Index: chrome/browser/notifications/notification_test_util.cc |
diff --git a/chrome/browser/notifications/notification_test_util.cc b/chrome/browser/notifications/notification_test_util.cc |
index ad254f2d2d6dff2e3babfc5df1d0629519a8fdd6..491c54e7ff1ccc1657b06a5dcc0304effdaa93e1 100644 |
--- a/chrome/browser/notifications/notification_test_util.cc |
+++ b/chrome/browser/notifications/notification_test_util.cc |
@@ -37,6 +37,19 @@ void StubNotificationUIManager::SetNotificationAddedCallback( |
notification_added_callback_ = callback; |
} |
+bool StubNotificationUIManager::SilentDismissById( |
+ const std::string& delegate_id, |
+ ProfileID profile_id) { |
+ auto iter = notifications_.begin(); |
+ for (; iter != notifications_.end(); ++iter) { |
+ if (iter->first.delegate_id() != delegate_id || iter->second != profile_id) |
+ continue; |
+ notifications_.erase(iter); |
+ return true; |
+ } |
+ return false; |
+} |
+ |
void StubNotificationUIManager::Add(const Notification& notification, |
Profile* profile) { |
notifications_.push_back(std::make_pair( |