diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-21 21:27:24 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-21 21:27:24 +0000 |
commit | bf3ec7355013aa824eca19a0362638771defd4e7 (patch) | |
tree | ad5efeeac31f5a9c2a7d7419fe50bca6b727f067 /chrome/test/test_notification_tracker.cc | |
parent | 8ebd02bc2e0b778418c06060d990fc6ceda21b5a (diff) | |
download | chromium_src-bf3ec7355013aa824eca19a0362638771defd4e7.zip chromium_src-bf3ec7355013aa824eca19a0362638771defd4e7.tar.gz chromium_src-bf3ec7355013aa824eca19a0362638771defd4e7.tar.bz2 |
Use a NotificationRegistrar to listen for notifications.
BUG=2381
Review URL: http://codereview.chromium.org/113719
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16661 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/test_notification_tracker.cc')
-rw-r--r-- | chrome/test/test_notification_tracker.cc | 8 |
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() { |