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

Unified Diff: components/arc/bluetooth/bluetooth_struct_traits_unittest.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_struct_traits_unittest.cc
diff --git a/components/arc/bluetooth/bluetooth_struct_traits_unittest.cc b/components/arc/bluetooth/bluetooth_struct_traits_unittest.cc
index 94adbbb734fcec269ca99865719cf36f560cc6ce..46a8ce30709969cd4e7dc5d74161dd9621b315c1 100644
--- a/components/arc/bluetooth/bluetooth_struct_traits_unittest.cc
+++ b/components/arc/bluetooth/bluetooth_struct_traits_unittest.cc
@@ -4,6 +4,9 @@
#include "components/arc/bluetooth/bluetooth_struct_traits.h"
+#include <string>
+#include <utility>
+
#include "base/macros.h"
#include "device/bluetooth/bluetooth_uuid.h"
#include "mojo/public/cpp/bindings/array.h"
@@ -24,7 +27,7 @@ constexpr uint8_t kManufacturerData[] = {0x00, 0xe0};
template <typename MojoType, typename UserType>
mojo::StructPtr<MojoType> ConvertToMojo(UserType& input) {
- mojo::Array<uint8_t> data = MojoType::Serialize(&input);
+ std::vector<uint8_t> data = MojoType::Serialize(&input);
mojo::StructPtr<MojoType> output;
MojoType::Deserialize(std::move(data), &output);
return output;
@@ -32,7 +35,7 @@ mojo::StructPtr<MojoType> ConvertToMojo(UserType& input) {
template <typename MojoType, typename UserType>
bool ConvertFromMojo(mojo::StructPtr<MojoType> input, UserType* output) {
- mojo::Array<uint8_t> data = MojoType::Serialize(&input);
+ std::vector<uint8_t> data = MojoType::Serialize(&input);
return MojoType::Deserialize(std::move(data), output);
}
@@ -70,7 +73,7 @@ TEST(BluetoothStructTraitsTest, DeserializeBluetoothUUID) {
TEST(BluetoothStructTraitsTest, DeserializeBluetoothAdvertisement) {
arc::mojom::BluetoothAdvertisementPtr advertisement_mojo =
arc::mojom::BluetoothAdvertisement::New();
- mojo::Array<arc::mojom::BluetoothAdvertisingDataPtr> adv_data;
+ std::vector<arc::mojom::BluetoothAdvertisingDataPtr> adv_data;
// Create service UUIDs.
arc::mojom::BluetoothAdvertisingDataPtr data =
@@ -133,13 +136,13 @@ TEST(BluetoothStructTraitsTest, DeserializeBluetoothAdvertisement) {
TEST(BluetoothStructTraitsTest, DeserializeBluetoothAdvertisementFailure) {
arc::mojom::BluetoothAdvertisementPtr advertisement_mojo =
arc::mojom::BluetoothAdvertisement::New();
- mojo::Array<arc::mojom::BluetoothAdvertisingDataPtr> adv_data;
+ std::vector<arc::mojom::BluetoothAdvertisingDataPtr> adv_data;
// Create empty manufacturer data. Manufacturer data must include the CIC
// which is 2 bytes long.
arc::mojom::BluetoothAdvertisingDataPtr data =
arc::mojom::BluetoothAdvertisingData::New();
- data->set_manufacturer_data((mojo::Array<uint8_t>()));
+ data->set_manufacturer_data((std::vector<uint8_t>()));
Luis Héctor Chávez 2016/11/17 22:45:19 you should be able to remove one set of parens. I
puthik_chromium 2016/11/17 23:12:29 Done. Didn't saw that there was 2 set of parens.
adv_data.push_back(std::move(data));
advertisement_mojo->type =

Powered by Google App Engine
This is Rietveld 408576698