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

Unified Diff: device/bluetooth/test/bluetooth_test_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
« no previous file with comments | « device/bluetooth/dbus/fake_bluetooth_device_client.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/test/bluetooth_test_bluez.cc
diff --git a/device/bluetooth/test/bluetooth_test_bluez.cc b/device/bluetooth/test/bluetooth_test_bluez.cc
index bc6cae2eac0799f25f2cbb9f2c45fda68e3419e8..d492f4a196461e96ca0c20e39658d7c0bc052637 100644
--- a/device/bluetooth/test/bluetooth_test_bluez.cc
+++ b/device/bluetooth/test/bluetooth_test_bluez.cc
@@ -94,7 +94,7 @@ BluetoothDevice* BluetoothTestBlueZ::SimulateLowEnergyDevice(
if (device_ordinal > 6 || device_ordinal < 1)
return nullptr;
- std::string device_name = kTestDeviceName;
+ base::Optional<std::string> device_name = kTestDeviceName;
std::string device_address = kTestDeviceAddress1;
std::vector<std::string> service_uuids;
BluetoothTransport device_type = BLUETOOTH_TRANSPORT_LE;
@@ -116,9 +116,7 @@ BluetoothDevice* BluetoothTestBlueZ::SimulateLowEnergyDevice(
device_address = kTestDeviceAddress2;
break;
case 5:
- // TODO: implement. See crbug.com/622432
- NOTIMPLEMENTED();
- return nullptr;
+ device_name = base::nullopt;
case 6:
device_address = kTestDeviceAddress2;
device_type = BLUETOOTH_TRANSPORT_DUAL;
@@ -128,7 +126,8 @@ BluetoothDevice* BluetoothTestBlueZ::SimulateLowEnergyDevice(
if (!adapter_->GetDevice(device_address)) {
fake_bluetooth_device_client_->CreateTestDevice(
dbus::ObjectPath(bluez::FakeBluetoothAdapterClient::kAdapterPath),
- device_name /* name */, device_name /* alias */, device_address,
+ /* name */ device_name,
+ /* alias */ device_name.value_or("") + "(alias)", device_address,
service_uuids, device_type);
}
BluetoothDevice* device = adapter_->GetDevice(device_address);
« no previous file with comments | « device/bluetooth/dbus/fake_bluetooth_device_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698