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

Unified Diff: chrome/browser/ui/webui/signin/user_manager_screen_handler.cc

Issue 591533002: Different message for offline unlock, first time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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 | « chrome/browser/profiles/profile_metrics.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..34c1fe76a9b5796dcdd5b5fad0008f23eed247ec 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;
+ 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 :
+ IDS_LOGIN_ERROR_AUTHENTICATING)),
base::StringValue(""),
base::FundamentalValue(0));
}
« no previous file with comments | « chrome/browser/profiles/profile_metrics.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698