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

Unified Diff: net/socket/client_socket_factory.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/client_socket_factory.cc
diff --git a/net/socket/client_socket_factory.cc b/net/socket/client_socket_factory.cc
index 8965630bd613adcc98480b4ce6b6c405e475c473..1c998c6328bb6b7094280c63cd923c4233ea9e95 100644
--- a/net/socket/client_socket_factory.cc
+++ b/net/socket/client_socket_factory.cc
@@ -4,7 +4,7 @@
#include "net/socket/client_socket_factory.h"
-#include "base/singleton.h"
+#include "base/lazy_instance.h"
#include "build/build_config.h"
#include "net/socket/client_socket_handle.h"
#if defined(OS_WIN)
@@ -71,11 +71,14 @@ class DefaultClientSocketFactory : public ClientSocketFactory {
}
};
+static base::LazyInstance<DefaultClientSocketFactory>
+ g_default_client_socket_factory(base::LINKER_INITIALIZED);
+
} // namespace
// static
ClientSocketFactory* ClientSocketFactory::GetDefaultFactory() {
- return Singleton<DefaultClientSocketFactory>::get();
+ return g_default_client_socket_factory.Pointer();
}
// static

Powered by Google App Engine
This is Rietveld 408576698