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

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

Issue 2244693002: bluetooth: Refactor how we update based on Advertising Data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 months 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 222a47fecba07aa38ffc2f79b4a682d8d9a94336..06044d6ba746108b9846111b98d0c6d9bd909b75 100644
--- a/device/bluetooth/bluez/bluetooth_device_bluez.cc
+++ b/device/bluetooth/bluez/bluetooth_device_bluez.cc
@@ -347,19 +347,18 @@ bool BluetoothDeviceBlueZ::IsConnecting() const {
return num_connecting_calls_ > 0;
}
-BluetoothDeviceBlueZ::UUIDList BluetoothDeviceBlueZ::GetUUIDs() const {
+BluetoothDevice::UUIDSet BluetoothDeviceBlueZ::GetUUIDs() const {
bluez::BluetoothDeviceClient::Properties* properties =
bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->GetProperties(
object_path_);
DCHECK(properties);
- std::vector<device::BluetoothUUID> uuids;
+ UUIDSet uuids;
const std::vector<std::string>& dbus_uuids = properties->uuids.value();
- for (std::vector<std::string>::const_iterator iter = dbus_uuids.begin();
- iter != dbus_uuids.end(); ++iter) {
- device::BluetoothUUID uuid(*iter);
+ for (const std::string& dbus_uuid : dbus_uuids) {
+ device::BluetoothUUID uuid(dbus_uuid);
DCHECK(uuid.IsValid());
- uuids.push_back(uuid);
+ uuids.insert(std::move(uuid));
}
return uuids;
}

Powered by Google App Engine
This is Rietveld 408576698