ServiceWorker: Consolidate version manipulation functions in SWProviderContext
[chromium-blink-merge.git] / athena / screen_lock / screen_lock_manager_base.cc
blobabd221b7e4a5af98d5dd4a3064a8e40a80892470
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "athena/screen_lock/screen_lock_manager_base.h"
7 #include "base/logging.h"
9 namespace athena {
10 namespace {
12 ScreenLockManager* instance = nullptr;
14 } // namespace
16 ScreenLockManagerBase::ScreenLockManagerBase() {
17 DCHECK(!instance);
18 instance = this;
21 ScreenLockManagerBase::~ScreenLockManagerBase() {
22 DCHECK_EQ(instance, this);
23 instance = nullptr;
26 // static
27 ScreenLockManager* ScreenLockManager::Get() {
28 return instance;
31 // static
32 void ScreenLockManager::Shutdown() {
33 if (instance) {
34 delete instance;
35 DCHECK(!instance);
39 } // namespace athena