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

Issue 2739173002: Always select best favicon bitmap (Closed)

Created:
3 years, 9 months ago by mastiz
Modified:
3 years, 8 months ago
Reviewers:
pkotwicz
CC:
chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Always select best favicon bitmap We do this by always sorting candidates by score, which should list the best-matching sizes first. This has two positive effects: 1. On mobile, selection of high-resolution bitmap doesn't choose the absolute largest, but the best fit. 2. On desktop, candidates are also sorted, so exact matches are more likely to be processed first and hence reducing the total number of downloaded images. BUG=704496 Review-Url: https://codereview.chromium.org/2739173002 Cr-Commit-Position: refs/heads/master@{#461096} Committed: https://chromium.googlesource.com/chromium/src/+/89f78d0440e218d828e11e891ad76e5f98a1f41b

Patch Set 1 #

Patch Set 2 : One more test. #

Patch Set 3 : Polishing. #

Patch Set 4 : Revisit TestFaviconWasScaledAfterDownload #

Total comments: 4

Patch Set 5 : Updated. #

Total comments: 4

Patch Set 6 : WIP. #

Total comments: 9

Patch Set 7 : Revert changes to not change behavior. #

Patch Set 8 : Finalize implementation. #

Patch Set 9 : Rebased. #

Total comments: 6

Patch Set 10 : Reverted FaviconSelector. #

Patch Set 11 : Minor changes. #

Total comments: 11

Patch Set 12 : Rebased. #

Total comments: 20

Patch Set 13 : More comments. #

Total comments: 15

Patch Set 14 : Addressed final comments. #

Patch Set 15 : Addressed final comments. #

Patch Set 16 : Return default value after NOTREACHED. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+187 lines, -250 lines) Patch
M components/favicon/core/favicon_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +38 lines, -29 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 12 chunks +120 lines, -184 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 5 chunks +26 lines, -37 lines 0 comments Download
M components/favicon_base/select_favicon_frames.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 48 (20 generated)
mastiz
Please take a high-level look! At this stage, it's most important for me to discuss ...
3 years, 9 months ago (2017-03-10 15:34:20 UTC) #4
pkotwicz
I think that the bucket part of the CL is the most relevant towards supporting ...
3 years, 9 months ago (2017-03-15 03:49:39 UTC) #6
mastiz
This is WIP: I followed your advice and went ahead with the multi-bucket support. This ...
3 years, 9 months ago (2017-03-15 16:34:33 UTC) #8
pkotwicz
Your CL looks mostly good https://codereview.chromium.org/2739173002/diff/60001/components/favicon/core/favicon_handler.cc File components/favicon/core/favicon_handler.cc (right): https://codereview.chromium.org/2739173002/diff/60001/components/favicon/core/favicon_handler.cc#newcode443 components/favicon/core/favicon_handler.cc:443: gfx::ImageSkia(gfx::ImageSkiaRep(bitmaps[index], 1)); FaviconService::SetFavicons() should ...
3 years, 9 months ago (2017-03-16 05:31:45 UTC) #9
mastiz
PTAL if you find time to see if this is going in the right direction, ...
3 years, 9 months ago (2017-03-16 16:48:38 UTC) #10
mastiz
Patch is ready for review overall although I'm planning to address some comments that are ...
3 years, 9 months ago (2017-03-17 17:13:09 UTC) #11
pkotwicz
https://codereview.chromium.org/2739173002/diff/160001/components/favicon/core/favicon_handler.cc File components/favicon/core/favicon_handler.cc (right): https://codereview.chromium.org/2739173002/diff/160001/components/favicon/core/favicon_handler.cc#newcode154 components/favicon/core/favicon_handler.cc:154: target_size_spec_(GetTargetSizeSpecs(handler_type).front()), Won't this regress the current behavior? https://codereview.chromium.org/2739173002/diff/160001/components/favicon/core/favicon_handler.cc#newcode392 components/favicon/core/favicon_handler.cc:392: ...
3 years, 9 months ago (2017-03-20 03:25:16 UTC) #12
mastiz
Thanks! Will update CL description to reflect current version. https://codereview.chromium.org/2739173002/diff/160001/components/favicon/core/favicon_handler.cc File components/favicon/core/favicon_handler.cc (right): https://codereview.chromium.org/2739173002/diff/160001/components/favicon/core/favicon_handler.cc#newcode154 components/favicon/core/favicon_handler.cc:154: ...
3 years, 9 months ago (2017-03-20 08:07:28 UTC) #13
mastiz
PTAL after I reverted FaviconSelector code, in line with our latest discussions to perhaps never ...
3 years, 9 months ago (2017-03-23 12:13:54 UTC) #20
pkotwicz
I think that storing the score in the candidates makes the code easier to read ...
3 years, 9 months ago (2017-03-23 20:43:26 UTC) #21
mastiz
PTAL. https://codereview.chromium.org/2739173002/diff/200001/components/favicon/core/favicon_handler.cc File components/favicon/core/favicon_handler.cc (right): https://codereview.chromium.org/2739173002/diff/200001/components/favicon/core/favicon_handler.cc#newcode146 components/favicon/core/favicon_handler.cc:146: } On 2017/03/23 20:43:25, pkotwicz wrote: > This ...
3 years, 9 months ago (2017-03-24 17:14:59 UTC) #22
pkotwicz
https://codereview.chromium.org/2739173002/diff/200001/components/favicon/core/favicon_handler.cc File components/favicon/core/favicon_handler.cc (right): https://codereview.chromium.org/2739173002/diff/200001/components/favicon/core/favicon_handler.cc#newcode146 components/favicon/core/favicon_handler.cc:146: } I don't see any changes?
3 years, 9 months ago (2017-03-26 01:39:53 UTC) #23
mastiz
Seems like I forgot to export the last version, PTAL. https://codereview.chromium.org/2739173002/diff/200001/components/favicon/core/favicon_handler.cc File components/favicon/core/favicon_handler.cc (right): https://codereview.chromium.org/2739173002/diff/200001/components/favicon/core/favicon_handler.cc#newcode146 ...
3 years, 9 months ago (2017-03-26 19:33:16 UTC) #24
pkotwicz
A few last comments https://codereview.chromium.org/2739173002/diff/220001/components/favicon/core/favicon_handler.cc File components/favicon/core/favicon_handler.cc (right): https://codereview.chromium.org/2739173002/diff/220001/components/favicon/core/favicon_handler.cc#newcode116 components/favicon/core/favicon_handler.cc:116: pixel_sizes.push_back(scale_factor * gfx::kFaviconSize); Nit: Round ...
3 years, 9 months ago (2017-03-27 00:49:06 UTC) #25
mastiz
Thanks, PTAL! https://codereview.chromium.org/2739173002/diff/220001/components/favicon/core/favicon_handler.cc File components/favicon/core/favicon_handler.cc (right): https://codereview.chromium.org/2739173002/diff/220001/components/favicon/core/favicon_handler.cc#newcode116 components/favicon/core/favicon_handler.cc:116: pixel_sizes.push_back(scale_factor * gfx::kFaviconSize); On 2017/03/27 00:49:06, pkotwicz ...
3 years, 9 months ago (2017-03-27 10:09:36 UTC) #26
pkotwicz
https://codereview.chromium.org/2739173002/diff/220001/components/favicon/core/favicon_handler.cc File components/favicon/core/favicon_handler.cc (right): https://codereview.chromium.org/2739173002/diff/220001/components/favicon/core/favicon_handler.cc#newcode140 components/favicon/core/favicon_handler.cc:140: /*best_indices=*/nullptr, &candidate.score); If you "assign 16x16 to sizes for ...
3 years, 8 months ago (2017-03-27 19:12:44 UTC) #27
mastiz
PTAL, thanks! https://codereview.chromium.org/2739173002/diff/220001/components/favicon/core/favicon_handler.cc File components/favicon/core/favicon_handler.cc (right): https://codereview.chromium.org/2739173002/diff/220001/components/favicon/core/favicon_handler.cc#newcode140 components/favicon/core/favicon_handler.cc:140: /*best_indices=*/nullptr, &candidate.score); On 2017/03/27 19:12:44, pkotwicz wrote: ...
3 years, 8 months ago (2017-03-28 09:09:30 UTC) #28
pkotwicz
LGTM https://codereview.chromium.org/2739173002/diff/240001/components/favicon/core/favicon_handler.cc File components/favicon/core/favicon_handler.cc (right): https://codereview.chromium.org/2739173002/diff/240001/components/favicon/core/favicon_handler.cc#newcode27 components/favicon/core/favicon_handler.cc:27: const int kNonTouchLargestIconSize = 192; Nit: New line ...
3 years, 8 months ago (2017-03-28 20:45:39 UTC) #29
mastiz
One clarification needed below, thanks! https://codereview.chromium.org/2739173002/diff/240001/components/favicon/core/favicon_handler.cc File components/favicon/core/favicon_handler.cc (right): https://codereview.chromium.org/2739173002/diff/240001/components/favicon/core/favicon_handler.cc#newcode27 components/favicon/core/favicon_handler.cc:27: const int kNonTouchLargestIconSize = ...
3 years, 8 months ago (2017-03-29 08:53:01 UTC) #30
mastiz
https://codereview.chromium.org/2739173002/diff/240001/components/favicon/core/favicon_handler_unittest.cc File components/favicon/core/favicon_handler_unittest.cc (right): https://codereview.chromium.org/2739173002/diff/240001/components/favicon/core/favicon_handler_unittest.cc#newcode914 components/favicon/core/favicon_handler_unittest.cc:914: // First is icon2, though its size larger than ...
3 years, 8 months ago (2017-03-30 14:23:25 UTC) #31
pkotwicz
https://codereview.chromium.org/2739173002/diff/240001/components/favicon/core/favicon_handler_unittest.cc File components/favicon/core/favicon_handler_unittest.cc (right): https://codereview.chromium.org/2739173002/diff/240001/components/favicon/core/favicon_handler_unittest.cc#newcode914 components/favicon/core/favicon_handler_unittest.cc:914: // First is icon2, though its size larger than ...
3 years, 8 months ago (2017-03-30 14:53:43 UTC) #32
mastiz
Thanks! Landing... https://codereview.chromium.org/2739173002/diff/240001/components/favicon/core/favicon_handler_unittest.cc File components/favicon/core/favicon_handler_unittest.cc (right): https://codereview.chromium.org/2739173002/diff/240001/components/favicon/core/favicon_handler_unittest.cc#newcode914 components/favicon/core/favicon_handler_unittest.cc:914: // First is icon2, though its size ...
3 years, 8 months ago (2017-03-31 07:10:58 UTC) #33
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/2739173002/280001
3 years, 8 months ago (2017-03-31 07:11:56 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/147939)
3 years, 8 months ago (2017-03-31 07:34:04 UTC) #38
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/2739173002/300001
3 years, 8 months ago (2017-03-31 08:01:10 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/184427)
3 years, 8 months ago (2017-03-31 08:24:01 UTC) #43
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/2739173002/300001
3 years, 8 months ago (2017-03-31 11:23:01 UTC) #45
commit-bot: I haz the power
3 years, 8 months ago (2017-03-31 11:49:57 UTC) #48
Message was sent while issue was closed.
Committed patchset #16 (id:300001) as
https://chromium.googlesource.com/chromium/src/+/89f78d0440e218d828e11e891ad7...

Powered by Google App Engine
This is Rietveld 408576698