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

Unified Diff: chrome/browser/chromeos/wm_ipc.cc

Issue 5734002: Continuation of CL 5685007, rename the singleton accessor method in more files. (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/browser/chromeos/wm_ipc.cc
diff --git a/chrome/browser/chromeos/wm_ipc.cc b/chrome/browser/chromeos/wm_ipc.cc
index 1dd0af5d3e0dff1e8be31ef8f25cf54837258521..aa09dd767d32c915c8fac806a5bb5437eb3afa18 100644
--- a/chrome/browser/chromeos/wm_ipc.cc
+++ b/chrome/browser/chromeos/wm_ipc.cc
@@ -10,9 +10,9 @@ extern "C" {
}
#include "app/x11_util.h"
+#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/scoped_ptr.h"
-#include "base/singleton.h"
namespace chromeos {
@@ -59,12 +59,11 @@ bool SetIntProperty(XID xid, Atom xatom, const std::vector<int>& values) {
} // namespace
+static base::LazyInstance<WmIpc> g_wm_ipc(base::LINKER_INITIALIZED);
+
// static
WmIpc* WmIpc::instance() {
- static WmIpc* instance = NULL;
- if (!instance)
- instance = Singleton<WmIpc>::get();
- return instance;
+ return g_wm_ipc.Pointer();
M-A Ruel 2010/12/13 15:54:02 Eh, thanks for fixing it.
}
bool WmIpc::SetWindowType(GtkWidget* widget,

Powered by Google App Engine
This is Rietveld 408576698