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

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

Issue 1005393003: [Download Notification] Use NotificationUIManager instead of MessageCenter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use NotificationUIManager instead of message_center::MessageCenter Created 5 years, 9 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 5e7802d4edf8e2d1e8f9adc2eb3a787afec20def..b5cb0554fc880b4eeaa80a2e174947343eedc98c 100644
--- a/chrome/browser/notifications/message_center_notification_manager.cc
+++ b/chrome/browser/notifications/message_center_notification_manager.cc
@@ -201,7 +201,14 @@ const Notification* MessageCenterNotificationManager::FindById(
profile_notifications_.find(profile_notification_id);
if (iter == profile_notifications_.end())
return NULL;
- return &(iter->second->notification());
+
+ // Update |notification| with the latest information from the message center.
Jun Mukai 2015/03/31 19:59:47 This is weird. Is there some case where the state
yoshiki 2015/04/01 04:10:49 "shown_as_popup" and "read" flags are changed in t
Jun Mukai 2015/04/01 18:02:11 Commented on the other part. I believe FindById sh
yoshiki 2015/04/06 02:22:18 Thank you for the suggestion but we can't do it. F
+ ProfileNotification* profile_notification = iter->second;
+ profile_notification->CopyNotificationState(
+ message_center_->FindVisibleNotificationById(
+ iter->second->notification().id()));
+
+ return &(profile_notification->notification());
}
bool MessageCenterNotificationManager::CancelById(

Powered by Google App Engine
This is Rietveld 408576698