Index: net/socket/ssl_client_socket_win.cc |
diff --git a/net/socket/ssl_client_socket_win.cc b/net/socket/ssl_client_socket_win.cc |
index fbe49132079c48de5ab7e84937af5397a636695e..19c3814abec58c5fc6a9674d04f8cf028a7bebf1 100644 |
--- a/net/socket/ssl_client_socket_win.cc |
+++ b/net/socket/ssl_client_socket_win.cc |
@@ -8,8 +8,8 @@ |
#include <map> |
#include "base/compiler_specific.h" |
+#include "base/lazy_instance.h" |
#include "base/lock.h" |
-#include "base/singleton.h" |
#include "base/stl_util-inl.h" |
#include "base/string_util.h" |
#include "base/utf_string_conversions.h" |
@@ -194,6 +194,9 @@ class CredHandleTable { |
CredHandleMap client_cert_creds_; |
}; |
+static base::LazyInstance<CredHandleTable> g_cred_handle_table( |
+ base::LINKER_INITIALIZED); |
+ |
// static |
int CredHandleTable::InitializeHandle(CredHandle* handle, |
PCCERT_CONTEXT client_cert, |
@@ -285,9 +288,9 @@ static int GetCredHandle(PCCERT_CONTEXT client_cert, |
NOTREACHED(); |
return ERR_UNEXPECTED; |
} |
- return Singleton<CredHandleTable>::get()->GetHandle(client_cert, |
- ssl_version_mask, |
- handle_ptr); |
+ return g_cred_handle_table.Get().GetHandle(client_cert, |
+ ssl_version_mask, |
+ handle_ptr); |
} |
//----------------------------------------------------------------------------- |
@@ -356,6 +359,9 @@ class ClientCertStore { |
HCERTSTORE store_; |
}; |
+static base::LazyInstance<ClientCertStore> g_client_cert_store( |
+ base::LINKER_INITIALIZED); |
+ |
//----------------------------------------------------------------------------- |
// Size of recv_buffer_ |
@@ -507,7 +513,7 @@ void SSLClientSocketWin::GetSSLCertRequestInfo( |
// Copy it to our own certificate store, so that we can close the "MY" |
// certificate store before returning from this function. |
PCCERT_CONTEXT cert_context2 = |
- Singleton<ClientCertStore>::get()->CopyCertContext(cert_context); |
+ g_client_cert_store.Get().CopyCertContext(cert_context); |
if (!cert_context2) { |
NOTREACHED(); |
continue; |