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

Unified Diff: chrome/browser/notifications/message_center_notification_manager.cc

Issue 344763002: Rename notification_id() to disambiguate its meaning (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 6 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/message_center_notification_manager.cc
diff --git a/chrome/browser/notifications/message_center_notification_manager.cc b/chrome/browser/notifications/message_center_notification_manager.cc
index b032c4eed99564e14156e5f749e25207e00bf081..f400bfd41f9e07b4173ffdb11da331c30711b5f4 100644
--- a/chrome/browser/notifications/message_center_notification_manager.cc
+++ b/chrome/browser/notifications/message_center_notification_manager.cc
@@ -137,7 +137,7 @@ bool MessageCenterNotificationManager::Update(const Notification& notification,
// Changing the type from non-progress to progress does not count towards
// the immediate update allowed in the message center.
std::string old_id =
- old_notification->notification().notification_id();
+ old_notification->notification().delegate_id();
DCHECK(message_center_->FindVisibleNotificationById(old_id));
// Add/remove notification in the local list but just update the same
@@ -146,7 +146,7 @@ bool MessageCenterNotificationManager::Update(const Notification& notification,
profile_notifications_.erase(old_id);
ProfileNotification* new_notification =
new ProfileNotification(profile, notification, message_center_);
- profile_notifications_[notification.notification_id()] = new_notification;
+ profile_notifications_[notification.delegate_id()] = new_notification;
// Now pass a copy to message center.
scoped_ptr<message_center::Notification> message_center_notification(
@@ -323,7 +323,7 @@ void MessageCenterNotificationManager::ImageDownloads::StartDownloads(
notification.icon_url(),
base::Bind(&message_center::MessageCenter::SetNotificationIcon,
base::Unretained(message_center_),
- notification.notification_id()));
+ notification.delegate_id()));
// Notification image.
StartDownloadWithImage(
@@ -332,7 +332,7 @@ void MessageCenterNotificationManager::ImageDownloads::StartDownloads(
notification.image_url(),
base::Bind(&message_center::MessageCenter::SetNotificationImage,
base::Unretained(message_center_),
- notification.notification_id()));
+ notification.delegate_id()));
// Notification button icons.
StartDownloadWithImage(
@@ -341,7 +341,7 @@ void MessageCenterNotificationManager::ImageDownloads::StartDownloads(
notification.button_one_icon_url(),
base::Bind(&message_center::MessageCenter::SetNotificationButtonIcon,
base::Unretained(message_center_),
- notification.notification_id(),
+ notification.delegate_id(),
0));
StartDownloadWithImage(
notification,
@@ -349,7 +349,7 @@ void MessageCenterNotificationManager::ImageDownloads::StartDownloads(
notification.button_two_icon_url(),
base::Bind(&message_center::MessageCenter::SetNotificationButtonIcon,
base::Unretained(message_center_),
- notification.notification_id(),
+ notification.delegate_id(),
1));
// This should tell the observer we're done if everything was synchronous.
@@ -472,7 +472,7 @@ std::string
void MessageCenterNotificationManager::AddProfileNotification(
ProfileNotification* profile_notification) {
const Notification& notification = profile_notification->notification();
- std::string id = notification.notification_id();
+ std::string id = notification.delegate_id();
// Notification ids should be unique.
DCHECK(profile_notifications_.find(id) == profile_notifications_.end());
profile_notifications_[id] = profile_notification;
@@ -487,7 +487,7 @@ void MessageCenterNotificationManager::AddProfileNotification(
void MessageCenterNotificationManager::RemoveProfileNotification(
ProfileNotification* profile_notification) {
- std::string id = profile_notification->notification().notification_id();
+ std::string id = profile_notification->notification().delegate_id();
profile_notifications_.erase(id);
delete profile_notification;
}
« no previous file with comments | « chrome/browser/notifications/desktop_notification_service.cc ('k') | chrome/browser/notifications/notification.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698