| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/notifications/balloon_collection_base.h" | 5 #include "chrome/browser/notifications/balloon_collection_base.h" |
| 6 | 6 |
| 7 #include "base/stl_util-inl.h" | 7 #include "base/stl_util.h" |
| 8 #include "chrome/browser/notifications/balloon.h" | 8 #include "chrome/browser/notifications/balloon.h" |
| 9 #include "chrome/browser/notifications/notification.h" | 9 #include "chrome/browser/notifications/notification.h" |
| 10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
| 11 | 11 |
| 12 BalloonCollectionBase::BalloonCollectionBase() { | 12 BalloonCollectionBase::BalloonCollectionBase() { |
| 13 } | 13 } |
| 14 | 14 |
| 15 BalloonCollectionBase::~BalloonCollectionBase() { | 15 BalloonCollectionBase::~BalloonCollectionBase() { |
| 16 STLDeleteElements(&balloons_); | 16 STLDeleteElements(&balloons_); |
| 17 } | 17 } |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 const Notification& notification) { | 76 const Notification& notification) { |
| 77 Balloons::iterator iter; | 77 Balloons::iterator iter; |
| 78 for (iter = balloons_.begin(); iter != balloons_.end(); ++iter) { | 78 for (iter = balloons_.begin(); iter != balloons_.end(); ++iter) { |
| 79 if ((*iter)->notification().notification_id() == | 79 if ((*iter)->notification().notification_id() == |
| 80 notification.notification_id()) { | 80 notification.notification_id()) { |
| 81 return *iter; | 81 return *iter; |
| 82 } | 82 } |
| 83 } | 83 } |
| 84 return NULL; | 84 return NULL; |
| 85 } | 85 } |
| OLD | NEW |