diff options
author | tapted@chromium.org <tapted@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-10 13:13:16 +0000 |
---|---|---|
committer | tapted@chromium.org <tapted@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-10 13:13:16 +0000 |
commit | e802c0f7ebdf5984007bec3e4bb6512d124e993e (patch) | |
tree | 0e298dce637fea472868e480e54915ba29341899 | |
parent | 401b7aaec6a8c3856679002da7ab3a07f3850fa4 (diff) | |
download | chromium_src-e802c0f7ebdf5984007bec3e4bb6512d124e993e.zip chromium_src-e802c0f7ebdf5984007bec3e4bb6512d124e993e.tar.gz chromium_src-e802c0f7ebdf5984007bec3e4bb6512d124e993e.tar.bz2 |
If an app lies about its icon size, always resize - not just when it's too modest.
Apps can lie about icon sizes in their manifest. Currently, if they say
an icon is smaller than it actually is, it will get resized
automatically. However, if the app claims an icon is bigger than it
actually is, no resizing occurs. This means that when a shortcut icon is
created, no resizing will occur and that icon entry will simply get an
empty/missing asset.
This CL changes UpdateShortcutInfoAndIconForApp to use ALWAYS_RESIZE
rather than RESIZE_WHEN_LARGER.
BUG=341512
Review URL: https://codereview.chromium.org/151053004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250081 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/ui/web_applications/web_app_ui.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/ui/web_applications/web_app_ui.cc b/chrome/browser/ui/web_applications/web_app_ui.cc index 490d97c..8d71054 100644 --- a/chrome/browser/ui/web_applications/web_app_ui.cc +++ b/chrome/browser/ui/web_applications/web_app_ui.cc @@ -461,7 +461,7 @@ void UpdateShortcutInfoAndIconForApp( if (!resource.empty()) { info_list.push_back(extensions::ImageLoader::ImageRepresentation( resource, - extensions::ImageLoader::ImageRepresentation::RESIZE_WHEN_LARGER, + extensions::ImageLoader::ImageRepresentation::ALWAYS_RESIZE, gfx::Size(size, size), ui::SCALE_FACTOR_100P)); } @@ -483,7 +483,7 @@ void UpdateShortcutInfoAndIconForApp( } info_list.push_back(extensions::ImageLoader::ImageRepresentation( resource, - extensions::ImageLoader::ImageRepresentation::RESIZE_WHEN_LARGER, + extensions::ImageLoader::ImageRepresentation::ALWAYS_RESIZE, gfx::Size(size, size), ui::SCALE_FACTOR_100P)); } |