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 7961ea8cb1d6c838ffc3f04a51fc3cd1484dbc03..140d7275385621493e4515ecffea8e6ae40361dc 100644 |
--- a/chrome/browser/notifications/notification_test_util.cc |
+++ b/chrome/browser/notifications/notification_test_util.cc |
@@ -53,6 +53,14 @@ bool StubNotificationUIManager::Update(const Notification& notification, |
const Notification* StubNotificationUIManager::FindById( |
const std::string& delegate_id, |
ProfileID profile_id) const { |
+ auto iter = notifications_.begin(); |
+ for (; iter != notifications_.end(); ++iter) { |
+ if (iter->first.delegate_id() != delegate_id || iter->second != profile_id) |
+ continue; |
+ |
+ return &iter->first; |
+ } |
+ |
return nullptr; |
} |