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

Unified Diff: chrome/browser/chromeos/login/screen_locker.cc

Issue 11737015: "Lock on idle and suspend": Log out instead if session cannot be locked (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 12 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/screen_locker.cc
diff --git a/chrome/browser/chromeos/login/screen_locker.cc b/chrome/browser/chromeos/login/screen_locker.cc
index 8fb34537294a5a91f9a3844ff40a14f6f94377a6..d002223409cc1e7705d7fff0d0c1cfce53a21e4e 100644
--- a/chrome/browser/chromeos/login/screen_locker.cc
+++ b/chrome/browser/chromeos/login/screen_locker.cc
@@ -95,13 +95,15 @@ class ScreenLockObserver : public chromeos::SessionManagerClient::Observer,
virtual void LockScreen() OVERRIDE {
VLOG(1) << "Received LockScreen D-Bus signal from session manager";
- if (session_started_) {
+ if (session_started_ &&
+ chromeos::UserManager::Get()->CanCurrentUserLock()) {
Nikita (slow) 2013/01/09 12:55:35 I'm not sure that making logout in this case makes
chromeos::ScreenLocker::Show();
} else {
- // If the user has not completed the sign in we will log them out. This
- // avoids complications with displaying the lock screen over the login
- // screen while remaining secure in the case that they walk away during
- // the signin steps. See crbug.com/112225 and crbug.com/110933.
+ // If the current user's session cannot be locked or the user has not
+ // completed all sign-in steps yet, log out instead. The latter is done to
+ // avoid complications with displaying the lock screen over the login
+ // screen while remaining secure in the case the user walks away during
+ // the sign-in steps. See crbug.com/112225 and crbug.com/110933.
VLOG(1) << "Calling session manager's StopSession D-Bus method";
chromeos::DBusThreadManager::Get()->
GetSessionManagerClient()->StopSession();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698