summaryrefslogtreecommitdiffstats
path: root/ash/wm/session_state_controller_impl.cc
diff options
context:
space:
mode:
authorbartfab@chromium.org <bartfab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-21 13:58:27 +0000
committerbartfab@chromium.org <bartfab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-21 13:58:27 +0000
commit91545875f50bd58f48d1311355c8f0e4eef847e6 (patch)
treedcca143751c99c5434f72f3fc26fe7371dc3b257 /ash/wm/session_state_controller_impl.cc
parent125d7dcd64991fa580bcd9cb98e43e9baa28f670 (diff)
downloadchromium_src-91545875f50bd58f48d1311355c8f0e4eef847e6.zip
chromium_src-91545875f50bd58f48d1311355c8f0e4eef847e6.tar.gz
chromium_src-91545875f50bd58f48d1311355c8f0e4eef847e6.tar.bz2
Let chromeos::User decide whether the current session can be locked
We have several different methods that try to determine whether the current session can be locked. This redundancy is difficult to maintain and has drifted out of sync in the past. The CL consolidates all checks and makes the chromeos::User class the autoritative source for whether the current session can be locked or not. BUG=152928 Review URL: https://chromiumcodereview.appspot.com/11412100 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169031 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm/session_state_controller_impl.cc')
-rw-r--r--ash/wm/session_state_controller_impl.cc16
1 files changed, 1 insertions, 15 deletions
diff --git a/ash/wm/session_state_controller_impl.cc b/ash/wm/session_state_controller_impl.cc
index 9abb3b8..93b55ce 100644
--- a/ash/wm/session_state_controller_impl.cc
+++ b/ash/wm/session_state_controller_impl.cc
@@ -61,7 +61,7 @@ void SessionStateControllerImpl::OnAppTerminating() {
}
void SessionStateControllerImpl::OnLockStateChanged(bool locked) {
- if (shutting_down_ || (IsLocked()) == locked)
+ if (shutting_down_ || (system_is_locked_ == locked))
return;
system_is_locked_ = locked;
@@ -136,14 +136,6 @@ void SessionStateControllerImpl::StartShutdownAnimation() {
StartPreShutdownAnimationTimer();
}
-bool SessionStateControllerImpl::IsEligibleForLock() {
- return IsLoggedInAsNonGuest() && !IsLocked() && !LockRequested();
-}
-
-bool SessionStateControllerImpl::IsLocked() {
- return system_is_locked_;
-}
-
bool SessionStateControllerImpl::LockRequested() {
return lock_fail_timer_.IsRunning();
}
@@ -246,12 +238,6 @@ void SessionStateControllerImpl::OnRootWindowHostCloseRequested(
Shell::GetInstance()->delegate()->Exit();
}
-bool SessionStateControllerImpl::IsLoggedInAsNonGuest() const {
- // TODO(mukai): think about kiosk mode.
- return (login_status_ != user::LOGGED_IN_NONE) &&
- (login_status_ != user::LOGGED_IN_GUEST);
-}
-
void SessionStateControllerImpl::StartLockTimer() {
lock_timer_.Stop();
lock_timer_.Start(