Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Issue 2799273002: Add support to process favicons from Web Manifests (Closed)

Created:
3 years, 8 months ago by mastiz
Modified:
3 years, 7 months ago
Reviewers:
pkotwicz
CC:
chromium-reviews, jam, ios-reviews+web_chromium.org, darin-cc_chromium.org, Eugene But (OOO till 7-30), ios-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add support to process favicons from Web Manifests With two main goals: - Treat Web Manifest icons similarly to icons inlined in the HTML head. - Avoid downloading manifests repeatedly for the trivial cases. We achieve the second by reusing the favicon cache itself, and using the manifest URL as a key in the tables. This is a bit hacky, but avoids adding considerable complexity to the History Backend and APIs. The new logic is behind a feature toggle and is disabled by default. BUG=690383 Review-Url: https://codereview.chromium.org/2799273002 Cr-Commit-Position: refs/heads/master@{#472786} Committed: https://chromium.googlesource.com/chromium/src/+/f5a564cc28633d8f086f057c1cf7fd58222fb2d4

Patch Set 1 #

Total comments: 7

Patch Set 2 : Adopt icon URL. #

Total comments: 19

Patch Set 3 : Handle manifests without icons. #

Patch Set 4 : Handle manifests without icons. #

Patch Set 5 : Added comment. #

Total comments: 32

Patch Set 6 : Addressed comments, improved tests. #

Total comments: 8

Patch Set 7 : Fix Javascript changes in flight. #

Patch Set 8 : Add hacks for demoing (DONOTSUBMIT) #

Total comments: 31

Patch Set 9 : Addressed comments. #

Patch Set 10 : Rebased. #

Patch Set 11 : Rebased. #

Patch Set 12 : Avoid hacks for demo purposes. #

Patch Set 13 : Addressed comments. #

Total comments: 7

Patch Set 14 : Reverted smart handling of HTTP status code. #

Patch Set 15 : Reverted fieldtrial_testing_config.json #

Total comments: 50

Patch Set 16 : Addressed comments. #

Patch Set 17 : Addressed comments (most notably, three bugs). #

Patch Set 18 : Added missing include. #

Patch Set 19 : Rebased. #

Total comments: 37

Patch Set 20 : Addressed comments. #

Total comments: 2

Patch Set 21 : Updated comment. #

Patch Set 22 : Avoid unnecessary processing of icons. #

Total comments: 14

Patch Set 23 : Browsertest comments addressed. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1046 lines, -128 lines) Patch
M chrome/browser/favicon/content_favicon_driver_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 6 chunks +105 lines, -27 lines 0 comments Download
A chrome/test/data/favicon/manifest.json View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
A chrome/test/data/favicon/manifest_without_icons.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +3 lines, -0 lines 0 comments Download
A chrome/test/data/favicon/page_with_manifest.html View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
A chrome/test/data/favicon/page_with_manifest_without_icons.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +6 lines, -0 lines 0 comments Download
M components/favicon/content/content_favicon_driver.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +12 lines, -3 lines 0 comments Download
M components/favicon/content/content_favicon_driver.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 5 chunks +47 lines, -3 lines 0 comments Download
M components/favicon/core/favicon_driver_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -1 line 0 comments Download
M components/favicon/core/favicon_driver_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +11 lines, -4 lines 0 comments Download
M components/favicon/core/favicon_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 9 chunks +55 lines, -9 lines 0 comments Download
M components/favicon/core/favicon_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 9 chunks +152 lines, -38 lines 0 comments Download
M components/favicon/core/favicon_handler_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 20 chunks +635 lines, -42 lines 0 comments Download
M components/favicon/ios/web_favicon_driver.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M components/favicon/ios/web_favicon_driver.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +7 lines, -1 line 0 comments Download

Messages

Total messages: 74 (31 generated)
mastiz
Peter, could you take a preliminary look? Please avoid the temptation of nits, it's WIP. ...
3 years, 8 months ago (2017-04-06 15:22:30 UTC) #2
pkotwicz
I'll take a look at this tomorrow morning. Yes, I expect that adding support for ...
3 years, 8 months ago (2017-04-07 03:33:04 UTC) #3
pkotwicz
Sorry about the delay in the code review https://codereview.chromium.org/2799273002/diff/1/components/favicon/core/favicon_handler.cc File components/favicon/core/favicon_handler.cc (right): https://codereview.chromium.org/2799273002/diff/1/components/favicon/core/favicon_handler.cc#newcode256 components/favicon/core/favicon_handler.cc:256: service_->SetFavicons(*manifest_url_, ...
3 years, 8 months ago (2017-04-07 14:13:04 UTC) #4
mastiz
PTAL. Still WIP, but now icon-URL was adopted. https://codereview.chromium.org/2799273002/diff/1/components/favicon/core/favicon_handler.cc File components/favicon/core/favicon_handler.cc (right): https://codereview.chromium.org/2799273002/diff/1/components/favicon/core/favicon_handler.cc#newcode256 components/favicon/core/favicon_handler.cc:256: service_->SetFavicons(*manifest_url_, ...
3 years, 8 months ago (2017-04-10 15:34:12 UTC) #5
pkotwicz
https://codereview.chromium.org/2799273002/diff/1/components/favicon/core/favicon_handler.cc File components/favicon/core/favicon_handler.cc (right): https://codereview.chromium.org/2799273002/diff/1/components/favicon/core/favicon_handler.cc#newcode365 components/favicon/core/favicon_handler.cc:365: current_candidate()->icon_url == notification_icon_url_ && Looks like I was wrong. ...
3 years, 8 months ago (2017-04-11 03:47:07 UTC) #6
mastiz
Thanks peter! PTAL. In this round, the most valuable feedback would be: 1. Caching of ...
3 years, 8 months ago (2017-04-11 13:31:02 UTC) #7
pkotwicz
I'll take a look at your CL tomorrow morning. Sorry for the delay
3 years, 8 months ago (2017-04-12 04:36:43 UTC) #8
pkotwicz
Your CL looks mostly good :) Your test coverage looks ok. I have one suggestion ...
3 years, 8 months ago (2017-04-12 22:10:07 UTC) #9
mastiz
PTAL, low prio. https://codereview.chromium.org/2799273002/diff/20001/components/favicon/core/favicon_handler.cc File components/favicon/core/favicon_handler.cc (right): https://codereview.chromium.org/2799273002/diff/20001/components/favicon/core/favicon_handler.cc#newcode314 components/favicon/core/favicon_handler.cc:314: if (redownload_icons_) { On 2017/04/12 22:10:06, ...
3 years, 8 months ago (2017-04-20 18:06:33 UTC) #10
pkotwicz
On 2017/04/20 18:06:33, mastiz wrote: > PTAL, low prio. > > https://codereview.chromium.org/2799273002/diff/20001/components/favicon/core/favicon_handler.cc > File components/favicon/core/favicon_handler.cc ...
3 years, 8 months ago (2017-04-21 04:16:08 UTC) #11
pkotwicz
I'll take a look tomorrow
3 years, 8 months ago (2017-04-21 04:16:37 UTC) #12
pkotwicz
Sorry for the delay. I will look tomorrow
3 years, 8 months ago (2017-04-24 04:26:49 UTC) #13
pkotwicz
Sorry again for the delay https://codereview.chromium.org/2799273002/diff/20001/components/favicon/core/favicon_handler.cc File components/favicon/core/favicon_handler.cc (right): https://codereview.chromium.org/2799273002/diff/20001/components/favicon/core/favicon_handler.cc#newcode473 components/favicon/core/favicon_handler.cc:473: best_favicon_.candidate.icon_type); It looks like ...
3 years, 8 months ago (2017-04-24 14:42:15 UTC) #14
mastiz
Thanks! PTAL, again low-prio. https://codereview.chromium.org/2799273002/diff/20001/components/favicon/core/favicon_handler.cc File components/favicon/core/favicon_handler.cc (right): https://codereview.chromium.org/2799273002/diff/20001/components/favicon/core/favicon_handler.cc#newcode473 components/favicon/core/favicon_handler.cc:473: best_favicon_.candidate.icon_type); On 2017/04/24 14:42:14, pkotwicz ...
3 years, 7 months ago (2017-04-27 13:54:50 UTC) #15
pkotwicz
I'll take a look at your CL tomorrow :)
3 years, 7 months ago (2017-04-28 00:35:39 UTC) #16
pkotwicz
Your CL looks pretty good now :) (Including the tests) https://codereview.chromium.org/2799273002/diff/20001/components/favicon/core/favicon_handler.cc File components/favicon/core/favicon_handler.cc (right): https://codereview.chromium.org/2799273002/diff/20001/components/favicon/core/favicon_handler.cc#newcode473 ...
3 years, 7 months ago (2017-05-01 04:56:54 UTC) #17
mastiz
PTAL! There's a few open questions left, otherwise the review seems quite mature. As you ...
3 years, 7 months ago (2017-05-04 10:57:53 UTC) #18
pkotwicz
I agree that this CL is pretty mature https://codereview.chromium.org/2799273002/diff/80001/components/favicon/core/favicon_handler.cc File components/favicon/core/favicon_handler.cc (right): https://codereview.chromium.org/2799273002/diff/80001/components/favicon/core/favicon_handler.cc#newcode379 components/favicon/core/favicon_handler.cc:379: if ...
3 years, 7 months ago (2017-05-04 17:28:25 UTC) #19
mastiz
PTAL! I believe this is the actual first version that could potentially land, except for ...
3 years, 7 months ago (2017-05-10 10:03:52 UTC) #25
pkotwicz
I'll look at this CL some more tomorrow morning https://codereview.chromium.org/2799273002/diff/240001/components/favicon/content/content_favicon_driver.h File components/favicon/content/content_favicon_driver.h (right): https://codereview.chromium.org/2799273002/diff/240001/components/favicon/content/content_favicon_driver.h#newcode87 components/favicon/content/content_favicon_driver.h:87: ...
3 years, 7 months ago (2017-05-11 06:12:57 UTC) #26
mastiz
Peter: it'd be great to target this BP (tomorrow, Friday) for this feature, now that ...
3 years, 7 months ago (2017-05-11 08:45:19 UTC) #27
pkotwicz
https://codereview.chromium.org/2799273002/diff/80001/components/favicon/core/favicon_handler.cc File components/favicon/core/favicon_handler.cc (right): https://codereview.chromium.org/2799273002/diff/80001/components/favicon/core/favicon_handler.cc#newcode379 components/favicon/core/favicon_handler.cc:379: if (service_ && (status_code == 404 || status_code == ...
3 years, 7 months ago (2017-05-12 06:13:29 UTC) #28
pkotwicz
I think I found another bug :( (Sorry for not spotting it in a previous ...
3 years, 7 months ago (2017-05-12 07:20:26 UTC) #29
mastiz
Thanks, PTAL! Unfortunately a power outage slowed me down and didn't have the chance to ...
3 years, 7 months ago (2017-05-12 13:31:33 UTC) #30
pkotwicz
I think that the third bug that I found affects https://www.twitter.com/manifest.json hence I am against ...
3 years, 7 months ago (2017-05-12 15:37:42 UTC) #31
mastiz
PTAL, thanks! https://codereview.chromium.org/2799273002/diff/80001/components/favicon/core/favicon_handler.cc File components/favicon/core/favicon_handler.cc (right): https://codereview.chromium.org/2799273002/diff/80001/components/favicon/core/favicon_handler.cc#newcode379 components/favicon/core/favicon_handler.cc:379: if (service_ && (status_code == 404 || ...
3 years, 7 months ago (2017-05-15 14:07:00 UTC) #32
pkotwicz
I will look at your CL tonight
3 years, 7 months ago (2017-05-15 14:16:38 UTC) #35
pkotwicz
https://codereview.chromium.org/2799273002/diff/80001/components/favicon/core/favicon_handler.cc File components/favicon/core/favicon_handler.cc (right): https://codereview.chromium.org/2799273002/diff/80001/components/favicon/core/favicon_handler.cc#newcode379 components/favicon/core/favicon_handler.cc:379: if (service_ && (status_code == 404 || status_code == ...
3 years, 7 months ago (2017-05-16 06:36:37 UTC) #46
mastiz
PTAL, thanks! https://codereview.chromium.org/2799273002/diff/280001/components/favicon/core/favicon_handler.cc File components/favicon/core/favicon_handler.cc (right): https://codereview.chromium.org/2799273002/diff/280001/components/favicon/core/favicon_handler.cc#newcode354 components/favicon/core/favicon_handler.cc:354: base::Bind(&FaviconHandler::OnFaviconDataForManifestFromFaviconService, On 2017/05/16 06:36:35, pkotwicz wrote: > ...
3 years, 7 months ago (2017-05-16 11:05:24 UTC) #49
pkotwicz
https://codereview.chromium.org/2799273002/diff/380001/components/favicon/core/favicon_handler_unittest.cc File components/favicon/core/favicon_handler_unittest.cc (right): https://codereview.chromium.org/2799273002/diff/380001/components/favicon/core/favicon_handler_unittest.cc#newcode1887 components/favicon/core/favicon_handler_unittest.cc:1887: // Test that SetFavicons() is not called when: Nit: ...
3 years, 7 months ago (2017-05-16 15:17:15 UTC) #52
mastiz
https://codereview.chromium.org/2799273002/diff/380001/components/favicon/core/favicon_handler_unittest.cc File components/favicon/core/favicon_handler_unittest.cc (right): https://codereview.chromium.org/2799273002/diff/380001/components/favicon/core/favicon_handler_unittest.cc#newcode1887 components/favicon/core/favicon_handler_unittest.cc:1887: // Test that SetFavicons() is not called when: On ...
3 years, 7 months ago (2017-05-16 16:32:58 UTC) #53
mastiz
https://codereview.chromium.org/2799273002/diff/280001/components/favicon/core/favicon_handler.cc File components/favicon/core/favicon_handler.cc (right): https://codereview.chromium.org/2799273002/diff/280001/components/favicon/core/favicon_handler.cc#newcode354 components/favicon/core/favicon_handler.cc:354: base::Bind(&FaviconHandler::OnFaviconDataForManifestFromFaviconService, On 2017/05/16 11:05:22, mastiz wrote: > On 2017/05/16 ...
3 years, 7 months ago (2017-05-16 17:53:45 UTC) #54
pkotwicz
Just comments for the browser test https://codereview.chromium.org/2799273002/diff/420001/chrome/browser/favicon/content_favicon_driver_browsertest.cc File chrome/browser/favicon/content_favicon_driver_browsertest.cc (right): https://codereview.chromium.org/2799273002/diff/420001/chrome/browser/favicon/content_favicon_driver_browsertest.cc#newcode138 chrome/browser/favicon/content_favicon_driver_browsertest.cc:138: // FaviconHandler. I ...
3 years, 7 months ago (2017-05-17 05:20:34 UTC) #55
mastiz
Thanks, PTAL. https://codereview.chromium.org/2799273002/diff/420001/chrome/browser/favicon/content_favicon_driver_browsertest.cc File chrome/browser/favicon/content_favicon_driver_browsertest.cc (right): https://codereview.chromium.org/2799273002/diff/420001/chrome/browser/favicon/content_favicon_driver_browsertest.cc#newcode138 chrome/browser/favicon/content_favicon_driver_browsertest.cc:138: // FaviconHandler. On 2017/05/17 05:20:34, pkotwicz wrote: ...
3 years, 7 months ago (2017-05-17 05:53:03 UTC) #56
pkotwicz
LGTM! Thank you for bearing with me!
3 years, 7 months ago (2017-05-17 14:39:45 UTC) #57
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2799273002/440001
3 years, 7 months ago (2017-05-17 20:36:11 UTC) #59
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/447616)
3 years, 7 months ago (2017-05-17 21:02:55 UTC) #61
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2799273002/440001
3 years, 7 months ago (2017-05-18 07:07:05 UTC) #63
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/430284)
3 years, 7 months ago (2017-05-18 09:38:46 UTC) #65
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2799273002/440001
3 years, 7 months ago (2017-05-18 09:54:14 UTC) #67
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/430419)
3 years, 7 months ago (2017-05-18 12:10:24 UTC) #69
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2799273002/440001
3 years, 7 months ago (2017-05-18 12:15:28 UTC) #71
commit-bot: I haz the power
3 years, 7 months ago (2017-05-18 13:15:39 UTC) #74
Message was sent while issue was closed.
Committed patchset #23 (id:440001) as
https://chromium.googlesource.com/chromium/src/+/f5a564cc28633d8f086f057c1cf7...

Powered by Google App Engine
This is Rietveld 408576698