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

Unified Diff: components/ntp_snippets/content_suggestions_service.cc

Issue 2232783002: Support action button to fetch more content suggestions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@snippetsbridge
Patch Set: Created 4 years, 4 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 3311d45624a4372568a304e857f205ae9f105b79..5f0fd9ba4d27e3ef9e5d961ee0ec99eae635a33e 100644
--- a/components/ntp_snippets/content_suggestions_service.cc
+++ b/components/ntp_snippets/content_suggestions_service.cc
@@ -66,6 +66,12 @@ ContentSuggestionsService::GetSuggestionsForCategory(Category category) const {
return iterator->second;
}
+void ContentSuggestionsService::FetchMoreSuggestions(Category category) {
+ auto iterator = providers_by_category_.find(category);
+ if (iterator != providers_by_category_.end())
+ iterator->second->FetchMoreSuggestions(category);
+}
+
void ContentSuggestionsService::FetchSuggestionImage(
const std::string& suggestion_id,
const ImageFetchedCallback& callback) {

Powered by Google App Engine
This is Rietveld 408576698