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

Unified Diff: components/ntp_snippets/content_suggestions_service.h

Issue 2781583002: [Content suggestions] Add a function to the service API to fetch favicons (Closed)
Patch Set: Fix compilation #2 Created 3 years, 9 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/content_suggestions_service.h
diff --git a/components/ntp_snippets/content_suggestions_service.h b/components/ntp_snippets/content_suggestions_service.h
index b207e065b472820fe6117cb086385d66c4ad46d2..1ae26328e74947039f352701c382af60d90a5462 100644
--- a/components/ntp_snippets/content_suggestions_service.h
+++ b/components/ntp_snippets/content_suggestions_service.h
@@ -124,6 +124,16 @@ class ContentSuggestionsService : public KeyedService,
void FetchSuggestionImage(const ContentSuggestion::ID& suggestion_id,
const ImageFetchedCallback& callback);
+ // Fetches the favicon from local cache (if larger than or equal to
+ // |minimum_size_in_pixel|) or from Google server (if there is no icon in the
+ // cache) and returns the results in the callback. If that suggestion doesn't
+ // exist or the fetch fails, the callback gets an empty image. The callback
+ // will not be called synchronously.
+ void FetchSuggestionFavicon(const ContentSuggestion::ID& suggestion_id,
+ int minimum_size_in_pixel,
+ int desired_size_in_pixel,
+ const ImageFetchedCallback& callback);
+
// Dismisses the suggestion with the given |suggestion_id|, if it exists.
// This will not trigger an update through the observers (i.e. providers must
// not call |Observer::OnNewSuggestions|).

Powered by Google App Engine
This is Rietveld 408576698