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

Unified Diff: device/bluetooth/dbus/bluetooth_input_client.cc

Issue 2423793002: Remove usage of FOR_EACH_OBSERVER macro in device/ (Closed)
Patch Set: rebase 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: device/bluetooth/dbus/bluetooth_input_client.cc
diff --git a/device/bluetooth/dbus/bluetooth_input_client.cc b/device/bluetooth/dbus/bluetooth_input_client.cc
index a116e7bef240b324cd022744b8ceb13441960c0e..de5bdd046fa820e31ae2595d555d171d79c8f624 100644
--- a/device/bluetooth/dbus/bluetooth_input_client.cc
+++ b/device/bluetooth/dbus/bluetooth_input_client.cc
@@ -83,16 +83,16 @@ class BluetoothInputClientImpl : public BluetoothInputClient,
// is created. Informs observers.
void ObjectAdded(const dbus::ObjectPath& object_path,
const std::string& interface_name) override {
- FOR_EACH_OBSERVER(BluetoothInputClient::Observer, observers_,
- InputAdded(object_path));
+ for (auto& observer : observers_)
+ observer.InputAdded(object_path);
}
// Called by dbus::ObjectManager when an object with the input interface
// is removed. Informs observers.
void ObjectRemoved(const dbus::ObjectPath& object_path,
const std::string& interface_name) override {
- FOR_EACH_OBSERVER(BluetoothInputClient::Observer, observers_,
- InputRemoved(object_path));
+ for (auto& observer : observers_)
+ observer.InputRemoved(object_path);
}
// Called by BluetoothPropertySet when a property value is changed,
@@ -100,8 +100,8 @@ class BluetoothInputClientImpl : public BluetoothInputClient,
// call. Informs observers.
void OnPropertyChanged(const dbus::ObjectPath& object_path,
const std::string& property_name) {
- FOR_EACH_OBSERVER(BluetoothInputClient::Observer, observers_,
- InputPropertyChanged(object_path, property_name));
+ for (auto& observer : observers_)
+ observer.InputPropertyChanged(object_path, property_name);
}
dbus::ObjectManager* object_manager_;

Powered by Google App Engine
This is Rietveld 408576698