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

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
« no previous file with comments | « no previous file | chrome/browser/android/chrome_jni_registrar.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 fc6ef11feb1abe804aa476673685dec1768ceb44..660e0a8cb9fa6de7eb975dec296f3970fa1ed7b5 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
@@ -95,7 +95,8 @@ 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 NotificationPlatformBridge.");
}
sInstance = new NotificationUIManager(nativeNotificationManager, context);
@@ -640,12 +641,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);
}
« no previous file with comments | « no previous file | chrome/browser/android/chrome_jni_registrar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698