Index: chrome/browser/chromeos/login/existing_user_controller.cc |
diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc |
index 19daaf962027f1a5bc413e7e071c762136f4f29e..984fbfea6b908b724668dcc8242180f01962b8a0 100644 |
--- a/chrome/browser/chromeos/login/existing_user_controller.cc |
+++ b/chrome/browser/chromeos/login/existing_user_controller.cc |
@@ -92,6 +92,9 @@ const char kCaptivePortalLaunchURL[] = "http://www.google.com/"; |
// Delay for transferring the auth cache to the system profile. |
const long int kAuthCacheTransferDelayMs = 2000; |
+// Delay for rebooting the machine if safe-mode login has failed. |
Chris Masone
2012/03/22 16:18:25
s/reboot/logout/
Or something that's not 'reboot'
pastarmovj
2012/03/23 13:00:25
Done.
|
+const long int kSafeModeRebootDelayMs = 30000; |
+ |
// Makes a call to the policy subsystem to reload the policy when we detect |
// authentication change. |
void RefreshPoliciesOnUIThread() { |
@@ -472,7 +475,15 @@ void ExistingUserController::OnLoginFailure(const LoginFailure& failure) { |
guest_mode_url_ = GURL::EmptyGURL(); |
std::string error = failure.GetErrorString(); |
- if (!online_succeeded_for_.empty()) { |
+ if (failure.reason() == LoginFailure::OWNER_REQUIRED) { |
+ ShowError(IDS_LOGIN_ERROR_OWNER_REQUIRED, error); |
+ content::BrowserThread::PostDelayedTask( |
+ content::BrowserThread::UI, FROM_HERE, |
+ base::Bind(&SessionManagerClient::StopSession, |
+ base::Unretained(DBusThreadManager::Get()-> |
+ GetSessionManagerClient())), |
+ kSafeModeRebootDelayMs); |
+ } else if (!online_succeeded_for_.empty()) { |
ShowGaiaPasswordChanged(online_succeeded_for_); |
} else { |
// Check networking after trying to login in case user is |