| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "content/common/bluetooth/bluetooth_device.h" | |
| 6 | |
| 7 #include "base/strings/string_util.h" | |
| 8 | |
| 9 namespace content { | |
| 10 | |
| 11 BluetoothDevice::BluetoothDevice() | |
| 12 : id(""), | |
| 13 name(base::string16()), | |
| 14 uuids() {} | |
| 15 | |
| 16 BluetoothDevice::BluetoothDevice( | |
| 17 const std::string& id, | |
| 18 const base::string16& name, | |
| 19 const std::vector<std::string>& uuids) | |
| 20 : id(id), | |
| 21 name(name), | |
| 22 uuids(uuids) {} | |
| 23 | |
| 24 BluetoothDevice::~BluetoothDevice() { | |
| 25 } | |
| 26 | |
| 27 // static | |
| 28 std::vector<std::string> BluetoothDevice::UUIDsFromBluetoothUUIDs( | |
| 29 const device::BluetoothDevice::UUIDList& uuid_list) { | |
| 30 std::vector<std::string> uuids; | |
| 31 uuids.reserve(uuid_list.size()); | |
| 32 for (const auto& it : uuid_list) | |
| 33 uuids.push_back(it.canonical_value()); | |
| 34 return uuids; | |
| 35 } | |
| 36 | |
| 37 } // namespace content | |
| OLD | NEW |