-
Notifications
You must be signed in to change notification settings - Fork 888
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
Make user change search engine provider in tor window #635
Conversation
Initially, DDG is set to search engine provider. When user changes in settings, that change will be persisted.
if (profile->GetProfileType() == Profile::INCOGNITO_PROFILE) { | ||
new PrivateWindowSearchEngineProviderController(profile); | ||
return; | ||
} | ||
|
||
if (profile->IsTorProfile() && | ||
profile->GetProfileType() == Profile::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.
What's the significance of checking for GUEST_PROFILE here? Is checking for IsTorProfile not sufficient?
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.
yep, this is redundant unless you want to remind people tor profile is also a gust profile but that can be done in a comment. So it is better to remove this check.
IsTorProfile traits is established upon profile creation.
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 is mandatory checking if we want to use off the record profile of tor window.
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.
If it is tor profile, it is already a off the record profile just like guest profile. And for now this is the only way we use tor 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.
When I open tor window, I can see two profiles are created.
Both are IsTorProfile() is true but with different profile type.(one is REGULAR and the other is GUEST). I think GUEST (off the record) is created from regular one.
That causes this runs twice and I need to use guest one.
I'm using NOTIFICATION_PROFILE_CREATED
to get here in ProfileCreationMonitor
.
Tested on Windows and was able to change the search engine in Tor window's Settings to different engines. Consequent searches use the selected engine. The engine selection is preserved after the browser is restarted. The search engine selection setting in the Tor window is independent from the regular profile search engine selection and the guest window search engine selection. |
Make user change search engine provider in tor window
Make user change search engine provider in tor window
Modify build settings to allow sccache support on Windows
Initially, DDG is set to search engine provider.
When user changes in settings, that change will be persisted.
Fixes brave/brave-browser#1513
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: