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

Unified Diff: device/bluetooth/dbus/fake_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/fake_bluetooth_device_client.cc
diff --git a/device/bluetooth/dbus/fake_bluetooth_device_client.cc b/device/bluetooth/dbus/fake_bluetooth_device_client.cc
index 76875d1ba7844ffa584c9d8b258b5fa83fe057cf..4d8679750a495dcd9d3b928c4c51bc87eb4ec664 100644
--- a/device/bluetooth/dbus/fake_bluetooth_device_client.cc
+++ b/device/bluetooth/dbus/fake_bluetooth_device_client.cc
@@ -765,8 +765,8 @@ void FakeBluetoothDeviceClient::CreateDevice(
properties_map_.insert(std::make_pair(device_path, std::move(properties)));
device_list_.push_back(device_path);
- FOR_EACH_OBSERVER(BluetoothDeviceClient::Observer, observers_,
- DeviceAdded(device_path));
+ for (auto& observer : observers_)
+ observer.DeviceAdded(device_path);
}
void FakeBluetoothDeviceClient::CreateDeviceWithProperties(
@@ -799,8 +799,8 @@ void FakeBluetoothDeviceClient::CreateDeviceWithProperties(
properties_map_.insert(std::make_pair(device_path, std::move(properties)));
device_list_.push_back(device_path);
pairing_options_map_.insert(std::make_pair(device_path, std::move(options)));
- FOR_EACH_OBSERVER(BluetoothDeviceClient::Observer, observers_,
- DeviceAdded(device_path));
+ for (auto& observer : observers_)
+ observer.DeviceAdded(device_path);
}
std::unique_ptr<base::ListValue>
@@ -1076,8 +1076,8 @@ void FakeBluetoothDeviceClient::RemoveDevice(
gatt_service_client->HideHeartRateService();
}
- FOR_EACH_OBSERVER(BluetoothDeviceClient::Observer, observers_,
- DeviceRemoved(device_path));
+ for (auto& observer : observers_)
+ observer.DeviceRemoved(device_path);
properties_map_.erase(iter);
PairingOptionsMap::const_iterator options_iter =
@@ -1093,8 +1093,8 @@ void FakeBluetoothDeviceClient::OnPropertyChanged(
const std::string& property_name) {
VLOG(2) << "Fake Bluetooth device property changed: " << object_path.value()
<< ": " << property_name;
- FOR_EACH_OBSERVER(BluetoothDeviceClient::Observer, observers_,
- DevicePropertyChanged(object_path, property_name));
+ for (auto& observer : observers_)
+ observer.DevicePropertyChanged(object_path, property_name);
}
void FakeBluetoothDeviceClient::DiscoverySimulationTimer() {
@@ -1790,8 +1790,8 @@ void FakeBluetoothDeviceClient::CreateTestDevice(
properties_map_.insert(std::make_pair(device_path, std::move(properties)));
device_list_.push_back(device_path);
- FOR_EACH_OBSERVER(BluetoothDeviceClient::Observer, observers_,
- DeviceAdded(device_path));
+ for (auto& observer : observers_)
+ observer.DeviceAdded(device_path);
}
} // namespace bluez

Powered by Google App Engine
This is Rietveld 408576698