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

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

Issue 2566123002: Last visit dates of bookmarks - fix browsing data removal on desktop (Closed)
Patch Set: Comments #2 Created 4 years 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
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_remover_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browsing_data/browsing_data_remover.cc
diff --git a/chrome/browser/browsing_data/browsing_data_remover.cc b/chrome/browser/browsing_data/browsing_data_remover.cc
index cc955a24263840ed51271fdf9ef8d382c7154cee..00b3c15f038a0c49443429cce0645c3b6e768e92 100644
--- a/chrome/browser/browsing_data/browsing_data_remover.cc
+++ b/chrome/browser/browsing_data/browsing_data_remover.cc
@@ -16,6 +16,7 @@
#include "base/metrics/histogram_macros.h"
#include "build/build_config.h"
#include "chrome/browser/autofill/personal_data_manager_factory.h"
+#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browsing_data/browsing_data_filter_builder.h"
#include "chrome/browser/browsing_data/browsing_data_helper.h"
@@ -51,6 +52,7 @@
#include "chrome/common/url_constants.h"
#include "components/autofill/core/browser/personal_data_manager.h"
#include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
+#include "components/bookmarks/browser/bookmark_model.h"
#include "components/browsing_data/content/storage_partition_http_cache_data_remover.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/content_settings/core/common/content_settings.h"
@@ -62,6 +64,7 @@
#include "components/history/core/browser/history_service.h"
#include "components/nacl/browser/nacl_browser.h"
#include "components/nacl/browser/pnacl_host.h"
+#include "components/ntp_snippets/bookmarks/bookmark_last_visit_utils.h"
#include "components/ntp_snippets/content_suggestions_service.h"
#include "components/omnibox/browser/omnibox_pref_names.h"
#include "components/password_manager/core/browser/password_store.h"
@@ -528,6 +531,7 @@ void BrowsingDataRemover::RemoveImpl(
&history_task_tracker_);
}
+ // Currently, ContentSuggestionService instance exists only on Android.
ntp_snippets::ContentSuggestionsService* content_suggestions_service =
ContentSuggestionsServiceFactory::GetForProfileIfExists(profile_);
if (content_suggestions_service) {
@@ -535,6 +539,14 @@ void BrowsingDataRemover::RemoveImpl(
filter);
}
+ // 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 BUILDFLAG(ENABLE_EXTENSIONS)
// The extension activity log contains details of which websites extensions
// were active on. It therefore indirectly stores details of websites a
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_remover_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698