Convert /device/bluetooth to use ARC
See https://chromium.googlesource.com/chromium/src/+/main/docs/mac/arc.md
for information about this conversion.
Bug: 1280317
Change-Id: Iab28dde06fa8e9792d435aaa1b5ca06f1fce66d1
Include-Ci-Only-Tests: true
Cq-Include-Trybots: luci.chromium.try:ios-blink-dbg-fyi
Cq-Include-Trybots: luci.chrome.try:mac-chrome
Validate-Test-Flakiness: skip
Low-Coverage-Reason: Doing core refactoring across all of Chromium; I do not own this code
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4606137
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1157126}
diff --git a/device/bluetooth/bluetooth_rfcomm_channel_mac.h b/device/bluetooth/bluetooth_rfcomm_channel_mac.h
index 0190cbf..8e2c9ce 100644
--- a/device/bluetooth/bluetooth_rfcomm_channel_mac.h
+++ b/device/bluetooth/bluetooth_rfcomm_channel_mac.h
@@ -12,9 +12,12 @@
#include <memory>
-#include "base/mac/scoped_nsobject.h"
#include "device/bluetooth/bluetooth_channel_mac.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
@class BluetoothRfcommChannelDelegate;
namespace device {
@@ -23,7 +26,6 @@
public:
// Creates a new RFCOMM channel wrapper with the given |socket| and native
// |channel|.
- // NOTE: The |channel| is expected to already be retained.
BluetoothRfcommChannelMac(BluetoothSocketMac* socket,
IOBluetoothRFCOMMChannel* channel);
@@ -61,10 +63,10 @@
private:
// The wrapped native RFCOMM channel.
- base::scoped_nsobject<IOBluetoothRFCOMMChannel> channel_;
+ IOBluetoothRFCOMMChannel* __strong channel_;
// The delegate for the native channel.
- base::scoped_nsobject<BluetoothRfcommChannelDelegate> delegate_;
+ BluetoothRfcommChannelDelegate* __strong delegate_;
};
} // namespace device