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

Unified Diff: components/signin/core/browser/gaia_cookie_manager_service.cc

Issue 2422943002: Remove usage of FOR_EACH_OBSERVER macro in components/signin (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
Index: components/signin/core/browser/gaia_cookie_manager_service.cc
diff --git a/components/signin/core/browser/gaia_cookie_manager_service.cc b/components/signin/core/browser/gaia_cookie_manager_service.cc
index de75979164ac5291a8e3a09d98ac7c57f0867f12..9cfd9c9ae0f98359cf2b1bade2600f6b3f0e20eb 100644
--- a/components/signin/core/browser/gaia_cookie_manager_service.cc
+++ b/components/signin/core/browser/gaia_cookie_manager_service.cc
@@ -519,8 +519,8 @@ void GaiaCookieManagerService::SignalComplete(
// Its possible for the observer to delete |this| object. Don't access
// access any members after this calling the observer. This method should
// be the last call in any other method.
- FOR_EACH_OBSERVER(Observer, observer_list_,
- OnAddAccountToCookieCompleted(account_id, error));
+ for (auto& observer : observer_list_)
+ observer.OnAddAccountToCookieCompleted(account_id, error);
}
void GaiaCookieManagerService::OnUbertokenSuccess(
@@ -627,11 +627,11 @@ void GaiaCookieManagerService::OnListAccountsSuccess(const std::string& data) {
// services, in response to OnGaiaAccountsInCookieUpdated, may try in return
// to call ListAccounts, which would immediately return false if the
// ListAccounts request is still sitting in queue.
- FOR_EACH_OBSERVER(Observer, observer_list_,
- OnGaiaAccountsInCookieUpdated(
- listed_accounts_,
- signed_out_accounts_,
- GoogleServiceAuthError(GoogleServiceAuthError::NONE)));
+ for (auto& observer : observer_list_) {
+ observer.OnGaiaAccountsInCookieUpdated(
+ listed_accounts_, signed_out_accounts_,
+ GoogleServiceAuthError(GoogleServiceAuthError::NONE));
+ }
}
void GaiaCookieManagerService::OnListAccountsFailure(
@@ -655,9 +655,10 @@ void GaiaCookieManagerService::OnListAccountsFailure(
UMA_HISTOGRAM_ENUMERATION("Signin.ListAccountsFailure",
error.state(), GoogleServiceAuthError::NUM_STATES);
- FOR_EACH_OBSERVER(Observer, observer_list_,
- OnGaiaAccountsInCookieUpdated(
- listed_accounts_, signed_out_accounts_, error));
+ for (auto& observer : observer_list_) {
+ observer.OnGaiaAccountsInCookieUpdated(listed_accounts_,
+ signed_out_accounts_, error);
+ }
HandleNextRequest();
}
@@ -667,9 +668,10 @@ void GaiaCookieManagerService::OnLogOutSuccess() {
list_accounts_stale_ = true;
fetcher_backoff_.InformOfRequest(true);
- FOR_EACH_OBSERVER(Observer, observer_list_,
- OnLogOutAccountsFromCookieCompleted(
- GoogleServiceAuthError(GoogleServiceAuthError::NONE)));
+ for (auto& observer : observer_list_) {
+ observer.OnLogOutAccountsFromCookieCompleted(
+ GoogleServiceAuthError(GoogleServiceAuthError::NONE));
+ }
HandleNextRequest();
}
@@ -689,8 +691,8 @@ void GaiaCookieManagerService::OnLogOutFailure(
return;
}
- FOR_EACH_OBSERVER(Observer, observer_list_,
- OnLogOutAccountsFromCookieCompleted(error));
+ for (auto& observer : observer_list_)
+ observer.OnLogOutAccountsFromCookieCompleted(error);
HandleNextRequest();
}
« no previous file with comments | « components/signin/core/browser/fake_signin_manager.cc ('k') | components/signin/core/browser/signin_error_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698