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

Unified Diff: components/ntp_snippets/content_suggestions_service.h

Issue 2284393002: Add ClearHistory() to ContentSuggestionsService and its providers (Closed)
Patch Set: |bookmark_model| can be null in tests. 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 bc8fb932473528d592b68b20f3d265351e4b1398..8ddd49148de5a3eafe5ac24f28e477f5269ca29b 100644
--- a/components/ntp_snippets/content_suggestions_service.h
+++ b/components/ntp_snippets/content_suggestions_service.h
@@ -13,6 +13,7 @@
#include "base/callback_forward.h"
#include "base/observer_list.h"
#include "base/optional.h"
+#include "base/time/time.h"
#include "components/keyed_service/core/keyed_service.h"
#include "components/ntp_snippets/category_factory.h"
#include "components/ntp_snippets/category_status.h"
@@ -119,6 +120,16 @@ class ContentSuggestionsService : public KeyedService,
// called only once per provider.
void RegisterProvider(std::unique_ptr<ContentSuggestionsProvider> provider);
+ // Removes history from the specified time range where the URL matches the
+ // |filter| from all providers. The data removed depends on the provider. Note
+ // that the data outside the time range may be deleted, for example
+ // suggestions, which are based on history from that time range. Providers
+ // should immediately clear any data related to history from the specified
+ // time range where the URL matches the |filter|.
+ void ClearHistory(base::Time begin,
+ base::Time end,
+ const base::Callback<bool(const GURL& url)>& filter);
+
// Removes all suggestions from all caches or internal stores in all
// providers. See |ClearCachedSuggestions|.
void ClearAllCachedSuggestions();
« 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