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

Unified Diff: device/bluetooth/test/mock_bluetooth_cbservice_mac.mm

Issue 2071853002: Revert of bluetooth: mac: Initial BluetoothRemoteGattCharacteristicMac implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@servicescan_cleanup
Patch Set: Created 4 years, 6 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
« no previous file with comments | « device/bluetooth/test/mock_bluetooth_cbservice_mac.h ('k') | device/device_tests.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/test/mock_bluetooth_cbservice_mac.mm
diff --git a/device/bluetooth/test/mock_bluetooth_cbservice_mac.mm b/device/bluetooth/test/mock_bluetooth_cbservice_mac.mm
index 4e06976fdb7707782d6708ce8a7cdde01f75a3c8..48337c8e95a47e31605d4d70dc1e1dd502f15133 100644
--- a/device/bluetooth/test/mock_bluetooth_cbservice_mac.mm
+++ b/device/bluetooth/test/mock_bluetooth_cbservice_mac.mm
@@ -7,17 +7,13 @@
#include "base/mac/foundation_util.h"
#include "base/mac/scoped_nsobject.h"
#include "device/bluetooth/test/bluetooth_test.h"
-#include "device/bluetooth/test/mock_bluetooth_cbcharacteristic_mac.h"
using base::mac::ObjCCast;
using base::scoped_nsobject;
@interface MockCBService () {
- // Owner of this instance.
- CBPeripheral* _peripheral;
scoped_nsobject<CBUUID> _UUID;
BOOL _primary;
- scoped_nsobject<NSMutableArray> _characteristics;
}
@end
@@ -26,15 +22,11 @@
@synthesize isPrimary = _primary;
-- (instancetype)initWithPeripheral:(CBPeripheral*)peripheral
- CBUUID:(CBUUID*)uuid
- primary:(BOOL)isPrimary {
+- (instancetype)initWithCBUUID:(CBUUID*)uuid primary:(BOOL)isPrimary {
self = [super init];
if (self) {
_UUID.reset([uuid retain]);
_primary = isPrimary;
- _peripheral = peripheral;
- _characteristics.reset([[NSMutableArray alloc] init]);
}
return self;
}
@@ -55,31 +47,12 @@
return [super isKindOfClass:aClass];
}
-- (CBPeripheral*)peripheral {
- return _peripheral;
-}
-
- (CBUUID*)UUID {
return _UUID.get();
-}
-
-- (void)addCharacteristicWithUUID:(CBUUID*)cb_uuid properties:(int)properties {
- scoped_nsobject<MockCBCharacteristic> characteristic_mock(
- [[MockCBCharacteristic alloc] initWithCBUUID:cb_uuid
- properties:properties]);
- [_characteristics.get() addObject:characteristic_mock];
-}
-
-- (void)removeCharacteristicMock:(MockCBCharacteristic*)characteristic_mock {
- [_characteristics.get() removeObject:characteristic_mock];
}
- (CBService*)service {
return ObjCCast<CBService>(self);
}
-- (NSArray*)characteristics {
- return _characteristics.get();
-}
-
@end
« no previous file with comments | « device/bluetooth/test/mock_bluetooth_cbservice_mac.h ('k') | device/device_tests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698