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

Unified Diff: chrome/browser/chromeos/power/login_lock_state_notifier.cc

Issue 2797743002: ash: Merge LoginStatus update code path (Closed)
Patch Set: for #2 comments Created 3 years, 8 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
« no previous file with comments | « ash/wm/lock_state_controller.cc ('k') | chrome/browser/chromeos/system/tray_accessibility_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « ash/wm/lock_state_controller.cc ('k') | chrome/browser/chromeos/system/tray_accessibility_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698