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

Unified Diff: components/policy/core/common/remote_commands/remote_commands_queue.cc

Issue 2422083002: Remove usage of FOR_EACH_OBSERVER macro in components/policy (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/policy/core/common/remote_commands/remote_commands_queue.cc
diff --git a/components/policy/core/common/remote_commands/remote_commands_queue.cc b/components/policy/core/common/remote_commands/remote_commands_queue.cc
index 210217268eb7886eaa9a90784c08a8096a313b9d..9543712e524792d0e17f2f83a7658a2ddafb26a2 100644
--- a/components/policy/core/common/remote_commands/remote_commands_queue.cc
+++ b/components/policy/core/common/remote_commands/remote_commands_queue.cc
@@ -63,8 +63,8 @@ void RemoteCommandsQueue::CurrentJobFinished() {
execution_timeout_timer_.Stop();
- FOR_EACH_OBSERVER(Observer, observer_list_,
- OnJobFinished(running_command_.get()));
+ for (auto& observer : observer_list_)
+ observer.OnJobFinished(running_command_.get());
running_command_.reset();
ScheduleNextJob();
@@ -86,8 +86,8 @@ void RemoteCommandsQueue::ScheduleNextJob() {
if (running_command_->Run(clock_->NowTicks(),
base::Bind(&RemoteCommandsQueue::CurrentJobFinished,
base::Unretained(this)))) {
- FOR_EACH_OBSERVER(Observer, observer_list_,
- OnJobStarted(running_command_.get()));
+ for (auto& observer : observer_list_)
+ observer.OnJobStarted(running_command_.get());
} else {
CurrentJobFinished();
}
« no previous file with comments | « components/policy/core/common/policy_service_impl.cc ('k') | components/policy/core/common/schema_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698