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

Unified Diff: chrome/browser/notifications/notification_channels_provider_android.h

Issue 2922473003: [Android] Implement GetRuleIterator for channels provider (Closed)
Patch Set: rebase 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
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 95b629521df05bd83077aa032e83ee43169d1c17..896f3509949de70ed61ceef70f65c513d9e950e9 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 {
+ NotificationChannel(std::string origin, NotificationChannelStatus status)
+ : origin_(origin), status_(status) {}
+ std::string origin_;
+ NotificationChannelStatus status_ = NotificationChannelStatus::UNAVAILABLE;
+};
// 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();

Powered by Google App Engine
This is Rietveld 408576698