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

Unified Diff: chrome/browser/content_settings/host_content_settings_map_factory.cc

Issue 2886433002: [Android] Adding content settings provider for notification channels (Closed)
Patch Set: Conditionally include new header file Created 3 years, 6 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 | « chrome/browser/BUILD.gn ('k') | chrome/browser/engagement/site_engagement_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/content_settings/host_content_settings_map_factory.cc
diff --git a/chrome/browser/content_settings/host_content_settings_map_factory.cc b/chrome/browser/content_settings/host_content_settings_map_factory.cc
index a3465561e0b82d26889314daa44e73579075289e..b9e9a444d8c17a0ed9962cd1aa0ba1bc56591f2c 100644
--- a/chrome/browser/content_settings/host_content_settings_map_factory.cc
+++ b/chrome/browser/content_settings/host_content_settings_map_factory.cc
@@ -30,6 +30,10 @@
#include "chrome/browser/supervised_user/supervised_user_settings_service_factory.h"
#endif
+#if defined(OS_ANDROID)
+#include "chrome/browser/notifications/notification_channels_provider_android.h"
+#endif // OS_ANDROID
+
HostContentSettingsMapFactory::HostContentSettingsMapFactory()
: RefcountedBrowserContextKeyedServiceFactory(
"HostContentSettingsMap",
@@ -109,6 +113,15 @@ scoped_refptr<RefcountedKeyedService>
}
#endif // BUILDFLAG(ENABLE_SUPERVISED_USERS)
+#if defined(OS_ANDROID)
+ if (base::FeatureList::IsEnabled(features::kSiteNotificationChannels)) {
+ auto channels_provider =
+ base::MakeUnique<NotificationChannelsProviderAndroid>();
+ settings_map->RegisterProvider(
+ HostContentSettingsMap::NOTIFICATION_ANDROID_PROVIDER,
+ std::move(channels_provider));
+ }
+#endif // defined (OS_ANDROID)
return settings_map;
}
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/engagement/site_engagement_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698