diff options
author | bartfab@chromium.org <bartfab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-21 13:58:27 +0000 |
---|---|---|
committer | bartfab@chromium.org <bartfab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-21 13:58:27 +0000 |
commit | 91545875f50bd58f48d1311355c8f0e4eef847e6 (patch) | |
tree | dcca143751c99c5434f72f3fc26fe7371dc3b257 /ash/shell | |
parent | 125d7dcd64991fa580bcd9cb98e43e9baa28f670 (diff) | |
download | chromium_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/shell')
-rw-r--r-- | ash/shell/shell_delegate_impl.cc | 4 | ||||
-rw-r--r-- | ash/shell/shell_delegate_impl.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/ash/shell/shell_delegate_impl.cc b/ash/shell/shell_delegate_impl.cc index 4f0f022..42311ca 100644 --- a/ash/shell/shell_delegate_impl.cc +++ b/ash/shell/shell_delegate_impl.cc @@ -46,6 +46,10 @@ bool ShellDelegateImpl::IsFirstRunAfterBoot() { return false; } +bool ShellDelegateImpl::CanLockScreen() { + return true; +} + void ShellDelegateImpl::LockScreen() { ash::shell::CreateLockScreen(); locked_ = true; diff --git a/ash/shell/shell_delegate_impl.h b/ash/shell/shell_delegate_impl.h index 6f55237..9e34aff 100644 --- a/ash/shell/shell_delegate_impl.h +++ b/ash/shell/shell_delegate_impl.h @@ -24,6 +24,7 @@ class ShellDelegateImpl : public ash::ShellDelegate { virtual bool IsUserLoggedIn() OVERRIDE; virtual bool IsSessionStarted() OVERRIDE; virtual bool IsFirstRunAfterBoot() OVERRIDE; + virtual bool CanLockScreen() OVERRIDE; virtual void LockScreen() OVERRIDE; virtual void UnlockScreen() OVERRIDE; virtual bool IsScreenLocked() const OVERRIDE; |