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

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

Issue 2440043002: bluetooth: bluez: GetName uses 'name' instead of 'alias'. (Closed)
Patch Set: Android needs StartLowEnergyDiscoverySession; Browser test needs s/alias/name/ Created 4 years, 1 month 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/bluez/bluetooth_device_bluez.cc
diff --git a/device/bluetooth/bluez/bluetooth_device_bluez.cc b/device/bluetooth/bluez/bluetooth_device_bluez.cc
index 9f1b448fea9e7b8f2de36bcf3856c9ea3b5ed762..5cdab8d5d92f51f804c7e225ea3789d9b19680c1 100644
--- a/device/bluetooth/bluez/bluetooth_device_bluez.cc
+++ b/device/bluetooth/bluez/bluetooth_device_bluez.cc
@@ -313,7 +313,10 @@ base::Optional<std::string> BluetoothDeviceBlueZ::GetName() const {
object_path_);
DCHECK(properties);
- return properties->alias.value();
+ if (properties->name.is_valid())
+ return properties->name.value();
+ else
+ return base::nullopt;
}
bool BluetoothDeviceBlueZ::IsPaired() const {
« no previous file with comments | « device/bluetooth/bluez/bluetooth_bluez_unittest.cc ('k') | device/bluetooth/dbus/fake_bluetooth_device_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698