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

Unified Diff: components/ntp_snippets/content_suggestions_provider.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_provider.h
diff --git a/components/ntp_snippets/content_suggestions_provider.h b/components/ntp_snippets/content_suggestions_provider.h
index 36cc5fbfcd058bd91252c109309453c6d930247c..d479eeccee05250904c4996f9f25680e1076575f 100644
--- a/components/ntp_snippets/content_suggestions_provider.h
+++ b/components/ntp_snippets/content_suggestions_provider.h
@@ -101,6 +101,17 @@ class ContentSuggestionsProvider {
virtual void FetchSuggestionImage(const std::string& suggestion_id,
const ImageFetchedCallback& callback) = 0;
+ // Removes history from the specified time range where the URL matches the
+ // |filter|. 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|.
+ virtual void ClearHistory(
+ base::Time begin,
+ base::Time end,
+ const base::Callback<bool(const GURL& url)>& filter) = 0;
+
// Clears all caches for the given category, so that the next fetch starts
// from scratch.
virtual void ClearCachedSuggestions(Category category) = 0;

Powered by Google App Engine
This is Rietveld 408576698