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

Unified Diff: chrome/browser/chromeos/login/screen_locker.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/browser/chromeos/login/screen_locker.cc
diff --git a/chrome/browser/chromeos/login/screen_locker.cc b/chrome/browser/chromeos/login/screen_locker.cc
index a2beddcdd6c87cbf6020cba8ad0e807a1f3e1100..c4ca040e544654db76dec1752ba42d771a578e9a 100644
--- a/chrome/browser/chromeos/login/screen_locker.cc
+++ b/chrome/browser/chromeos/login/screen_locker.cc
@@ -16,9 +16,9 @@
#include "app/resource_bundle.h"
#include "app/x11_util.h"
#include "base/command_line.h"
+#include "base/lazy_instance.h"
#include "base/metrics/histogram.h"
#include "base/message_loop.h"
-#include "base/singleton.h"
#include "base/string_util.h"
#include "base/timer.h"
#include "base/utf_string_conversions.h"
@@ -194,6 +194,9 @@ class ScreenLockObserver : public chromeos::ScreenLockLibrary::Observer,
DISALLOW_COPY_AND_ASSIGN(ScreenLockObserver);
};
+static base::LazyInstance<ScreenLockObserver> g_screen_lock_observer(
Evan Martin 2010/12/13 17:38:30 *
+ base::LINKER_INITIALIZED);
+
// A ScreenLock window that covers entire screen to keep the keyboard
// focus/events inside the grab widget.
class LockWindow : public views::WidgetGtk {
@@ -901,7 +904,7 @@ void ScreenLocker::UnlockScreenFailed() {
// static
void ScreenLocker::InitClass() {
- Singleton<ScreenLockObserver>::get();
+ g_screen_lock_observer.Get();
}
////////////////////////////////////////////////////////////////////////////////

Powered by Google App Engine
This is Rietveld 408576698