| Index: device/bluetooth/bluetooth_uuid.cc
|
| diff --git a/device/bluetooth/bluetooth_uuid.cc b/device/bluetooth/bluetooth_uuid.cc
|
| index 071493a902b55ac8b0570b190e2ecf1885b1fa0d..b35094deba169ab202a92d118bb5d02027b38c18 100644
|
| --- a/device/bluetooth/bluetooth_uuid.cc
|
| +++ b/device/bluetooth/bluetooth_uuid.cc
|
| @@ -13,8 +13,8 @@ namespace device {
|
|
|
| namespace {
|
|
|
| -const char* kCommonUuidPostfix = "-0000-1000-8000-00805f9b34fb";
|
| -const char* kCommonUuidPrefix = "0000";
|
| +const char kCommonUuidPostfix[] = "-0000-1000-8000-00805f9b34fb";
|
| +const char kCommonUuidPrefix[] = "0000";
|
|
|
| // Returns the canonical, 128-bit canonical, and the format of the UUID
|
| // in |canonical|, |canonical_128|, and |format| based on |uuid|.
|
| @@ -30,8 +30,10 @@ void GetCanonicalUuid(std::string uuid,
|
| if (uuid.empty())
|
| return;
|
|
|
| - if (uuid.size() < 11 && uuid.find("0x") == 0)
|
| + if (uuid.size() < 11 &&
|
| + base::StartsWith(uuid, "0x", base::CompareCase::SENSITIVE)) {
|
| uuid = uuid.substr(2);
|
| + }
|
|
|
| if (!(uuid.size() == 4 || uuid.size() == 8 || uuid.size() == 36))
|
| return;
|
|
|