Chromium Code Reviews| Index: chrome/browser/chromeos/cros/screen_lock_library.cc |
| diff --git a/chrome/browser/chromeos/cros/screen_lock_library.cc b/chrome/browser/chromeos/cros/screen_lock_library.cc |
| index a63f11a9e93a22035034fb29ebed7b0c20564c85..a0f79b6a46a4c02343f4e5daf0fed98e694ab978 100644 |
| --- a/chrome/browser/chromeos/cros/screen_lock_library.cc |
| +++ b/chrome/browser/chromeos/cros/screen_lock_library.cc |
| @@ -1,29 +1,28 @@ |
| -// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| +// Copyright (c) 2011 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 "chrome/browser/chromeos/cros/screen_lock_library.h" |
| +#include "base/basictypes.h" |
| #include "base/message_loop.h" |
| -#include "base/string_util.h" |
| +#include "base/observer_list.h" |
| #include "chrome/browser/chromeos/cros/cros_library.h" |
| #include "content/browser/browser_thread.h" |
| +#include "third_party/cros/chromeos_screen_lock.h" |
| namespace chromeos { |
| -// This class handles the interaction with the ChromeOS screen lock APIs. |
| class ScreenLockLibraryImpl : public ScreenLockLibrary { |
| public: |
| ScreenLockLibraryImpl() { |
| - if (CrosLibrary::Get()->EnsureLoaded()) { |
| + if (CrosLibrary::Get()->EnsureLoaded()) |
| Init(); |
| - } |
| } |
| ~ScreenLockLibraryImpl() { |
| - if (screen_lock_connection_) { |
| + if (screen_lock_connection_) |
| chromeos::DisconnectScreenLock(screen_lock_connection_); |
|
tfarina
2011/07/28 00:10:52
After disconnecting, the PowerLibraryImpl sets its
|
| - } |
| } |
| void AddObserver(Observer* observer) { |
| @@ -52,8 +51,8 @@ class ScreenLockLibraryImpl : public ScreenLockLibrary { |
| private: |
| void Init() { |
| - screen_lock_connection_ = chromeos::MonitorScreenLock( |
| - &ScreenLockedHandler, this); |
| + screen_lock_connection_ = |
| + chromeos::MonitorScreenLock(&ScreenLockedHandler, this); |
| } |
| void LockScreen() { |