Index: chrome/browser/chromeos/arc/auth/arc_manual_auth_code_fetcher.cc |
diff --git a/chrome/browser/chromeos/arc/auth/arc_manual_auth_code_fetcher.cc b/chrome/browser/chromeos/arc/auth/arc_manual_auth_code_fetcher.cc |
index 28fe5ef52f801d4b6f98eae79e86573329e666a1..0cbeb5355095ab3b0d56c82eff9c4c90b4bb9f29 100644 |
--- a/chrome/browser/chromeos/arc/auth/arc_manual_auth_code_fetcher.cc |
+++ b/chrome/browser/chromeos/arc/auth/arc_manual_auth_code_fetcher.cc |
@@ -8,6 +8,7 @@ |
#include "base/callback_helpers.h" |
#include "base/logging.h" |
#include "chrome/browser/chromeos/arc/arc_auth_context.h" |
+#include "chrome/browser/chromeos/arc/arc_optin_uma.h" |
namespace arc { |
@@ -40,6 +41,7 @@ void ArcManualAuthCodeFetcher::OnContextPrepared( |
net::URLRequestContextGetter* request_context_getter) { |
DCHECK(!pending_callback_.is_null()); |
if (!request_context_getter) { |
+ UpdateOptInCancelUMA(OptInCancelReason::NETWORK_ERROR); |
support_host_->ShowError(ArcSupportHost::Error::SIGN_IN_NETWORK_ERROR, |
false); |
return; |
@@ -53,6 +55,12 @@ void ArcManualAuthCodeFetcher::OnAuthSucceeded(const std::string& auth_code) { |
base::ResetAndReturn(&pending_callback_).Run(auth_code); |
} |
+void ArcManualAuthCodeFetcher::OnAuthFailed() { |
+ // Don't report via callback. Extension is already showing more detailed |
+ // information. Update only UMA here. |
+ UpdateOptInCancelUMA(OptInCancelReason::NETWORK_ERROR); |
+} |
+ |
void ArcManualAuthCodeFetcher::OnRetryClicked() { |
DCHECK(!pending_callback_.is_null()); |
FetchInternal(); |