summaryrefslogtreecommitdiffstats
path: root/device/test
diff options
context:
space:
mode:
Diffstat (limited to 'device/test')
-rw-r--r--device/test/run_all_unittests.cc1
-rw-r--r--device/test/test_device_client.cc2
-rw-r--r--device/test/usb_test_gadget_impl.cc9
3 files changed, 9 insertions, 3 deletions
diff --git a/device/test/run_all_unittests.cc b/device/test/run_all_unittests.cc
index 9894155..b70df54 100644
--- a/device/test/run_all_unittests.cc
+++ b/device/test/run_all_unittests.cc
@@ -5,6 +5,7 @@
#include "base/bind.h"
#include "base/test/launcher/unit_test_launcher.h"
#include "base/test/test_suite.h"
+#include "build/build_config.h"
#include "third_party/mojo/src/mojo/edk/embedder/embedder.h"
#if defined(OS_ANDROID)
diff --git a/device/test/test_device_client.cc b/device/test/test_device_client.cc
index ff6933e..7a6c052 100644
--- a/device/test/test_device_client.cc
+++ b/device/test/test_device_client.cc
@@ -4,6 +4,8 @@
#include "device/test/test_device_client.h"
+#include "build/build_config.h"
+
// This file unconditionally includes these headers despite conditionally
// depending on the corresponding targets. The code below needs the destructors
// of the classes defined even when the classes are never instantiated.
diff --git a/device/test/usb_test_gadget_impl.cc b/device/test/usb_test_gadget_impl.cc
index f9ccf2c..be3b795 100644
--- a/device/test/usb_test_gadget_impl.cc
+++ b/device/test/usb_test_gadget_impl.cc
@@ -4,6 +4,9 @@
#include "device/test/usb_test_gadget.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include <string>
#include <vector>
@@ -69,7 +72,7 @@ static const int kReenumeratePeriod = 100; // 0.1 seconds
struct UsbTestGadgetConfiguration {
UsbTestGadget::Type type;
const char* http_resource;
- uint16 product_id;
+ uint16_t product_id;
};
static const struct UsbTestGadgetConfiguration kConfigurations[] = {
@@ -201,7 +204,7 @@ class UsbGadgetFactory : public UsbService::Observer,
usb_service_ = DeviceClient::Get()->GetUsbService();
request_context_getter_ = new URLRequestContextGetter(io_task_runner);
- static uint32 next_session_id;
+ static uint32_t next_session_id;
base::ProcessId process_id = base::GetCurrentProcId();
session_id_ = base::StringPrintf("%d-%d", process_id, next_session_id++);
@@ -424,7 +427,7 @@ class DeviceAddListener : public UsbService::Observer {
void OnDeviceAdded(scoped_refptr<UsbDevice> device) override {
if (device->vendor_id() == 0x18D1 && !device->serial_number().empty()) {
- const uint16 product_id = device->product_id();
+ const uint16_t product_id = device->product_id();
if (product_id_ == -1) {
bool found = false;
for (size_t i = 0; i < arraysize(kConfigurations); ++i) {