Index: trunk/src/chrome/common/extensions/api/bluetooth/bluetooth_manifest_permission.cc |
=================================================================== |
--- trunk/src/chrome/common/extensions/api/bluetooth/bluetooth_manifest_permission.cc (revision 261569) |
+++ trunk/src/chrome/common/extensions/api/bluetooth/bluetooth_manifest_permission.cc (working copy) |
@@ -10,7 +10,7 @@ |
#include "base/values.h" |
#include "chrome/common/extensions/api/bluetooth/bluetooth_manifest_data.h" |
#include "chrome/common/extensions/api/manifest_types.h" |
-#include "device/bluetooth/bluetooth_uuid.h" |
+#include "device/bluetooth/bluetooth_utils.h" |
#include "extensions/common/error_utils.h" |
#include "extensions/common/extension_messages.h" |
#include "extensions/common/manifest_constants.h" |
@@ -31,8 +31,8 @@ |
bool ParseUuid(BluetoothManifestPermission* permission, |
const std::string& uuid, |
base::string16* error) { |
- device::BluetoothUUID bt_uuid(uuid); |
- if (!bt_uuid.IsValid()) { |
+ std::string canonical_uuid = device::bluetooth_utils::CanonicalUuid(uuid); |
+ if (canonical_uuid.empty()) { |
*error = ErrorUtils::FormatErrorMessageUTF16( |
errors::kErrorInvalidUuid, uuid); |
return false; |
@@ -83,12 +83,13 @@ |
const Extension* extension, |
const BluetoothPermissionRequest& request) const { |
- device::BluetoothUUID param_uuid(request.uuid); |
+ std::string canonical_param_uuid = |
+ device::bluetooth_utils::CanonicalUuid(request.uuid); |
for (BluetoothUuidSet::const_iterator it = uuids_.begin(); |
it != uuids_.end(); |
++it) { |
- device::BluetoothUUID uuid(*it); |
- if (param_uuid == uuid) |
+ std::string canonical_uuid = device::bluetooth_utils::CanonicalUuid(*it); |
+ if (canonical_uuid == canonical_param_uuid) |
return true; |
} |
return false; |