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

Side by Side Diff: google_apis/gaia/identity_provider.cc

Issue 643183003: Adding instrumentation to locate the source of jankiness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « google_apis/gaia/account_tracker.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/profiler/scoped_profile.h"
5 #include "google_apis/gaia/identity_provider.h" 6 #include "google_apis/gaia/identity_provider.h"
6 7
7 IdentityProvider::Observer::~Observer() {} 8 IdentityProvider::Observer::~Observer() {}
8 9
9 IdentityProvider::~IdentityProvider() {} 10 IdentityProvider::~IdentityProvider() {}
10 11
11 void IdentityProvider::AddActiveAccountRefreshTokenObserver( 12 void IdentityProvider::AddActiveAccountRefreshTokenObserver(
12 OAuth2TokenService::Observer* observer) { 13 OAuth2TokenService::Observer* observer) {
13 OAuth2TokenService* token_service = GetTokenService(); 14 OAuth2TokenService* token_service = GetTokenService();
14 if (!token_service || token_service_observers_.HasObserver(observer)) 15 if (!token_service || token_service_observers_.HasObserver(observer))
(...skipping 17 matching lines...) Expand all
32 33
33 void IdentityProvider::AddObserver(Observer* observer) { 34 void IdentityProvider::AddObserver(Observer* observer) {
34 observers_.AddObserver(observer); 35 observers_.AddObserver(observer);
35 } 36 }
36 37
37 void IdentityProvider::RemoveObserver(Observer* observer) { 38 void IdentityProvider::RemoveObserver(Observer* observer) {
38 observers_.RemoveObserver(observer); 39 observers_.RemoveObserver(observer);
39 } 40 }
40 41
41 void IdentityProvider::OnRefreshTokenAvailable(const std::string& account_id) { 42 void IdentityProvider::OnRefreshTokenAvailable(const std::string& account_id) {
43 // TODO(vadimt): Remove ScopedProfile below once crbug.com/422460 is fixed.
44 tracked_objects::ScopedProfile tracking_profile(
45 FROM_HERE_WITH_EXPLICIT_FUNCTION(
46 "422460 IdentityProvider::OnRefreshTokenAvailable"));
47
42 if (account_id != GetActiveAccountId()) 48 if (account_id != GetActiveAccountId())
43 return; 49 return;
44 FOR_EACH_OBSERVER(OAuth2TokenService::Observer, 50 FOR_EACH_OBSERVER(OAuth2TokenService::Observer,
45 token_service_observers_, 51 token_service_observers_,
46 OnRefreshTokenAvailable(account_id)); 52 OnRefreshTokenAvailable(account_id));
47 } 53 }
48 54
49 void IdentityProvider::OnRefreshTokenRevoked(const std::string& account_id) { 55 void IdentityProvider::OnRefreshTokenRevoked(const std::string& account_id) {
50 if (account_id != GetActiveAccountId()) 56 if (account_id != GetActiveAccountId())
51 return; 57 return;
(...skipping 10 matching lines...) Expand all
62 68
63 IdentityProvider::IdentityProvider() : token_service_observer_count_(0) {} 69 IdentityProvider::IdentityProvider() : token_service_observer_count_(0) {}
64 70
65 void IdentityProvider::FireOnActiveAccountLogin() { 71 void IdentityProvider::FireOnActiveAccountLogin() {
66 FOR_EACH_OBSERVER(Observer, observers_, OnActiveAccountLogin()); 72 FOR_EACH_OBSERVER(Observer, observers_, OnActiveAccountLogin());
67 } 73 }
68 74
69 void IdentityProvider::FireOnActiveAccountLogout() { 75 void IdentityProvider::FireOnActiveAccountLogout() {
70 FOR_EACH_OBSERVER(Observer, observers_, OnActiveAccountLogout()); 76 FOR_EACH_OBSERVER(Observer, observers_, OnActiveAccountLogout());
71 } 77 }
OLDNEW
« no previous file with comments | « google_apis/gaia/account_tracker.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698