Skip to content
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

Consider Qwant search provider as a initial provider in tor window #647

Merged
merged 1 commit into from
Oct 16, 2018

Conversation

simonhong
Copy link
Member

@simonhong simonhong commented Oct 16, 2018

If Qwant is default prepopulate search provider, use it as an
initial search engine provider of tor window. Otherwise, DDG is used.
When user changes search provider setting, it will be persisted.

Fixes brave/brave-browser#1514

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Verified that these changes build without errors on
    • Windows
    • macOS
    • Linux
  • Verified that these changes pass automated tests (npm test brave_unit_tests && npm test brave_browser_tests) on
    • Windows
    • macOS
    • Linux
  • Ran git rebase master (if needed).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.
  • Request a security/privacy review as needed.
  • Add appropriate QA labels (QA/Yes or QA/No) to include the closed issue in milestone

Test Plan:

  1. Set Region as non German/France
  2. Start Browser with clean profile
  3. Launch Tor window and check search provider is DDG
  4. Close Browser
  5. Set Region as German or France
  6. Start Browser with clean profile
  7. Launch Tor window and check search provider is Qwant.

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

If Qwant is default prepopulate search provider, use it as an
initial search engine provider of tor window. Otherwise, DDG is used.
When user changes search provider setting, it will be persisted.
@simonhong simonhong force-pushed the qwant_search_provider branch from 74bbf03 to cd8ede4 Compare October 16, 2018 11:31
@@ -18,14 +19,13 @@ TorWindowSearchEngineProviderController(Profile* profile)

alternative_search_engine_provider_in_tor_.Init(
kAlternativeSearchEngineProviderInTor,
otr_profile_->GetOriginalProfile()->GetPrefs());
profile->GetOriginalProfile()->GetPrefs());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you explain why GetOriginalProfile from regular profile? That will just return itself

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

|profile| is off the record profile.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. I just checked the caller.

@mkarolin
Copy link
Collaborator

Tried it:

  • With locale set to FR, switched the regular default search engine from Qwant to Bing. Opened Tor window, the search engine was Qwant.
  • With locale set to US, regular search engine was set to Google, Tor window search engine was DDG.
    Seems to work as expected. 👍

@simonhong
Copy link
Member Author

Thanks for test and review! @mkarolin @darkdh

@riastradh-brave
Copy link
Contributor

So does this fix #647?

@darkdh
Copy link
Member

darkdh commented Oct 16, 2018

@riastradh-brave I think you meant brave/brave-browser#1607

@riastradh-brave
Copy link
Contributor

@darkdh oops, yes, I did mean brave/brave-browser#1607.

@bsclifton
Copy link
Member

@riastradh-brave no- that is fixed with #654 I believe

@simonhong simonhong merged commit 46f9e46 into master Oct 16, 2018
darkdh pushed a commit that referenced this pull request Oct 17, 2018
Consider Qwant search provider as a initial provider in tor window
darkdh pushed a commit that referenced this pull request Oct 17, 2018
Consider Qwant search provider as a initial provider in tor window
darkdh pushed a commit that referenced this pull request Oct 17, 2018
Consider Qwant search provider as a initial provider in tor window
@darkdh
Copy link
Member

darkdh commented Oct 17, 2018

master: 46f9e46
0.55.x: 0ec80b2
0.56.x: 5b72784
0.57.x: 09cd532

@bsclifton bsclifton deleted the qwant_search_provider branch October 17, 2018 00:11
@bbondy bbondy added this to the 0.55.x - Release milestone Jan 14, 2019
@bbondy bbondy removed the 0.55.x label Jan 14, 2019
fmarier pushed a commit that referenced this pull request Oct 29, 2019
Mark all strings for l10n
petemill pushed a commit that referenced this pull request Jul 27, 2020
Mark all strings for l10n
petemill pushed a commit that referenced this pull request Jul 28, 2020
Mark all strings for l10n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

set Qwant as the default for Tor Windows (German & France)
6 participants