summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_message_service.cc
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-21 21:37:06 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-21 21:37:06 +0000
commitfc368956c37b3f6447103d97d034c8dfa5f2ed5f (patch)
tree26c91201cb807544275af7e8d9423f7875e13bf7 /chrome/browser/extensions/extension_message_service.cc
parent651f749bb3ee9a7d6a9c239f703351a499e16832 (diff)
downloadchromium_src-fc368956c37b3f6447103d97d034c8dfa5f2ed5f.zip
chromium_src-fc368956c37b3f6447103d97d034c8dfa5f2ed5f.tar.gz
chromium_src-fc368956c37b3f6447103d97d034c8dfa5f2ed5f.tar.bz2
Use a NotificationRegistrar to listen for notifications.
BUG=2381 Review URL: http://codereview.chromium.org/113717 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16665 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_message_service.cc')
-rw-r--r--chrome/browser/extensions/extension_message_service.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/chrome/browser/extensions/extension_message_service.cc b/chrome/browser/extensions/extension_message_service.cc
index 08dd703..86371e0 100644
--- a/chrome/browser/extensions/extension_message_service.cc
+++ b/chrome/browser/extensions/extension_message_service.cc
@@ -74,14 +74,10 @@ void ExtensionMessageService::Init() {
ui_loop_ = MessageLoop::current();
- // Note: we never stop observing because we live longer than
- // NotificationService.
- NotificationService::current()->AddObserver(this,
- NotificationType::RENDERER_PROCESS_TERMINATED,
- NotificationService::AllSources());
- NotificationService::current()->AddObserver(this,
- NotificationType::RENDERER_PROCESS_CLOSED,
- NotificationService::AllSources());
+ registrar_.Add(this, NotificationType::RENDERER_PROCESS_TERMINATED,
+ NotificationService::AllSources());
+ registrar_.Add(this, NotificationType::RENDERER_PROCESS_CLOSED,
+ NotificationService::AllSources());
}
void ExtensionMessageService::RegisterExtension(