| Index: chrome/browser/extensions/api/commands/command_service.cc
|
| diff --git a/chrome/browser/extensions/api/commands/command_service.cc b/chrome/browser/extensions/api/commands/command_service.cc
|
| index 960bf41cd647ed3c57aef4addb5f29f35f2b5c9c..1e1c25ad08e56abc7ffdba02d1424f17a92b3f7a 100644
|
| --- a/chrome/browser/extensions/api/commands/command_service.cc
|
| +++ b/chrome/browser/extensions/api/commands/command_service.cc
|
| @@ -294,11 +294,10 @@ bool CommandService::AddKeybindingPref(
|
| std::move(suggested_key_prefs));
|
|
|
| // Fetch the newly-updated command, and notify the observers.
|
| - FOR_EACH_OBSERVER(
|
| - Observer,
|
| - observers_,
|
| - OnExtensionCommandAdded(extension_id,
|
| - FindCommandByName(extension_id, command_name)));
|
| + for (auto& observer : observers_) {
|
| + observer.OnExtensionCommandAdded(
|
| + extension_id, FindCommandByName(extension_id, command_name));
|
| + }
|
|
|
| // TODO(devlin): Deprecate this notification in favor of the observers.
|
| std::pair<const std::string, const std::string> details =
|
| @@ -849,10 +848,8 @@ void CommandService::RemoveKeybindingPrefs(const std::string& extension_id,
|
| }
|
|
|
| for (const Command& removed_command : removed_commands) {
|
| - FOR_EACH_OBSERVER(
|
| - Observer,
|
| - observers_,
|
| - OnExtensionCommandRemoved(extension_id, removed_command));
|
| + for (auto& observer : observers_)
|
| + observer.OnExtensionCommandRemoved(extension_id, removed_command);
|
| }
|
| }
|
|
|
|
|