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

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

Issue 1005393003: [Download Notification] Use NotificationUIManager instead of MessageCenter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed the comments Created 5 years, 8 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_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;
}

Powered by Google App Engine
This is Rietveld 408576698