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

Unified Diff: components/ntp_snippets/ntp_snippets_service.cc

Issue 2303713002: Implement ClearHistory for all ntp_snippets providers (Closed)
Patch Set: Marc's nits. Created 4 years, 3 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/ntp_snippets_service.cc
diff --git a/components/ntp_snippets/ntp_snippets_service.cc b/components/ntp_snippets/ntp_snippets_service.cc
index dbc71396623bd40ad0a68ef98ba47fa854d98b6e..79b6a7939e91945ab2c60ce63fdcb1a7389d8ed8 100644
--- a/components/ntp_snippets/ntp_snippets_service.cc
+++ b/components/ntp_snippets/ntp_snippets_service.cc
@@ -339,7 +339,13 @@ void NTPSnippetsService::ClearHistory(
base::Time begin,
base::Time end,
const base::Callback<bool(const GURL& url)>& filter) {
- // TODO(vitaliii): Implement. See crbug.com/641321.
+ // Both time range and the filter are ignored and all suggestions are removed,
+ // because it is not known which history entries were used for the suggestions
+ // personalization.
+ if (!ready())
+ nuke_after_load_ = true;
+ else
+ NukeAllSnippets();
}
void NTPSnippetsService::ClearCachedSuggestions(Category category) {
« no previous file with comments | « components/ntp_snippets/ntp_snippets_service.h ('k') | components/ntp_snippets/ntp_snippets_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698