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

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

Issue 20136004: Allow partial update for notification update API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix trybots 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/notification_ui_manager_impl.cc
diff --git a/chrome/browser/notifications/notification_ui_manager_impl.cc b/chrome/browser/notifications/notification_ui_manager_impl.cc
index 6e15592f004e9a36938be8c9c0a3a76d3bdcf316..9b65dd5a88905a62ccaa5a0bb9a7812b29a83c9f 100644
--- a/chrome/browser/notifications/notification_ui_manager_impl.cc
+++ b/chrome/browser/notifications/notification_ui_manager_impl.cc
@@ -74,11 +74,15 @@ void NotificationUIManagerImpl::Add(const Notification& notification,
CheckAndShowNotifications();
}
-bool NotificationUIManagerImpl::DoesIdExist(const std::string& id) {
+bool NotificationUIManagerImpl::DoesIdExist(
+ const std::string& id, Notification* matched_notification) {
for (NotificationDeque::iterator iter = show_queue_.begin();
iter != show_queue_.end(); ++iter) {
- if ((*iter)->notification().notification_id() == id)
+ if ((*iter)->notification().notification_id() == id) {
+ if (matched_notification)
+ *matched_notification = (*iter)->notification();
return true;
+ }
}
return false;
}

Powered by Google App Engine
This is Rietveld 408576698