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

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: Fix arc 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..61a4d6cdc9d4690856bd4adc5b8cd78e519332f0 100644
--- a/device/bluetooth/bluez/bluetooth_device_bluez.cc
+++ b/device/bluetooth/bluez/bluetooth_device_bluez.cc
@@ -347,20 +347,20 @@ bool BluetoothDeviceBlueZ::IsConnecting() const {
return num_connecting_calls_ > 0;
}
-BluetoothDeviceBlueZ::UUIDList BluetoothDeviceBlueZ::GetUUIDs() const {
+BluetoothDeviceBlueZ::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(uuid);
Jeffrey Yasskin 2016/08/19 15:09:53 Try to std::move() BluetoothUUIDs around, since th
ortuno 2016/08/19 20:50:34 Done.
}
+
return uuids;
}

Powered by Google App Engine
This is Rietveld 408576698