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

Unified Diff: chrome_frame/chrome_frame_automation.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/chrome_frame_automation.cc
diff --git a/chrome_frame/chrome_frame_automation.cc b/chrome_frame/chrome_frame_automation.cc
index c8a0938bd978f3e35b958ca962c0882d72bc13df..d0da1af2e6d16698f2016622ba716ddabf28daba 100644
--- a/chrome_frame/chrome_frame_automation.cc
+++ b/chrome_frame/chrome_frame_automation.cc
@@ -11,11 +11,11 @@
#include "base/debug/trace_event.h"
#include "base/file_util.h"
#include "base/file_version_info.h"
+#include "base/lazy_instance.h"
#include "base/lock.h"
#include "base/logging.h"
#include "base/path_service.h"
#include "base/process_util.h"
-#include "base/singleton.h"
#include "base/string_util.h"
#include "base/sys_info.h"
#include "base/utf_string_conversions.h"
@@ -564,7 +564,9 @@ bool ProxyFactory::ReleaseAutomationServer(void* server_id,
return true;
}
-Singleton<ProxyFactory, LeakySingletonTraits<ProxyFactory> > g_proxy_factory;
+static base::LazyInstance<ProxyFactory,
+ base::LeakyLazyInstanceTraits<ProxyFactory> >
+ g_proxy_factory(base::LINKER_INITIALIZED);
template <> struct RunnableMethodTraits<ChromeFrameAutomationClient> {
static void RetainCallee(ChromeFrameAutomationClient* obj) {}
@@ -581,7 +583,7 @@ ChromeFrameAutomationClient::ChromeFrameAutomationClient()
ui_thread_id_(NULL),
init_state_(UNINITIALIZED),
use_chrome_network_(false),
- proxy_factory_(g_proxy_factory.get()),
+ proxy_factory_(g_proxy_factory.Pointer()),
handle_top_level_requests_(false),
tab_handle_(-1),
session_id_(-1),

Powered by Google App Engine
This is Rietveld 408576698