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

Unified Diff: google_apis/gaia/ubertoken_fetcher.cc

Issue 1148283005: Add histograms to entire MergeSession flow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: jwd comments Created 5 years, 7 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 | « google_apis/gaia/oauth2_token_service.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gaia/ubertoken_fetcher.cc
diff --git a/google_apis/gaia/ubertoken_fetcher.cc b/google_apis/gaia/ubertoken_fetcher.cc
index 15e5932bed620498fe8ede7fc2cd6ad2369c987d..8fa330fc962c85bbae8fd159b2b5e5eb138f695f 100644
--- a/google_apis/gaia/ubertoken_fetcher.cc
+++ b/google_apis/gaia/ubertoken_fetcher.cc
@@ -7,6 +7,7 @@
#include <vector>
#include "base/logging.h"
+#include "base/metrics/histogram_macros.h"
#include "base/rand_util.h"
#include "base/time/time.h"
#include "google_apis/gaia/gaia_auth_fetcher.h"
@@ -58,6 +59,8 @@ void UbertokenFetcher::OnUberAuthTokenFailure(
// Calculate an exponential backoff with randomness of less than 1 sec.
double backoff = base::RandDouble() + (1 << retry_number_);
++retry_number_;
+ UMA_HISTOGRAM_ENUMERATION("Signin.UberTokenRetry",
+ error.state(), GoogleServiceAuthError::NUM_STATES);
retry_timer_.Stop();
retry_timer_.Start(FROM_HERE,
base::TimeDelta::FromSecondsD(backoff),
@@ -79,6 +82,8 @@ void UbertokenFetcher::OnUberAuthTokenFailure(
}
}
+ UMA_HISTOGRAM_ENUMERATION("Signin.UberTokenFailure",
+ error.state(), GoogleServiceAuthError::NUM_STATES);
consumer_->OnUbertokenFailure(error);
}
« no previous file with comments | « google_apis/gaia/oauth2_token_service.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698