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

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

Issue 1814923002: Nuke NotificationUIManager from PlatformNotificationServiceImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@profile_manager_load
Patch Set: Created 4 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/NotificationUIManager.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationUIManager.java b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationUIManager.java
index c7665997e2de3934b4e53ef3239a2a1d5ed0a5b7..248519448d386a60b9a37e7f3ddc578c6a6f492c 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationUIManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationUIManager.java
@@ -94,7 +94,7 @@ public class NotificationUIManager {
@CalledByNative
private static NotificationUIManager create(long nativeNotificationManager, Context context) {
if (sInstance != null) {
- throw new IllegalStateException("There must only be a single NotificationUIManager.");
+ throw new IllegalStateException("There must only be a single NotificationBridge.");
}
sInstance = new NotificationUIManager(nativeNotificationManager, context);
@@ -636,12 +636,15 @@ public class NotificationUIManager {
/**
* Closes the notification associated with the given parameters.
*
+ * @param profileId of the profile whose notification this is for.
* @param persistentNotificationId The persistent id of the notification.
* @param origin The origin to which the notification belongs.
* @param tag The tag of the notification. May be NULL.
*/
@CalledByNative
- private void closeNotification(long persistentNotificationId, String origin, String tag) {
+ private void closeNotification(
+ String profileId, long persistentNotificationId, String origin, String tag) {
+ // TODO(miguelg) make profile_id part of the tag.
String platformTag = makePlatformTag(persistentNotificationId, origin, tag);
mNotificationManager.cancel(platformTag, PLATFORM_ID);
}

Powered by Google App Engine
This is Rietveld 408576698