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 9f1b448fea9e7b8f2de36bcf3856c9ea3b5ed762..1a6f7b2b5aea7f6e64b5b7134cad201e68f9b0b0 100644 |
| --- a/device/bluetooth/bluez/bluetooth_device_bluez.cc |
| +++ b/device/bluetooth/bluez/bluetooth_device_bluez.cc |
| @@ -607,6 +607,30 @@ void BluetoothDeviceBlueZ::UpdateServiceData() { |
| service_data_[BluetoothUUID(pair.first)] = pair.second; |
| } |
| +void BluetoothDeviceBlueZ::UpdateManufacturerData() { |
| + bluez::BluetoothDeviceClient::Properties* properties = |
| + bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->GetProperties( |
| + object_path_); |
| + DCHECK(properties); |
| + manufacturer_data_.clear(); |
| + |
| + if (properties->manufacturer_data.is_valid()) { |
| + for (const auto& pair : properties->manufacturer_data.value()) |
| + manufacturer_data_[pair.first] = pair.second; |
| + } |
| +} |
| + |
| +void BluetoothDeviceBlueZ::UpdateAdvertisingDataFlags() { |
| + bluez::BluetoothDeviceClient::Properties* properties = |
| + bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->GetProperties( |
| + object_path_); |
| + DCHECK(properties); |
| + advertising_data_flags_ = base::nullopt; |
| + |
| + if (properties->advertising_data_flags.is_valid()) |
| + advertising_data_flags_ = properties->advertising_data_flags.value()[0]; |
|
ortuno
2016/11/02 23:36:48
Could you comment why we only need the first eleme
puthik_chromium
2016/11/03 20:40:39
Done.
|
| +} |
| + |
| BluetoothPairingBlueZ* BluetoothDeviceBlueZ::BeginPairing( |
| BluetoothDevice::PairingDelegate* pairing_delegate) { |
| pairing_.reset(new BluetoothPairingBlueZ(this, pairing_delegate)); |