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

Unified Diff: device/bluetooth/bluez/bluetooth_device_bluez.cc

Issue 2421713002: arc: bluetooth: Expose missing advertise data. (Closed)
Patch Set: Fix comment 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
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));

Powered by Google App Engine
This is Rietveld 408576698