summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cert_store.cc
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-22 03:18:21 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-22 03:18:21 +0000
commit4517eb4e75100a8f7ebeae008c7542641ad7bcad (patch)
tree96ef1d5c6d2adacc218eb1cb3d57ee9d896bfdfb /chrome/browser/cert_store.cc
parenteca71dae5d36be62bcf8bc12b1238e29c4099e55 (diff)
downloadchromium_src-4517eb4e75100a8f7ebeae008c7542641ad7bcad.zip
chromium_src-4517eb4e75100a8f7ebeae008c7542641ad7bcad.tar.gz
chromium_src-4517eb4e75100a8f7ebeae008c7542641ad7bcad.tar.bz2
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
Diffstat (limited to 'chrome/browser/cert_store.cc')
-rw-r--r--chrome/browser/cert_store.cc12
1 files changed, 4 insertions, 8 deletions
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() {