From 4517eb4e75100a8f7ebeae008c7542641ad7bcad Mon Sep 17 00:00:00 2001 From: "pkasting@chromium.org" Date: Fri, 22 May 2009 03:18:21 +0000 Subject: Use a NotificationRegistrar to listen for notifications. BUG=2381 Review URL: http://codereview.chromium.org/112051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16714 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/cert_store.cc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'chrome/browser/cert_store.cc') diff --git a/chrome/browser/cert_store.cc b/chrome/browser/cert_store.cc index 09e71b8..adc7ff1 100644 --- a/chrome/browser/cert_store.cc +++ b/chrome/browser/cert_store.cc @@ -36,14 +36,10 @@ CertStore::CertStore() : next_cert_id_(1) { // removed from cache, and remove the cert when we know it // is not used anymore. - // TODO(tc): This notification observer never gets removed because the - // CertStore is never deleted. - 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()); } CertStore::~CertStore() { -- cgit v1.1