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

Unified Diff: chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc

Issue 2616633002: Respect time range in browsing data removal for last-visited data. (Closed)
Patch Set: rebase Created 3 years, 11 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: chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
index 2818aa42be11ab6e5a312cb32881091b96a70918..2c8f794a121e7dd3ec5d35509f8ced9acd9d2177 100644
--- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
+++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
@@ -4,6 +4,10 @@
#include "chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h"
+#include <set>
+#include <string>
+#include <utility>
+
#include "chrome/browser/autofill/personal_data_manager_factory.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "chrome/browser/browser_process.h"
@@ -294,12 +298,12 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
}
// Remove the last visit dates meta-data from the bookmark model.
- // TODO(vitaliii): Do not remove all dates, but only the ones matched by the
- // time range and the filter.
bookmarks::BookmarkModel* bookmark_model =
BookmarkModelFactory::GetForBrowserContext(profile_);
- if (bookmark_model)
- ntp_snippets::RemoveAllLastVisitDates(bookmark_model);
+ if (bookmark_model) {
+ ntp_snippets::RemoveLastVisitedDatesBetween(delete_begin_, delete_end_,
+ filter, bookmark_model);
+ }
#if BUILDFLAG(ENABLE_EXTENSIONS)
// The extension activity log contains details of which websites extensions

Powered by Google App Engine
This is Rietveld 408576698