| Index: chrome/browser/chromeos/power/login_lock_state_notifier.cc
|
| diff --git a/chrome/browser/chromeos/power/login_lock_state_notifier.cc b/chrome/browser/chromeos/power/login_lock_state_notifier.cc
|
| index e6e16b5c72d8a428065564bbbc92c37d0d4d671f..b70ecc5e4435b9ef488eb42189bd377535c4a062 100644
|
| --- a/chrome/browser/chromeos/power/login_lock_state_notifier.cc
|
| +++ b/chrome/browser/chromeos/power/login_lock_state_notifier.cc
|
| @@ -4,9 +4,6 @@
|
|
|
| #include "chrome/browser/chromeos/power/login_lock_state_notifier.h"
|
|
|
| -#include "ash/common/login_status.h"
|
| -#include "ash/common/system/tray/system_tray_delegate.h"
|
| -#include "ash/common/wm_shell.h"
|
| #include "ash/shell.h"
|
| #include "base/logging.h"
|
| #include "chrome/browser/chrome_notification_types.h"
|
| @@ -19,28 +16,12 @@ class LockStateControllerDelegate;
|
|
|
| namespace chromeos {
|
|
|
| -namespace {
|
| -
|
| -ash::LoginStatus GetCurrentLoginStatus() {
|
| - if (ash::Shell::Get()->system_tray_delegate())
|
| - return ash::Shell::Get()->system_tray_delegate()->GetUserLoginStatus();
|
| -
|
| - return ash::LoginStatus::NOT_LOGGED_IN;
|
| -}
|
| -
|
| -} // namespace
|
| -
|
| LoginLockStateNotifier::LoginLockStateNotifier() {
|
| - registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_CHANGED,
|
| - content::NotificationService::AllSources());
|
| registrar_.Add(this, chrome::NOTIFICATION_APP_TERMINATING,
|
| content::NotificationService::AllSources());
|
| registrar_.Add(this, chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED,
|
| content::NotificationService::AllSources());
|
|
|
| - // Tell the controller about the initial state.
|
| - ash::Shell::GetInstance()->OnLoginStateChanged(GetCurrentLoginStatus());
|
| -
|
| const ScreenLocker* locker = ScreenLocker::default_screen_locker();
|
| bool locked = locker && locker->locked();
|
| ash::Shell::GetInstance()->OnLockStateChanged(locked);
|
| @@ -53,10 +34,6 @@ void LoginLockStateNotifier::Observe(
|
| const content::NotificationSource& source,
|
| const content::NotificationDetails& details) {
|
| switch (type) {
|
| - case chrome::NOTIFICATION_LOGIN_USER_CHANGED: {
|
| - ash::Shell::GetInstance()->OnLoginStateChanged(GetCurrentLoginStatus());
|
| - break;
|
| - }
|
| case chrome::NOTIFICATION_APP_TERMINATING:
|
| ash::Shell::GetInstance()->OnAppTerminating();
|
| break;
|
|
|