Chromium Code Reviews| Index: chrome/browser/ui/webui/signin/user_manager_screen_handler.cc |
| diff --git a/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc b/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc |
| index 6347f05dc41078d21ac56f8edab65619afbb23ef..2ca3e38934f0f43805dd31fe3dafba66a0ebe10a 100644 |
| --- a/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc |
| +++ b/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc |
| @@ -473,9 +473,14 @@ void UserManagerScreenHandler::OnClientLoginFailure( |
| state == GoogleServiceAuthError::TWO_FACTOR || |
| state == GoogleServiceAuthError::ACCOUNT_DELETED || |
| state == GoogleServiceAuthError::ACCOUNT_DISABLED); |
| - ReportAuthenticationResult(success, |
| - success ? ProfileMetrics::AUTH_ONLINE |
| - : ProfileMetrics::AUTH_FAILED); |
| + bool offline = (state == GoogleServiceAuthError::CONNECTION_FAILED || |
| + state == GoogleServiceAuthError::SERVICE_UNAVAILABLE || |
| + state == GoogleServiceAuthError::REQUEST_CANCELED); |
| + ProfileMetrics::ProfileAuth failure_metric = |
| + offline ? ProfileMetrics::AUTH_FAILED_OFFLINE |
| + : ProfileMetrics::AUTH_FAILED; |
|
noms (inactive)
2014/09/19 17:38:09
nit: put the : at the end of L480
|
| + ReportAuthenticationResult( |
| + success, success ? ProfileMetrics::AUTH_ONLINE : failure_metric); |
| } |
| void UserManagerScreenHandler::RegisterMessages() { |
| @@ -686,8 +691,10 @@ void UserManagerScreenHandler::ReportAuthenticationResult( |
| web_ui()->CallJavascriptFunction( |
| "cr.ui.Oobe.showSignInError", |
| base::FundamentalValue(0), |
| - base::StringValue( |
| - l10n_util::GetStringUTF8(IDS_LOGIN_ERROR_AUTHENTICATING)), |
| + base::StringValue(l10n_util::GetStringUTF8( |
| + auth == ProfileMetrics::AUTH_FAILED_OFFLINE |
| + ? IDS_LOGIN_ERROR_AUTHENTICATING_OFFLINE |
|
noms (inactive)
2014/09/19 17:38:09
The ? and : should go to at the end of the line. A
|
| + : IDS_LOGIN_ERROR_AUTHENTICATING)), |
| base::StringValue(""), |
| base::FundamentalValue(0)); |
| } |