| Index: device/bluetooth/bluetooth_device.cc
|
| diff --git a/device/bluetooth/bluetooth_device.cc b/device/bluetooth/bluetooth_device.cc
|
| index d4e072bbc4b4b3a404de2931ea3d6bff6b4e2d18..285bf3ab8b8bcab19770bb91c923138ae7e70909 100644
|
| --- a/device/bluetooth/bluetooth_device.cc
|
| +++ b/device/bluetooth/bluetooth_device.cc
|
| @@ -417,14 +417,22 @@ std::string BluetoothDevice::CanonicalizeAddress(const std::string& address) {
|
|
|
| std::string BluetoothDevice::GetIdentifier() const { return GetAddress(); }
|
|
|
| -void BluetoothDevice::UpdateAdvertisementData(int8_t rssi,
|
| - UUIDList advertised_uuids,
|
| - ServiceDataMap service_data,
|
| - const int8_t* tx_power) {
|
| +void BluetoothDevice::UpdateAdvertisementData(
|
| + int8_t rssi,
|
| + const std::string* advertised_name,
|
| + UUIDList advertised_uuids,
|
| + ServiceDataMap service_data,
|
| + const int8_t* tx_power) {
|
| UpdateTimestamp();
|
|
|
| inquiry_rssi_ = rssi;
|
|
|
| + if (advertised_name != nullptr) {
|
| + advertised_name_ = *advertised_name;
|
| + } else {
|
| + advertised_name_ = base::nullopt;
|
| + }
|
| +
|
| device_uuids_.ReplaceAdvertisedUUIDs(std::move(advertised_uuids));
|
| service_data_ = std::move(service_data);
|
|
|
| @@ -437,6 +445,7 @@ void BluetoothDevice::UpdateAdvertisementData(int8_t rssi,
|
|
|
| void BluetoothDevice::ClearAdvertisementData() {
|
| inquiry_rssi_ = base::nullopt;
|
| + advertised_name_ = base::nullopt;
|
| device_uuids_.ClearAdvertisedUUIDs();
|
| service_data_.clear();
|
| inquiry_tx_power_ = base::nullopt;
|
|
|