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

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

Issue 686963002: Switching profiler instrumentations from ScopedProfile to ScopedTracker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
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 "base/profiler/scoped_tracker.h"
6 #include "google_apis/gaia/identity_provider.h" 6 #include "google_apis/gaia/identity_provider.h"
7 7
8 IdentityProvider::Observer::~Observer() {} 8 IdentityProvider::Observer::~Observer() {}
9 9
10 IdentityProvider::~IdentityProvider() {} 10 IdentityProvider::~IdentityProvider() {}
11 11
12 void IdentityProvider::AddActiveAccountRefreshTokenObserver( 12 void IdentityProvider::AddActiveAccountRefreshTokenObserver(
13 OAuth2TokenService::Observer* observer) { 13 OAuth2TokenService::Observer* observer) {
14 OAuth2TokenService* token_service = GetTokenService(); 14 OAuth2TokenService* token_service = GetTokenService();
15 if (!token_service || token_service_observers_.HasObserver(observer)) 15 if (!token_service || token_service_observers_.HasObserver(observer))
(...skipping 17 matching lines...) Expand all
33 33
34 void IdentityProvider::AddObserver(Observer* observer) { 34 void IdentityProvider::AddObserver(Observer* observer) {
35 observers_.AddObserver(observer); 35 observers_.AddObserver(observer);
36 } 36 }
37 37
38 void IdentityProvider::RemoveObserver(Observer* observer) { 38 void IdentityProvider::RemoveObserver(Observer* observer) {
39 observers_.RemoveObserver(observer); 39 observers_.RemoveObserver(observer);
40 } 40 }
41 41
42 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. 43 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed.
44 tracked_objects::ScopedProfile tracking_profile( 44 tracked_objects::ScopedTracker tracking_profile(
45 FROM_HERE_WITH_EXPLICIT_FUNCTION( 45 FROM_HERE_WITH_EXPLICIT_FUNCTION(
46 "422460 IdentityProvider::OnRefreshTokenAvailable")); 46 "422460 IdentityProvider::OnRefreshTokenAvailable"));
47 47
48 if (account_id != GetActiveAccountId()) 48 if (account_id != GetActiveAccountId())
49 return; 49 return;
50 FOR_EACH_OBSERVER(OAuth2TokenService::Observer, 50 FOR_EACH_OBSERVER(OAuth2TokenService::Observer,
51 token_service_observers_, 51 token_service_observers_,
52 OnRefreshTokenAvailable(account_id)); 52 OnRefreshTokenAvailable(account_id));
53 } 53 }
54 54
(...skipping 13 matching lines...) Expand all
68 68
69 IdentityProvider::IdentityProvider() : token_service_observer_count_(0) {} 69 IdentityProvider::IdentityProvider() : token_service_observer_count_(0) {}
70 70
71 void IdentityProvider::FireOnActiveAccountLogin() { 71 void IdentityProvider::FireOnActiveAccountLogin() {
72 FOR_EACH_OBSERVER(Observer, observers_, OnActiveAccountLogin()); 72 FOR_EACH_OBSERVER(Observer, observers_, OnActiveAccountLogin());
73 } 73 }
74 74
75 void IdentityProvider::FireOnActiveAccountLogout() { 75 void IdentityProvider::FireOnActiveAccountLogout() {
76 FOR_EACH_OBSERVER(Observer, observers_, OnActiveAccountLogout()); 76 FOR_EACH_OBSERVER(Observer, observers_, OnActiveAccountLogout());
77 } 77 }
OLDNEW
« no previous file with comments | « google_apis/gaia/gaia_oauth_client.cc ('k') | google_apis/gaia/oauth2_access_token_fetcher_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698