| Index: components/arc/bluetooth/arc_bluetooth_bridge.cc
|
| diff --git a/components/arc/bluetooth/arc_bluetooth_bridge.cc b/components/arc/bluetooth/arc_bluetooth_bridge.cc
|
| index fb716aca60ea93b031c0f2f2ad7cf2d99bb6217c..1c85deb3d1c8f4fb0dceb238e520bfad9607f3c4 100644
|
| --- a/components/arc/bluetooth/arc_bluetooth_bridge.cc
|
| +++ b/components/arc/bluetooth/arc_bluetooth_bridge.cc
|
| @@ -1372,12 +1372,11 @@ ArcBluetoothBridge::GetDeviceProperties(mojom::BluetoothPropertyType type,
|
| return properties;
|
| }
|
|
|
| - if (type == mojom::BluetoothPropertyType::ALL ||
|
| - type == mojom::BluetoothPropertyType::BDNAME) {
|
| + if ((type == mojom::BluetoothPropertyType::ALL ||
|
| + type == mojom::BluetoothPropertyType::BDNAME) &&
|
| + device->GetName()) {
|
| mojom::BluetoothPropertyPtr btp = mojom::BluetoothProperty::New();
|
| - // TODO(615720): Use the upcoming GetName (was GetDeviceName).
|
| - btp->set_bdname(
|
| - mojo::String::From(base::UTF16ToUTF8(device->GetNameForDisplay())));
|
| + btp->set_bdname(mojo::String::From(device->GetName().value()));
|
| properties.push_back(std::move(btp));
|
| }
|
| if (type == mojom::BluetoothPropertyType::ALL ||
|
| @@ -1415,7 +1414,6 @@ ArcBluetoothBridge::GetDeviceProperties(mojom::BluetoothPropertyType type,
|
| if (type == mojom::BluetoothPropertyType::ALL ||
|
| type == mojom::BluetoothPropertyType::REMOTE_FRIENDLY_NAME) {
|
| mojom::BluetoothPropertyPtr btp = mojom::BluetoothProperty::New();
|
| - // TODO(615720): Use the upcoming GetName (was GetDeviceName).
|
| btp->set_remote_friendly_name(
|
| mojo::String::From(base::UTF16ToUTF8(device->GetNameForDisplay())));
|
| properties.push_back(std::move(btp));
|
|
|