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

Unified Diff: google_apis/gaia/oauth2_token_service.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
Index: google_apis/gaia/oauth2_token_service.cc
diff --git a/google_apis/gaia/oauth2_token_service.cc b/google_apis/gaia/oauth2_token_service.cc
index 34dfc1bda906b2f52bb2006153a91b17568740ac..524564614d39df6147b27b91ac9d5a0310eefb15 100644
--- a/google_apis/gaia/oauth2_token_service.cc
+++ b/google_apis/gaia/oauth2_token_service.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/memory/weak_ptr.h"
#include "base/message_loop/message_loop.h"
+#include "base/metrics/histogram_macros.h"
#include "base/profiler/scoped_tracker.h"
#include "base/rand_util.h"
#include "base/stl_util.h"
@@ -291,6 +292,8 @@ void OAuth2TokenService::Fetcher::OnGetTokenFailure(
base::TimeDelta backoff = base::TimeDelta::FromMilliseconds(
ComputeExponentialBackOffMilliseconds(retry_number_));
++retry_number_;
+ UMA_HISTOGRAM_ENUMERATION("Signin.OAuth2TokenGetRetry",
+ error.state(), GoogleServiceAuthError::NUM_STATES);
retry_timer_.Stop();
retry_timer_.Start(FROM_HERE,
backoff,
@@ -299,6 +302,8 @@ void OAuth2TokenService::Fetcher::OnGetTokenFailure(
return;
}
+ UMA_HISTOGRAM_ENUMERATION("Signin.OAuth2TokenGetFailure",
+ error.state(), GoogleServiceAuthError::NUM_STATES);
error_ = error;
InformWaitingRequestsAndDelete();
}
« no previous file with comments | « components/signin/core/browser/gaia_cookie_manager_service_unittest.cc ('k') | google_apis/gaia/ubertoken_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698