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

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

Issue 20136004: Allow partial update for notification update API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add more tests per feedback Created 7 years, 5 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 d0cbb7e7d14ee990070d5b1289ff378e1c853580..76458b40414b3d1af57ea14adc5f9e7dda2fc6d9 100644
--- a/chrome/browser/notifications/message_center_notification_manager.cc
+++ b/chrome/browser/notifications/message_center_notification_manager.cc
@@ -64,13 +64,15 @@ MessageCenterNotificationManager::~MessageCenterNotificationManager() {
////////////////////////////////////////////////////////////////////////////////
// NotificationUIManager
-bool MessageCenterNotificationManager::DoesIdExist(const std::string& id) {
- if (NotificationUIManagerImpl::DoesIdExist(id))
- return true;
- NotificationMap::iterator iter = profile_notifications_.find(id);
+const Notification* MessageCenterNotificationManager::FindById(
+ const std::string& id) const {
+ const Notification* notification = NotificationUIManagerImpl::FindById(id);
+ if (notification)
+ return notification;
+ NotificationMap::const_iterator iter = profile_notifications_.find(id);
if (iter == profile_notifications_.end())
- return false;
- return true;
+ return NULL;
+ return &(iter->second->notification());
}
bool MessageCenterNotificationManager::CancelById(const std::string& id) {

Powered by Google App Engine
This is Rietveld 408576698