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

Unified Diff: chrome_frame/external_tab.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: chrome_frame/external_tab.cc
diff --git a/chrome_frame/external_tab.cc b/chrome_frame/external_tab.cc
index ca402d9a0882c54ae65a033b0f48c3e7c3480cdb..0d2609f08135ac80af0d2f7750dafd498607fa99 100644
--- a/chrome_frame/external_tab.cc
+++ b/chrome_frame/external_tab.cc
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "chrome_frame/external_tab.h"
-#include "base/singleton.h"
+#include "base/lazy_instance.h"
#include "base/tracked.h"
#include "base/task.h"
#include "base/waitable_event.h"
@@ -14,7 +14,8 @@ DISABLE_RUNNABLE_METHOD_REFCOUNT(ExternalTabProxy);
DISABLE_RUNNABLE_METHOD_REFCOUNT(UIDelegate);
namespace {
- Singleton<ChromeProxyFactory> g_proxy_factory;
+ static base::LazyInstance<ChromeProxyFactory> g_proxy_factory(
+ base::LINKER_INITIALIZED);
struct UserDataHolder : public SyncMessageContext {
explicit UserDataHolder(void* p) : data(p) {}
@@ -24,7 +25,7 @@ namespace {
ExternalTabProxy::ExternalTabProxy() : state_(NONE), tab_(0), tab_wnd_(NULL),
- chrome_wnd_(NULL), proxy_factory_(g_proxy_factory.get()), proxy_(NULL),
+ chrome_wnd_(NULL), proxy_factory_(g_proxy_factory.Pointer()), proxy_(NULL),
ui_delegate_(NULL) {
}

Powered by Google App Engine
This is Rietveld 408576698