Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(527)

Unified Diff: net/socket/ssl_client_socket_nss.cc

Issue 5682008: Make members of Singleton<T> private and only visible to the singleton type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/socket/ssl_client_socket_nss.cc
diff --git a/net/socket/ssl_client_socket_nss.cc b/net/socket/ssl_client_socket_nss.cc
index fff4352e61c9b7d502db461da0ed8908576815d5..f946819c5296ae5386bc539bd87be2d49c1e438f 100644
--- a/net/socket/ssl_client_socket_nss.cc
+++ b/net/socket/ssl_client_socket_nss.cc
@@ -63,9 +63,9 @@
#include "base/compiler_specific.h"
#include "base/metrics/histogram.h"
+#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/nss_util.h"
-#include "base/singleton.h"
#include "base/string_number_conversions.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
@@ -185,6 +185,9 @@ class NSSSSLInitSingleton {
}
};
+static base::LazyInstance<NSSSSLInitSingleton> g_nss_ssl_init_singleton(
+ base::LINKER_INITIALIZED);
+
// Initialize the NSS SSL library if it isn't already initialized. This must
// be called before any other NSS SSL functions. This function is
// thread-safe, and the NSS SSL library will only ever be initialized once.
@@ -195,7 +198,7 @@ void EnsureNSSSSLInit() {
// http://code.google.com/p/chromium/issues/detail?id=59847
base::ThreadRestrictions::ScopedAllowIO allow_io;
- Singleton<NSSSSLInitSingleton>::get();
+ g_nss_ssl_init_singleton.Get();
}
// The default error mapping function.

Powered by Google App Engine
This is Rietveld 408576698