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

Issue 1354903003: manifest: allow the icon downloader to choose non-square icons (Closed)

Created:
5 years, 3 months ago by Lalit Maganti
Modified:
5 years, 3 months ago
CC:
chromium-reviews, dominickn
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

manifest: allow the icon downloader to choose non-square icons If the icon selector has allowed a non-square icon through (because of any being the provided size in the manifest) then the downloader should not prevent the icon from be chosen as long as both dimensions are greater than the minimum size. Change this so that non-square icons are allowed as a fallback option if no square icon was found. The most squarish one which meets the minimum size criteria is picked. BUG=533184 Committed: https://crrev.com/79d995190f907a28b0e654c4f4a980b8add47540 Cr-Commit-Position: refs/heads/master@{#350523}

Patch Set 1 #

Patch Set 2 : Rebase on latest #

Total comments: 4

Patch Set 3 : Switch to using ratios #

Total comments: 2

Patch Set 4 : Cleanup and fix unit tests #

Patch Set 5 : Fix compile #

Total comments: 2

Patch Set 6 : Add check for width being greater than ideal #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -5 lines) Patch
M chrome/browser/manifest/manifest_icon_downloader.cc View 1 2 3 4 5 2 chunks +25 lines, -1 line 0 comments Download
M chrome/browser/manifest/manifest_icon_downloader_unittest.cc View 1 2 3 1 chunk +21 lines, -4 lines 0 comments Download

Messages

Total messages: 17 (4 generated)
Lalit Maganti
Dan: PTAL. Mounir is out until Tuesday so he won't be able to review until ...
5 years, 3 months ago (2015-09-18 10:09:29 UTC) #2
mlamouri (slow - plz ping)
https://codereview.chromium.org/1354903003/diff/20001/chrome/browser/manifest/manifest_icon_downloader.cc File chrome/browser/manifest/manifest_icon_downloader.cc (right): https://codereview.chromium.org/1354903003/diff/20001/chrome/browser/manifest/manifest_icon_downloader.cc#newcode135 chrome/browser/manifest/manifest_icon_downloader.cc:135: // size. Very quick comment: maybe you could use ...
5 years, 3 months ago (2015-09-18 13:41:59 UTC) #4
Lalit Maganti
https://codereview.chromium.org/1354903003/diff/20001/chrome/browser/manifest/manifest_icon_downloader.cc File chrome/browser/manifest/manifest_icon_downloader.cc (right): https://codereview.chromium.org/1354903003/diff/20001/chrome/browser/manifest/manifest_icon_downloader.cc#newcode135 chrome/browser/manifest/manifest_icon_downloader.cc:135: // size. On 2015/09/18 13:41:59, Mounir Lamouri (OOO back ...
5 years, 3 months ago (2015-09-18 14:06:46 UTC) #5
gone
https://chromiumcodereview.appspot.com/1354903003/diff/20001/chrome/browser/manifest/manifest_icon_downloader.cc File chrome/browser/manifest/manifest_icon_downloader.cc (right): https://chromiumcodereview.appspot.com/1354903003/diff/20001/chrome/browser/manifest/manifest_icon_downloader.cc#newcode135 chrome/browser/manifest/manifest_icon_downloader.cc:135: // size. On 2015/09/18 14:06:46, Lalit Maganti wrote: > ...
5 years, 3 months ago (2015-09-18 18:46:41 UTC) #6
gone
https://chromiumcodereview.appspot.com/1354903003/diff/40001/chrome/browser/manifest/manifest_icon_downloader.cc File chrome/browser/manifest/manifest_icon_downloader.cc (right): https://chromiumcodereview.appspot.com/1354903003/diff/40001/chrome/browser/manifest/manifest_icon_downloader.cc#newcode143 chrome/browser/manifest/manifest_icon_downloader.cc:143: float ratio = static_cast<float>(bitmaps[i].height()) / Can you use some ...
5 years, 3 months ago (2015-09-21 09:51:03 UTC) #7
Lalit Maganti
https://chromiumcodereview.appspot.com/1354903003/diff/20001/chrome/browser/manifest/manifest_icon_downloader.cc File chrome/browser/manifest/manifest_icon_downloader.cc (right): https://chromiumcodereview.appspot.com/1354903003/diff/20001/chrome/browser/manifest/manifest_icon_downloader.cc#newcode135 chrome/browser/manifest/manifest_icon_downloader.cc:135: // size. On 2015/09/18 18:46:41, dfalcantara wrote: > On ...
5 years, 3 months ago (2015-09-21 09:52:34 UTC) #8
gone
lgtm
5 years, 3 months ago (2015-09-21 09:58:04 UTC) #9
mlamouri (slow - plz ping)
lgtm https://codereview.chromium.org/1354903003/diff/80001/chrome/browser/manifest/manifest_icon_downloader.cc File chrome/browser/manifest/manifest_icon_downloader.cc (right): https://codereview.chromium.org/1354903003/diff/80001/chrome/browser/manifest/manifest_icon_downloader.cc#newcode144 chrome/browser/manifest/manifest_icon_downloader.cc:144: float ratio = height / width; nit: you ...
5 years, 3 months ago (2015-09-23 13:45:21 UTC) #10
Lalit Maganti
Also do you think I should add scaling if the width is greater than ideal? ...
5 years, 3 months ago (2015-09-23 13:50:02 UTC) #11
Lalit Maganti
Added the height check for scaling. Will send to CQ when tree reopens.
5 years, 3 months ago (2015-09-23 13:57:52 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1354903003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1354903003/100001
5 years, 3 months ago (2015-09-24 09:33:59 UTC) #15
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 3 months ago (2015-09-24 10:25:45 UTC) #16
commit-bot: I haz the power
5 years, 3 months ago (2015-09-24 10:26:52 UTC) #17
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/79d995190f907a28b0e654c4f4a980b8add47540
Cr-Commit-Position: refs/heads/master@{#350523}

Powered by Google App Engine
This is Rietveld 408576698