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

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

Issue 2284393002: Add ClearHistory() to ContentSuggestionsService and its providers (Closed)
Patch Set: Created 4 years, 4 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/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 42156529798915316326dcd3fd59061224e0ff61..4ed5aa930c3c1b22500968ede640c6a0a6511d5f 100644
--- a/chrome/browser/browsing_data/browsing_data_remover.cc
+++ b/chrome/browser/browsing_data/browsing_data_remover.cc
@@ -490,6 +490,13 @@ void BrowsingDataRemover::RemoveImpl(
"OriginTypeMask has been updated without updating user metrics");
if ((remove_mask & REMOVE_HISTORY) && may_delete_history) {
+ ntp_snippets::ContentSuggestionsService* content_suggestions_service =
+ ContentSuggestionsServiceFactory::GetForProfile(profile_);
+ if (content_suggestions_service)
+ content_suggestions_service->ClearHistory();
Marc Treib 2016/08/29 09:43:10 Should this also get called when the user deletes
vitaliii 2016/08/29 10:37:25 The idea was to differentiate these cases, because
Marc Treib 2016/08/29 11:27:35 I see - yes, that makes sense. Note that not nece
vitaliii 2016/08/29 16:46:42 Done.
+ }
+
+ if ((remove_mask & REMOVE_HISTORY) && may_delete_history) {
Marc Treib 2016/08/29 09:43:11 Now you have two identical "if"s - merge them?
vitaliii 2016/08/29 10:37:25 Done.
history::HistoryService* history_service =
HistoryServiceFactory::GetForProfile(
profile_, ServiceAccessType::EXPLICIT_ACCESS);

Powered by Google App Engine
This is Rietveld 408576698