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

Unified Diff: device/bluetooth/bluez/bluetooth_device_bluez.cc

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/bluez/bluetooth_device_bluez.h ('k') | device/bluetooth/test/bluetooth_test_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluez/bluetooth_device_bluez.cc
diff --git a/device/bluetooth/bluez/bluetooth_device_bluez.cc b/device/bluetooth/bluez/bluetooth_device_bluez.cc
index 3cb677ce08d1335789cadb5c16558408537c4448..7cd7041a2cf270f5be9e23ed660c9b7184c91c98 100644
--- a/device/bluetooth/bluez/bluetooth_device_bluez.cc
+++ b/device/bluetooth/bluez/bluetooth_device_bluez.cc
@@ -214,15 +214,6 @@ device::BluetoothTransport BluetoothDeviceBlueZ::GetType() const {
return device::BLUETOOTH_TRANSPORT_INVALID;
}
-std::string BluetoothDeviceBlueZ::GetDeviceName() const {
- bluez::BluetoothDeviceClient::Properties* properties =
- bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->GetProperties(
- object_path_);
- DCHECK(properties);
-
- return properties->alias.value();
-}
-
void BluetoothDeviceBlueZ::CreateGattConnectionImpl() {
// BlueZ implementation does not use the default CreateGattConnection
// implementation.
@@ -293,6 +284,15 @@ uint16_t BluetoothDeviceBlueZ::GetAppearance() const {
return properties->appearance.value();
}
+base::Optional<std::string> BluetoothDeviceBlueZ::GetName() const {
+ bluez::BluetoothDeviceClient::Properties* properties =
+ bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->GetProperties(
+ object_path_);
+ DCHECK(properties);
+
+ return properties->alias.value();
+}
+
bool BluetoothDeviceBlueZ::IsPaired() const {
bluez::BluetoothDeviceClient::Properties* properties =
bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->GetProperties(
« no previous file with comments | « device/bluetooth/bluez/bluetooth_device_bluez.h ('k') | device/bluetooth/test/bluetooth_test_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698