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

Unified Diff: components/ntp_snippets/content_suggestions_service.cc

Issue 2230473002: Refactor and extend SnippetsBridge for multi-section support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@categoryinfo
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 98c232621ce17b9565bf5d4e536951747d5b04ce..80f2cd62fe284b493cf3b64817655e2e1e2b0b5e 100644
--- a/components/ntp_snippets/content_suggestions_service.cc
+++ b/components/ntp_snippets/content_suggestions_service.cc
@@ -92,8 +92,9 @@ void ContentSuggestionsService::ClearCachedSuggestionsForDebugging() {
id_category_map_.clear();
for (auto& category_provider_pair : providers_by_category_) {
category_provider_pair.second->ClearCachedSuggestionsForDebugging();
+ FOR_EACH_OBSERVER(Observer, observers_,
+ OnNewSuggestions(category_provider_pair.first));
}
- FOR_EACH_OBSERVER(Observer, observers_, OnNewSuggestions());
}
void ContentSuggestionsService::ClearDismissedSuggestionsForDebugging() {
@@ -174,7 +175,7 @@ void ContentSuggestionsService::OnNewSuggestions(
suggestions_by_category_[category] = std::move(new_suggestions);
- FOR_EACH_OBSERVER(Observer, observers_, OnNewSuggestions());
+ FOR_EACH_OBSERVER(Observer, observers_, OnNewSuggestions(category));
}
void ContentSuggestionsService::OnCategoryStatusChanged(
« no previous file with comments | « components/ntp_snippets/content_suggestions_service.h ('k') | components/ntp_snippets/content_suggestions_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698