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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/notifications/ChannelsInitializer.java

Issue 2814603003: [Android O] Split out browser notification channels (Closed)
Patch Set: Fix up ChannelsUpdaterTest expectations Created 3 years, 8 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/android/java/src/org/chromium/chrome/browser/notifications/ChannelsInitializer.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/notifications/ChannelsInitializer.java b/chrome/android/java/src/org/chromium/chrome/browser/notifications/ChannelsInitializer.java
index f3f21c93f4c961487726307a00c6cd68ce5c096e..afd4d32337f028750832e7c60e551eb28b295299 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/notifications/ChannelsInitializer.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/notifications/ChannelsInitializer.java
@@ -28,10 +28,14 @@ public class ChannelsInitializer {
// To define a new channel, add the channel ID to this StringDef and add a new entry to
// PredefinedChannels.MAP below with the appropriate channel parameters.
- @StringDef({CHANNEL_ID_BROWSER, CHANNEL_ID_SITES})
+ @StringDef({CHANNEL_ID_BROWSER, CHANNEL_ID_DOWNLOADS, CHANNEL_ID_INCOGNITO, CHANNEL_ID_MEDIA,
+ CHANNEL_ID_SITES})
@Retention(RetentionPolicy.SOURCE)
public @interface ChannelId {}
public static final String CHANNEL_ID_BROWSER = "browser";
+ public static final String CHANNEL_ID_DOWNLOADS = "downloads";
+ public static final String CHANNEL_ID_INCOGNITO = "incognito";
+ public static final String CHANNEL_ID_MEDIA = "media";
public static final String CHANNEL_ID_SITES = "sites";
@StringDef({CHANNEL_GROUP_ID_GENERAL})
@@ -53,6 +57,18 @@ public class ChannelsInitializer {
new Channel(CHANNEL_ID_BROWSER,
org.chromium.chrome.R.string.notification_category_browser,
NotificationManager.IMPORTANCE_LOW, CHANNEL_GROUP_ID_GENERAL));
+ map.put(CHANNEL_ID_DOWNLOADS,
+ new Channel(CHANNEL_ID_DOWNLOADS,
+ org.chromium.chrome.R.string.notification_category_downloads,
+ NotificationManager.IMPORTANCE_LOW, CHANNEL_GROUP_ID_GENERAL));
+ map.put(CHANNEL_ID_INCOGNITO,
+ new Channel(CHANNEL_ID_INCOGNITO,
+ org.chromium.chrome.R.string.notification_category_incognito,
+ NotificationManager.IMPORTANCE_LOW, CHANNEL_GROUP_ID_GENERAL));
+ map.put(CHANNEL_ID_MEDIA,
+ new Channel(CHANNEL_ID_MEDIA,
+ org.chromium.chrome.R.string.notification_category_media,
+ NotificationManager.IMPORTANCE_LOW, CHANNEL_GROUP_ID_GENERAL));
map.put(CHANNEL_ID_SITES,
new Channel(CHANNEL_ID_SITES,
org.chromium.chrome.R.string.notification_category_sites,

Powered by Google App Engine
This is Rietveld 408576698