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

Unified Diff: components/arc/bluetooth/bluetooth_type_converters.cc

Issue 2511253002: arc: bluetooth: enable use_new_wrapper_types for bluetooth.mojom (Closed)
Patch Set: rebase to ToT Created 4 years, 1 month 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: 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..93a499962e18b8c6856afae005e923b721862227 100644
--- a/components/arc/bluetooth/bluetooth_type_converters.cc
+++ b/components/arc/bluetooth/bluetooth_type_converters.cc
@@ -57,7 +57,7 @@ TypeConverter<arc::mojom::BluetoothAddressPtr, std::string>::Convert(
arc::mojom::BluetoothAddressPtr mojo_addr =
arc::mojom::BluetoothAddress::New();
- mojo_addr->address = mojo::Array<uint8_t>::From(address_bytes);
+ mojo_addr->address = address_bytes;
Luis Héctor Chávez 2016/11/17 22:45:19 nit: does base::HexStringToBytes(stripped, &mojo_
puthik_chromium 2016/11/17 23:12:29 Done. stripped also not need.
return mojo_addr;
}
@@ -68,7 +68,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 +141,14 @@ 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);
+ result->sequence = std::vector<arc::mojom::BluetoothSdpAttributePtr>();
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);
+ result->sequence = std::vector<arc::mojom::BluetoothSdpAttributePtr>();
return result;
}
for (const auto& child : attr_bluez.sequence()) {

Powered by Google App Engine
This is Rietveld 408576698