-
Notifications
You must be signed in to change notification settings - Fork 892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't add brave url to history #1821
Conversation
#include "url/gurl.h" | ||
|
||
TEST(HistoryUtilsTest, BraveUISchemeTest) { | ||
EXPECT_FALSE(CanAddURLToHistory(GURL("brave://sync/"))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add some urls that should be added to history? Want to make sure that someone doesn't accidentally break this to return false
for everything
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also some urls that should not be added based on the ChromiumImpl method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't need to to check many urls because CanAddURLToHistory()
just checks scheme.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see what you mean. will add more urls
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
#undef CanAddURLToHistory | ||
|
||
bool CanAddURLToHistory(const GURL& url) { | ||
if (!url.is_valid()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we actually need this? Can we just let CanAddURLToHistory_ChromiumImpl
handle anything like that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
924b728
to
e2c8054
Compare
Added test for this change: HistoryUtilsTest.VariousURLTest
e2c8054
to
3721c79
Compare
Fix brave/brave-browser#3493
Submitter Checklist:
npm test brave_unit_tests && npm test brave_browser_tests
) onnpm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
yarn test brave_unit_tests --filter=HistoryUtilsTest.*
Reviewer Checklist: