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

Unified Diff: components/sync/engine_impl/cycle/directory_type_debug_info_emitter.cc

Issue 2424673002: Remove usage of FOR_EACH_OBSERVER macro in components/sync (Closed)
Patch Set: blank line before return 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
« no previous file with comments | « components/sync/driver/sync_error_controller.cc ('k') | components/sync/engine_impl/cycle/sync_cycle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/engine_impl/cycle/directory_type_debug_info_emitter.cc
diff --git a/components/sync/engine_impl/cycle/directory_type_debug_info_emitter.cc b/components/sync/engine_impl/cycle/directory_type_debug_info_emitter.cc
index 975fd463755bbe97d447e2cbd17c916210cf8e03..29f70c3a85e199525f898ae84a8e66e4ab4d8a4c 100644
--- a/components/sync/engine_impl/cycle/directory_type_debug_info_emitter.cc
+++ b/components/sync/engine_impl/cycle/directory_type_debug_info_emitter.cc
@@ -46,8 +46,8 @@ CommitCounters* DirectoryTypeDebugInfoEmitter::GetMutableCommitCounters() {
}
void DirectoryTypeDebugInfoEmitter::EmitCommitCountersUpdate() {
- FOR_EACH_OBSERVER(TypeDebugInfoObserver, (*type_debug_info_observers_),
- OnCommitCountersUpdated(type_, commit_counters_));
+ for (auto& observer : *type_debug_info_observers_)
+ observer.OnCommitCountersUpdated(type_, commit_counters_);
}
const UpdateCounters& DirectoryTypeDebugInfoEmitter::GetUpdateCounters() const {
@@ -59,8 +59,8 @@ UpdateCounters* DirectoryTypeDebugInfoEmitter::GetMutableUpdateCounters() {
}
void DirectoryTypeDebugInfoEmitter::EmitUpdateCountersUpdate() {
- FOR_EACH_OBSERVER(TypeDebugInfoObserver, (*type_debug_info_observers_),
- OnUpdateCountersUpdated(type_, update_counters_));
+ for (auto& observer : *type_debug_info_observers_)
+ observer.OnUpdateCountersUpdated(type_, update_counters_);
}
void DirectoryTypeDebugInfoEmitter::EmitStatusCountersUpdate() {
@@ -83,8 +83,8 @@ void DirectoryTypeDebugInfoEmitter::EmitStatusCountersUpdate() {
}
}
- FOR_EACH_OBSERVER(TypeDebugInfoObserver, (*type_debug_info_observers_),
- OnStatusCountersUpdated(type_, counters));
+ for (auto& observer : *type_debug_info_observers_)
+ observer.OnStatusCountersUpdated(type_, counters);
}
} // namespace syncer
« no previous file with comments | « components/sync/driver/sync_error_controller.cc ('k') | components/sync/engine_impl/cycle/sync_cycle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698