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

Issue 2662103002: Refactor ManifestIconSelector and update it for Manifest.icon.purpose (Closed)

Created:
3 years, 10 months ago by F
Modified:
3 years, 10 months ago
Reviewers:
dominickn, pkotwicz, gone
CC:
chromium-reviews, dominickn+watch_chromium.org, pkotwicz+watch_chromium.org, zpeng+watch_chromium.org, agrieve+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor ManifestIconSelector and update it for Manifest.icon.purpose This CL refactors ManifestIconSelector: 1. Removes the extra copy of icons introduced in FilterIconsByType; 2. Combines the iteration for finding the ideal icon and the iteration for finding the icon closest to ideal icon into one iteration; 3. Changes out-dated name "preferred icon" to current "ideal icon"; 4. Removes non-static class members and functions. This CL also updates ManifestIconSelector to allow users to pass desired icon purpose as a parameter to FindBestMatchingIcon. BUG=649771 Review-Url: https://codereview.chromium.org/2662103002 Cr-Commit-Position: refs/heads/master@{#447595} Committed: https://chromium.googlesource.com/chromium/src/+/19e2302e5d56e1aaa20a1ac7ee3a863a013ed60c

Patch Set 1 : InstallableManager not updated #

Total comments: 4

Patch Set 2 : Addressing comments #

Total comments: 14

Patch Set 3 : Addressing comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+284 lines, -286 lines) Patch
M chrome/browser/android/banners/app_banner_manager_android.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/installable/installable_manager.cc View 1 2 2 chunks +2 lines, -11 lines 0 comments Download
M chrome/browser/manifest/manifest_icon_selector.h View 1 chunk +10 lines, -46 lines 0 comments Download
M chrome/browser/manifest/manifest_icon_selector.cc View 1 2 1 chunk +52 lines, -114 lines 0 comments Download
M chrome/browser/manifest/manifest_icon_selector_unittest.cc View 1 17 chunks +216 lines, -113 lines 0 comments Download

Messages

Total messages: 26 (16 generated)
F
Hi Dominick, PTAL. Thanks! I ended up with only one static function. I'm not sure ...
3 years, 10 months ago (2017-01-30 23:00:30 UTC) #3
dominickn
Thanks for doing this so quickly! https://codereview.chromium.org/2662103002/diff/1/chrome/browser/manifest/manifest_icon_selector.cc File chrome/browser/manifest/manifest_icon_selector.cc (right): https://codereview.chromium.org/2662103002/diff/1/chrome/browser/manifest/manifest_icon_selector.cc#newcode24 chrome/browser/manifest/manifest_icon_selector.cc:24: for (size_t i ...
3 years, 10 months ago (2017-01-31 01:52:18 UTC) #4
F
Thanks Dominick, PTAL! Hi Dan, PTAL. Thanks! https://codereview.chromium.org/2662103002/diff/1/chrome/browser/manifest/manifest_icon_selector.cc File chrome/browser/manifest/manifest_icon_selector.cc (right): https://codereview.chromium.org/2662103002/diff/1/chrome/browser/manifest/manifest_icon_selector.cc#newcode24 chrome/browser/manifest/manifest_icon_selector.cc:24: for (size_t ...
3 years, 10 months ago (2017-01-31 16:52:59 UTC) #7
F
Hi Dan, PTAL. Thanks! (Oops, didn't actually add reviewer last email. Sorry for extra email.)
3 years, 10 months ago (2017-01-31 16:55:43 UTC) #9
dominickn
lgtm with a nit https://codereview.chromium.org/2662103002/diff/20001/chrome/browser/installable/installable_manager.cc File chrome/browser/installable/installable_manager.cc (right): https://codereview.chromium.org/2662103002/diff/20001/chrome/browser/installable/installable_manager.cc#newcode7 chrome/browser/installable/installable_manager.cc:7: #include <algorithm> This is unused ...
3 years, 10 months ago (2017-01-31 18:13:03 UTC) #12
pkotwicz
LGTM https://codereview.chromium.org/2662103002/diff/20001/chrome/browser/manifest/manifest_icon_selector.cc File chrome/browser/manifest/manifest_icon_selector.cc (left): https://codereview.chromium.org/2662103002/diff/20001/chrome/browser/manifest/manifest_icon_selector.cc#oldcode133 chrome/browser/manifest/manifest_icon_selector.cc:133: DCHECK(minimum_icon_size_in_px <= ideal_icon_size_in_px); Shouldn't we keep this DCHECK? ...
3 years, 10 months ago (2017-01-31 18:24:53 UTC) #14
F
Thanks Dominick & Peter, PTAL! https://codereview.chromium.org/2662103002/diff/20001/chrome/browser/installable/installable_manager.cc File chrome/browser/installable/installable_manager.cc (right): https://codereview.chromium.org/2662103002/diff/20001/chrome/browser/installable/installable_manager.cc#newcode7 chrome/browser/installable/installable_manager.cc:7: #include <algorithm> On 2017/01/31 ...
3 years, 10 months ago (2017-01-31 18:42:50 UTC) #16
gone
lgtm
3 years, 10 months ago (2017-02-01 18:31:30 UTC) #20
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/2662103002/40001
3 years, 10 months ago (2017-02-01 19:01:26 UTC) #23
commit-bot: I haz the power
3 years, 10 months ago (2017-02-01 20:23:06 UTC) #26
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/19e2302e5d56e1aaa20a1ac7ee3a...

Powered by Google App Engine
This is Rietveld 408576698