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

Side by Side Diff: device/bluetooth/test/mock_bluetooth_cbservice_mac.mm

Issue 2906883004: bluetooth: macOS: Removing useless |.get()| (Closed)
Patch Set: Merge from top of tree Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "device/bluetooth/test/mock_bluetooth_cbservice_mac.h" 5 #include "device/bluetooth/test/mock_bluetooth_cbservice_mac.h"
6 6
7 #include "base/mac/foundation_util.h" 7 #include "base/mac/foundation_util.h"
8 #include "base/mac/scoped_nsobject.h" 8 #include "base/mac/scoped_nsobject.h"
9 #include "device/bluetooth/test/bluetooth_test.h" 9 #include "device/bluetooth/test/bluetooth_test.h"
10 #include "device/bluetooth/test/mock_bluetooth_cbcharacteristic_mac.h" 10 #include "device/bluetooth/test/mock_bluetooth_cbcharacteristic_mac.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 return YES; 53 return YES;
54 } 54 }
55 return [super isKindOfClass:aClass]; 55 return [super isKindOfClass:aClass];
56 } 56 }
57 57
58 - (CBPeripheral*)peripheral { 58 - (CBPeripheral*)peripheral {
59 return _peripheral; 59 return _peripheral;
60 } 60 }
61 61
62 - (CBUUID*)UUID { 62 - (CBUUID*)UUID {
63 return _UUID.get(); 63 return _UUID;
64 } 64 }
65 65
66 - (void)addCharacteristicWithUUID:(CBUUID*)cb_uuid properties:(int)properties { 66 - (void)addCharacteristicWithUUID:(CBUUID*)cb_uuid properties:(int)properties {
67 scoped_nsobject<MockCBCharacteristic> characteristic_mock( 67 scoped_nsobject<MockCBCharacteristic> characteristic_mock(
68 [[MockCBCharacteristic alloc] initWithService:self.service 68 [[MockCBCharacteristic alloc] initWithService:self.service
69 CBUUID:cb_uuid 69 CBUUID:cb_uuid
70 properties:properties]); 70 properties:properties]);
71 [_characteristics.get() addObject:characteristic_mock]; 71 [_characteristics addObject:characteristic_mock];
72 } 72 }
73 73
74 - (void)removeCharacteristicMock:(MockCBCharacteristic*)characteristic_mock { 74 - (void)removeCharacteristicMock:(MockCBCharacteristic*)characteristic_mock {
75 [_characteristics.get() removeObject:characteristic_mock]; 75 [_characteristics removeObject:characteristic_mock];
76 } 76 }
77 77
78 - (CBService*)service { 78 - (CBService*)service {
79 return ObjCCast<CBService>(self); 79 return ObjCCast<CBService>(self);
80 } 80 }
81 81
82 - (NSArray*)characteristics { 82 - (NSArray*)characteristics {
83 return _characteristics.get(); 83 return _characteristics;
84 } 84 }
85 85
86 @end 86 @end
OLDNEW
« no previous file with comments | « device/bluetooth/test/mock_bluetooth_cbperipheral_mac.mm ('k') | device/bluetooth/test/mock_bluetooth_central_manager_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698