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

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

Issue 2009753002: bluetooth: Make public BluetoothDevice::GetName method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: split out name/alias Created 4 years, 5 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/test/mock_bluetooth_cbperipheral_mac.mm
diff --git a/device/bluetooth/test/mock_bluetooth_cbperipheral_mac.mm b/device/bluetooth/test/mock_bluetooth_cbperipheral_mac.mm
index 3f9ab52ae7760fc6ee31b605af12a3c7c1d31a55..d469ec9e621fe952f7753b42c9b4e2c8ef9aee5b 100644
--- a/device/bluetooth/test/mock_bluetooth_cbperipheral_mac.mm
+++ b/device/bluetooth/test/mock_bluetooth_cbperipheral_mac.mm
@@ -33,13 +33,14 @@ using base::scoped_nsobject;
}
- (instancetype)initWithUTF8StringIdentifier:(const char*)utf8Identifier {
- scoped_nsobject<NSUUID> identifier(
- [[NSUUID alloc] initWithUUIDString:@(utf8Identifier)]);
- return [self initWithIdentifier:identifier name:nil];
+ return [self initWithUTF8StringIdentifier:utf8Identifier name:nil];
}
-- (instancetype)initWithIdentifier:(NSUUID*)identifier {
- return [self initWithIdentifier:identifier name:nil];
+- (instancetype)initWithUTF8StringIdentifier:(const char*)utf8Identifier
+ name:(NSString*)name {
+ scoped_nsobject<NSUUID> identifier(
+ [[NSUUID alloc] initWithUUIDString:@(utf8Identifier)]);
+ return [self initWithIdentifier:identifier name:name];
}
- (instancetype)initWithIdentifier:(NSUUID*)identifier name:(NSString*)name {
@@ -48,9 +49,6 @@ using base::scoped_nsobject;
_identifier.reset([identifier retain]);
if (name) {
_name.reset([name retain]);
- } else {
- _name.reset(
- [@(device::BluetoothTestBase::kTestDeviceName.c_str()) retain]);
}
_state = CBPeripheralStateDisconnected;
}
« no previous file with comments | « device/bluetooth/test/mock_bluetooth_cbperipheral_mac.h ('k') | device/bluetooth/test/mock_bluetooth_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698