| Index: chrome/browser/chromeos/login/google_authenticator.cc
|
| diff --git a/chrome/browser/chromeos/login/google_authenticator.cc b/chrome/browser/chromeos/login/google_authenticator.cc
|
| index 81a1851288a487ce011c4598afe3e3fc2117c505..5d246ddda459db232cccdc2fcebf6e82e3716e2f 100644
|
| --- a/chrome/browser/chromeos/login/google_authenticator.cc
|
| +++ b/chrome/browser/chromeos/login/google_authenticator.cc
|
| @@ -61,7 +61,8 @@ GoogleAuthenticator::GoogleAuthenticator(LoginStatusConsumer* consumer)
|
| hosted_policy_(GaiaAuthFetcher::HostedAccountsAllowed),
|
| unlock_(false),
|
| try_again_(true),
|
| - checked_for_localaccount_(false) {
|
| + checked_for_localaccount_(false),
|
| + last_error_(GoogleServiceAuthError::None()) {
|
| CHECK(chromeos::CrosLibrary::Get()->EnsureLoaded());
|
| // If not already owned, this is a no-op. If it is, this loads the owner's
|
| // public key off of disk.
|
| @@ -205,7 +206,9 @@ void GoogleAuthenticator::OnClientLoginSuccess(
|
| }
|
|
|
| void GoogleAuthenticator::OnClientLoginFailure(
|
| - const GoogleServiceAuthError& error) {
|
| + const GoogleServiceAuthError& error) {
|
| + // Save off the last error.
|
| + last_error_ = error;
|
|
|
| if (error.state() == GoogleServiceAuthError::REQUEST_CANCELED) {
|
| if (try_again_) {
|
| @@ -280,6 +283,13 @@ void GoogleAuthenticator::OnLoginSuccess(
|
| NotificationService::AllSources(),
|
| Details<AuthenticationNotificationDetails>(&details));
|
|
|
| + // If there was an error during the login attempt, notify the consumer.
|
| + if (last_error_.state() != GoogleServiceAuthError::NONE) {
|
| + consumer_->SetLoginFailure(
|
| + LoginFailure::FromNetworkAuthFailure(last_error_));
|
| + last_error_ = GoogleServiceAuthError::None();
|
| + }
|
| +
|
| int mount_error = chromeos::kCryptohomeMountErrorNone;
|
| BootTimesLoader::Get()->AddLoginTimeMarker("CryptohomeMounting", false);
|
| if (unlock_ ||
|
|
|