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

Unified Diff: components/ntp_snippets/content_suggestions_service.cc

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_service.cc
diff --git a/components/ntp_snippets/content_suggestions_service.cc b/components/ntp_snippets/content_suggestions_service.cc
index 725d24148ba1d381fd6318b1bf0eb2af82c0f2b8..aee5519d0ba8526c02dfd4312e496a20d75f8a47 100644
--- a/components/ntp_snippets/content_suggestions_service.cc
+++ b/components/ntp_snippets/content_suggestions_service.cc
@@ -81,6 +81,15 @@ void ContentSuggestionsService::FetchSuggestionImage(
callback);
}
+void ContentSuggestionsService::ClearHistory(
+ base::Time begin,
+ base::Time end,
+ base::Callback<bool(const GURL& url)> filter) {
+ for (const auto& provider : providers_) {
+ provider->ClearHistory(begin, end, filter);
+ }
+}
+
void ContentSuggestionsService::ClearAllCachedSuggestions() {
suggestions_by_category_.clear();
id_category_map_.clear();

Powered by Google App Engine
This is Rietveld 408576698