Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Load search favicons locally in about:preferences #12698

Merged
merged 1 commit into from
Jan 18, 2018

Conversation

diracdeltas
Copy link
Member

@diracdeltas diracdeltas commented Jan 17, 2018

fix #12689
fix #11108
partial fix for #12632

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).
  • 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. (Ask a Brave employee to help if you cannot access this document.)

Test Plan:

  1. go to about:preferences and open the 'network requests' tab in devtools
  2. click on the search preferences tab. you should not see any network requests to remote sites.
  3. all the search favicons should load correctly

Reviewer Checklist:

  • Request a security/privacy review as needed if one was not already requested.

Tests

  • Adequate test coverage exists to prevent regressions
  • Tests should be independent and work correctly when run individually or as a suite ref
  • New files have MPL2 license header

fix #12689
fix #11108

Test Plan:
1. go to about:preferences and open the 'network requests' tab in devtools
2. click on the search preferences tab. you should not see any network requests to remote sites.
3. all the search favicons should load correctly
@tildelowengrimm
Copy link

This looks like the exact MVP for #12689. 👌

Is the ico/png variation just because that's what these sites are serving today? I'm r+, but I haven't checked that the ico files are correct (or that any of the images aren't malicious blobs).

I think that there are two bigger blocks of subsequent work to polish this feature. One is safely automating our inclusion of updated favicons when sites occasionally change them — so we don't need to watch for changes or update the codebase every time. The other one is updating the favicons based on user browsing, but that seems like a fair bit more work because we'd want to depend on a favicon cache. I'll open other issues for those.

@codecov-io
Copy link

codecov-io commented Jan 18, 2018

Codecov Report

Merging #12698 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master   #12698      +/-   ##
==========================================
+ Coverage   56.18%   56.19%   +<.01%     
==========================================
  Files         278      278              
  Lines       27121    27127       +6     
  Branches     4395     4396       +1     
==========================================
+ Hits        15239    15245       +6     
  Misses      11882    11882
Flag Coverage Δ
#unittest 56.19% <100%> (ø) ⬆️
Impacted Files Coverage Δ
js/data/searchProviders.js 100% <100%> (ø) ⬆️
js/about/preferences.js 45.73% <100%> (ø) ⬆️

@diracdeltas
Copy link
Member Author

Is the ico/png variation just because that's what these sites are serving today? I'm r+, but I haven't checked that the ico files are correct (or that any of the images aren't malicious blobs).

Yup! I just ran wget on the URL in the image property (which were all HTTPS) in order to get the localImage file.

@diracdeltas diracdeltas added this to the 0.20.x (Beta Channel) milestone Jan 18, 2018
@diracdeltas diracdeltas merged commit 574e319 into master Jan 18, 2018
diracdeltas added a commit that referenced this pull request Jan 18, 2018
Load search favicons locally in about:preferences
diracdeltas added a commit that referenced this pull request Jan 18, 2018
Load search favicons locally in about:preferences
@diracdeltas
Copy link
Member Author

master: 574e319
0.21.x: 2f9a6ca
0.20.x: 54ad151

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ship hard-coded search engine favicons visiting about:preferences#search should not set cookies
3 participants