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

Unified Diff: device/bluetooth/dbus/fake_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/fake_bluetooth_input_client.cc
diff --git a/device/bluetooth/dbus/fake_bluetooth_input_client.cc b/device/bluetooth/dbus/fake_bluetooth_input_client.cc
index bd3b86f635db74d1e3f0590f1fd42bb188a68264..36030626a75b1a516b3d6172d2fd6fb30e88d631 100644
--- a/device/bluetooth/dbus/fake_bluetooth_input_client.cc
+++ b/device/bluetooth/dbus/fake_bluetooth_input_client.cc
@@ -95,8 +95,8 @@ void FakeBluetoothInputClient::AddInputDevice(
properties_map_[object_path] = properties;
- FOR_EACH_OBSERVER(BluetoothInputClient::Observer, observers_,
- InputAdded(object_path));
+ for (auto& observer : observers_)
+ observer.InputAdded(object_path);
}
void FakeBluetoothInputClient::RemoveInputDevice(
@@ -106,8 +106,8 @@ void FakeBluetoothInputClient::RemoveInputDevice(
if (it == properties_map_.end())
return;
- FOR_EACH_OBSERVER(BluetoothInputClient::Observer, observers_,
- InputRemoved(object_path));
+ for (auto& observer : observers_)
+ observer.InputRemoved(object_path);
delete it->second;
properties_map_.erase(it);
@@ -116,8 +116,8 @@ void FakeBluetoothInputClient::RemoveInputDevice(
void FakeBluetoothInputClient::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);
}
} // namespace bluez
« no previous file with comments | « device/bluetooth/dbus/fake_bluetooth_gatt_service_client.cc ('k') | device/bluetooth/dbus/fake_bluetooth_media_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698