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

Unified Diff: device/bluetooth/dbus/fake_bluetooth_media_transport_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_media_transport_client.cc
diff --git a/device/bluetooth/dbus/fake_bluetooth_media_transport_client.cc b/device/bluetooth/dbus/fake_bluetooth_media_transport_client.cc
index f021ef0d4054d36120154df2c9da15aad0b26165..72f036204eef6eb268965d619432009d78fb2108 100644
--- a/device/bluetooth/dbus/fake_bluetooth_media_transport_client.cc
+++ b/device/bluetooth/dbus/fake_bluetooth_media_transport_client.cc
@@ -193,8 +193,8 @@ void FakeBluetoothMediaTransportClient::SetValid(
ObjectPath transport_path = transport->path;
// Notifies observers about the state change of the transport.
- FOR_EACH_OBSERVER(BluetoothMediaTransportClient::Observer, observers_,
- MediaTransportRemoved(transport_path));
+ for (auto& observer : observers_)
+ observer.MediaTransportRemoved(transport_path);
endpoint->ClearConfiguration(transport_path);
delete transport;
@@ -212,10 +212,10 @@ void FakeBluetoothMediaTransportClient::SetState(
return;
transport->properties->state.ReplaceValue(state);
- FOR_EACH_OBSERVER(
- BluetoothMediaTransportClient::Observer, observers_,
- MediaTransportPropertyChanged(
- transport->path, BluetoothMediaTransportClient::kStateProperty));
+ for (auto& observer : observers_) {
+ observer.MediaTransportPropertyChanged(
+ transport->path, BluetoothMediaTransportClient::kStateProperty);
+ }
}
void FakeBluetoothMediaTransportClient::SetVolume(
@@ -226,10 +226,10 @@ void FakeBluetoothMediaTransportClient::SetVolume(
return;
transport->properties->volume.ReplaceValue(volume);
- FOR_EACH_OBSERVER(
- BluetoothMediaTransportClient::Observer, observers_,
- MediaTransportPropertyChanged(
- transport->path, BluetoothMediaTransportClient::kVolumeProperty));
+ for (auto& observer : observers_) {
+ observer.MediaTransportPropertyChanged(
+ transport->path, BluetoothMediaTransportClient::kVolumeProperty);
+ }
}
void FakeBluetoothMediaTransportClient::WriteData(
« no previous file with comments | « device/bluetooth/dbus/fake_bluetooth_media_client.cc ('k') | device/bluetooth/test/mock_bluetooth_gatt_notify_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698