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

Unified Diff: chrome/browser/ntp_snippets/content_suggestions_service_factory.cc

Issue 2284393002: Add ClearHistory() to ContentSuggestionsService and its providers (Closed)
Patch Set: |bookmark_model| can be null in tests. 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/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 401cda05023307225aae7cff9be8bc125ff23c57..840d55992ea6a000f34cee92ce33b78dfb8f83f2 100644
--- a/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc
+++ b/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc
@@ -246,7 +246,9 @@ KeyedService* ContentSuggestionsServiceFactory::BuildServiceInstanceFor(
}
#endif // OS_ANDROID
- if (base::FeatureList::IsEnabled(ntp_snippets::kBookmarkSuggestionsFeature)) {
+ // |bookmark_model| can be null in tests.
+ if (base::FeatureList::IsEnabled(ntp_snippets::kBookmarkSuggestionsFeature) &&
+ bookmark_model) {
RegisterBookmarkProvider(bookmark_model, service, category_factory,
pref_service);
}

Powered by Google App Engine
This is Rietveld 408576698