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

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

Issue 2614733002: [NTP::PhysicalWeb] Enable by default and depend on physical web flag. (Closed)
Patch Set: clean rebase. Created 3 years, 11 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/resources/snippets_internals.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ea214afa13a469967550ee1ac95bea02534e67b1..d21b916c1401b7a539398e40dabb61fac0b21c08 100644
--- a/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc
+++ b/chrome/browser/ntp_snippets/content_suggestions_service_factory.cc
@@ -140,6 +140,13 @@ void RegisterBookmarkProvider(BookmarkModel* bookmark_model,
}
#if defined(OS_ANDROID)
+
+bool IsPhysicalWebPageProviderEnabled() {
+ return base::FeatureList::IsEnabled(
+ ntp_snippets::kPhysicalWebPageSuggestionsFeature) &&
+ base::FeatureList::IsEnabled(chrome::android::kPhysicalWebFeature);
+}
+
void RegisterPhysicalWebPageProvider(
ContentSuggestionsService* service,
PhysicalWebDataSource* physical_web_data_source,
@@ -317,8 +324,7 @@ KeyedService* ContentSuggestionsServiceFactory::BuildServiceInstanceFor(
}
#if defined(OS_ANDROID)
- if (base::FeatureList::IsEnabled(
- ntp_snippets::kPhysicalWebPageSuggestionsFeature)) {
+ if (IsPhysicalWebPageProviderEnabled()) {
RegisterPhysicalWebPageProvider(service, physical_web_data_source,
pref_service);
}
« no previous file with comments | « no previous file | chrome/browser/resources/snippets_internals.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698