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

Unified Diff: chrome/browser/notifications/balloon_collection_base.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/balloon_collection_base.cc
diff --git a/chrome/browser/notifications/balloon_collection_base.cc b/chrome/browser/notifications/balloon_collection_base.cc
index c7487390bb5dc8cecbe70e52268bc58d9c05cebe..b69673e8f70aab629a686278cc3966713155a0a6 100644
--- a/chrome/browser/notifications/balloon_collection_base.cc
+++ b/chrome/browser/notifications/balloon_collection_base.cc
@@ -35,11 +35,15 @@ void BalloonCollectionBase::Remove(Balloon* balloon) {
}
}
-bool BalloonCollectionBase::DoesIdExist(const std::string& id) {
+bool BalloonCollectionBase::DoesIdExist(const std::string& id,
+ Notification* matched_notification) {
Balloons::iterator iter;
for (iter = balloons_.begin(); iter != balloons_.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