manifest: rework icon selector to include small icon cut-off
commita85c20c17c0433419a0b777c68688712b2b2bde3
authorlalitm <lalitm@google.com>
Fri, 21 Aug 2015 13:56:04 +0000 (21 06:56 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 21 Aug 2015 13:56:41 +0000 (21 13:56 +0000)
treef77682bdfdb7497f19792f08ec98a87cd715c2ff
parentd9ff6d21e187712f52ae35cacbba8f693f77427b
manifest: rework icon selector to include small icon cut-off

Up until this point, arbitarily small icons have been selected as being suitable
for download.

We no longer want to do this as it can lead to pixellated looking icons which
look quite ugly. Instead we impose a cutoff similar to Android icon selection -
we stop allowing icons which are smaller than one density bucket below the bucket
of the device.

The tests have been changed to reflect this fact as they were also allowing small
icons.

BUG=513666

Review URL: https://codereview.chromium.org/1285063003

Cr-Commit-Position: refs/heads/master@{#344759}
chrome/android/javatests/src/org/chromium/chrome/browser/banners/AppBannerManagerTest.java
chrome/browser/manifest/manifest_icon_selector.cc
chrome/browser/manifest/manifest_icon_selector.h
chrome/browser/manifest/manifest_icon_selector_unittest.cc
chrome/test/data/banners/launcher-icon-4x.png [new file with mode: 0644]
chrome/test/data/banners/manifest.json
chrome/test/data/banners/manifest_no_type.json
chrome/test/data/banners/manifest_no_type_caps.json