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

Unified Diff: components/ntp_snippets/content_suggestions_service.h

Issue 2223073002: Add per-section clearing and dismissed suggestions to snippets-internals (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix non-Debug builds 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.h
diff --git a/components/ntp_snippets/content_suggestions_service.h b/components/ntp_snippets/content_suggestions_service.h
index 488aeab7388c3e1219a5eca831d327b0b2f6d5ce..d572b737ec6c4eb4322614f905eae7f04d150c09 100644
--- a/components/ntp_snippets/content_suggestions_service.h
+++ b/components/ntp_snippets/content_suggestions_service.h
@@ -105,17 +105,31 @@ class ContentSuggestionsService : public KeyedService,
// Only for debugging use through the internals page.
// Removes all suggestions from all caches or internal stores in all
- // providers. It does, however, not remove any suggestions from the provider's
- // sources, so if their configuration hasn't changed, they should return the
- // same results when they fetch the next time. In particular, calling this
- // method will not mark any suggestions as dismissed.
- void ClearCachedSuggestionsForDebugging();
+ // providers. See |ClearCachedSuggestionsForDebugging|.
+ void ClearAllCachedSuggestionsForDebugging();
+
+ // Only for debugging use through the internals page.
+ // Removes all suggestions of the given |category| from all caches or internal
+ // stores in the service and the corresponding provider. It does, however, not
+ // remove any suggestions from the provider's sources, so if its configuration
+ // hasn't changed, it might return the same results when it fetches the next
+ // time. In particular, calling this method will not mark any suggestions as
+ // dismissed.
+ void ClearCachedSuggestionsForDebugging(Category category);
+
+ // Only for debugging use through the internals page.
+ // Retrieves suggestions of the given |category| that have previously been
+ // dismissed and are still stored in the respective provider. If the
+ // provider doesn't store dismissed suggestions, this returns an empty vector.
+ std::vector<ContentSuggestion> GetDismissedSuggestionsForDebugging(
+ Category category);
// Only for debugging use through the internals page. Some providers
// internally store a list of dismissed suggestions to prevent them from
- // reappearing. This function clears all such lists in all providers, making
- // dismissed suggestions reappear (only for certain providers).
- void ClearDismissedSuggestionsForDebugging();
+ // reappearing. This function clears all suggestions of the given |category|
+ // from such lists, making dismissed suggestions reappear (if the provider
+ // supports it).
+ void ClearDismissedSuggestionsForDebugging(Category category);
CategoryFactory* category_factory() { return &category_factory_; }
« no previous file with comments | « components/ntp_snippets/content_suggestions_provider.h ('k') | components/ntp_snippets/content_suggestions_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698