summaryrefslogtreecommitdiffstats
path: root/net/socket/ssl_client_socket_win.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/socket/ssl_client_socket_win.cc')
-rw-r--r--net/socket/ssl_client_socket_win.cc16
1 files changed, 11 insertions, 5 deletions
diff --git a/net/socket/ssl_client_socket_win.cc b/net/socket/ssl_client_socket_win.cc
index fbe4913..19c3814 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;