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

Unified Diff: components/ntp_snippets/ntp_snippets_service.cc

Issue 1974013002: Replace SkBitmap with gfx::Image in the ImageFetcher API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix more iOS build errors. Created 4 years, 7 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/ntp_snippets_service.cc
diff --git a/components/ntp_snippets/ntp_snippets_service.cc b/components/ntp_snippets/ntp_snippets_service.cc
index 02524508ceca77bf9620436e54bc6604c47ab25e..e150b3258a71b9cb98e257560d5ca10619631ae7 100644
--- a/components/ntp_snippets/ntp_snippets_service.cc
+++ b/components/ntp_snippets/ntp_snippets_service.cc
@@ -25,6 +25,7 @@
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
#include "components/suggestions/proto/suggestions.pb.h"
+#include "ui/gfx/image/image.h"
using image_fetcher::ImageFetcher;
using suggestions::ChromeSuggestion;
@@ -147,7 +148,10 @@ bool ContainsSnippet(const NTPSnippetsService::NTPSnippetStorage& haystack,
void WrapImageFetchedCallback(
const NTPSnippetsService::ImageFetchedCallback& callback,
noyau (Ping after 24h) 2016/05/13 16:10:09 This callback needs to change as well, to carry th
markusheintz_ 2016/05/17 13:08:23 Absolutely. The same is true for the suggestions s
const GURL& snippet_id_url,
- const SkBitmap* bitmap) {
+ const gfx::Image& image) {
+ const SkBitmap* bitmap = NULL;
+ if (!image.IsEmpty())
+ bitmap = image.ToSkBitmap();
callback.Run(snippet_id_url.spec(), bitmap);
}

Powered by Google App Engine
This is Rietveld 408576698