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

Unified Diff: chrome/browser/chromeos/arc/auth/arc_manual_auth_code_fetcher.cc

Issue 2618603003: arc: Restore UMA statistics for failures in LSO flow. (Closed)
Patch Set: Created 3 years, 11 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
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();

Powered by Google App Engine
This is Rietveld 408576698