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

Unified Diff: net/base/winsock_init.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/base/winsock_init.cc
diff --git a/net/base/winsock_init.cc b/net/base/winsock_init.cc
index ccaf01c3e83b0ab5b0ecfd1d3e540b3ae9ca042a..41810efb273a69b4ee979a3a629fb614e509660f 100644
--- a/net/base/winsock_init.cc
+++ b/net/base/winsock_init.cc
@@ -6,8 +6,8 @@
#include "net/base/winsock_init.h"
+#include "base/lazy_instance.h"
#include "base/logging.h"
-#include "base/singleton.h"
namespace {
@@ -37,12 +37,15 @@ class WinsockInitSingleton {
}
};
+static base::LazyInstance<WinsockInitSingleton> g_winsock_init_singleton(
+ base::LINKER_INITIALIZED);
+
} // namespace
namespace net {
void EnsureWinsockInit() {
- Singleton<WinsockInitSingleton>::get();
+ g_winsock_init_singleton.Get();
}
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698