| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/login/login_screen.h" | 5 #include "chrome/browser/chromeos/login/login_screen.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 // Check networking after trying to login in case user is | 84 // Check networking after trying to login in case user is |
| 85 // cached locally or the local admin account. | 85 // cached locally or the local admin account. |
| 86 if (!network || !CrosLibrary::Get()->EnsureLoaded()) { | 86 if (!network || !CrosLibrary::Get()->EnsureLoaded()) { |
| 87 ShowError(IDS_LOGIN_ERROR_NO_NETWORK_LIBRARY, error); | 87 ShowError(IDS_LOGIN_ERROR_NO_NETWORK_LIBRARY, error); |
| 88 } else if (!network->Connected()) { | 88 } else if (!network->Connected()) { |
| 89 ShowError(IDS_LOGIN_ERROR_OFFLINE_FAILED_NETWORK_NOT_CONNECTED, error); | 89 ShowError(IDS_LOGIN_ERROR_OFFLINE_FAILED_NETWORK_NOT_CONNECTED, error); |
| 90 } else { | 90 } else { |
| 91 ShowError(IDS_LOGIN_ERROR_AUTHENTICATING_NEW, error); | 91 ShowError(IDS_LOGIN_ERROR_AUTHENTICATING_NEW, error); |
| 92 } | 92 } |
| 93 | 93 |
| 94 view()->ClearAndEnablePassword(); | 94 view()->ClearAndFocusPassword(); |
| 95 view()->EnableInputControls(true); |
| 95 } | 96 } |
| 96 | 97 |
| 97 void LoginScreen::OnLoginSuccess( | 98 void LoginScreen::OnLoginSuccess( |
| 98 const std::string& username, | 99 const std::string& username, |
| 99 const std::string& password, | 100 const std::string& password, |
| 100 const GaiaAuthConsumer::ClientLoginResult& credentials, | 101 const GaiaAuthConsumer::ClientLoginResult& credentials, |
| 101 bool pending_requests) { | 102 bool pending_requests) { |
| 102 | 103 |
| 103 delegate()->GetObserver(this)->OnExit(ScreenObserver::LOGIN_SIGN_IN_SELECTED); | 104 delegate()->GetObserver(this)->OnExit(ScreenObserver::LOGIN_SIGN_IN_SELECTED); |
| 104 AppendStartUrlToCmdline(); | 105 AppendStartUrlToCmdline(); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 130 view()->GetWidget(), | 131 view()->GetWidget(), |
| 131 view()->GetPasswordBounds(), | 132 view()->GetPasswordBounds(), |
| 132 BubbleBorder::LEFT_TOP, | 133 BubbleBorder::LEFT_TOP, |
| 133 ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_WARNING), | 134 ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_WARNING), |
| 134 error_text, | 135 error_text, |
| 135 l10n_util::GetString(IDS_CANT_ACCESS_ACCOUNT_BUTTON), | 136 l10n_util::GetString(IDS_CANT_ACCESS_ACCOUNT_BUTTON), |
| 136 this); | 137 this); |
| 137 } | 138 } |
| 138 | 139 |
| 139 } // namespace chromeos | 140 } // namespace chromeos |
| OLD | NEW |