summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cert_store.cc
diff options
context:
space:
mode:
authorsky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-23 23:51:22 +0000
committersky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-23 23:51:22 +0000
commita2255c5a52ca788ff105b3cb31da68bb5d61c885 (patch)
tree8c07d35d7b18340f922259c63c27a7a665894b4b /chrome/browser/cert_store.cc
parent3ada41b2341303941e4f01b8986bee567bfde14d (diff)
downloadchromium_src-a2255c5a52ca788ff105b3cb31da68bb5d61c885.zip
chromium_src-a2255c5a52ca788ff105b3cb31da68bb5d61c885.tar.gz
chromium_src-a2255c5a52ca788ff105b3cb31da68bb5d61c885.tar.bz2
Fixes leak of CertStore on shutdown.
BUG=none TEST=none Review URL: http://codereview.chromium.org/18568 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8599 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cert_store.cc')
-rw-r--r--chrome/browser/cert_store.cc14
1 files changed, 1 insertions, 13 deletions
diff --git a/chrome/browser/cert_store.cc b/chrome/browser/cert_store.cc
index a2fdd7a..36c5257 100644
--- a/chrome/browser/cert_store.cc
+++ b/chrome/browser/cert_store.cc
@@ -23,19 +23,9 @@ struct MatchSecond {
T value;
};
-// static
-CertStore* CertStore::instance_ = NULL;
-
-// static
-void CertStore::Initialize() {
- DCHECK(!instance_);
- instance_ = new CertStore();
-}
-
// static
CertStore* CertStore::GetSharedInstance() {
- DCHECK(instance_);
- return instance_;
+ return Singleton<CertStore>::get();
}
CertStore::CertStore() : next_cert_id_(1) {
@@ -52,8 +42,6 @@ CertStore::CertStore() : next_cert_id_(1) {
}
CertStore::~CertStore() {
- NotificationService::current()->RemoveObserver(this,
- NOTIFY_RENDERER_PROCESS_TERMINATED, NotificationService::AllSources());
}
int CertStore::StoreCert(net::X509Certificate* cert, int process_id) {