Index: chrome/browser/notifications/sync_notifier/synced_notification_unittest.cc |
diff --git a/chrome/browser/notifications/sync_notifier/synced_notification_unittest.cc b/chrome/browser/notifications/sync_notifier/synced_notification_unittest.cc |
index 87810cce0928a9891f699ae57639b31deae620f2..5669e43b02f3e86833b4737af2e97a39a88ce3c6 100644 |
--- a/chrome/browser/notifications/sync_notifier/synced_notification_unittest.cc |
+++ b/chrome/browser/notifications/sync_notifier/synced_notification_unittest.cc |
@@ -87,6 +87,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 |
@@ -101,6 +102,16 @@ class StubNotificationUIManager : public NotificationUIManager { |
return false; |
} |
+ 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 { |
@@ -122,6 +133,7 @@ class StubNotificationUIManager : public NotificationUIManager { |
private: |
DISALLOW_COPY_AND_ASSIGN(StubNotificationUIManager); |
Notification notification_; |
+ Profile* profile_; |
}; |
class SyncedNotificationTest : public testing::Test { |