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

Unified Diff: components/image_fetcher/image_fetcher_impl.cc

Issue 2715153006: Set desired_image_size when decoding images for NTP Tile icons. (Closed)
Patch Set: ax 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/image_fetcher/image_fetcher_impl.cc
diff --git a/components/image_fetcher/image_fetcher_impl.cc b/components/image_fetcher/image_fetcher_impl.cc
index d260b2cdd2a09436a2f2c840416dc3c60d05b4b0..61f20f2e1fcfdbd51ff577acc62ed3e931ff45bd 100644
--- a/components/image_fetcher/image_fetcher_impl.cc
+++ b/components/image_fetcher/image_fetcher_impl.cc
@@ -39,6 +39,9 @@ void ImageFetcherImpl::SetDataUseServiceName(
image_data_fetcher_->SetDataUseServiceName(data_use_service_name);
}
+void ImageFetcherImpl::SetDesiredImageFrameSize(const gfx::Size& size) {
+ desired_image_frame_size_ = size;
+}
void ImageFetcherImpl::StartOrQueueNetworkRequest(
Marc Treib 2017/03/01 09:17:26 nit: empty line before
tschumann 2017/03/01 09:37:43 Done.
const std::string& id,
const GURL& image_url,
@@ -72,7 +75,7 @@ void ImageFetcherImpl::OnImageURLFetched(const GURL& image_url,
}
image_decoder_->DecodeImage(
- image_data,
+ image_data, desired_image_frame_size_,
base::Bind(&ImageFetcherImpl::OnImageDecoded,
base::Unretained(this), image_url));
}

Powered by Google App Engine
This is Rietveld 408576698