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

Unified Diff: components/ntp_snippets/content_suggestions_provider.h

Issue 2421463002: FetchMore functionality backend (Closed)
Patch Set: NTBR. Rebasing a lot. Created 4 years, 1 month 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 f6741356d66e6cfc0a3773c83c8afe25a6d63d83..0eca4e8c0ba44ac9efbc6c5679caa993e638f1bb 100644
--- a/components/ntp_snippets/content_suggestions_provider.h
+++ b/components/ntp_snippets/content_suggestions_provider.h
@@ -31,6 +31,8 @@ class ContentSuggestionsProvider {
using ImageFetchedCallback = base::Callback<void(const gfx::Image&)>;
using DismissedSuggestionsCallback = base::Callback<void(
std::vector<ContentSuggestion> dismissed_suggestions)>;
+ using FetchedMoreCallback =
vitaliii 2016/11/01 23:29:57 nit: FetchMoreCallback or MultipleContentSuggestio
fhorschig 2016/11/02 05:05:27 Renamed (but shorter) in CL 2466863003.
+ base::Callback<void(std::vector<ContentSuggestion> suggestions)>;
// The observer of a provider is notified when new data is available.
class Observer {
@@ -100,6 +102,12 @@ class ContentSuggestionsProvider {
virtual void FetchSuggestionImage(const ContentSuggestion::ID& suggestion_id,
const ImageFetchedCallback& callback) = 0;
+ // A user-triggered request to fetch more content for the given category.
vitaliii 2016/11/01 23:29:57 "User-triggered" seems to be not relevant here, th
fhorschig 2016/11/02 05:05:27 Done. (in CL 2466863003)
+ // Provides only suggestions that have not been provided. The given |callback|
vitaliii 2016/11/01 23:29:57 This sentence looks contradicting to the next line
fhorschig 2016/11/02 05:05:27 Done. (in CL 2466863003)
+ // is called with these suggestion, along with all existing suggestions.
vitaliii 2016/11/01 23:29:57 s/suggestion/suggestionS
fhorschig 2016/11/02 05:05:27 Done. (in CL 2466863003)
+ virtual void FetchMore(const Category& category,
+ const FetchedMoreCallback& callback) = 0;
+
// Removes history from the specified time range where the URL matches the
// |filter|. The data removed depends on the provider. Note that the
// data outside the time range may be deleted, for example suggestions, which

Powered by Google App Engine
This is Rietveld 408576698