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

Unified Diff: components/ntp_snippets/content_suggestions_service.h

Issue 2400783003: Ntp: show AllDismissedItem when all sections have been dismissed. (Closed)
Patch Set: Rebase. 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.h
diff --git a/components/ntp_snippets/content_suggestions_service.h b/components/ntp_snippets/content_suggestions_service.h
index 987a9fb4accd0cf0d623b1b970cb0195a24be638..928a3a04151d9eb0adc2e5ff7c0a4410834a5be2 100644
--- a/components/ntp_snippets/content_suggestions_service.h
+++ b/components/ntp_snippets/content_suggestions_service.h
@@ -125,6 +125,10 @@ class ContentSuggestionsService : public KeyedService,
// This will not trigger an update through the observers.
void DismissCategory(Category category);
+ // Restores all dismissed categories.
+ // This will not trigger an update through the observers.
+ void RestoreDismissedCategories();
+
// Observer accessors.
void AddObserver(Observer* observer);
void RemoveObserver(Observer* observer);
@@ -237,6 +241,11 @@ class ContentSuggestionsService : public KeyedService,
std::map<Category, ContentSuggestionsProvider*, Category::CompareByID>
providers_by_category_;
+ // All dismissed categories and their providers. These may be restored by
+ // RestoreDismissedCategories().
+ std::map<Category, ContentSuggestionsProvider*, Category::CompareByID>
+ dismissed_providers_by_category_;
+
// All current suggestion categories, in an order determined by the
// |category_factory_|. This vector contains exactly the same categories as
// |providers_by_category_|.
« no previous file with comments | « chrome/browser/android/ntp/ntp_snippets_bridge.cc ('k') | components/ntp_snippets/content_suggestions_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698