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

Unified Diff: chromeos/dbus/bluetooth_media_transport_client.cc

Issue 993273002: device/bluetooth: Add I/O watcher for audio data retrieval triggered by state change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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: chromeos/dbus/bluetooth_media_transport_client.cc
diff --git a/chromeos/dbus/bluetooth_media_transport_client.cc b/chromeos/dbus/bluetooth_media_transport_client.cc
index 2be8a5639efa46f7f140eb62af71d1f91a0db2ad..e8b06ee3e750d9f596bbc58f7edfae34a64431a1 100644
--- a/chromeos/dbus/bluetooth_media_transport_client.cc
+++ b/chromeos/dbus/bluetooth_media_transport_client.cc
@@ -241,7 +241,16 @@ class BluetoothMediaTransportClientImpl
if (reader.PopFileDescriptor(&fd) &&
reader.PopUint16(&read_mtu) &&
reader.PopUint16(&write_mtu)) {
- callback.Run(fd, read_mtu, write_mtu);
+ fd.CheckValidity();
+ DCHECK(fd.is_valid());
+
+ VLOG(1) << "OnAcquireSuccess - fd: "<< fd.value()
+ <<", read MTU: " << read_mtu
+ <<", write MTU: " << write_mtu;
+
+ // The ownership of the file descriptor is transferred to the user
+ // application.
+ callback.Run(fd.TakeValue(), read_mtu, write_mtu);
armansito 2015/03/12 03:42:54 You don't want to do this here, I would leave it u
Miao 2015/03/12 22:33:31 Done.
return;
}

Powered by Google App Engine
This is Rietveld 408576698