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

Unified Diff: chrome/browser/sync_file_system/mock_remote_file_sync_service.cc

Issue 2425553002: Remove FOR_EACH_OBSERVER macro usage in chrome/browser/sync_file_system (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: chrome/browser/sync_file_system/mock_remote_file_sync_service.cc
diff --git a/chrome/browser/sync_file_system/mock_remote_file_sync_service.cc b/chrome/browser/sync_file_system/mock_remote_file_sync_service.cc
index d9e30f15fa785da037327920b8f85193e51c273f..35cea613b45d688d4c636b39605a597825de87cd 100644
--- a/chrome/browser/sync_file_system/mock_remote_file_sync_service.cc
+++ b/chrome/browser/sync_file_system/mock_remote_file_sync_service.cc
@@ -57,15 +57,15 @@ void MockRemoteFileSyncService::SetServiceState(RemoteServiceState state) {
void MockRemoteFileSyncService::NotifyRemoteChangeQueueUpdated(
int64_t pending_changes) {
- FOR_EACH_OBSERVER(Observer, service_observers_,
- OnRemoteChangeQueueUpdated(pending_changes));
+ for (auto& observer : service_observers_)
+ observer.OnRemoteChangeQueueUpdated(pending_changes);
}
void MockRemoteFileSyncService::NotifyRemoteServiceStateUpdated(
RemoteServiceState state,
const std::string& description) {
- FOR_EACH_OBSERVER(Observer, service_observers_,
- OnRemoteServiceStateUpdated(state, description));
+ for (auto& observer : service_observers_)
+ observer.OnRemoteServiceStateUpdated(state, description);
}
void MockRemoteFileSyncService::NotifyFileStatusChanged(
@@ -74,9 +74,10 @@ void MockRemoteFileSyncService::NotifyFileStatusChanged(
SyncFileStatus sync_status,
SyncAction action_taken,
SyncDirection direction) {
- FOR_EACH_OBSERVER(FileStatusObserver, file_status_observers_,
- OnFileStatusChanged(url, file_type, sync_status,
- action_taken, direction));
+ for (auto& observer : file_status_observers_) {
+ observer.OnFileStatusChanged(url, file_type, sync_status, action_taken,
+ direction);
+ }
}
void MockRemoteFileSyncService::AddServiceObserverStub(Observer* observer) {

Powered by Google App Engine
This is Rietveld 408576698