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

Unified Diff: device/bluetooth/bluetooth_low_energy_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_low_energy_device_mac.h ('k') | device/bluetooth/bluetooth_low_energy_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_low_energy_device_mac.mm
diff --git a/device/bluetooth/bluetooth_low_energy_device_mac.mm b/device/bluetooth/bluetooth_low_energy_device_mac.mm
index fb7a379316516ccca0178031bc969c295d79f12d..6995dbedf4fca6c468039040ae2c2d1dba13c996 100644
--- a/device/bluetooth/bluetooth_low_energy_device_mac.mm
+++ b/device/bluetooth/bluetooth_low_energy_device_mac.mm
@@ -111,6 +111,12 @@ uint16_t BluetoothLowEnergyDeviceMac::GetAppearance() const {
return 0;
}
+base::Optional<std::string> BluetoothLowEnergyDeviceMac::GetName() const {
+ if ([peripheral_ name])
+ return base::SysNSStringToUTF8([peripheral_ name]);
+ return base::nullopt;
+}
+
int BluetoothLowEnergyDeviceMac::GetRSSI() const {
return rssi_;
}
@@ -218,10 +224,6 @@ void BluetoothLowEnergyDeviceMac::ConnectToServiceInsecurely(
NOTIMPLEMENTED();
}
-std::string BluetoothLowEnergyDeviceMac::GetDeviceName() const {
- return base::SysNSStringToUTF8([peripheral_ name]);
-}
-
void BluetoothLowEnergyDeviceMac::CreateGattConnectionImpl() {
if (!IsGattConnected()) {
GetMacAdapter()->CreateGattConnection(this);
« no previous file with comments | « device/bluetooth/bluetooth_low_energy_device_mac.h ('k') | device/bluetooth/bluetooth_low_energy_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698