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

Unified Diff: device/bluetooth/bluetooth_service_record_win.cc

Issue 224893002: device/bluetooth: Rename device::bluetooth_utils::UUID to device::BluetoothUUID (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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/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
« no previous file with comments | « device/bluetooth/bluetooth_service_record_mac_unittest.mm ('k') | device/bluetooth/bluetooth_service_record_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698