| Index: components/arc/bluetooth/bluetooth_type_converters.cc
|
| diff --git a/components/arc/bluetooth/bluetooth_type_converters.cc b/components/arc/bluetooth/bluetooth_type_converters.cc
|
| index 6acc8c40457df34b909bb40b49754a4545e90c45..2d170d94e24fda1a3c9a306c83acb41adbfbab55 100644
|
| --- a/components/arc/bluetooth/bluetooth_type_converters.cc
|
| +++ b/components/arc/bluetooth/bluetooth_type_converters.cc
|
| @@ -50,14 +50,10 @@ namespace mojo {
|
| arc::mojom::BluetoothAddressPtr
|
| TypeConverter<arc::mojom::BluetoothAddressPtr, std::string>::Convert(
|
| const std::string& address) {
|
| - std::string stripped = StripNonHex(address);
|
| -
|
| - std::vector<uint8_t> address_bytes;
|
| - base::HexStringToBytes(stripped, &address_bytes);
|
|
|
| arc::mojom::BluetoothAddressPtr mojo_addr =
|
| arc::mojom::BluetoothAddress::New();
|
| - mojo_addr->address = mojo::Array<uint8_t>::From(address_bytes);
|
| + base::HexStringToBytes(StripNonHex(address), &mojo_addr->address);
|
|
|
| return mojo_addr;
|
| }
|
| @@ -68,7 +64,7 @@ std::string TypeConverter<std::string, arc::mojom::BluetoothAddress>::Convert(
|
| std::ostringstream addr_stream;
|
| addr_stream << std::setfill('0') << std::hex << std::uppercase;
|
|
|
| - const mojo::Array<uint8_t>& bytes = address.address;
|
| + const std::vector<uint8_t>& bytes = address.address;
|
|
|
| if (address.address.size() != kAddressSize)
|
| return std::string(kInvalidAddress);
|
| @@ -141,16 +137,12 @@ TypeConverter<arc::mojom::BluetoothSdpAttributePtr,
|
| case bluez::BluetoothServiceAttributeValueBlueZ::BOOL:
|
| result->type_size = attr_bluez.size();
|
| result->value.Append(attr_bluez.value().CreateDeepCopy());
|
| - result->sequence =
|
| - mojo::Array<arc::mojom::BluetoothSdpAttributePtr>::New(0);
|
| break;
|
| case bluez::BluetoothServiceAttributeValueBlueZ::SEQUENCE:
|
| if (depth + 1 >= arc::kBluetoothSDPMaxDepth) {
|
| result->type = bluez::BluetoothServiceAttributeValueBlueZ::NULLTYPE;
|
| result->type_size = 0;
|
| result->value.Append(base::Value::CreateNullValue());
|
| - result->sequence =
|
| - mojo::Array<arc::mojom::BluetoothSdpAttributePtr>::New(0);
|
| return result;
|
| }
|
| for (const auto& child : attr_bluez.sequence()) {
|
|
|