Index: chrome/browser/notifications/notification_channels_provider_android.h |
diff --git a/chrome/browser/notifications/notification_channels_provider_android.h b/chrome/browser/notifications/notification_channels_provider_android.h |
index 8c629070276f818c4a5752a3701cf2bb903faad4..7c9e0461158b1fd0da351a9e73e0ca9bb469fa0f 100644 |
--- a/chrome/browser/notifications/notification_channels_provider_android.h |
+++ b/chrome/browser/notifications/notification_channels_provider_android.h |
@@ -15,13 +15,16 @@ |
#include "components/content_settings/core/common/content_settings_types.h" |
#include "components/keyed_service/core/keyed_service.h" |
-namespace { |
- |
// A Java counterpart will be generated for this enum. |
// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.notifications |
enum NotificationChannelStatus { ENABLED, BLOCKED, UNAVAILABLE }; |
-} // anonymous namespace |
+struct NotificationChannel { |
+ std::string origin_; |
+ NotificationChannelStatus status_ = NotificationChannelStatus::UNAVAILABLE; |
+ NotificationChannel(std::string origin, NotificationChannelStatus status) |
+ : origin_(origin), status_(status) {} |
raymes
2017/06/04 23:51:21
nit: methods always come before member variables
awdf
2017/06/05 16:29:26
Done.
|
+}; |
// This class provides notification content settings from system notification |
// channels on Android O+. This provider takes precedence over pref-provided |
@@ -39,6 +42,7 @@ class NotificationChannelsProviderAndroid |
virtual NotificationChannelStatus GetChannelStatus( |
const std::string& origin) = 0; |
virtual void DeleteChannel(const std::string& origin) = 0; |
+ virtual std::vector<NotificationChannel> GetChannels() = 0; |
}; |
NotificationChannelsProviderAndroid(); |