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 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; |
| } |