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

Unified Diff: components/ntp_snippets/content_suggestions_provider.h

Issue 2131943002: Change NTPSnippetsService to implement ContentSuggestionsProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@neuerservice2
Patch Set: Insert the default-case again because some compilers need it Created 4 years, 5 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_provider.h
diff --git a/components/ntp_snippets/content_suggestions_provider.h b/components/ntp_snippets/content_suggestions_provider.h
index 93872f5843a8214d2b835e810e05c558c44f6435..8d0b5dd7e5d6c38ae55581b5ca84299aae71dac0 100644
--- a/components/ntp_snippets/content_suggestions_provider.h
+++ b/components/ntp_snippets/content_suggestions_provider.h
@@ -62,7 +62,8 @@ class ContentSuggestionsProvider {
};
// Sets an observer which is notified about changes to the available
- // suggestions, or removes it by passing a nullptr.
+ // suggestions, or removes it by passing a nullptr. The provider does not take
+ // ownership of the observer and the observer must outlive this provider.
virtual void SetObserver(Observer* observer) = 0;
// Determines the status of the given |category|, see
@@ -78,6 +79,8 @@ class ContentSuggestionsProvider {
// Fetches the image for the suggestion with the given ID and returns it
// through the callback. This fetch may occur locally or from the internet.
+ // If that suggestion doesn't exist, doesn't have an image or if the fetch
+ // fails, the callback gets a null image.
virtual void FetchSuggestionImage(const std::string& suggestion_id,
const ImageFetchedCallback& callback) = 0;

Powered by Google App Engine
This is Rietveld 408576698