Chromium Code Reviews| 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 417ed161d40b86266ffbb43cea208a835ae1a5ec..50f15ebd401bc3ff07019dadb5edb22be2c1983c 100644 |
| --- a/device/bluetooth/bluez/bluetooth_device_bluez.cc |
| +++ b/device/bluetooth/bluez/bluetooth_device_bluez.cc |
| @@ -595,6 +595,20 @@ void BluetoothDeviceBlueZ::GetServiceRecords( |
| weak_ptr_factory_.GetWeakPtr(), error_callback)); |
| } |
| +void BluetoothDeviceBlueZ::UpdateServiceData() { |
| + bluez::BluetoothDeviceClient::Properties* properties = |
| + bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->GetProperties( |
| + object_path_); |
| + DCHECK(properties); |
| + DCHECK(properties->service_data.is_valid()); |
|
ortuno
2016/10/05 06:27:10
Does bluez cache service data i.e. if a device sto
puthik_chromium
2016/10/06 01:49:56
Add comment in header file instead.
- BlueZ won't
|
| + |
| + service_data_.clear(); |
| + for (const auto& pair : properties->service_data.value()) { |
| + service_data_.insert(std::pair<BluetoothUUID, std::vector<uint8_t>>( |
| + BluetoothUUID(pair.first), pair.second)); |
| + } |
| +} |
| + |
| BluetoothPairingBlueZ* BluetoothDeviceBlueZ::BeginPairing( |
| BluetoothDevice::PairingDelegate* pairing_delegate) { |
| pairing_.reset(new BluetoothPairingBlueZ(this, pairing_delegate)); |