| Index: device/bluetooth/bluetooth_service_record_win.cc
|
| diff --git a/device/bluetooth/bluetooth_service_record_win.cc b/device/bluetooth/bluetooth_service_record_win.cc
|
| index e0ba750f2972e5e347611a5df0d1e6009842d2e1..48f87232ab42a23e5f3794904869a1f6c08f6858 100644
|
| --- a/device/bluetooth/bluetooth_service_record_win.cc
|
| +++ b/device/bluetooth/bluetooth_service_record_win.cc
|
| @@ -10,7 +10,7 @@
|
| #include "base/strings/string_number_conversions.h"
|
| #include "base/strings/stringprintf.h"
|
| #include "device/bluetooth/bluetooth_init_win.h"
|
| -#include "device/bluetooth/bluetooth_utils.h"
|
| +#include "device/bluetooth/bluetooth_uuid.h"
|
|
|
| namespace {
|
|
|
| @@ -61,7 +61,8 @@ void ExtractChannels(const SDP_ELEMENT_DATA& protocol_descriptor_list_data,
|
| }
|
| }
|
|
|
| -void ExtractUuid(const SDP_ELEMENT_DATA& uuid_data, std::string* uuid) {
|
| +void ExtractUuid(const SDP_ELEMENT_DATA& uuid_data,
|
| + device::BluetoothUUID* uuid) {
|
| HBLUETOOTH_CONTAINER_ELEMENT inner_uuid_element = NULL;
|
| SDP_ELEMENT_DATA inner_uuid_data;
|
| if (AdvanceToSdpType(uuid_data,
|
| @@ -71,13 +72,13 @@ void ExtractUuid(const SDP_ELEMENT_DATA& uuid_data, std::string* uuid) {
|
| if (inner_uuid_data.specificType == SDP_ST_UUID16) {
|
| std::string uuid_hex =
|
| base::StringPrintf("%04x", inner_uuid_data.data.uuid16);
|
| - *uuid = device::bluetooth_utils::CanonicalUuid(uuid_hex);
|
| + *uuid = device::BluetoothUUID(uuid_hex);
|
| } else if (inner_uuid_data.specificType == SDP_ST_UUID32) {
|
| std::string uuid_hex =
|
| base::StringPrintf("%08x", inner_uuid_data.data.uuid32);
|
| - *uuid = device::bluetooth_utils::CanonicalUuid(uuid_hex);
|
| + *uuid = device::BluetoothUUID(uuid_hex);
|
| } else if (inner_uuid_data.specificType == SDP_ST_UUID128) {
|
| - *uuid = base::StringPrintf(
|
| + *uuid = device::BluetoothUUID(base::StringPrintf(
|
| "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
|
| inner_uuid_data.data.uuid128.Data1,
|
| inner_uuid_data.data.uuid128.Data2,
|
| @@ -89,9 +90,9 @@ void ExtractUuid(const SDP_ELEMENT_DATA& uuid_data, std::string* uuid) {
|
| inner_uuid_data.data.uuid128.Data4[4],
|
| inner_uuid_data.data.uuid128.Data4[5],
|
| inner_uuid_data.data.uuid128.Data4[6],
|
| - inner_uuid_data.data.uuid128.Data4[7]);
|
| + inner_uuid_data.data.uuid128.Data4[7]));
|
| } else {
|
| - uuid->clear();
|
| + *uuid = device::BluetoothUUID();
|
| }
|
| }
|
| }
|
| @@ -143,8 +144,8 @@ BluetoothServiceRecordWin::BluetoothServiceRecordWin(
|
| blob_size,
|
| kUuidId,
|
| &uuid_data)) {
|
| - ExtractUuid(uuid_data, &uuid_);
|
| + ExtractUuid(uuid_data, &uuid_);
|
| }
|
| }
|
|
|
| -} // namespace device
|
| +} // namespace device
|
|
|