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

Unified Diff: device/bluetooth/dbus/bluetooth_device_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_device_client.cc
diff --git a/device/bluetooth/dbus/bluetooth_device_client.cc b/device/bluetooth/dbus/bluetooth_device_client.cc
index 70930894f235a09b2ee81449e984a668606c3837..1eec1ca969015d3605f745b5bdab1d682cd17107 100644
--- a/device/bluetooth/dbus/bluetooth_device_client.cc
+++ b/device/bluetooth/dbus/bluetooth_device_client.cc
@@ -465,16 +465,16 @@ class BluetoothDeviceClientImpl : public BluetoothDeviceClient,
// is created. Informs observers.
void ObjectAdded(const dbus::ObjectPath& object_path,
const std::string& interface_name) override {
- FOR_EACH_OBSERVER(BluetoothDeviceClient::Observer, observers_,
- DeviceAdded(object_path));
+ for (auto& observer : observers_)
+ observer.DeviceAdded(object_path);
}
// Called by dbus::ObjectManager when an object with the device interface
// is removed. Informs observers.
void ObjectRemoved(const dbus::ObjectPath& object_path,
const std::string& interface_name) override {
- FOR_EACH_OBSERVER(BluetoothDeviceClient::Observer, observers_,
- DeviceRemoved(object_path));
+ for (auto& observer : observers_)
+ observer.DeviceRemoved(object_path);
}
// Called by BluetoothPropertySet when a property value is changed,
@@ -482,8 +482,8 @@ class BluetoothDeviceClientImpl : public BluetoothDeviceClient,
// call. Informs observers.
void OnPropertyChanged(const dbus::ObjectPath& object_path,
const std::string& property_name) {
- FOR_EACH_OBSERVER(BluetoothDeviceClient::Observer, observers_,
- DevicePropertyChanged(object_path, property_name));
+ for (auto& observer : observers_)
+ observer.DevicePropertyChanged(object_path, property_name);
}
// Called when a response for successful method call is received.
« no previous file with comments | « device/bluetooth/dbus/bluetooth_adapter_client.cc ('k') | device/bluetooth/dbus/bluetooth_gatt_characteristic_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698