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

Unified Diff: device/bluetooth/dbus/bluetooth_media_transport_client.cc

Issue 2317593002: dbus: No dbus::FileDescriptor in BluetoothMediaTransportClient (Closed)
Patch Set: Created 4 years, 3 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_media_transport_client.cc
diff --git a/device/bluetooth/dbus/bluetooth_media_transport_client.cc b/device/bluetooth/dbus/bluetooth_media_transport_client.cc
index a6901514ba5dc9d213a85511821ddac068adcc58..774d5e97d644950a1463e2e6626ee9c379f80ce0 100644
--- a/device/bluetooth/dbus/bluetooth_media_transport_client.cc
+++ b/device/bluetooth/dbus/bluetooth_media_transport_client.cc
@@ -223,7 +223,7 @@ class BluetoothMediaTransportClientImpl
dbus::Response* response) {
DCHECK(response);
- dbus::FileDescriptor fd;
+ base::ScopedFD fd;
uint16_t read_mtu;
uint16_t write_mtu;
@@ -231,15 +231,14 @@ class BluetoothMediaTransportClientImpl
dbus::MessageReader reader(response);
if (reader.PopFileDescriptor(&fd) && reader.PopUint16(&read_mtu) &&
reader.PopUint16(&write_mtu)) {
- fd.CheckValidity();
DCHECK(fd.is_valid());
- VLOG(1) << "OnAcquireSuccess - fd: " << fd.value()
+ VLOG(1) << "OnAcquireSuccess - fd: " << fd.get()
<< ", read MTU: " << read_mtu << ", write MTU: " << write_mtu;
// The ownership of the file descriptor is transferred to the user
// application.
- callback.Run(&fd, read_mtu, write_mtu);
+ callback.Run(std::move(fd), read_mtu, write_mtu);
return;
}

Powered by Google App Engine
This is Rietveld 408576698