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

Unified Diff: device/bluetooth/dbus/bluetooth_gatt_descriptor_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_gatt_descriptor_client.cc
diff --git a/device/bluetooth/dbus/bluetooth_gatt_descriptor_client.cc b/device/bluetooth/dbus/bluetooth_gatt_descriptor_client.cc
index e4b724cbf5cc465b0e4be614356426a5713e4656..d083dee6d13f98f07ab12cad04604e434b7993c5 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_descriptor_client.cc
+++ b/device/bluetooth/dbus/bluetooth_gatt_descriptor_client.cc
@@ -160,16 +160,16 @@ class BluetoothGattDescriptorClientImpl
void ObjectAdded(const dbus::ObjectPath& object_path,
const std::string& interface_name) override {
VLOG(2) << "Remote GATT descriptor added: " << object_path.value();
- FOR_EACH_OBSERVER(BluetoothGattDescriptorClient::Observer, observers_,
- GattDescriptorAdded(object_path));
+ for (auto& observer : observers_)
+ observer.GattDescriptorAdded(object_path);
}
// dbus::ObjectManager::Interface override.
void ObjectRemoved(const dbus::ObjectPath& object_path,
const std::string& interface_name) override {
VLOG(2) << "Remote GATT descriptor removed: " << object_path.value();
- FOR_EACH_OBSERVER(BluetoothGattDescriptorClient::Observer, observers_,
- GattDescriptorRemoved(object_path));
+ for (auto& observer : observers_)
+ observer.GattDescriptorRemoved(object_path);
}
protected:
@@ -191,9 +191,8 @@ class BluetoothGattDescriptorClientImpl
const std::string& property_name) {
VLOG(2) << "Remote GATT descriptor property changed: "
<< object_path.value() << ": " << property_name;
- FOR_EACH_OBSERVER(
- BluetoothGattDescriptorClient::Observer, observers_,
- GattDescriptorPropertyChanged(object_path, property_name));
+ for (auto& observer : observers_)
+ observer.GattDescriptorPropertyChanged(object_path, property_name);
}
// Called when a response for a successful method call is received.
« no previous file with comments | « device/bluetooth/dbus/bluetooth_gatt_characteristic_client.cc ('k') | device/bluetooth/dbus/bluetooth_gatt_service_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698