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..19e87fa27dd6ff663a87c155e8d2839e2d1d9643 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); |
@@ -242,6 +246,11 @@ class ContentSuggestionsService : public KeyedService, |
// |providers_by_category_|. |
std::vector<Category> categories_; |
+ // All dismissed categories and their providers. These may be restored by |
+ // RestoreDismissedCategories(). |
+ std::map<Category, ContentSuggestionsProvider*, Category::CompareByID> |
+ dismissed_providers_by_category_; |
Marc Treib
2016/10/11 07:35:58
nit: Maybe move this next to provider_by_category_
Michael van Ouwerkerk
2016/10/11 12:04:16
Done.
|
+ |
// All current suggestions grouped by category. This contains an entry for |
// every category in |categories_| whose status is an available status. It may |
// contain an empty vector if the category is available but empty (or still |