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

Unified Diff: google_apis/gaia/identity_provider.cc

Issue 2422843003: Remove usage of FOR_EACH_OBSERVER macro in google_apis (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « google_apis/gaia/account_tracker.cc ('k') | google_apis/gaia/oauth2_token_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gaia/identity_provider.cc
diff --git a/google_apis/gaia/identity_provider.cc b/google_apis/gaia/identity_provider.cc
index be698ffbfa0cf487ff4a312b86473092d8f4b3d7..77a14809416fce6647151f486c91bf2006fd5c81 100644
--- a/google_apis/gaia/identity_provider.cc
+++ b/google_apis/gaia/identity_provider.cc
@@ -48,31 +48,30 @@ void IdentityProvider::OnRefreshTokenAvailable(const std::string& account_id) {
if (account_id != GetActiveAccountId())
return;
- FOR_EACH_OBSERVER(OAuth2TokenService::Observer,
- token_service_observers_,
- OnRefreshTokenAvailable(account_id));
+ for (auto& observer : token_service_observers_)
+ observer.OnRefreshTokenAvailable(account_id);
}
void IdentityProvider::OnRefreshTokenRevoked(const std::string& account_id) {
if (account_id != GetActiveAccountId())
return;
- FOR_EACH_OBSERVER(OAuth2TokenService::Observer,
- token_service_observers_,
- OnRefreshTokenRevoked(account_id));
+ for (auto& observer : token_service_observers_)
+ observer.OnRefreshTokenRevoked(account_id);
}
void IdentityProvider::OnRefreshTokensLoaded() {
- FOR_EACH_OBSERVER(OAuth2TokenService::Observer,
- token_service_observers_,
- OnRefreshTokensLoaded());
+ for (auto& observer : token_service_observers_)
+ observer.OnRefreshTokensLoaded();
}
IdentityProvider::IdentityProvider() : token_service_observer_count_(0) {}
void IdentityProvider::FireOnActiveAccountLogin() {
- FOR_EACH_OBSERVER(Observer, observers_, OnActiveAccountLogin());
+ for (auto& observer : observers_)
+ observer.OnActiveAccountLogin();
}
void IdentityProvider::FireOnActiveAccountLogout() {
- FOR_EACH_OBSERVER(Observer, observers_, OnActiveAccountLogout());
+ for (auto& observer : observers_)
+ observer.OnActiveAccountLogout();
}
« no previous file with comments | « google_apis/gaia/account_tracker.cc ('k') | google_apis/gaia/oauth2_token_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698