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.
5 #include "content/common/bluetooth/bluetooth_device.h"
7 #include "base/strings/string_util.h"
11 BluetoothDevice::BluetoothDevice()
13 name(base::string16()),
16 device::BluetoothDevice::VendorIDSource::VENDOR_ID_UNKNOWN
),
25 BluetoothDevice::BluetoothDevice(
26 const std::string
& instance_id
,
27 const base::string16
& name
,
29 device::BluetoothDevice::VendorIDSource vendor_id_source
,
32 uint16 product_version
,
35 const std::vector
<std::string
>& uuids
)
36 : instance_id(instance_id
),
38 device_class(device_class
),
39 vendor_id_source(vendor_id_source
),
41 product_id(product_id
),
42 product_version(product_version
),
48 BluetoothDevice::~BluetoothDevice() {
52 std::vector
<std::string
> BluetoothDevice::UUIDsFromBluetoothUUIDs(
53 const device::BluetoothDevice::UUIDList
& uuid_list
) {
54 std::vector
<std::string
> uuids
;
55 uuids
.reserve(uuid_list
.size());
56 for (const auto& it
: uuid_list
)
57 uuids
.push_back(it
.canonical_value());
61 } // namespace content