-
Notifications
You must be signed in to change notification settings - Fork 879
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
Hide DDG newtab of tor window in qwant region(ger/fr) and qwant is set #657
Conversation
Otherwise, DDG newetab is used in tor window newtab.
Marked as WIP because after changing search provider and then reloading newtab doesn't reflect new search provider. But, when relaunch new search provider configuration is reflected in tor newtab. After preference is changed, valid isQwant is passed but newtab page doesn't refreshed with new value. I think this is different issue with this. |
I think this is ready to review! |
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.
lgtm
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.
This works great for Tor window, but private window is still showing DDG
browser/ui/webui/brave_new_tab_ui.cc
Outdated
TemplateURLPrepopulateData::PREPOPULATED_ENGINE_ID_QWANT; | ||
bool qwant_used = | ||
profile->GetPrefs()->GetInteger(kAlternativeSearchEngineProviderInTor) == | ||
TemplateURLPrepopulateData::PREPOPULATED_ENGINE_ID_QWANT; |
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.
qwant_used
only returns true for Tor tabs with this logic; this should return true also for incognito windows
…an Incognito window (already worked as expected in a Tor window) Auditors: @simonhong
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.
Had to make a modification, but this works great 😄 There is one open issue, which I captured in brave/brave-browser#1666. We can fix this at a later time (this PR is much better than the prior JavaScript check that was done). All tests pass 🎉
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.
👍
Hide DDG newtab of tor window in qwant region(ger/fr) and qwant is set
Hide DDG newtab of tor window in qwant region(ger/fr) and qwant is set
Hide DDG newtab of tor window in qwant region(ger/fr) and qwant is set
Hide DDG newtab of tor window in qwant region(ger/fr) if qwant is set to search provider.
Otherwise, DDG newetab is used in tor window newtab.
Close brave/brave-browser#1632
Submitter Checklist:
npm test brave_unit_tests && npm test brave_browser_tests
) ongit rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist: