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

Unified Diff: components/signin/core/browser/fake_signin_manager.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/fake_signin_manager.cc
diff --git a/components/signin/core/browser/fake_signin_manager.cc b/components/signin/core/browser/fake_signin_manager.cc
index a4912d5fd22de15cb6836584c4380ee5375a018a..32caba99d7b1cd971caa67de4050628d9902a39d 100644
--- a/components/signin/core/browser/fake_signin_manager.cc
+++ b/components/signin/core/browser/fake_signin_manager.cc
@@ -56,9 +56,10 @@ void FakeSigninManager::StartSignInWithRefreshToken(
void FakeSigninManager::CompletePendingSignin() {
SetAuthenticatedAccountId(GetAccountIdForAuthInProgress());
set_auth_in_progress(std::string());
- FOR_EACH_OBSERVER(
- SigninManagerBase::Observer, observer_list_,
- GoogleSigninSucceeded(authenticated_account_id_, username_, password_));
+ for (auto& observer : observer_list_) {
+ observer.GoogleSigninSucceeded(authenticated_account_id_, username_,
+ password_);
+ }
}
void FakeSigninManager::SignIn(const std::string& gaia_id,
@@ -76,8 +77,8 @@ void FakeSigninManager::ForceSignOut() {
}
void FakeSigninManager::FailSignin(const GoogleServiceAuthError& error) {
- FOR_EACH_OBSERVER(SigninManagerBase::Observer, observer_list_,
- GoogleSigninFailed(error));
+ for (auto& observer : observer_list_)
+ observer.GoogleSigninFailed(error);
}
void FakeSigninManager::SignOut(
@@ -91,8 +92,8 @@ void FakeSigninManager::SignOut(
const std::string username = GetAuthenticatedAccountInfo().email;
authenticated_account_id_.clear();
- FOR_EACH_OBSERVER(SigninManagerBase::Observer, observer_list_,
- GoogleSignedOut(account_id, username));
+ for (auto& observer : observer_list_)
+ observer.GoogleSignedOut(account_id, username);
}
#endif // !defined (OS_CHROMEOS)

Powered by Google App Engine
This is Rietveld 408576698