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

Unified Diff: device/bluetooth/bluetooth_classic_device_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
« no previous file with comments | « device/bluetooth/bluetooth_classic_device_mac.h ('k') | device/bluetooth/bluetooth_device.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_classic_device_mac.mm
diff --git a/device/bluetooth/bluetooth_classic_device_mac.mm b/device/bluetooth/bluetooth_classic_device_mac.mm
index d14f2703c98ed2b8b4ca45cf78a5044726947094..eaeba2c6bc9406628770a6edf9bf7e6da2f1df17 100644
--- a/device/bluetooth/bluetooth_classic_device_mac.mm
+++ b/device/bluetooth/bluetooth_classic_device_mac.mm
@@ -71,10 +71,6 @@ uint32_t BluetoothClassicDeviceMac::GetBluetoothClass() const {
return [device_ classOfDevice];
}
-std::string BluetoothClassicDeviceMac::GetDeviceName() const {
- return base::SysNSStringToUTF8([device_ name]);
-}
-
void BluetoothClassicDeviceMac::CreateGattConnectionImpl() {
// Classic devices do not support GATT connection.
DidFailToConnectGatt(ERROR_UNSUPPORTED_DEVICE);
@@ -110,6 +106,12 @@ uint16_t BluetoothClassicDeviceMac::GetAppearance() const {
return 0;
}
+base::Optional<std::string> BluetoothClassicDeviceMac::GetName() const {
+ if ([device_ name])
+ return base::SysNSStringToUTF8([device_ name]);
+ return base::nullopt;
+}
+
bool BluetoothClassicDeviceMac::IsPaired() const {
return [device_ isPaired];
}
« no previous file with comments | « device/bluetooth/bluetooth_classic_device_mac.h ('k') | device/bluetooth/bluetooth_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698