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

Unified Diff: athena/screen_lock/screen_lock_manager_base.cc

Issue 620663005: Lock screen for Chrome-Athena (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more nit Created 6 years, 2 months 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: athena/screen_lock/screen_lock_manager_base.cc
diff --git a/athena/screen_lock/screen_lock_manager_base.cc b/athena/screen_lock/screen_lock_manager_base.cc
new file mode 100644
index 0000000000000000000000000000000000000000..80a847b09d135b8ef27831ad5600ab6275e3a6d8
--- /dev/null
+++ b/athena/screen_lock/screen_lock_manager_base.cc
@@ -0,0 +1,39 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "athena/screen_lock/screen_lock_manager_base.h"
+
+#include "base/logging.h"
+
+namespace athena {
+namespace {
+
+ScreenLockManager* instance = NULL;
+
+} // namespace
+
+ScreenLockManagerBase::ScreenLockManagerBase() {
+ DCHECK(!instance);
+ instance = this;
+}
+
+ScreenLockManagerBase::~ScreenLockManagerBase() {
+ DCHECK_EQ(instance, this);
+ instance = NULL;
+}
+
+// static
+ScreenLockManager* ScreenLockManager::Get() {
+ return instance;
+}
+
+// static
+void ScreenLockManager::Shutdown() {
+ if (instance) {
+ delete instance;
+ DCHECK(!instance);
+ }
+}
+
+} // namespace athena
« no previous file with comments | « athena/screen_lock/screen_lock_manager_base.h ('k') | athena/screen_lock/shell/shell_screen_lock_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698