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

Unified Diff: chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/notifications/MockNotificationManagerProxy.java

Issue 2832433002: [Android O] Refactor channel definitions into new class (Closed)
Patch Set: rebase 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
« no previous file with comments | « chrome/android/junit/src/org/chromium/chrome/browser/notifications/ChannelsUpdaterTest.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/notifications/MockNotificationManagerProxy.java
diff --git a/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/notifications/MockNotificationManagerProxy.java b/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/notifications/MockNotificationManagerProxy.java
index 0e50e6902e035d066e6e29a1220cca3f117e08d2..f8864798532bb0e45699c4b87140f4f4a006349b 100644
--- a/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/notifications/MockNotificationManagerProxy.java
+++ b/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/notifications/MockNotificationManagerProxy.java
@@ -6,7 +6,7 @@ package org.chromium.chrome.test.util.browser.notifications;
import android.app.Notification;
-import org.chromium.chrome.browser.notifications.ChannelsInitializer;
+import org.chromium.chrome.browser.notifications.ChannelDefinitions;
import org.chromium.chrome.browser.notifications.NotificationManagerProxy;
import java.util.ArrayList;
@@ -23,8 +23,8 @@ import javax.annotation.Nullable;
*/
public class MockNotificationManagerProxy implements NotificationManagerProxy {
private static final String KEY_SEPARATOR = ":";
- private List<ChannelsInitializer.Channel> mChannels;
- private List<ChannelsInitializer.ChannelGroup> mNotificationChannelGroups;
+ private List<ChannelDefinitions.Channel> mChannels;
+ private List<ChannelDefinitions.ChannelGroup> mNotificationChannelGroups;
/**
* Holds a notification and the arguments passed to #notify and #cancel.
@@ -97,36 +97,36 @@ public class MockNotificationManagerProxy implements NotificationManagerProxy {
}
@Override
- public void createNotificationChannel(ChannelsInitializer.Channel channel) {
+ public void createNotificationChannel(ChannelDefinitions.Channel channel) {
mChannels.add(channel);
}
- public List<ChannelsInitializer.Channel> getChannels() {
+ public List<ChannelDefinitions.Channel> getChannels() {
return mChannels;
}
@Override
- public void createNotificationChannelGroup(ChannelsInitializer.ChannelGroup channelGroup) {
+ public void createNotificationChannelGroup(ChannelDefinitions.ChannelGroup channelGroup) {
mNotificationChannelGroups.add(channelGroup);
}
- public List<ChannelsInitializer.ChannelGroup> getNotificationChannelGroups() {
+ public List<ChannelDefinitions.ChannelGroup> getNotificationChannelGroups() {
return mNotificationChannelGroups;
}
@Override
public List<String> getNotificationChannelIds() {
List<String> channelIds = new ArrayList<>();
- for (ChannelsInitializer.Channel channel : mChannels) {
+ for (ChannelDefinitions.Channel channel : mChannels) {
channelIds.add(channel.mId);
}
return channelIds;
}
@Override
- public void deleteNotificationChannel(@ChannelsInitializer.ChannelId String id) {
- for (Iterator<ChannelsInitializer.Channel> it = mChannels.iterator(); it.hasNext();) {
- ChannelsInitializer.Channel channel = it.next();
+ public void deleteNotificationChannel(@ChannelDefinitions.ChannelId String id) {
+ for (Iterator<ChannelDefinitions.Channel> it = mChannels.iterator(); it.hasNext();) {
+ ChannelDefinitions.Channel channel = it.next();
if (id.equals(channel.mId)) it.remove();
}
}
« no previous file with comments | « chrome/android/junit/src/org/chromium/chrome/browser/notifications/ChannelsUpdaterTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698