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

Unified Diff: google_apis/gaia/gaia_auth_fetcher.cc

Issue 2697563002: Pass time since profile was loaded and request count on each ListAccount request to Gaia. (Closed)
Patch Set: Nit Created 3 years, 10 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/gaia_auth_fetcher.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gaia/gaia_auth_fetcher.cc
diff --git a/google_apis/gaia/gaia_auth_fetcher.cc b/google_apis/gaia/gaia_auth_fetcher.cc
index 789fa4744d472219cd7c4553d9efb5bfbd6e3a10..59c0f653ce2683dc6cd2677d6e0be9b714a6a7fd 100644
--- a/google_apis/gaia/gaia_auth_fetcher.cc
+++ b/google_apis/gaia/gaia_auth_fetcher.cc
@@ -649,12 +649,19 @@ void GaiaAuthFetcher::StartOAuthLogin(const std::string& access_token,
oauth_login_gurl_, net::LOAD_NORMAL);
}
-void GaiaAuthFetcher::StartListAccounts() {
+void GaiaAuthFetcher::StartListAccounts(const base::Time& profile_load_time) {
DCHECK(!fetch_pending_) << "Tried to fetch two things at once!";
+ // Report the time since the profile was loaded and the number of this request
+ // in order to debug channel ID issues observed on Gaia.
+ static int32_t list_accounts_request_counter = 0;
+ std::string extra_headers = base::StringPrintf(
+ "Origin: %s \r\n RequestCount: %d \r\n TimeSinceProfileLoad: %ld",
+ "https://www.google.com", list_accounts_request_counter++,
+ (base::Time::Now() - profile_load_time).InMilliseconds());
CreateAndStartGaiaFetcher(" ", // To force an HTTP POST.
- "Origin: https://www.google.com",
- list_accounts_gurl_, net::LOAD_NORMAL);
+ extra_headers, list_accounts_gurl_,
vanupam 2017/02/15 03:08:28 list_accounts_gurl_ is assigned in the constructor
msarda 2017/03/01 10:26:36 Done.
+ net::LOAD_NORMAL);
}
void GaiaAuthFetcher::StartLogOut() {
« no previous file with comments | « google_apis/gaia/gaia_auth_fetcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698