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

Unified Diff: google_apis/gaia/oauth2_token_service.cc

Issue 685033006: Instrumenting internals of AccountIdFetcher::Start to locate the source of jankiness. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rogerta@ comments Created 6 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 dac940b58ae2e20c51f821599ce2d8216b5b44fd..842bea70f4b30b9fdfccc961db40f1c721484aa1 100644
--- a/google_apis/gaia/oauth2_token_service.cc
+++ b/google_apis/gaia/oauth2_token_service.cc
@@ -214,6 +214,12 @@ OAuth2TokenService::Fetcher* OAuth2TokenService::Fetcher::CreateAndStart(
client_secret,
scopes,
waiting_request);
+
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "422460 OAuth2TokenService::Fetcher::CreateAndStart"));
+
fetcher->Start();
return fetcher;
}
@@ -461,6 +467,11 @@ OAuth2TokenService::StartRequestForClientWithContext(
Consumer* consumer) {
DCHECK(CalledOnValidThread());
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed.
+ tracked_objects::ScopedTracker tracking_profile1(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "422460 OAuth2TokenService::StartRequestForClientWithContext 1"));
+
scoped_ptr<RequestImpl> request(new RequestImpl(account_id, consumer));
FOR_EACH_OBSERVER(DiagnosticsObserver, diagnostics_observer_list_,
OnAccessTokenRequested(account_id,
@@ -468,6 +479,11 @@ OAuth2TokenService::StartRequestForClientWithContext(
scopes));
if (!RefreshTokenIsAvailable(account_id)) {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed.
+ tracked_objects::ScopedTracker tracking_profile2(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "422460 OAuth2TokenService::StartRequestForClientWithContext 2"));
+
GoogleServiceAuthError error(GoogleServiceAuthError::USER_NOT_SIGNED_UP);
FOR_EACH_OBSERVER(DiagnosticsObserver, diagnostics_observer_list_,
@@ -488,6 +504,11 @@ OAuth2TokenService::StartRequestForClientWithContext(
account_id,
scopes);
if (HasCacheEntry(request_parameters)) {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed.
+ tracked_objects::ScopedTracker tracking_profile3(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "422460 OAuth2TokenService::StartRequestForClientWithContext 3"));
+
StartCacheLookupRequest(request.get(), request_parameters, consumer);
} else {
FetchOAuth2Token(request.get(),
@@ -506,6 +527,11 @@ void OAuth2TokenService::FetchOAuth2Token(RequestImpl* request,
const std::string& client_id,
const std::string& client_secret,
const ScopeSet& scopes) {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "422460 OAuth2TokenService::FetchOAuth2Token"));
+
// If there is already a pending fetcher for |scopes| and |account_id|,
// simply register this |request| for those results rather than starting
// a new fetcher.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698