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

Unified Diff: device/bluetooth/bluetooth_socket_mac.mm

Issue 13983004: Simplified BluetoothDeviceMac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comments. Created 7 years, 8 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/bluetooth_socket_mac.mm
diff --git a/device/bluetooth/bluetooth_socket_mac.mm b/device/bluetooth/bluetooth_socket_mac.mm
index 83b30a8582f3e70be22d15936cf90169ec675518..c1805baad69d7fc7bcfbc280aea2d9fc524b60a5 100644
--- a/device/bluetooth/bluetooth_socket_mac.mm
+++ b/device/bluetooth/bluetooth_socket_mac.mm
@@ -46,15 +46,14 @@
namespace device {
BluetoothSocketMac::BluetoothSocketMac(IOBluetoothRFCOMMChannel* rfcomm_channel)
- : rfcomm_channel_(rfcomm_channel),
- delegate_([[BluetoothRFCOMMChannelDelegate alloc] initWithSocket:this]) {
- [rfcomm_channel_ setDelegate:delegate_];
+ : rfcomm_channel_(rfcomm_channel) {
+ [rfcomm_channel_ setDelegate:[[BluetoothRFCOMMChannelDelegate alloc]
+ initWithSocket:this]];
ResetIncomingDataBuffer();
}
BluetoothSocketMac::~BluetoothSocketMac() {
- [rfcomm_channel_ release];
- [delegate_ release];
+ [rfcomm_channel_ closeChannel];
Mark Mentovai 2013/04/11 21:48:58 Does IOBluetoothRFCOMMChannel release its delegate
Mark Mentovai 2013/04/11 21:48:58 How does rfcomm_channel_ get released now?
youngki 2013/04/11 22:14:29 So.. I did a bunch of testing with a bluetooth app
Mark Mentovai 2013/04/11 22:24:37 youngki wrote:
youngki 2013/04/12 01:51:47 Thanks for pointing this out; and you are right, I
}
// static
« device/bluetooth/bluetooth_device_mac.mm ('K') | « device/bluetooth/bluetooth_socket_mac.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698