Index: chrome/browser/notifications/sync_notifier/chrome_notifier_service_unittest.cc |
diff --git a/chrome/browser/notifications/sync_notifier/chrome_notifier_service_unittest.cc b/chrome/browser/notifications/sync_notifier/chrome_notifier_service_unittest.cc |
index 0fee6235d2abf5817725c860fd41eb37ae965b7a..6c8c3e1f898bc2f88604938b700fee8012055a8b 100644 |
--- a/chrome/browser/notifications/sync_notifier/chrome_notifier_service_unittest.cc |
+++ b/chrome/browser/notifications/sync_notifier/chrome_notifier_service_unittest.cc |
@@ -122,6 +122,7 @@ class StubNotificationUIManager : public NotificationUIManager { |
OVERRIDE { |
// Make a deep copy of the notification that we can inspect. |
notification_ = notification; |
+ profile_ = profile; |
} |
// Returns true if any notifications match the supplied ID, either currently |
@@ -136,6 +137,18 @@ class StubNotificationUIManager : public NotificationUIManager { |
return false; |
} |
+ // Adds the notification_id for each outstanding notification to the set |
+ // |notification_ids| (must not be NULL). |
+ virtual std::set<std::string> GetAllIdsByProfileAndSourceOrigin( |
+ Profile* profile, |
+ const GURL& source) OVERRIDE { |
+ std::set<std::string> notification_ids; |
+ if (source == notification_.origin_url() && |
+ profile->IsSameProfile(profile_)) |
+ notification_ids.insert(notification_.notification_id()); |
+ return notification_ids; |
+ } |
+ |
// Removes notifications matching the |source_origin| (which could be an |
// extension ID). Returns true if anything was removed. |
virtual bool CancelAllBySourceOrigin(const GURL& source_origin) OVERRIDE { |
@@ -157,6 +170,7 @@ class StubNotificationUIManager : public NotificationUIManager { |
private: |
DISALLOW_COPY_AND_ASSIGN(StubNotificationUIManager); |
Notification notification_; |
+ Profile* profile_; |
}; |
// Dummy SyncChangeProcessor used to help review what SyncChanges are pushed |