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

Unified Diff: components/signin/core/browser/gaia_cookie_manager_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
« no previous file with comments | « no previous file | components/signin/core/browser/gaia_cookie_manager_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/signin/core/browser/gaia_cookie_manager_service.cc
diff --git a/components/signin/core/browser/gaia_cookie_manager_service.cc b/components/signin/core/browser/gaia_cookie_manager_service.cc
index 7eb1c283465c9d5ce76504a86f7973fc8bc04f0d..e6697887bd99437fdc34941148937e127df32b23 100644
--- a/components/signin/core/browser/gaia_cookie_manager_service.cc
+++ b/components/signin/core/browser/gaia_cookie_manager_service.cc
@@ -8,6 +8,7 @@
#include <vector>
#include "base/json/json_reader.h"
+#include "base/metrics/histogram_macros.h"
#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
@@ -526,6 +527,8 @@ void GaiaCookieManagerService::OnMergeSessionFailure(
<< " error=" << error.ToString();
if (++fetcher_retries_ < kMaxFetcherRetries && IsTransientError(error)) {
fetcher_backoff_.InformOfRequest(false);
+ UMA_HISTOGRAM_ENUMERATION("OAuth2Login.MergeSessionRetry",
+ error.state(), GoogleServiceAuthError::NUM_STATES);
fetcher_timer_.Start(
FROM_HERE, fetcher_backoff_.GetTimeUntilRelease(),
base::Bind(&SigninClient::DelayNetworkCall,
@@ -538,6 +541,9 @@ void GaiaCookieManagerService::OnMergeSessionFailure(
uber_token_ = std::string();
const std::string account_id = requests_.front().account_id();
+
+ UMA_HISTOGRAM_ENUMERATION("OAuth2Login.MergeSessionFailure",
+ error.state(), GoogleServiceAuthError::NUM_STATES);
HandleNextRequest();
SignalComplete(account_id, error);
}
@@ -574,6 +580,8 @@ void GaiaCookieManagerService::OnListAccountsFailure(
GaiaCookieRequestType::LIST_ACCOUNTS);
if (++fetcher_retries_ < kMaxFetcherRetries && IsTransientError(error)) {
fetcher_backoff_.InformOfRequest(false);
+ UMA_HISTOGRAM_ENUMERATION("Signin.ListAccountsRetry",
+ error.state(), GoogleServiceAuthError::NUM_STATES);
fetcher_timer_.Start(
FROM_HERE, fetcher_backoff_.GetTimeUntilRelease(),
base::Bind(&SigninClient::DelayNetworkCall,
@@ -584,6 +592,8 @@ void GaiaCookieManagerService::OnListAccountsFailure(
return;
}
+ UMA_HISTOGRAM_ENUMERATION("Signin.ListAccountsFailure",
+ error.state(), GoogleServiceAuthError::NUM_STATES);
FOR_EACH_OBSERVER(Observer, observer_list_,
OnGaiaAccountsInCookieUpdated(listed_accounts_, error));
HandleNextRequest();
« no previous file with comments | « no previous file | components/signin/core/browser/gaia_cookie_manager_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698