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

Unified Diff: components/signin/core/browser/gaia_cookie_manager_service.cc

Issue 2697563002: Pass time since profile was loaded and request count on each ListAccount request to Gaia. (Closed)
Patch Set: fix printf format 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 | « components/signin/core/browser/gaia_cookie_manager_service.h ('k') | no next file » | 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 28f30f1d2ffab1aa02322776bfcc0253688d930f..818e58214a593091d67bcf0e0c21309ff5668ff4 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 <queue>
+#include "base/format_macros.h"
#include "base/json/json_reader.h"
#include "base/metrics/histogram_macros.h"
#include "base/stl_util.h"
@@ -298,7 +299,11 @@ GaiaCookieManagerService::GaiaCookieManagerService(
fetcher_retries_(0),
source_(source),
external_cc_result_fetched_(false),
- list_accounts_stale_(true) {
+ list_accounts_stale_(true),
+ // |GaiaCookieManagerService| is created as soon as the profle is
+ // initialized so it is acceptable to use of this
+ // |GaiaCookieManagerService| as the time when the profile is loaded.
+ profile_load_time_(base::Time::Now()) {
DCHECK(!source_.empty());
}
@@ -754,9 +759,18 @@ void GaiaCookieManagerService::StartFetchingLogOut() {
void GaiaCookieManagerService::StartFetchingListAccounts() {
VLOG(1) << "GaiaCookieManagerService::ListAccounts";
+
+ // 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;
Roger Tawa OOO till Jul 10th 2017/03/01 13:42:37 Should make this a member of the class. If you ha
msarda 2017/03/01 14:35:24 Done.
+ std::string request_source = GetSourceForRequest(requests_.front());
+ std::string source_with_debug_info = base::StringPrintf(
+ "%s,counter:%" PRId32 ",load_time_ms:%" PRId64, request_source.c_str(),
+ list_accounts_request_counter++,
+ (base::Time::Now() - profile_load_time_).InMilliseconds());
+
gaia_auth_fetcher_.reset(signin_client_->CreateGaiaAuthFetcher(
- this, GetSourceForRequest(requests_.front()),
- signin_client_->GetURLRequestContext()));
+ this, source_with_debug_info, signin_client_->GetURLRequestContext()));
gaia_auth_fetcher_->StartListAccounts();
}
« no previous file with comments | « components/signin/core/browser/gaia_cookie_manager_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698