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

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

Issue 2342673004: Clear browsing data from ContentSuggestionService only if exists. (Closed)
Patch Set: Last comment of Bernhard 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
« no previous file with comments | « no previous file | chrome/browser/ntp_snippets/content_suggestions_service_factory.h » ('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 aaf1e6074e4a670877882e04657f7ae74a704959..deb6fd57943b2b8c20bc7b25fe4420c8de9fcfc3 100644
--- a/chrome/browser/browsing_data/browsing_data_remover.cc
+++ b/chrome/browser/browsing_data/browsing_data_remover.cc
@@ -522,7 +522,7 @@ void BrowsingDataRemover::RemoveImpl(
}
ntp_snippets::ContentSuggestionsService* content_suggestions_service =
- ContentSuggestionsServiceFactory::GetForProfile(profile_);
+ ContentSuggestionsServiceFactory::GetForProfileIfExists(profile_);
if (content_suggestions_service) {
content_suggestions_service->ClearHistory(delete_begin_, delete_end_,
filter);
@@ -1016,7 +1016,7 @@ void BrowsingDataRemover::RemoveImpl(
weak_ptr_factory_.GetWeakPtr()));
ntp_snippets::ContentSuggestionsService* content_suggestions_service =
- ContentSuggestionsServiceFactory::GetForProfile(profile_);
+ ContentSuggestionsServiceFactory::GetForProfileIfExists(profile_);
if (content_suggestions_service)
content_suggestions_service->ClearAllCachedSuggestions();
}
« no previous file with comments | « no previous file | chrome/browser/ntp_snippets/content_suggestions_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698