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

Unified Diff: google_apis/gaia/account_tracker.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/drive/auth_service.cc ('k') | google_apis/gaia/identity_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gaia/account_tracker.cc
diff --git a/google_apis/gaia/account_tracker.cc b/google_apis/gaia/account_tracker.cc
index 0a2cce054d3178aec1fe71276bb1bac18804af57..c00e5bdc681b82d0f6682fbeefe0fc9d6aa72c5f 100644
--- a/google_apis/gaia/account_tracker.cc
+++ b/google_apis/gaia/account_tracker.cc
@@ -154,14 +154,14 @@ void AccountTracker::SetAccountStateForTest(AccountIds ids, bool is_signed_in) {
void AccountTracker::NotifyAccountAdded(const AccountState& account) {
DCHECK(!account.ids.gaia.empty());
- FOR_EACH_OBSERVER(
- Observer, observer_list_, OnAccountAdded(account.ids));
+ for (auto& observer : observer_list_)
+ observer.OnAccountAdded(account.ids);
}
void AccountTracker::NotifyAccountRemoved(const AccountState& account) {
DCHECK(!account.ids.gaia.empty());
- FOR_EACH_OBSERVER(
- Observer, observer_list_, OnAccountRemoved(account.ids));
+ for (auto& observer : observer_list_)
+ observer.OnAccountRemoved(account.ids);
}
void AccountTracker::NotifySignInChanged(const AccountState& account) {
@@ -172,9 +172,8 @@ void AccountTracker::NotifySignInChanged(const AccountState& account) {
"422460 AccountTracker::NotifySignInChanged"));
DCHECK(!account.ids.gaia.empty());
- FOR_EACH_OBSERVER(Observer,
- observer_list_,
- OnAccountSignInChanged(account.ids, account.is_signed_in));
+ for (auto& observer : observer_list_)
+ observer.OnAccountSignInChanged(account.ids, account.is_signed_in);
}
void AccountTracker::UpdateSignInState(const std::string& account_key,
« no previous file with comments | « google_apis/drive/auth_service.cc ('k') | google_apis/gaia/identity_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698