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

Unified Diff: components/ntp_snippets/content_suggestions_provider.h

Issue 2284393002: Add ClearHistory() to ContentSuggestionsService and its providers (Closed)
Patch Set: msramek@'s comments and filter. 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..bcad4ff202ec989f42b9164b34a00b1c32ad564d 100644
--- a/components/ntp_snippets/content_suggestions_provider.h
+++ b/components/ntp_snippets/content_suggestions_provider.h
@@ -101,6 +101,16 @@ class ContentSuggestionsProvider {
virtual void FetchSuggestionImage(const std::string& suggestion_id,
const ImageFetchedCallback& callback) = 0;
+ // Removes history from a given time range related to URLs matched by
+ // |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 and URLs
+ // matched by |filter|.
Marc Treib 2016/08/30 13:01:56 It's really an intersection between the time range
vitaliii 2016/08/30 14:17:48 Done.
+ virtual void ClearHistory(base::Time begin,
+ base::Time end,
+ 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