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

Unified Diff: components/ntp_tiles/icon_cacher_impl.cc

Issue 2715153006: Set desired_image_size when decoding images for NTP Tile icons. (Closed)
Patch Set: comment formatting Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/ntp_tiles/icon_cacher_impl.cc
diff --git a/components/ntp_tiles/icon_cacher_impl.cc b/components/ntp_tiles/icon_cacher_impl.cc
index cb957ea010e58bcd9e70444e6dc578aed426c45e..c5c85acdd0ec3b9e3a022d4304ac27ac36f20593 100644
--- a/components/ntp_tiles/icon_cacher_impl.cc
+++ b/components/ntp_tiles/icon_cacher_impl.cc
@@ -11,6 +11,7 @@
#include "components/favicon_base/favicon_types.h"
#include "components/favicon_base/favicon_util.h"
#include "components/image_fetcher/image_fetcher.h"
+#include "ui/gfx/geometry/size.h"
#include "ui/gfx/image/image.h"
#include "url/gurl.h"
@@ -37,6 +38,8 @@ IconCacherImpl::IconCacherImpl(
image_fetcher_(std::move(image_fetcher)) {
image_fetcher_->SetDataUseServiceName(
data_use_measurement::DataUseUserData::NTP_TILES);
+ // For images with multiple frames, prefer one of size 128x128px.
+ image_fetcher_->SetDesiredImageFrameSize(gfx::Size(128, 128));
}
IconCacherImpl::~IconCacherImpl() = default;

Powered by Google App Engine
This is Rietveld 408576698