summaryrefslogtreecommitdiffstats
path: root/chrome/test/test_notification_tracker.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test/test_notification_tracker.cc')
-rw-r--r--chrome/test/test_notification_tracker.cc8
1 files changed, 1 insertions, 7 deletions
diff --git a/chrome/test/test_notification_tracker.cc b/chrome/test/test_notification_tracker.cc
index dd22b3b..d346911 100644
--- a/chrome/test/test_notification_tracker.cc
+++ b/chrome/test/test_notification_tracker.cc
@@ -3,7 +3,6 @@
// found in the LICENSE file.
#include "chrome/test/test_notification_tracker.h"
-#include "chrome/common/notification_service.h"
TestNotificationTracker::Event::Event()
: type(NotificationType::ALL),
@@ -22,16 +21,11 @@ TestNotificationTracker::TestNotificationTracker() {
}
TestNotificationTracker::~TestNotificationTracker() {
- NotificationService* service = NotificationService::current();
- for (size_t i = 0; i < listening_.size(); i++)
- service->RemoveObserver(this, listening_[i].first, listening_[i].second);
- listening_.clear();
}
void TestNotificationTracker::ListenFor(NotificationType type,
const NotificationSource& source) {
- listening_.push_back(std::make_pair(type, source));
- NotificationService::current()->AddObserver(this, type, source);
+ registrar_.Add(this, type, source);
}
void TestNotificationTracker::Reset() {