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

Unified Diff: chrome/browser/ntp_snippets/content_suggestions_service_factory.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
Index: chrome/browser/ntp_snippets/content_suggestions_service_factory.cc
diff --git a/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc b/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc
index 4d5f4e3f3588d829f234805cba2dc800e001be41..6ad50364d596ce40c765efd3d3d3ef6e888e3310 100644
--- a/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc
+++ b/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc
@@ -184,6 +184,13 @@ ContentSuggestionsService* ContentSuggestionsServiceFactory::GetForProfile(
GetInstance()->GetServiceForBrowserContext(profile, true));
}
+// static
+ContentSuggestionsService*
+ContentSuggestionsServiceFactory::GetForProfileIfExists(Profile* profile) {
+ return static_cast<ContentSuggestionsService*>(
+ GetInstance()->GetServiceForBrowserContext(profile, false));
+}
+
ContentSuggestionsServiceFactory::ContentSuggestionsServiceFactory()
: BrowserContextKeyedServiceFactory(
"ContentSuggestionsService",
« no previous file with comments | « chrome/browser/ntp_snippets/content_suggestions_service_factory.h ('k') | components/ntp_snippets/ntp_snippets_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698