| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ios/public/provider/chrome/browser/signin/chrome_identity_service.h" | 5 #include "ios/public/provider/chrome/browser/signin/chrome_identity_service.h" |
| 6 | 6 |
| 7 #include "ios/public/provider/chrome/browser/signin/chrome_identity_interaction_
manager.h" | 7 #include "ios/public/provider/chrome/browser/signin/chrome_identity_interaction_
manager.h" |
| 8 | 8 |
| 9 namespace ios { | 9 namespace ios { |
| 10 | 10 |
| 11 ChromeIdentityService::ChromeIdentityService() {} | 11 ChromeIdentityService::ChromeIdentityService() {} |
| 12 | 12 |
| 13 ChromeIdentityService::~ChromeIdentityService() { | 13 ChromeIdentityService::~ChromeIdentityService() { |
| 14 FOR_EACH_OBSERVER(Observer, observer_list_, | 14 for (auto& observer : observer_list_) |
| 15 OnChromeIdentityServiceWillBeDestroyed()); | 15 observer.OnChromeIdentityServiceWillBeDestroyed(); |
| 16 } | 16 } |
| 17 | 17 |
| 18 void ChromeIdentityService::DismissDialogs() {} | 18 void ChromeIdentityService::DismissDialogs() {} |
| 19 | 19 |
| 20 bool ChromeIdentityService::HandleApplicationOpenURL(UIApplication* application, | 20 bool ChromeIdentityService::HandleApplicationOpenURL(UIApplication* application, |
| 21 NSURL* url, | 21 NSURL* url, |
| 22 NSDictionary* options) { | 22 NSDictionary* options) { |
| 23 return false; | 23 return false; |
| 24 } | 24 } |
| 25 | 25 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 | 124 |
| 125 void ChromeIdentityService::RemoveObserver(Observer* observer) { | 125 void ChromeIdentityService::RemoveObserver(Observer* observer) { |
| 126 observer_list_.RemoveObserver(observer); | 126 observer_list_.RemoveObserver(observer); |
| 127 } | 127 } |
| 128 | 128 |
| 129 bool ChromeIdentityService::IsInvalidGrantError(NSDictionary* user_info) { | 129 bool ChromeIdentityService::IsInvalidGrantError(NSDictionary* user_info) { |
| 130 return false; | 130 return false; |
| 131 } | 131 } |
| 132 | 132 |
| 133 void ChromeIdentityService::FireIdentityListChanged() { | 133 void ChromeIdentityService::FireIdentityListChanged() { |
| 134 FOR_EACH_OBSERVER(Observer, observer_list_, OnIdentityListChanged()); | 134 for (auto& observer : observer_list_) |
| 135 observer.OnIdentityListChanged(); |
| 135 } | 136 } |
| 136 | 137 |
| 137 void ChromeIdentityService::FireAccessTokenRefreshFailed( | 138 void ChromeIdentityService::FireAccessTokenRefreshFailed( |
| 138 ChromeIdentity* identity, | 139 ChromeIdentity* identity, |
| 139 NSDictionary* user_info) { | 140 NSDictionary* user_info) { |
| 140 FOR_EACH_OBSERVER(Observer, observer_list_, | 141 for (auto& observer : observer_list_) |
| 141 OnAccessTokenRefreshFailed(identity, user_info)); | 142 observer.OnAccessTokenRefreshFailed(identity, user_info); |
| 142 } | 143 } |
| 143 | 144 |
| 144 void ChromeIdentityService::FireProfileDidUpdate(ChromeIdentity* identity) { | 145 void ChromeIdentityService::FireProfileDidUpdate(ChromeIdentity* identity) { |
| 145 FOR_EACH_OBSERVER(Observer, observer_list_, OnProfileUpdate(identity)); | 146 for (auto& observer : observer_list_) |
| 147 observer.OnProfileUpdate(identity); |
| 146 } | 148 } |
| 147 | 149 |
| 148 } // namespace ios | 150 } // namespace ios |
| OLD | NEW |