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

Unified Diff: components/ntp_snippets/bookmarks/bookmark_suggestions_provider.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/bookmarks/bookmark_suggestions_provider.cc
diff --git a/components/ntp_snippets/bookmarks/bookmark_suggestions_provider.cc b/components/ntp_snippets/bookmarks/bookmark_suggestions_provider.cc
index e990e6a047d58db5574260ac4a4237d1e71a620f..eaea934043a9fc0f63e7163abc1a6f33587c7d2f 100644
--- a/components/ntp_snippets/bookmarks/bookmark_suggestions_provider.cc
+++ b/components/ntp_snippets/bookmarks/bookmark_suggestions_provider.cc
@@ -188,7 +188,11 @@ void BookmarkSuggestionsProvider::ClearHistory(
base::Time begin,
base::Time end,
const base::Callback<bool(const GURL& url)>& filter) {
- // TODO(vitaliii): Implement. See crbug.com/641321.
+ // TODO(vitaliii): Do not remove all dates, but only the ones matched by the
+ // time range and the filter.
+ RemoveAllLastVisitDates(bookmark_model_);
+ ClearDismissedSuggestionsForDebugging(provided_category_);
+ FetchBookmarks();
}
void BookmarkSuggestionsProvider::ClearCachedSuggestions(Category category) {
« no previous file with comments | « components/ntp_snippets/bookmarks/bookmark_last_visit_utils.cc ('k') | components/ntp_snippets/ntp_snippets_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698