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

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

Issue 1538173003: Implementing GATT connection/disconnect on OS X. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing patch Created 4 years, 10 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #import "mock_bluetooth_cbperipheral_mac.h"
6
7 @implementation MockCBPeripheral
8
9 @synthesize name = _name;
10 @synthesize identifier = _identifier;
11 @synthesize state = _state;
12
13 - (instancetype)initWithIdentifier:(NSUUID*)identifier {
14 self = [super init];
15 if (self) {
16 _identifier = [identifier retain];
17 _name = [@"FakeBluetoothDevice" retain];
18 _state = CBPeripheralStateDisconnected;
19 }
20 return self;
21 }
22
23 - (void)dealloc {
24 [_name release];
msarda 2016/02/11 10:55:39 Never call release. Use scoped_nsobject and implem
jlebel 2016/02/19 11:02:36 Done.
25 [_identifier release];
26 [super dealloc];
27 }
28
29 - (void)setStateForTesting:(CBPeripheralState)state {
msarda 2016/02/11 10:55:39 Optional: This is a mock object. It is not really
jlebel 2016/02/19 11:02:36 Done.
30 _state = state;
31 }
32
33 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698