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

Unified Diff: components/ntp_snippets/remote/remote_suggestions_provider_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_snippets/remote/remote_suggestions_provider_impl.cc
diff --git a/components/ntp_snippets/remote/remote_suggestions_provider_impl.cc b/components/ntp_snippets/remote/remote_suggestions_provider_impl.cc
index 81dcbf38c7c6922cbf17bb1860aa0c353fa2964e..363b2b0851bf7dc3536c0980676396ae27948b9f 100644
--- a/components/ntp_snippets/remote/remote_suggestions_provider_impl.cc
+++ b/components/ntp_snippets/remote/remote_suggestions_provider_impl.cc
@@ -30,6 +30,7 @@
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
#include "components/strings/grit/components_strings.h"
+#include "ui/gfx/geometry/size.h"
#include "ui/gfx/image/image.h"
namespace ntp_snippets {
@@ -215,8 +216,11 @@ void CachedImageFetcher::OnImageFetchedFromDatabase(
// |image_decoder_| is null in tests.
if (image_decoder_ && !data.empty()) {
image_decoder_->DecodeImage(
- data, base::Bind(&CachedImageFetcher::OnImageDecodedFromDatabase,
- base::Unretained(this), callback, suggestion_id, url));
+ data,
+ // We're not dealing with multi-frame images.
+ /*desired_image_frame_size=*/gfx::Size(),
+ base::Bind(&CachedImageFetcher::OnImageDecodedFromDatabase,
+ base::Unretained(this), callback, suggestion_id, url));
return;
}
// Fetching from the DB failed; start a network fetch.

Powered by Google App Engine
This is Rietveld 408576698