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

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: added URL filtering and tests 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 96cd31d3a9481f446ae30fbc20edb82f1375fc92..116976a2369b4d14bbf23fa3ee7b0b30fdaea153 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"
@@ -293,12 +297,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