-
Notifications
You must be signed in to change notification settings - Fork 862
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
Set proper DDG config as a default alternate SE except QWANT region in Tor #9486
Conversation
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.
++
9997b21
to
ce32e1e
Compare
ce32e1e
to
26650e5
Compare
@@ -39,25 +39,9 @@ SearchEngineProviderService::SearchEngineProviderService( | |||
base::BindRepeating(&SearchEngineProviderService::OnPreferenceChanged, | |||
base::Unretained(this))); | |||
|
|||
std::vector<TemplateURLPrepopulateData::BravePrepopulatedEngineID> |
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.
@bsclifton Should I leave this logic as-is? this alternative url is used for private/guest profile.
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 this is OK 😄 Like you shared, this is only used in Tor window and then private window when "use DDG" flag is enabled
@@ -54,26 +55,14 @@ void TorWindowSearchEngineProviderService::OnTemplateURLServiceChanged() { | |||
std::unique_ptr<TemplateURLData> | |||
TorWindowSearchEngineProviderService::GetInitialSearchEngineProvider( | |||
PrefService* prefs) const { | |||
std::unique_ptr<TemplateURLData> provider_data; | |||
|
|||
int initial_id = TemplateURLPrepopulateData::GetPrepopulatedDefaultSearch( |
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.
Instead of using TemplateURLPrepopulateData::duckduckgo
for all regions,
how about using this logic(https://github.com/brave/brave-core/pull/9486/files#diff-303c4f4e4e368bfb2681efc54ff35e1412d362740939fc50c7f93b9b92bcca2cL42) for private and tor profile both?
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.
We already talked on Slack- but just documenting that we can use regular DDG link for Tor window 👍
26650e5
to
6c911cf
Compare
6c911cf
to
6316fc6
Compare
Maybe we could add a browser test to reproduce the crash? |
@iefremov hmm, fortunately, can't add crash test because we'll always use proper non-null data. :) |
6316fc6
to
9e0cf5f
Compare
…n tor As we changed some regions(AU, NZ, IE, DE)'s DSE to google, orignally used DDG variants(ex, DDG_DE) was set to initial_id. However, Those regions's default list doesn't have previously used DDG variants. So, |provider_data| could be nullptr. Set DDG always for non QWANT region. fix brave/brave-browser#16950
9e0cf5f
to
92e7ff4
Compare
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.
Thanks for digging in and confirming the root cause 😄
Set proper DDG config as a default alternate SE except QWANT region in Tor
Verified
Steps:
Verification PASSED on
Reproduced the original issue using
|
fix brave/brave-browser#16950
Resolves
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
,npm run lint
,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: