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

Unified Diff: chrome/browser/command_updater.cc

Issue 2426223002: Reduce FOR_EACH_OBSERVER macro usage in chrome/browser (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/command_updater.cc
diff --git a/chrome/browser/command_updater.cc b/chrome/browser/command_updater.cc
index 950a17e0a254cc5e9b4d798ccd039a2709d71b09..5321e017932679577c6ab33b3b065ba1a6ecd575 100644
--- a/chrome/browser/command_updater.cc
+++ b/chrome/browser/command_updater.cc
@@ -73,8 +73,8 @@ void CommandUpdater::UpdateCommandEnabled(int id, bool enabled) {
if (command->enabled == enabled)
return; // Nothing to do.
command->enabled = enabled;
- FOR_EACH_OBSERVER(CommandObserver, command->observers,
- EnabledStateChangedForCommand(id, enabled));
+ for (auto& observer : command->observers)
+ observer.EnabledStateChangedForCommand(id, enabled);
}
CommandUpdater::Command* CommandUpdater::GetCommand(int id, bool create) {
« no previous file with comments | « chrome/browser/background/background_contents.cc ('k') | chrome/browser/media/android/router/media_router_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698