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

Unified Diff: components/ntp_snippets/content_suggestions_service.cc

Issue 2421463002: FetchMore functionality backend (Closed)
Patch Set: Strategy pattern to handle differences in fetching procedure. Created 4 years, 2 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.cc
diff --git a/components/ntp_snippets/content_suggestions_service.cc b/components/ntp_snippets/content_suggestions_service.cc
index 56497a741f085725b8ad2b232d2c69e70fdf0cdf..d24bc5e52a0635a0392e87ce9a956b428ad1b2f0 100644
--- a/components/ntp_snippets/content_suggestions_service.cc
+++ b/components/ntp_snippets/content_suggestions_service.cc
@@ -182,6 +182,14 @@ void ContentSuggestionsService::RegisterProvider(
providers_.push_back(std::move(provider));
}
+void ContentSuggestionsService::FetchMore(Category category) {
+ auto providers_it = providers_by_category_.find(category);
+ if (providers_it == providers_by_category_.end())
+ return;
+
+ providers_it->second->FetchMore();
+}
+
////////////////////////////////////////////////////////////////////////////////
// Private methods

Powered by Google App Engine
This is Rietveld 408576698