| Index: components/proximity_auth/cryptauth/cryptauth_gcm_manager_impl.cc
|
| diff --git a/components/proximity_auth/cryptauth/cryptauth_gcm_manager_impl.cc b/components/proximity_auth/cryptauth/cryptauth_gcm_manager_impl.cc
|
| index 588ddcf3a458db33c3d42987649a29694ac2ce73..77680e8f31f40be707e320f2f0acdb05c644797b 100644
|
| --- a/components/proximity_auth/cryptauth/cryptauth_gcm_manager_impl.cc
|
| +++ b/components/proximity_auth/cryptauth/cryptauth_gcm_manager_impl.cc
|
| @@ -102,9 +102,11 @@ void CryptAuthGCMManagerImpl::OnMessage(const std::string& app_id,
|
| if (tickle_type == kRegistrationTickleTypeForceEnrollment ||
|
| tickle_type == kRegistrationTickleTypeUpdateEnrollment) {
|
| // These tickle types correspond to re-enrollment messages.
|
| - FOR_EACH_OBSERVER(Observer, observers_, OnReenrollMessage());
|
| + for (auto& observer : observers_)
|
| + observer.OnReenrollMessage();
|
| } else if (tickle_type == kRegistrationTickleTypeDevicesSync) {
|
| - FOR_EACH_OBSERVER(Observer, observers_, OnResyncMessage());
|
| + for (auto& observer : observers_)
|
| + observer.OnResyncMessage();
|
| } else {
|
| PA_LOG(WARNING) << "Unknown tickle type in GCM message.";
|
| }
|
| @@ -133,14 +135,16 @@ void CryptAuthGCMManagerImpl::OnRegistrationCompleted(
|
| if (result != gcm::GCMClient::SUCCESS) {
|
| PA_LOG(WARNING) << "GCM registration failed with result="
|
| << static_cast<int>(result);
|
| - FOR_EACH_OBSERVER(Observer, observers_, OnGCMRegistrationResult(false));
|
| + for (auto& observer : observers_)
|
| + observer.OnGCMRegistrationResult(false);
|
| return;
|
| }
|
|
|
| PA_LOG(INFO) << "GCM registration success, registration_id="
|
| << registration_id;
|
| pref_service_->SetString(prefs::kCryptAuthGCMRegistrationId, registration_id);
|
| - FOR_EACH_OBSERVER(Observer, observers_, OnGCMRegistrationResult(true));
|
| + for (auto& observer : observers_)
|
| + observer.OnGCMRegistrationResult(true);
|
| }
|
|
|
| } // namespace proximity_auth
|
|
|