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

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

Issue 1026853002: Integrate the notification database with the normal code path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@n-db-ConfirmShow
Patch Set: android part Created 5 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/browser/notifications/notification_ui_manager_android.h
diff --git a/chrome/browser/notifications/notification_ui_manager_android.h b/chrome/browser/notifications/notification_ui_manager_android.h
index e7681bbdbb618412375146322c0d1bf947387769..2a9c44484d057455e50be05aac4ffe7f69529b8e 100644
--- a/chrome/browser/notifications/notification_ui_manager_android.h
+++ b/chrome/browser/notifications/notification_ui_manager_android.h
@@ -22,16 +22,19 @@ class NotificationUIManagerAndroid : public NotificationUIManager {
NotificationUIManagerAndroid();
~NotificationUIManagerAndroid() override;
- // Called by the Java implementation when a notification has been clicked on.
+ // Called by the Java implementation when the notification has been clicked.
bool OnNotificationClicked(JNIEnv* env,
jobject java_object,
- jstring notification_id,
- jbyteArray serialized_notification_data);
+ jlong persistent_notification_id,
+ jstring java_origin,
+ jstring java_tag);
- // Called by the Java implementation when a notification has been closed.
+ // Called by the Java implementation when the notification has been closed.
bool OnNotificationClosed(JNIEnv* env,
jobject java_object,
- jstring notification_id);
+ jlong persistent_notification_id,
+ jstring java_origin,
+ jstring java_tag);
// NotificationUIManager implementation;
void Add(const Notification& notification, Profile* profile) override;
@@ -75,11 +78,11 @@ class NotificationUIManagerAndroid : public NotificationUIManager {
// Map from a notification id to the associated ProfileNotification*.
std::map<std::string, ProfileNotification*> profile_notifications_;
johnme 2015/04/08 17:33:32 Could you maybe get rid of this now? It's not yet
Peter Beverloo 2015/04/08 18:57:48 We still have some boilerplate code supporting non
- // Holds the tag of a notification, and its origin.
+ // Pair containing a regenerated notification's origin and tag.
using RegeneratedNotificationInfo = std::pair<std::string, std::string>;
- // Map from notification id to RegeneratedNotificationInfo.
- std::map<std::string, RegeneratedNotificationInfo>
+ // Map from persistent notification id to RegeneratedNotificationInfo.
+ std::map<int64_t, RegeneratedNotificationInfo>
regenerated_notification_infos_;
base::android::ScopedJavaGlobalRef<jobject> java_object_;

Powered by Google App Engine
This is Rietveld 408576698