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

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: Added unit tests (refactored out a class for jni calls) Created 3 years, 7 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/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..4759f1e993ae4615f783cdaab52e866cacc4100f 100644
--- a/chrome/browser/content_settings/host_content_settings_map_factory.cc
+++ b/chrome/browser/content_settings/host_content_settings_map_factory.cc
@@ -7,6 +7,7 @@
#include <utility>
#include "base/feature_list.h"
+#include "chrome/browser/notifications/notification_channels_provider_android.h"
#include "chrome/browser/prefs/pref_service_syncable_util.h"
#include "chrome/browser/profiles/off_the_record_profile_impl.h"
#include "chrome/browser/profiles/profile.h"
@@ -109,6 +110,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;
}

Powered by Google App Engine
This is Rietveld 408576698