[go: nahoru, domu]

Switch to standard integer types in device/.

BUG=138542
TBR=reillyg@chromium.org

Review URL: https://codereview.chromium.org/1542163002

Cr-Commit-Position: refs/heads/master@{#366628}
diff --git a/device/battery/battery_monitor_impl.h b/device/battery/battery_monitor_impl.h
index 8d7a67f..09e1bd4 100644
--- a/device/battery/battery_monitor_impl.h
+++ b/device/battery/battery_monitor_impl.h
@@ -5,6 +5,7 @@
 #ifndef DEVICE_BATTERY_BATTERY_MONITOR_IMPL_H_
 #define DEVICE_BATTERY_BATTERY_MONITOR_IMPL_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "device/battery/battery_export.h"
 #include "device/battery/battery_monitor.mojom.h"
diff --git a/device/battery/battery_status_manager_chromeos.cc b/device/battery/battery_status_manager_chromeos.cc
index b2ca0d46..ae5c777 100644
--- a/device/battery/battery_status_manager_chromeos.cc
+++ b/device/battery/battery_status_manager_chromeos.cc
@@ -4,6 +4,7 @@
 
 #include "device/battery/battery_status_manager.h"
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "chromeos/dbus/dbus_thread_manager.h"
 #include "chromeos/dbus/power_manager/power_supply_properties.pb.h"
diff --git a/device/battery/battery_status_manager_default.cc b/device/battery/battery_status_manager_default.cc
index bb392907..c689884 100644
--- a/device/battery/battery_status_manager_default.cc
+++ b/device/battery/battery_status_manager_default.cc
@@ -5,6 +5,7 @@
 #include "device/battery/battery_status_manager.h"
 
 #include "base/logging.h"
+#include "base/macros.h"
 
 namespace device {
 
diff --git a/device/battery/battery_status_manager_linux.cc b/device/battery/battery_status_manager_linux.cc
index 0b2da63..cf07f78 100644
--- a/device/battery/battery_status_manager_linux.cc
+++ b/device/battery/battery_status_manager_linux.cc
@@ -4,6 +4,9 @@
 
 #include "device/battery/battery_status_manager_linux.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/macros.h"
 #include "base/metrics/histogram.h"
 #include "base/threading/thread.h"
@@ -147,7 +150,7 @@
         continue;
 
       bool is_present = GetPropertyAsBoolean(*dictionary, "IsPresent", false);
-      uint32 type = static_cast<uint32>(
+      uint32_t type = static_cast<uint32_t>(
           GetPropertyAsDouble(*dictionary, "Type", UPOWER_DEVICE_TYPE_UNKNOWN));
 
       if (!is_present || type != UPOWER_DEVICE_TYPE_BATTERY) {
@@ -324,7 +327,7 @@
   if (!dictionary.HasKey("State"))
     return status;
 
-  uint32 state = static_cast<uint32>(
+  uint32_t state = static_cast<uint32_t>(
       GetPropertyAsDouble(dictionary, "State", UPOWER_DEVICE_STATE_UNKNOWN));
   status.charging = state != UPOWER_DEVICE_STATE_DISCHARGING &&
                     state != UPOWER_DEVICE_STATE_EMPTY;
diff --git a/device/battery/battery_status_manager_mac.cc b/device/battery/battery_status_manager_mac.cc
index 8481c47..ca88790 100644
--- a/device/battery/battery_status_manager_mac.cc
+++ b/device/battery/battery_status_manager_mac.cc
@@ -11,6 +11,7 @@
 
 #include "base/mac/foundation_util.h"
 #include "base/mac/scoped_cftyperef.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/metrics/histogram.h"
 #include "base/time/time.h"
diff --git a/device/battery/battery_status_manager_win.cc b/device/battery/battery_status_manager_win.cc
index 50ceac7..a832bbb 100644
--- a/device/battery/battery_status_manager_win.cc
+++ b/device/battery/battery_status_manager_win.cc
@@ -5,6 +5,7 @@
 #include "device/battery/battery_status_manager_win.h"
 
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/metrics/histogram.h"
 #include "base/strings/string16.h"
diff --git a/device/battery/battery_status_service.h b/device/battery/battery_status_service.h
index 89432c4..9462344 100644
--- a/device/battery/battery_status_service.h
+++ b/device/battery/battery_status_service.h
@@ -6,6 +6,7 @@
 #define DEVICE_BATTERY_BATTERY_STATUS_SERVICE_H_
 
 #include "base/callback_list.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/singleton.h"
 #include "device/battery/battery_export.h"
diff --git a/device/battery/battery_status_service_unittest.cc b/device/battery/battery_status_service_unittest.cc
index cef64fc6..c46b8061 100644
--- a/device/battery/battery_status_service_unittest.cc
+++ b/device/battery/battery_status_service_unittest.cc
@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
 #include "device/battery/battery_status_manager.h"
diff --git a/device/bluetooth/android/bluetooth_jni_registrar.cc b/device/bluetooth/android/bluetooth_jni_registrar.cc
index 08aca21..21712c2c 100644
--- a/device/bluetooth/android/bluetooth_jni_registrar.cc
+++ b/device/bluetooth/android/bluetooth_jni_registrar.cc
@@ -6,6 +6,7 @@
 
 #include "base/android/jni_android.h"
 #include "base/android/jni_registrar.h"
+#include "base/macros.h"
 #include "device/bluetooth/android/wrappers.h"
 #include "device/bluetooth/bluetooth_adapter_android.h"
 #include "device/bluetooth/bluetooth_device_android.h"
diff --git a/device/bluetooth/bluetooth_adapter.cc b/device/bluetooth/bluetooth_adapter.cc
index b97ac24..20f73d6 100644
--- a/device/bluetooth/bluetooth_adapter.cc
+++ b/device/bluetooth/bluetooth_adapter.cc
@@ -7,6 +7,7 @@
 #include "base/bind.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/stl_util.h"
+#include "build/build_config.h"
 #include "device/bluetooth/bluetooth_device.h"
 #include "device/bluetooth/bluetooth_discovery_session.h"
 #include "device/bluetooth/bluetooth_discovery_session_outcome.h"
diff --git a/device/bluetooth/bluetooth_adapter.h b/device/bluetooth/bluetooth_adapter.h
index 71b44b9..e06b8bf 100644
--- a/device/bluetooth/bluetooth_adapter.h
+++ b/device/bluetooth/bluetooth_adapter.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_
 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_
 
+#include <stdint.h>
+
 #include <list>
 #include <set>
 #include <string>
@@ -14,6 +16,7 @@
 #include "base/containers/scoped_ptr_hash_map.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
+#include "build/build_config.h"
 #include "device/bluetooth/bluetooth_advertisement.h"
 #include "device/bluetooth/bluetooth_audio_sink.h"
 #include "device/bluetooth/bluetooth_device.h"
@@ -168,12 +171,13 @@
     virtual void GattCharacteristicValueChanged(
         BluetoothAdapter* adapter,
         BluetoothGattCharacteristic* characteristic,
-        const std::vector<uint8>& value) {}
+        const std::vector<uint8_t>& value) {}
 
     // Called when the value of a characteristic descriptor has been updated.
     virtual void GattDescriptorValueChanged(BluetoothAdapter* adapter,
                                             BluetoothGattDescriptor* descriptor,
-                                            const std::vector<uint8>& value) {}
+                                            const std::vector<uint8_t>& value) {
+    }
   };
 
   // Used to configure a listening servie.
diff --git a/device/bluetooth/bluetooth_adapter_android.h b/device/bluetooth/bluetooth_adapter_android.h
index 9447506..17ead5d 100644
--- a/device/bluetooth/bluetooth_adapter_android.h
+++ b/device/bluetooth/bluetooth_adapter_android.h
@@ -7,6 +7,7 @@
 
 #include "base/android/jni_android.h"
 #include "base/android/scoped_java_ref.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "device/bluetooth/bluetooth_adapter.h"
 
diff --git a/device/bluetooth/bluetooth_adapter_bluez.cc b/device/bluetooth/bluetooth_adapter_bluez.cc
index b00db70..2e059f1 100644
--- a/device/bluetooth/bluetooth_adapter_bluez.cc
+++ b/device/bluetooth/bluetooth_adapter_bluez.cc
@@ -13,6 +13,7 @@
 #include "base/sequenced_task_runner.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
+#include "build/build_config.h"
 #include "device/bluetooth/bluetooth_adapter_profile_bluez.h"
 #include "device/bluetooth/bluetooth_advertisement_bluez.h"
 #include "device/bluetooth/bluetooth_audio_sink_bluez.h"
@@ -580,8 +581,8 @@
 }
 
 void BluetoothAdapterBlueZ::DisplayPasskey(const dbus::ObjectPath& device_path,
-                                           uint32 passkey,
-                                           uint16 entered) {
+                                           uint32_t passkey,
+                                           uint16_t entered) {
   DCHECK(IsPresent());
   DCHECK(agent_.get());
   VLOG(1) << device_path.value() << ": DisplayPasskey: " << passkey << " ("
@@ -599,7 +600,7 @@
 
 void BluetoothAdapterBlueZ::RequestConfirmation(
     const dbus::ObjectPath& device_path,
-    uint32 passkey,
+    uint32_t passkey,
     const ConfirmationCallback& callback) {
   DCHECK(IsPresent());
   DCHECK(agent_.get());
@@ -994,7 +995,7 @@
 
 void BluetoothAdapterBlueZ::NotifyGattCharacteristicValueChanged(
     BluetoothRemoteGattCharacteristicBlueZ* characteristic,
-    const std::vector<uint8>& value) {
+    const std::vector<uint8_t>& value) {
   DCHECK_EQ(static_cast<BluetoothRemoteGattServiceBlueZ*>(
                 characteristic->GetService())
                 ->GetAdapter(),
@@ -1007,7 +1008,7 @@
 
 void BluetoothAdapterBlueZ::NotifyGattDescriptorValueChanged(
     BluetoothRemoteGattDescriptorBlueZ* descriptor,
-    const std::vector<uint8>& value) {
+    const std::vector<uint8_t>& value) {
   DCHECK_EQ(static_cast<BluetoothRemoteGattServiceBlueZ*>(
                 descriptor->GetCharacteristic()->GetService())
                 ->GetAdapter(),
diff --git a/device/bluetooth/bluetooth_adapter_bluez.h b/device/bluetooth/bluetooth_adapter_bluez.h
index e5bf146..f766372 100644
--- a/device/bluetooth/bluetooth_adapter_bluez.h
+++ b/device/bluetooth/bluetooth_adapter_bluez.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_BLUEZ_H_
 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_BLUEZ_H_
 
+#include <stdint.h>
+
 #include <map>
 #include <queue>
 #include <string>
@@ -140,10 +142,10 @@
       BluetoothRemoteGattDescriptorBlueZ* descriptor);
   void NotifyGattCharacteristicValueChanged(
       BluetoothRemoteGattCharacteristicBlueZ* characteristic,
-      const std::vector<uint8>& value);
+      const std::vector<uint8_t>& value);
   void NotifyGattDescriptorValueChanged(
       BluetoothRemoteGattDescriptorBlueZ* descriptor,
-      const std::vector<uint8>& value);
+      const std::vector<uint8_t>& value);
 
   // Returns the object path of the adapter.
   const dbus::ObjectPath& object_path() const { return object_path_; }
@@ -219,10 +221,10 @@
   void RequestPasskey(const dbus::ObjectPath& device_path,
                       const PasskeyCallback& callback) override;
   void DisplayPasskey(const dbus::ObjectPath& device_path,
-                      uint32 passkey,
-                      uint16 entered) override;
+                      uint32_t passkey,
+                      uint16_t entered) override;
   void RequestConfirmation(const dbus::ObjectPath& device_path,
-                           uint32 passkey,
+                           uint32_t passkey,
                            const ConfirmationCallback& callback) override;
   void RequestAuthorization(const dbus::ObjectPath& device_path,
                             const ConfirmationCallback& callback) override;
diff --git a/device/bluetooth/bluetooth_adapter_factory.cc b/device/bluetooth/bluetooth_adapter_factory.cc
index 2162034..fc2af86f 100644
--- a/device/bluetooth/bluetooth_adapter_factory.cc
+++ b/device/bluetooth/bluetooth_adapter_factory.cc
@@ -10,6 +10,7 @@
 #include "base/lazy_instance.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
+#include "build/build_config.h"
 #include "device/bluetooth/bluetooth_adapter.h"
 
 #if defined(OS_MACOSX)
diff --git a/device/bluetooth/bluetooth_adapter_factory.h b/device/bluetooth/bluetooth_adapter_factory.h
index 05e1d3d..2f6bfcd 100644
--- a/device/bluetooth/bluetooth_adapter_factory.h
+++ b/device/bluetooth/bluetooth_adapter_factory.h
@@ -7,6 +7,7 @@
 
 #include "base/callback.h"
 #include "base/memory/ref_counted.h"
+#include "build/build_config.h"
 #include "device/bluetooth/bluetooth_adapter.h"
 #include "device/bluetooth/bluetooth_export.h"
 
diff --git a/device/bluetooth/bluetooth_adapter_mac.h b/device/bluetooth/bluetooth_adapter_mac.h
index ce36b76..472c2f9bd 100644
--- a/device/bluetooth/bluetooth_adapter_mac.h
+++ b/device/bluetooth/bluetooth_adapter_mac.h
@@ -12,6 +12,7 @@
 
 #include "base/containers/hash_tables.h"
 #include "base/mac/scoped_nsobject.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm
index 1d51e7022..72554ed 100644
--- a/device/bluetooth/bluetooth_adapter_mac.mm
+++ b/device/bluetooth/bluetooth_adapter_mac.mm
@@ -6,6 +6,7 @@
 
 #import <IOBluetooth/objc/IOBluetoothDevice.h>
 #import <IOBluetooth/objc/IOBluetoothHostController.h>
+#include <stddef.h>
 
 #include <string>
 
diff --git a/device/bluetooth/bluetooth_adapter_mac_unittest.mm b/device/bluetooth/bluetooth_adapter_mac_unittest.mm
index be934180..8cde99f 100644
--- a/device/bluetooth/bluetooth_adapter_mac_unittest.mm
+++ b/device/bluetooth/bluetooth_adapter_mac_unittest.mm
@@ -5,6 +5,7 @@
 #include "base/bind.h"
 #include "base/memory/ref_counted.h"
 #include "base/test/test_simple_task_runner.h"
+#include "build/build_config.h"
 #include "device/bluetooth/bluetooth_adapter.h"
 #include "device/bluetooth/bluetooth_adapter_mac.h"
 #include "device/bluetooth/bluetooth_discovery_session.h"
diff --git a/device/bluetooth/bluetooth_adapter_profile_bluez.h b/device/bluetooth/bluetooth_adapter_profile_bluez.h
index 5382c8f..37cf993 100644
--- a/device/bluetooth/bluetooth_adapter_profile_bluez.h
+++ b/device/bluetooth/bluetooth_adapter_profile_bluez.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_PROFILE_BLUEZ_H_
 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_PROFILE_BLUEZ_H_
 
+#include <stddef.h>
+
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "device/bluetooth/bluetooth_adapter_bluez.h"
diff --git a/device/bluetooth/bluetooth_adapter_unittest.cc b/device/bluetooth/bluetooth_adapter_unittest.cc
index b451704..9cff2e4 100644
--- a/device/bluetooth/bluetooth_adapter_unittest.cc
+++ b/device/bluetooth/bluetooth_adapter_unittest.cc
@@ -2,9 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/memory/ref_counted.h"
 #include "base/run_loop.h"
+#include "build/build_config.h"
 #include "device/bluetooth/bluetooth_adapter.h"
 #include "device/bluetooth/bluetooth_device.h"
 #include "device/bluetooth/bluetooth_discovery_session.h"
@@ -133,9 +137,9 @@
   void RequestPasskey(BluetoothDevice* device) override {}
   void DisplayPinCode(BluetoothDevice* device,
                       const std::string& pincode) override {}
-  void DisplayPasskey(BluetoothDevice* device, uint32 passkey) override {}
-  void KeysEntered(BluetoothDevice* device, uint32 entered) override {}
-  void ConfirmPasskey(BluetoothDevice* device, uint32 passkey) override {}
+  void DisplayPasskey(BluetoothDevice* device, uint32_t passkey) override {}
+  void KeysEntered(BluetoothDevice* device, uint32_t entered) override {}
+  void ConfirmPasskey(BluetoothDevice* device, uint32_t passkey) override {}
   void AuthorizePairing(BluetoothDevice* device) override {}
 };
 
diff --git a/device/bluetooth/bluetooth_adapter_win.h b/device/bluetooth/bluetooth_adapter_win.h
index c1486ab..936f420 100644
--- a/device/bluetooth/bluetooth_adapter_win.h
+++ b/device/bluetooth/bluetooth_adapter_win.h
@@ -5,12 +5,15 @@
 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_WIN_H_
 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_WIN_H_
 
+#include <stddef.h>
+
 #include <set>
 #include <string>
 #include <utility>
 #include <vector>
 
 #include "base/containers/hash_tables.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_vector.h"
 #include "base/memory/weak_ptr.h"
diff --git a/device/bluetooth/bluetooth_advertisement.h b/device/bluetooth/bluetooth_advertisement.h
index eb4cebbd7..5dcc1f0 100644
--- a/device/bluetooth/bluetooth_advertisement.h
+++ b/device/bluetooth/bluetooth_advertisement.h
@@ -5,11 +5,14 @@
 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADVERTISEMENT_H_
 #define DEVICE_BLUETOOTH_BLUETOOTH_ADVERTISEMENT_H_
 
+#include <stdint.h>
+
 #include <map>
 #include <string>
 #include <vector>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/observer_list.h"
diff --git a/device/bluetooth/bluetooth_advertisement_bluez_unittest.cc b/device/bluetooth/bluetooth_advertisement_bluez_unittest.cc
index 6ef7a63..b3a67020 100644
--- a/device/bluetooth/bluetooth_advertisement_bluez_unittest.cc
+++ b/device/bluetooth/bluetooth_advertisement_bluez_unittest.cc
@@ -6,6 +6,7 @@
 
 #include "base/bind.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
diff --git a/device/bluetooth/bluetooth_advertisement_unittest.cc b/device/bluetooth/bluetooth_advertisement_unittest.cc
index fe95ba3..b0bbd17 100644
--- a/device/bluetooth/bluetooth_advertisement_unittest.cc
+++ b/device/bluetooth/bluetooth_advertisement_unittest.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stdint.h>
+
 #include "device/bluetooth/bluetooth_advertisement.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
diff --git a/device/bluetooth/bluetooth_audio_sink.h b/device/bluetooth/bluetooth_audio_sink.h
index 37359256..fbc2922 100644
--- a/device/bluetooth/bluetooth_audio_sink.h
+++ b/device/bluetooth/bluetooth_audio_sink.h
@@ -5,11 +5,13 @@
 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_AUDIO_SINK_H_
 #define DEVICE_BLUETOOTH_BLUETOOTH_AUDIO_SINK_H_
 
+#include <stddef.h>
 #include <stdint.h>
 #include <string>
 #include <vector>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "device/bluetooth/bluetooth_export.h"
diff --git a/device/bluetooth/bluetooth_audio_sink_bluez_unittest.cc b/device/bluetooth/bluetooth_audio_sink_bluez_unittest.cc
index bf2e063..6b6e3aa 100644
--- a/device/bluetooth/bluetooth_audio_sink_bluez_unittest.cc
+++ b/device/bluetooth/bluetooth_audio_sink_bluez_unittest.cc
@@ -2,6 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <vector>
 
 #include "base/bind.h"
diff --git a/device/bluetooth/bluetooth_bluez_unittest.cc b/device/bluetooth/bluetooth_bluez_unittest.cc
index a01e73d..74287e0 100644
--- a/device/bluetooth/bluetooth_bluez_unittest.cc
+++ b/device/bluetooth/bluetooth_bluez_unittest.cc
@@ -2,6 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/memory/scoped_vector.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
@@ -113,21 +116,21 @@
     QuitMessageLoop();
   }
 
-  void DisplayPasskey(BluetoothDevice* device, uint32 passkey) override {
+  void DisplayPasskey(BluetoothDevice* device, uint32_t passkey) override {
     ++call_count_;
     ++display_passkey_count_;
     last_passkey_ = passkey;
     QuitMessageLoop();
   }
 
-  void KeysEntered(BluetoothDevice* device, uint32 entered) override {
+  void KeysEntered(BluetoothDevice* device, uint32_t entered) override {
     ++call_count_;
     ++keys_entered_count_;
     last_entered_ = entered;
     QuitMessageLoop();
   }
 
-  void ConfirmPasskey(BluetoothDevice* device, uint32 passkey) override {
+  void ConfirmPasskey(BluetoothDevice* device, uint32_t passkey) override {
     ++call_count_;
     ++confirm_passkey_count_;
     last_passkey_ = passkey;
@@ -148,8 +151,8 @@
   int keys_entered_count_;
   int confirm_passkey_count_;
   int authorize_pairing_count_;
-  uint32 last_passkey_;
-  uint32 last_entered_;
+  uint32_t last_passkey_;
+  uint32_t last_entered_;
   std::string last_pincode_;
 
  private:
diff --git a/device/bluetooth/bluetooth_channel_mac.h b/device/bluetooth/bluetooth_channel_mac.h
index 588a45c..b1ecee1 100644
--- a/device/bluetooth/bluetooth_channel_mac.h
+++ b/device/bluetooth/bluetooth_channel_mac.h
@@ -6,6 +6,7 @@
 #define DEVICE_BLUETOOTH_BLUETOOTH_CHANNEL_MAC_H_
 
 #import <IOKit/IOReturn.h>
+#include <stdint.h>
 
 #include <string>
 
diff --git a/device/bluetooth/bluetooth_classic_device_mac.h b/device/bluetooth/bluetooth_classic_device_mac.h
index c456505..c582d6d 100644
--- a/device/bluetooth/bluetooth_classic_device_mac.h
+++ b/device/bluetooth/bluetooth_classic_device_mac.h
@@ -6,11 +6,12 @@
 #define DEVICE_BLUETOOTH_BLUETOOTH_CLASSIC_DEVICE_MAC_H_
 
 #import <IOBluetooth/IOBluetooth.h>
+#include <stdint.h>
 
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/mac/scoped_nsobject.h"
+#include "base/macros.h"
 #include "base/observer_list.h"
 #include "device/bluetooth/bluetooth_device_mac.h"
 
@@ -27,20 +28,20 @@
   ~BluetoothClassicDeviceMac() override;
 
   // BluetoothDevice override
-  uint32 GetBluetoothClass() const override;
+  uint32_t GetBluetoothClass() const override;
   std::string GetAddress() const override;
   VendorIDSource GetVendorIDSource() const override;
-  uint16 GetVendorID() const override;
-  uint16 GetProductID() const override;
-  uint16 GetDeviceID() const override;
+  uint16_t GetVendorID() const override;
+  uint16_t GetProductID() const override;
+  uint16_t GetDeviceID() const override;
   bool IsPaired() const override;
   bool IsConnected() const override;
   bool IsGattConnected() const override;
   bool IsConnectable() const override;
   bool IsConnecting() const override;
   UUIDList GetUUIDs() const override;
-  int16 GetInquiryRSSI() const override;
-  int16 GetInquiryTxPower() const override;
+  int16_t GetInquiryRSSI() const override;
+  int16_t GetInquiryTxPower() const override;
   bool ExpectingPinCode() const override;
   bool ExpectingPasskey() const override;
   bool ExpectingConfirmation() const override;
@@ -49,7 +50,7 @@
                const base::Closure& callback,
                const ConnectErrorCallback& error_callback) override;
   void SetPinCode(const std::string& pincode) override;
-  void SetPasskey(uint32 passkey) override;
+  void SetPasskey(uint32_t passkey) override;
   void ConfirmPairing() override;
   void RejectPairing() override;
   void CancelPairing() override;
diff --git a/device/bluetooth/bluetooth_classic_device_mac.mm b/device/bluetooth/bluetooth_classic_device_mac.mm
index a472f86d..d1c3f634 100644
--- a/device/bluetooth/bluetooth_classic_device_mac.mm
+++ b/device/bluetooth/bluetooth_classic_device_mac.mm
@@ -6,7 +6,6 @@
 
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/bind.h"
 #include "base/hash.h"
 #include "base/mac/sdk_forward_declarations.h"
@@ -46,7 +45,8 @@
   if (!sdp_uuid)
     return BluetoothUUID();
 
-  const uint8* uuid_bytes = reinterpret_cast<const uint8*>([sdp_uuid bytes]);
+  const uint8_t* uuid_bytes =
+      reinterpret_cast<const uint8_t*>([sdp_uuid bytes]);
   std::string uuid_str = base::HexEncode(uuid_bytes, 16);
   DCHECK_EQ(uuid_str.size(), 32U);
   uuid_str.insert(8, "-");
@@ -66,7 +66,7 @@
 BluetoothClassicDeviceMac::~BluetoothClassicDeviceMac() {
 }
 
-uint32 BluetoothClassicDeviceMac::GetBluetoothClass() const {
+uint32_t BluetoothClassicDeviceMac::GetBluetoothClass() const {
   return [device_ classOfDevice];
 }
 
@@ -90,15 +90,15 @@
   return VENDOR_ID_UNKNOWN;
 }
 
-uint16 BluetoothClassicDeviceMac::GetVendorID() const {
+uint16_t BluetoothClassicDeviceMac::GetVendorID() const {
   return 0;
 }
 
-uint16 BluetoothClassicDeviceMac::GetProductID() const {
+uint16_t BluetoothClassicDeviceMac::GetProductID() const {
   return 0;
 }
 
-uint16 BluetoothClassicDeviceMac::GetDeviceID() const {
+uint16_t BluetoothClassicDeviceMac::GetDeviceID() const {
   return 0;
 }
 
@@ -138,11 +138,11 @@
   return uuids;
 }
 
-int16 BluetoothClassicDeviceMac::GetInquiryRSSI() const {
+int16_t BluetoothClassicDeviceMac::GetInquiryRSSI() const {
   return kUnknownPower;
 }
 
-int16 BluetoothClassicDeviceMac::GetInquiryTxPower() const {
+int16_t BluetoothClassicDeviceMac::GetInquiryTxPower() const {
   NOTIMPLEMENTED();
   return kUnknownPower;
 }
@@ -195,7 +195,7 @@
   NOTIMPLEMENTED();
 }
 
-void BluetoothClassicDeviceMac::SetPasskey(uint32 passkey) {
+void BluetoothClassicDeviceMac::SetPasskey(uint32_t passkey) {
   NOTIMPLEMENTED();
 }
 
diff --git a/device/bluetooth/bluetooth_device.cc b/device/bluetooth/bluetooth_device.cc
index af2b3988..e666aa5 100644
--- a/device/bluetooth/bluetooth_device.cc
+++ b/device/bluetooth/bluetooth_device.cc
@@ -95,7 +95,7 @@
 
 BluetoothDevice::DeviceType BluetoothDevice::GetDeviceType() const {
   // https://www.bluetooth.org/Technical/AssignedNumbers/baseband.htm
-  uint32 bluetooth_class = GetBluetoothClass();
+  uint32_t bluetooth_class = GetBluetoothClass();
   switch ((bluetooth_class & 0x1f00) >> 8) {
     case 0x01:
       // Computer major device class.
diff --git a/device/bluetooth/bluetooth_device.h b/device/bluetooth/bluetooth_device.h
index 809417d..a28bc9e 100644
--- a/device/bluetooth/bluetooth_device.h
+++ b/device/bluetooth/bluetooth_device.h
@@ -5,6 +5,9 @@
 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_
 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <set>
 #include <string>
 #include <vector>
@@ -145,8 +148,7 @@
     // but not display, such as keyboards. The Passkey is a numeric in the
     // range 0-999999 and should be always presented zero-padded to six
     // digits.
-    virtual void DisplayPasskey(BluetoothDevice* device,
-                                uint32 passkey) = 0;
+    virtual void DisplayPasskey(BluetoothDevice* device, uint32_t passkey) = 0;
 
     // This method will be called when the Bluetooth daemon gets a notification
     // of a key entered on the device |device| while pairing with the device
@@ -160,8 +162,7 @@
     // The |entered| value describes the number of keys entered so far,
     // including the last [enter] key. A first call to KeysEntered() with
     // |entered| as 0 will be sent when the device supports this feature.
-    virtual void KeysEntered(BluetoothDevice* device,
-                             uint32 entered) = 0;
+    virtual void KeysEntered(BluetoothDevice* device, uint32_t entered) = 0;
 
     // This method will be called when the Bluetooth daemon requires that the
     // user confirm that the Passkey |passkey| is displayed on the screen
@@ -175,8 +176,7 @@
     // such as other computers or phones. The Passkey is a numeric in the
     // range 0-999999 and should be always present zero-padded to six
     // digits.
-    virtual void ConfirmPasskey(BluetoothDevice* device,
-                                uint32 passkey) = 0;
+    virtual void ConfirmPasskey(BluetoothDevice* device, uint32_t passkey) = 0;
 
     // This method will be called when the Bluetooth daemon requires that a
     // pairing request, usually only incoming, using the just-works model is
@@ -192,7 +192,7 @@
 
   // Returns the Bluetooth class of the device, used by GetDeviceType()
   // and metrics logging,
-  virtual uint32 GetBluetoothClass() const = 0;
+  virtual uint32_t GetBluetoothClass() const = 0;
 
   // Returns the identifier of the bluetooth device.
   virtual std::string GetIdentifier() const;
@@ -206,14 +206,14 @@
   virtual VendorIDSource GetVendorIDSource() const = 0;
 
   // Returns the Vendor ID of the device, where available.
-  virtual uint16 GetVendorID() const = 0;
+  virtual uint16_t GetVendorID() const = 0;
 
   // Returns the Product ID of the device, where available.
-  virtual uint16 GetProductID() const = 0;
+  virtual uint16_t GetProductID() const = 0;
 
   // Returns the Device ID of the device, typically the release or version
   // number in BCD format, where available.
-  virtual uint16 GetDeviceID() const = 0;
+  virtual uint16_t GetDeviceID() const = 0;
 
   // Returns the name of the device suitable for displaying, this may
   // be a synthesized string containing the address and localized type name
@@ -266,13 +266,13 @@
   // The received signal strength, in dBm. This field is avaliable and valid
   // only during discovery. If not during discovery, or RSSI wasn't reported,
   // this method will return |kUnknownPower|.
-  virtual int16 GetInquiryRSSI() const = 0;
+  virtual int16_t GetInquiryRSSI() const = 0;
 
   // The transmitted power level. This field is avaliable only for LE devices
   // that include this field in AD. It is avaliable and valid only during
   // discovery. If not during discovery, or TxPower wasn't reported, this
   // method will return |kUnknownPower|.
-  virtual int16 GetInquiryTxPower() const = 0;
+  virtual int16_t GetInquiryTxPower() const = 0;
 
   // The ErrorCallback is used for methods that can fail in which case it
   // is called, in the success case the callback is simply not called.
@@ -350,7 +350,7 @@
   // Passkeys are generally required for Bluetooth 2.1 and later devices
   // which cannot provide input or display on their own, and don't accept
   // passkey-less pairing, and are a numeric in the range 0-999999.
-  virtual void SetPasskey(uint32 passkey) = 0;
+  virtual void SetPasskey(uint32_t passkey) = 0;
 
   // Confirms to the remote device during pairing that a passkey provided by
   // the ConfirmPasskey() delegate call is displayed on both devices.
diff --git a/device/bluetooth/bluetooth_device_android.cc b/device/bluetooth/bluetooth_device_android.cc
index 5fb025d..ebd78318 100644
--- a/device/bluetooth/bluetooth_device_android.cc
+++ b/device/bluetooth/bluetooth_device_android.cc
@@ -50,7 +50,7 @@
   return base::android::ScopedJavaLocalRef<jobject>(j_device_);
 }
 
-uint32 BluetoothDeviceAndroid::GetBluetoothClass() const {
+uint32_t BluetoothDeviceAndroid::GetBluetoothClass() const {
   return Java_ChromeBluetoothDevice_getBluetoothClass(AttachCurrentThread(),
                                                       j_device_.obj());
 }
@@ -66,17 +66,17 @@
   return VENDOR_ID_UNKNOWN;
 }
 
-uint16 BluetoothDeviceAndroid::GetVendorID() const {
+uint16_t BluetoothDeviceAndroid::GetVendorID() const {
   // Android API does not provide Vendor ID.
   return 0;
 }
 
-uint16 BluetoothDeviceAndroid::GetProductID() const {
+uint16_t BluetoothDeviceAndroid::GetProductID() const {
   // Android API does not provide Product ID.
   return 0;
 }
 
-uint16 BluetoothDeviceAndroid::GetDeviceID() const {
+uint16_t BluetoothDeviceAndroid::GetDeviceID() const {
   // Android API does not provide Device ID.
   return 0;
 }
@@ -118,12 +118,12 @@
   return uuids;
 }
 
-int16 BluetoothDeviceAndroid::GetInquiryRSSI() const {
+int16_t BluetoothDeviceAndroid::GetInquiryRSSI() const {
   NOTIMPLEMENTED();
   return kUnknownPower;
 }
 
-int16 BluetoothDeviceAndroid::GetInquiryTxPower() const {
+int16_t BluetoothDeviceAndroid::GetInquiryTxPower() const {
   NOTIMPLEMENTED();
   return kUnknownPower;
 }
@@ -160,7 +160,7 @@
   NOTIMPLEMENTED();
 }
 
-void BluetoothDeviceAndroid::SetPasskey(uint32 passkey) {
+void BluetoothDeviceAndroid::SetPasskey(uint32_t passkey) {
   NOTIMPLEMENTED();
 }
 
diff --git a/device/bluetooth/bluetooth_device_android.h b/device/bluetooth/bluetooth_device_android.h
index 637bcff..eadcb395 100644
--- a/device/bluetooth/bluetooth_device_android.h
+++ b/device/bluetooth/bluetooth_device_android.h
@@ -5,7 +5,10 @@
 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_ANDROID_H_
 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_ANDROID_H_
 
+#include <stdint.h>
+
 #include "base/android/jni_android.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "device/bluetooth/bluetooth_adapter_android.h"
 #include "device/bluetooth/bluetooth_device.h"
@@ -49,20 +52,20 @@
       jobject advertised_uuids);  // Java Type: List<ParcelUuid>
 
   // BluetoothDevice:
-  uint32 GetBluetoothClass() const override;
+  uint32_t GetBluetoothClass() const override;
   std::string GetAddress() const override;
   VendorIDSource GetVendorIDSource() const override;
-  uint16 GetVendorID() const override;
-  uint16 GetProductID() const override;
-  uint16 GetDeviceID() const override;
+  uint16_t GetVendorID() const override;
+  uint16_t GetProductID() const override;
+  uint16_t GetDeviceID() const override;
   bool IsPaired() const override;
   bool IsConnected() const override;
   bool IsGattConnected() const override;
   bool IsConnectable() const override;
   bool IsConnecting() const override;
   UUIDList GetUUIDs() const override;
-  int16 GetInquiryRSSI() const override;
-  int16 GetInquiryTxPower() const override;
+  int16_t GetInquiryRSSI() const override;
+  int16_t GetInquiryTxPower() const override;
   bool ExpectingPinCode() const override;
   bool ExpectingPasskey() const override;
   bool ExpectingConfirmation() const override;
@@ -71,7 +74,7 @@
                const base::Closure& callback,
                const ConnectErrorCallback& error_callback) override;
   void SetPinCode(const std::string& pincode) override;
-  void SetPasskey(uint32 passkey) override;
+  void SetPasskey(uint32_t passkey) override;
   void ConfirmPairing() override;
   void RejectPairing() override;
   void CancelPairing() override;
diff --git a/device/bluetooth/bluetooth_device_bluez.cc b/device/bluetooth/bluetooth_device_bluez.cc
index 69ac80d..97ba1d75 100644
--- a/device/bluetooth/bluetooth_device_bluez.cc
+++ b/device/bluetooth/bluetooth_device_bluez.cc
@@ -52,9 +52,9 @@
 
 void ParseModalias(const dbus::ObjectPath& object_path,
                    BluetoothDevice::VendorIDSource* vendor_id_source,
-                   uint16* vendor_id,
-                   uint16* product_id,
-                   uint16* device_id) {
+                   uint16_t* vendor_id,
+                   uint16_t* product_id,
+                   uint16_t* device_id) {
   bluez::BluetoothDeviceClient::Properties* properties =
       bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->GetProperties(
           object_path);
@@ -181,7 +181,7 @@
   }
 }
 
-uint32 BluetoothDeviceBlueZ::GetBluetoothClass() const {
+uint32_t BluetoothDeviceBlueZ::GetBluetoothClass() const {
   bluez::BluetoothDeviceClient::Properties* properties =
       bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->GetProperties(
           object_path_);
@@ -227,20 +227,20 @@
   return vendor_id_source;
 }
 
-uint16 BluetoothDeviceBlueZ::GetVendorID() const {
-  uint16 vendor_id = 0;
+uint16_t BluetoothDeviceBlueZ::GetVendorID() const {
+  uint16_t vendor_id = 0;
   ParseModalias(object_path_, NULL, &vendor_id, NULL, NULL);
   return vendor_id;
 }
 
-uint16 BluetoothDeviceBlueZ::GetProductID() const {
-  uint16 product_id = 0;
+uint16_t BluetoothDeviceBlueZ::GetProductID() const {
+  uint16_t product_id = 0;
   ParseModalias(object_path_, NULL, NULL, &product_id, NULL);
   return product_id;
 }
 
-uint16 BluetoothDeviceBlueZ::GetDeviceID() const {
-  uint16 device_id = 0;
+uint16_t BluetoothDeviceBlueZ::GetDeviceID() const {
+  uint16_t device_id = 0;
   ParseModalias(object_path_, NULL, NULL, NULL, &device_id);
   return device_id;
 }
@@ -304,7 +304,7 @@
   return uuids;
 }
 
-int16 BluetoothDeviceBlueZ::GetInquiryRSSI() const {
+int16_t BluetoothDeviceBlueZ::GetInquiryRSSI() const {
   bluez::BluetoothDeviceClient::Properties* properties =
       bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->GetProperties(
           object_path_);
@@ -316,7 +316,7 @@
   return properties->rssi.value();
 }
 
-int16 BluetoothDeviceBlueZ::GetInquiryTxPower() const {
+int16_t BluetoothDeviceBlueZ::GetInquiryTxPower() const {
   bluez::BluetoothDeviceClient::Properties* properties =
       bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->GetProperties(
           object_path_);
@@ -398,7 +398,7 @@
   pairing_->SetPinCode(pincode);
 }
 
-void BluetoothDeviceBlueZ::SetPasskey(uint32 passkey) {
+void BluetoothDeviceBlueZ::SetPasskey(uint32_t passkey) {
   if (!pairing_.get())
     return;
 
@@ -583,9 +583,9 @@
 }
 
 void BluetoothDeviceBlueZ::OnGetConnInfo(const ConnectionInfoCallback& callback,
-                                         int16 rssi,
-                                         int16 transmit_power,
-                                         int16 max_transmit_power) {
+                                         int16_t rssi,
+                                         int16_t transmit_power,
+                                         int16_t max_transmit_power) {
   callback.Run(ConnectionInfo(rssi, transmit_power, max_transmit_power));
 }
 
diff --git a/device/bluetooth/bluetooth_device_bluez.h b/device/bluetooth/bluetooth_device_bluez.h
index aa54686..595bab4 100644
--- a/device/bluetooth/bluetooth_device_bluez.h
+++ b/device/bluetooth/bluetooth_device_bluez.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_BLUEZ_H_
 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_BLUEZ_H_
 
+#include <stdint.h>
+
 #include <string>
 
 #include "base/macros.h"
@@ -39,20 +41,20 @@
       public bluez::BluetoothGattServiceClient::Observer {
  public:
   // BluetoothDevice override
-  uint32 GetBluetoothClass() const override;
+  uint32_t GetBluetoothClass() const override;
   std::string GetAddress() const override;
   VendorIDSource GetVendorIDSource() const override;
-  uint16 GetVendorID() const override;
-  uint16 GetProductID() const override;
-  uint16 GetDeviceID() const override;
+  uint16_t GetVendorID() const override;
+  uint16_t GetProductID() const override;
+  uint16_t GetDeviceID() const override;
   bool IsPaired() const override;
   bool IsConnected() const override;
   bool IsGattConnected() const override;
   bool IsConnectable() const override;
   bool IsConnecting() const override;
   UUIDList GetUUIDs() const override;
-  int16 GetInquiryRSSI() const override;
-  int16 GetInquiryTxPower() const override;
+  int16_t GetInquiryRSSI() const override;
+  int16_t GetInquiryTxPower() const override;
   bool ExpectingPinCode() const override;
   bool ExpectingPasskey() const override;
   bool ExpectingConfirmation() const override;
@@ -61,7 +63,7 @@
                const base::Closure& callback,
                const ConnectErrorCallback& error_callback) override;
   void SetPinCode(const std::string& pincode) override;
-  void SetPasskey(uint32 passkey) override;
+  void SetPasskey(uint32_t passkey) override;
   void ConfirmPairing() override;
   void RejectPairing() override;
   void CancelPairing() override;
@@ -126,9 +128,9 @@
   // Called by dbus:: on completion of the D-Bus method call to get the
   // connection attributes of the current connection to the device.
   void OnGetConnInfo(const ConnectionInfoCallback& callback,
-                     int16 rssi,
-                     int16 transmit_power,
-                     int16 max_transmit_power);
+                     int16_t rssi,
+                     int16_t transmit_power,
+                     int16_t max_transmit_power);
   void OnGetConnInfoError(const ConnectionInfoCallback& callback,
                           const std::string& error_name,
                           const std::string& error_message);
diff --git a/device/bluetooth/bluetooth_device_mac.h b/device/bluetooth/bluetooth_device_mac.h
index b290a077..ceb8515 100644
--- a/device/bluetooth/bluetooth_device_mac.h
+++ b/device/bluetooth/bluetooth_device_mac.h
@@ -5,6 +5,7 @@
 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_MAC_H_
 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_MAC_H_
 
+#include "base/macros.h"
 #include "device/bluetooth/bluetooth_device.h"
 
 @class NSDate;
diff --git a/device/bluetooth/bluetooth_device_unittest.cc b/device/bluetooth/bluetooth_device_unittest.cc
index f05e310..f395764 100644
--- a/device/bluetooth/bluetooth_device_unittest.cc
+++ b/device/bluetooth/bluetooth_device_unittest.cc
@@ -4,9 +4,12 @@
 
 #include "device/bluetooth/bluetooth_device.h"
 
+#include <stddef.h>
+
 #include "base/macros.h"
 #include "base/run_loop.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "device/bluetooth/bluetooth_gatt_service.h"
 #include "device/bluetooth/test/test_bluetooth_adapter_observer.h"
 #include "testing/gtest/include/gtest/gtest.h"
diff --git a/device/bluetooth/bluetooth_device_win.cc b/device/bluetooth/bluetooth_device_win.cc
index 1efd638..8678576 100644
--- a/device/bluetooth/bluetooth_device_win.cc
+++ b/device/bluetooth/bluetooth_device_win.cc
@@ -6,7 +6,6 @@
 
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/containers/scoped_ptr_hash_map.h"
 #include "base/logging.h"
 #include "base/memory/scoped_vector.h"
@@ -45,7 +44,7 @@
 BluetoothDeviceWin::~BluetoothDeviceWin() {
 }
 
-uint32 BluetoothDeviceWin::GetBluetoothClass() const {
+uint32_t BluetoothDeviceWin::GetBluetoothClass() const {
   return bluetooth_class_;
 }
 
@@ -58,15 +57,15 @@
   return VENDOR_ID_UNKNOWN;
 }
 
-uint16 BluetoothDeviceWin::GetVendorID() const {
+uint16_t BluetoothDeviceWin::GetVendorID() const {
   return 0;
 }
 
-uint16 BluetoothDeviceWin::GetProductID() const {
+uint16_t BluetoothDeviceWin::GetProductID() const {
   return 0;
 }
 
-uint16 BluetoothDeviceWin::GetDeviceID() const {
+uint16_t BluetoothDeviceWin::GetDeviceID() const {
   return 0;
 }
 
@@ -95,11 +94,11 @@
   return uuids_;
 }
 
-int16 BluetoothDeviceWin::GetInquiryRSSI() const {
+int16_t BluetoothDeviceWin::GetInquiryRSSI() const {
   return kUnknownPower;
 }
 
-int16 BluetoothDeviceWin::GetInquiryTxPower() const {
+int16_t BluetoothDeviceWin::GetInquiryTxPower() const {
   NOTIMPLEMENTED();
   return kUnknownPower;
 }
@@ -136,7 +135,7 @@
   NOTIMPLEMENTED();
 }
 
-void BluetoothDeviceWin::SetPasskey(uint32 passkey) {
+void BluetoothDeviceWin::SetPasskey(uint32_t passkey) {
   NOTIMPLEMENTED();
 }
 
diff --git a/device/bluetooth/bluetooth_device_win.h b/device/bluetooth/bluetooth_device_win.h
index cfc3f87..cd2106a 100644
--- a/device/bluetooth/bluetooth_device_win.h
+++ b/device/bluetooth/bluetooth_device_win.h
@@ -5,10 +5,12 @@
 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_WIN_H_
 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_WIN_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/observer_list.h"
 #include "device/bluetooth/bluetooth_device.h"
 #include "device/bluetooth/bluetooth_export.h"
@@ -32,20 +34,20 @@
   ~BluetoothDeviceWin() override;
 
   // BluetoothDevice override
-  uint32 GetBluetoothClass() const override;
+  uint32_t GetBluetoothClass() const override;
   std::string GetAddress() const override;
   VendorIDSource GetVendorIDSource() const override;
-  uint16 GetVendorID() const override;
-  uint16 GetProductID() const override;
-  uint16 GetDeviceID() const override;
+  uint16_t GetVendorID() const override;
+  uint16_t GetProductID() const override;
+  uint16_t GetDeviceID() const override;
   bool IsPaired() const override;
   bool IsConnected() const override;
   bool IsGattConnected() const override;
   bool IsConnectable() const override;
   bool IsConnecting() const override;
   UUIDList GetUUIDs() const override;
-  int16 GetInquiryRSSI() const override;
-  int16 GetInquiryTxPower() const override;
+  int16_t GetInquiryRSSI() const override;
+  int16_t GetInquiryTxPower() const override;
   bool ExpectingPinCode() const override;
   bool ExpectingPasskey() const override;
   bool ExpectingConfirmation() const override;
@@ -54,7 +56,7 @@
                const base::Closure& callback,
                const ConnectErrorCallback& error_callback) override;
   void SetPinCode(const std::string& pincode) override;
-  void SetPasskey(uint32 passkey) override;
+  void SetPasskey(uint32_t passkey) override;
   void ConfirmPairing() override;
   void RejectPairing() override;
   void CancelPairing() override;
@@ -112,7 +114,7 @@
 
   // The Bluetooth class of the device, a bitmask that may be decoded using
   // https://www.bluetooth.org/Technical/AssignedNumbers/baseband.htm
-  uint32 bluetooth_class_;
+  uint32_t bluetooth_class_;
 
   // The name of the device, as supplied by the remote device.
   std::string name_;
diff --git a/device/bluetooth/bluetooth_device_win_unittest.cc b/device/bluetooth/bluetooth_device_win_unittest.cc
index 0fb9d32..e3dd2df 100644
--- a/device/bluetooth/bluetooth_device_win_unittest.cc
+++ b/device/bluetooth/bluetooth_device_win_unittest.cc
@@ -2,7 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "base/basictypes.h"
 #include "base/bind.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/sequenced_task_runner.h"
diff --git a/device/bluetooth/bluetooth_discovery_filter.h b/device/bluetooth/bluetooth_discovery_filter.h
index f93198b..da3149e 100644
--- a/device/bluetooth/bluetooth_discovery_filter.h
+++ b/device/bluetooth/bluetooth_discovery_filter.h
@@ -5,8 +5,11 @@
 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DISCOVERY_FILTER_H_
 #define DEVICE_BLUETOOTH_BLUETOOTH_DISCOVERY_FILTER_H_
 
+#include <stdint.h>
+
 #include <set>
 
+#include "base/macros.h"
 #include "base/memory/scoped_vector.h"
 #include "device/bluetooth/bluetooth_export.h"
 #include "device/bluetooth/bluetooth_uuid.h"
diff --git a/device/bluetooth/bluetooth_discovery_filter_unittest.cc b/device/bluetooth/bluetooth_discovery_filter_unittest.cc
index ea7a04f..8d8bb40 100644
--- a/device/bluetooth/bluetooth_discovery_filter_unittest.cc
+++ b/device/bluetooth/bluetooth_discovery_filter_unittest.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stdint.h>
+
 #include "base/macros.h"
 #include "device/bluetooth/bluetooth_discovery_session.h"
 #include "testing/gtest/include/gtest/gtest.h"
diff --git a/device/bluetooth/bluetooth_discovery_manager_mac.mm b/device/bluetooth/bluetooth_discovery_manager_mac.mm
index 1cc99d6..a2a024d 100644
--- a/device/bluetooth/bluetooth_discovery_manager_mac.mm
+++ b/device/bluetooth/bluetooth_discovery_manager_mac.mm
@@ -10,6 +10,7 @@
 #include "base/logging.h"
 #include "base/mac/scoped_nsobject.h"
 #include "base/mac/sdk_forward_declarations.h"
+#include "base/macros.h"
 
 namespace device {
 
diff --git a/device/bluetooth/bluetooth_discovery_session.h b/device/bluetooth/bluetooth_discovery_session.h
index 4192cf5..1169a68 100644
--- a/device/bluetooth/bluetooth_discovery_session.h
+++ b/device/bluetooth/bluetooth_discovery_session.h
@@ -6,6 +6,7 @@
 #define DEVICE_BLUETOOTH_BLUETOOTH_DISCOVERY_SESSION_H_
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
 #include "device/bluetooth/bluetooth_adapter.h"
diff --git a/device/bluetooth/bluetooth_gatt_bluez_unittest.cc b/device/bluetooth/bluetooth_gatt_bluez_unittest.cc
index 777f5f1..7dcfe27 100644
--- a/device/bluetooth/bluetooth_gatt_bluez_unittest.cc
+++ b/device/bluetooth/bluetooth_gatt_bluez_unittest.cc
@@ -2,6 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/memory/scoped_vector.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
@@ -49,8 +52,8 @@
 
 // Compares GATT characteristic/descriptor values. Returns true, if the values
 // are equal.
-bool ValuesEqual(const std::vector<uint8>& value0,
-                 const std::vector<uint8>& value1) {
+bool ValuesEqual(const std::vector<uint8_t>& value0,
+                 const std::vector<uint8_t>& value1) {
   if (value0.size() != value1.size())
     return false;
   for (size_t i = 0; i < value0.size(); ++i)
@@ -128,7 +131,7 @@
 
   void SuccessCallback() { ++success_callback_count_; }
 
-  void ValueCallback(const std::vector<uint8>& value) {
+  void ValueCallback(const std::vector<uint8_t>& value) {
     ++success_callback_count_;
     last_read_value_ = value;
   }
@@ -181,7 +184,7 @@
 
   int success_callback_count_;
   int error_callback_count_;
-  std::vector<uint8> last_read_value_;
+  std::vector<uint8_t> last_read_value_;
   BluetoothGattService::GattErrorCode last_service_error_;
 };
 
@@ -637,7 +640,7 @@
   // Issue write request to non-writable characteristics.
   observer.Reset();
 
-  std::vector<uint8> write_value;
+  std::vector<uint8_t> write_value;
   write_value.push_back(0x01);
   BluetoothGattCharacteristic* characteristic = service->GetCharacteristic(
       fake_bluetooth_gatt_characteristic_client_->GetHeartRateMeasurementPath()
@@ -711,7 +714,7 @@
   // Issue some invalid write requests to the characteristic.
   // The value should still not change.
 
-  std::vector<uint8> invalid_write_length;
+  std::vector<uint8_t> invalid_write_length;
   invalid_write_length.push_back(0x01);
   invalid_write_length.push_back(0x00);
   characteristic->WriteRemoteCharacteristic(
@@ -725,7 +728,7 @@
             last_service_error_);
   EXPECT_EQ(0, observer.gatt_characteristic_value_changed_count());
 
-  std::vector<uint8> invalid_write_value;
+  std::vector<uint8_t> invalid_write_value;
   invalid_write_value.push_back(0x02);
   characteristic->WriteRemoteCharacteristic(
       invalid_write_value, base::Bind(&BluetoothGattBlueZTest::SuccessCallback,
diff --git a/device/bluetooth/bluetooth_gatt_characteristic.cc b/device/bluetooth/bluetooth_gatt_characteristic.cc
index 47182a5..f7bb6d8 100644
--- a/device/bluetooth/bluetooth_gatt_characteristic.cc
+++ b/device/bluetooth/bluetooth_gatt_characteristic.cc
@@ -17,7 +17,7 @@
 // static
 BluetoothGattCharacteristic* BluetoothGattCharacteristic::Create(
     const BluetoothUUID& uuid,
-    const std::vector<uint8>& value,
+    const std::vector<uint8_t>& value,
     Properties properties,
     Permissions permissions) {
   LOG(ERROR) << "Creating local GATT characteristics currently not supported.";
diff --git a/device/bluetooth/bluetooth_gatt_characteristic.h b/device/bluetooth/bluetooth_gatt_characteristic.h
index 91d753f4..6dabe87 100644
--- a/device/bluetooth/bluetooth_gatt_characteristic.h
+++ b/device/bluetooth/bluetooth_gatt_characteristic.h
@@ -5,11 +5,13 @@
 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_GATT_CHARACTERISTIC_H_
 #define DEVICE_BLUETOOTH_BLUETOOTH_GATT_CHARACTERISTIC_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "device/bluetooth/bluetooth_export.h"
 #include "device/bluetooth/bluetooth_gatt_service.h"
@@ -56,7 +58,7 @@
     PROPERTY_RELIABLE_WRITE = 1 << 8,
     PROPERTY_WRITABLE_AUXILIARIES = 1 << 9
   };
-  typedef uint32 Properties;
+  typedef uint32_t Properties;
 
   // Values representing read, write, and encryption permissions for a
   // characteristic's value. While attribute permissions for all GATT
@@ -76,7 +78,7 @@
     PERMISSION_READ_ENCRYPTED = 1 << 2,
     PERMISSION_WRITE_ENCRYPTED = 1 << 3
   };
-  typedef uint32 Permissions;
+  typedef uint32_t Permissions;
 
   // The ErrorCallback is used by methods to asynchronously report errors.
   typedef base::Callback<void(BluetoothGattService::GattErrorCode)>
@@ -84,7 +86,7 @@
 
   // The ValueCallback is used to return the value of a remote characteristic
   // upon a read request.
-  typedef base::Callback<void(const std::vector<uint8>&)> ValueCallback;
+  typedef base::Callback<void(const std::vector<uint8_t>&)> ValueCallback;
 
   // The NotifySessionCallback is used to return sessions after they have
   // been successfully started.
@@ -110,7 +112,7 @@
   // set the correspoding bit in the characteristic's properties field. If
   // |properties| has |PROPERTY_EXTENDED_PROPERTIES| set, it will be ignored.
   static BluetoothGattCharacteristic* Create(const BluetoothUUID& uuid,
-                                             const std::vector<uint8>& value,
+                                             const std::vector<uint8_t>& value,
                                              Properties properties,
                                              Permissions permissions);
 
@@ -131,7 +133,7 @@
   // Returns the value of the characteristic. For remote characteristics, this
   // is the most recently cached value. For local characteristics, this is the
   // most recently updated value or the value retrieved from the delegate.
-  virtual const std::vector<uint8>& GetValue() const = 0;
+  virtual const std::vector<uint8_t>& GetValue() const = 0;
 
   // Returns a pointer to the GATT service this characteristic belongs to.
   virtual BluetoothGattService* GetService() const = 0;
@@ -173,7 +175,7 @@
   //
   // This method only makes sense for local characteristics and does nothing and
   // returns false if this instance represents a remote characteristic.
-  virtual bool UpdateValue(const std::vector<uint8>& value) = 0;
+  virtual bool UpdateValue(const std::vector<uint8_t>& value) = 0;
 
   // Starts a notify session for the remote characteristic, if it supports
   // notifications/indications. On success, the characteristic starts sending
@@ -195,7 +197,7 @@
   // only applies to remote characteristics and will fail for those that are
   // locally hosted.
   virtual void WriteRemoteCharacteristic(
-      const std::vector<uint8>& new_value,
+      const std::vector<uint8_t>& new_value,
       const base::Closure& callback,
       const ErrorCallback& error_callback) = 0;
 
diff --git a/device/bluetooth/bluetooth_gatt_characteristic_unittest.cc b/device/bluetooth/bluetooth_gatt_characteristic_unittest.cc
index bbca500..8eeccb6 100644
--- a/device/bluetooth/bluetooth_gatt_characteristic_unittest.cc
+++ b/device/bluetooth/bluetooth_gatt_characteristic_unittest.cc
@@ -4,7 +4,11 @@
 
 #include "device/bluetooth/bluetooth_gatt_characteristic.h"
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/run_loop.h"
+#include "build/build_config.h"
 #include "device/bluetooth/bluetooth_gatt_service.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
diff --git a/device/bluetooth/bluetooth_gatt_connection.h b/device/bluetooth/bluetooth_gatt_connection.h
index ede1f3d..e616a11 100644
--- a/device/bluetooth/bluetooth_gatt_connection.h
+++ b/device/bluetooth/bluetooth_gatt_connection.h
@@ -8,6 +8,7 @@
 #include <string>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "device/bluetooth/bluetooth_export.h"
 
 namespace device {
diff --git a/device/bluetooth/bluetooth_gatt_descriptor.cc b/device/bluetooth/bluetooth_gatt_descriptor.cc
index 5d3673b..95a8f49e 100644
--- a/device/bluetooth/bluetooth_gatt_descriptor.cc
+++ b/device/bluetooth/bluetooth_gatt_descriptor.cc
@@ -4,6 +4,8 @@
 
 #include "device/bluetooth/bluetooth_gatt_descriptor.h"
 
+#include <stddef.h>
+
 #include <vector>
 
 #include "base/lazy_instance.h"
@@ -81,7 +83,7 @@
 // static
 BluetoothGattDescriptor* BluetoothGattDescriptor::Create(
     const BluetoothUUID& uuid,
-    const std::vector<uint8>& value,
+    const std::vector<uint8_t>& value,
     BluetoothGattCharacteristic::Permissions permissions) {
   LOG(ERROR) << "Creating local GATT characteristic descriptors currently not "
              << "supported.";
diff --git a/device/bluetooth/bluetooth_gatt_descriptor.h b/device/bluetooth/bluetooth_gatt_descriptor.h
index 00e49ea..31702688 100644
--- a/device/bluetooth/bluetooth_gatt_descriptor.h
+++ b/device/bluetooth/bluetooth_gatt_descriptor.h
@@ -5,10 +5,12 @@
 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_GATT_DESCRIPTOR_H_
 #define DEVICE_BLUETOOTH_BLUETOOTH_GATT_DESCRIPTOR_H_
 
+#include <stdint.h>
+
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "device/bluetooth/bluetooth_export.h"
 #include "device/bluetooth/bluetooth_gatt_characteristic.h"
 #include "device/bluetooth/bluetooth_uuid.h"
@@ -27,7 +29,7 @@
 
   // The ValueCallback is used to return the value of a remote characteristic
   // descriptor upon a read request.
-  typedef base::Callback<void(const std::vector<uint8>&)> ValueCallback;
+  typedef base::Callback<void(const std::vector<uint8_t>&)> ValueCallback;
 
   // The Bluetooth Specification declares several predefined descriptors that
   // profiles can use. The following are definitions for the list of UUIDs
@@ -132,7 +134,7 @@
   // unsupported predefined descriptor UUIDs.
   static BluetoothGattDescriptor* Create(
       const BluetoothUUID& uuid,
-      const std::vector<uint8>& value,
+      const std::vector<uint8_t>& value,
       BluetoothGattCharacteristic::Permissions permissions);
 
   // Identifier used to uniquely identify a GATT descriptor object. This is
@@ -153,7 +155,7 @@
   // most recently cached value of the remote descriptor. For local descriptors
   // this is the most recently updated value or the value retrieved from the
   // delegate.
-  virtual const std::vector<uint8>& GetValue() const = 0;
+  virtual const std::vector<uint8_t>& GetValue() const = 0;
 
   // Returns a pointer to the GATT characteristic that this characteristic
   // descriptor belongs to.
@@ -173,10 +175,9 @@
   // called to signal success and |error_callback| for failures. This method
   // only applies to remote descriptors and will fail for those that are locally
   // hosted.
-  virtual void WriteRemoteDescriptor(
-      const std::vector<uint8>& new_value,
-      const base::Closure& callback,
-      const ErrorCallback& error_callback) = 0;
+  virtual void WriteRemoteDescriptor(const std::vector<uint8_t>& new_value,
+                                     const base::Closure& callback,
+                                     const ErrorCallback& error_callback) = 0;
 
  protected:
   BluetoothGattDescriptor();
diff --git a/device/bluetooth/bluetooth_gatt_notify_session.h b/device/bluetooth/bluetooth_gatt_notify_session.h
index 4c63563..cbedb62 100644
--- a/device/bluetooth/bluetooth_gatt_notify_session.h
+++ b/device/bluetooth/bluetooth_gatt_notify_session.h
@@ -8,6 +8,7 @@
 #include <string>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "device/bluetooth/bluetooth_export.h"
 
 namespace device {
diff --git a/device/bluetooth/bluetooth_gatt_service.h b/device/bluetooth/bluetooth_gatt_service.h
index 35ec16d..fe4bf1c5 100644
--- a/device/bluetooth/bluetooth_gatt_service.h
+++ b/device/bluetooth/bluetooth_gatt_service.h
@@ -5,10 +5,12 @@
 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_GATT_SERVICE_H_
 #define DEVICE_BLUETOOTH_BLUETOOTH_GATT_SERVICE_H_
 
+#include <stdint.h>
+
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "device/bluetooth/bluetooth_export.h"
 #include "device/bluetooth/bluetooth_uuid.h"
 
@@ -40,7 +42,7 @@
   class Delegate {
    public:
     // Callbacks used for communicating GATT request responses.
-    typedef base::Callback<void(const std::vector<uint8>)> ValueCallback;
+    typedef base::Callback<void(const std::vector<uint8_t>)> ValueCallback;
     typedef base::Closure ErrorCallback;
 
     // Called when a remote device in the central role requests to read the
@@ -79,7 +81,7 @@
     virtual void OnCharacteristicWriteRequest(
         const BluetoothGattService* service,
         const BluetoothGattCharacteristic* characteristic,
-        const std::vector<uint8>& value,
+        const std::vector<uint8_t>& value,
         int offset,
         const ValueCallback& callback,
         const ErrorCallback& error_callback) = 0;
@@ -120,7 +122,7 @@
     virtual void OnDescriptorWriteRequest(
         const BluetoothGattService* service,
         const BluetoothGattDescriptor* descriptor,
-        const std::vector<uint8>& value,
+        const std::vector<uint8_t>& value,
         int offset,
         const ValueCallback& callback,
         const ErrorCallback& error_callback) = 0;
diff --git a/device/bluetooth/bluetooth_gatt_service_unittest.cc b/device/bluetooth/bluetooth_gatt_service_unittest.cc
index 7c3af735..e153cc5 100644
--- a/device/bluetooth/bluetooth_gatt_service_unittest.cc
+++ b/device/bluetooth/bluetooth_gatt_service_unittest.cc
@@ -4,6 +4,7 @@
 
 #include "device/bluetooth/bluetooth_gatt_service.h"
 
+#include "build/build_config.h"
 #include "device/bluetooth/bluetooth_gatt_characteristic.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
diff --git a/device/bluetooth/bluetooth_l2cap_channel_mac.h b/device/bluetooth/bluetooth_l2cap_channel_mac.h
index de085e65..5ecbfc3c 100644
--- a/device/bluetooth/bluetooth_l2cap_channel_mac.h
+++ b/device/bluetooth/bluetooth_l2cap_channel_mac.h
@@ -7,6 +7,8 @@
 
 #import <IOBluetooth/IOBluetooth.h>
 #import <IOKit/IOReturn.h>
+#include <stddef.h>
+#include <stdint.h>
 
 #include "base/mac/scoped_nsobject.h"
 #include "base/macros.h"
diff --git a/device/bluetooth/bluetooth_low_energy_central_manager_delegate.h b/device/bluetooth/bluetooth_low_energy_central_manager_delegate.h
index df211504..c162d3b 100644
--- a/device/bluetooth/bluetooth_low_energy_central_manager_delegate.h
+++ b/device/bluetooth/bluetooth_low_energy_central_manager_delegate.h
@@ -7,6 +7,7 @@
 
 #include "base/mac/sdk_forward_declarations.h"
 #include "base/memory/scoped_ptr.h"
+#include "build/build_config.h"
 
 #if defined(OS_IOS)
 #import <CoreBluetooth/CoreBluetooth.h>
diff --git a/device/bluetooth/bluetooth_low_energy_device_mac.h b/device/bluetooth/bluetooth_low_energy_device_mac.h
index 863cb10..19cbb01 100644
--- a/device/bluetooth/bluetooth_low_energy_device_mac.h
+++ b/device/bluetooth/bluetooth_low_energy_device_mac.h
@@ -11,10 +11,14 @@
 #import <IOBluetooth/IOBluetooth.h>
 #endif  // defined(OS_IOS)
 
+#include <stdint.h>
+
 #include <set>
 
 #include "base/mac/scoped_nsobject.h"
 #include "base/mac/sdk_forward_declarations.h"
+#include "base/macros.h"
+#include "build/build_config.h"
 #include "crypto/sha2.h"
 #include "device/bluetooth/bluetooth_device_mac.h"
 
@@ -36,20 +40,20 @@
 
   // BluetoothDevice overrides.
   std::string GetIdentifier() const override;
-  uint32 GetBluetoothClass() const override;
+  uint32_t GetBluetoothClass() const override;
   std::string GetAddress() const override;
   BluetoothDevice::VendorIDSource GetVendorIDSource() const override;
-  uint16 GetVendorID() const override;
-  uint16 GetProductID() const override;
-  uint16 GetDeviceID() const override;
+  uint16_t GetVendorID() const override;
+  uint16_t GetProductID() const override;
+  uint16_t GetDeviceID() const override;
   bool IsPaired() const override;
   bool IsConnected() const override;
   bool IsGattConnected() const override;
   bool IsConnectable() const override;
   bool IsConnecting() const override;
   BluetoothDevice::UUIDList GetUUIDs() const override;
-  int16 GetInquiryRSSI() const override;
-  int16 GetInquiryTxPower() const override;
+  int16_t GetInquiryRSSI() const override;
+  int16_t GetInquiryTxPower() const override;
   bool ExpectingPinCode() const override;
   bool ExpectingPasskey() const override;
   bool ExpectingConfirmation() const override;
@@ -58,7 +62,7 @@
                const base::Closure& callback,
                const ConnectErrorCallback& error_callback) override;
   void SetPinCode(const std::string& pincode) override;
-  void SetPasskey(uint32 passkey) override;
+  void SetPasskey(uint32_t passkey) override;
   void ConfirmPairing() override;
   void RejectPairing() override;
   void CancelPairing() override;
diff --git a/device/bluetooth/bluetooth_low_energy_device_mac.mm b/device/bluetooth/bluetooth_low_energy_device_mac.mm
index 64b7492..677c5955 100644
--- a/device/bluetooth/bluetooth_low_energy_device_mac.mm
+++ b/device/bluetooth/bluetooth_low_energy_device_mac.mm
@@ -5,6 +5,7 @@
 #include "device/bluetooth/bluetooth_low_energy_device_mac.h"
 
 #import <CoreFoundation/CoreFoundation.h>
+#include <stddef.h>
 
 #include "base/mac/mac_util.h"
 #include "base/mac/scoped_cftyperef.h"
@@ -80,7 +81,7 @@
   return identifier_;
 }
 
-uint32 BluetoothLowEnergyDeviceMac::GetBluetoothClass() const {
+uint32_t BluetoothLowEnergyDeviceMac::GetBluetoothClass() const {
   return 0x1F00;  // Unspecified Device Class
 }
 
@@ -93,15 +94,15 @@
   return VENDOR_ID_UNKNOWN;
 }
 
-uint16 BluetoothLowEnergyDeviceMac::GetVendorID() const {
+uint16_t BluetoothLowEnergyDeviceMac::GetVendorID() const {
   return 0;
 }
 
-uint16 BluetoothLowEnergyDeviceMac::GetProductID() const {
+uint16_t BluetoothLowEnergyDeviceMac::GetProductID() const {
   return 0;
 }
 
-uint16 BluetoothLowEnergyDeviceMac::GetDeviceID() const {
+uint16_t BluetoothLowEnergyDeviceMac::GetDeviceID() const {
   return 0;
 }
 
@@ -134,11 +135,11 @@
                                    advertised_uuids_.end());
 }
 
-int16 BluetoothLowEnergyDeviceMac::GetInquiryRSSI() const {
+int16_t BluetoothLowEnergyDeviceMac::GetInquiryRSSI() const {
   return kUnknownPower;
 }
 
-int16 BluetoothLowEnergyDeviceMac::GetInquiryTxPower() const {
+int16_t BluetoothLowEnergyDeviceMac::GetInquiryTxPower() const {
   NOTIMPLEMENTED();
   return kUnknownPower;
 }
@@ -171,7 +172,7 @@
   NOTIMPLEMENTED();
 }
 
-void BluetoothLowEnergyDeviceMac::SetPasskey(uint32 passkey) {
+void BluetoothLowEnergyDeviceMac::SetPasskey(uint32_t passkey) {
   NOTIMPLEMENTED();
 }
 
diff --git a/device/bluetooth/bluetooth_low_energy_discovery_manager_mac.h b/device/bluetooth/bluetooth_low_energy_discovery_manager_mac.h
index cef82b5b..20d63a1 100644
--- a/device/bluetooth/bluetooth_low_energy_discovery_manager_mac.h
+++ b/device/bluetooth/bluetooth_low_energy_discovery_manager_mac.h
@@ -13,6 +13,8 @@
 
 #include "base/mac/scoped_nsobject.h"
 #include "base/mac/sdk_forward_declarations.h"
+#include "base/macros.h"
+#include "build/build_config.h"
 #include "device/bluetooth/bluetooth_device.h"
 
 namespace device {
diff --git a/device/bluetooth/bluetooth_low_energy_win.cc b/device/bluetooth/bluetooth_low_energy_win.cc
index 425f114..6e1cb81 100644
--- a/device/bluetooth/bluetooth_low_energy_win.cc
+++ b/device/bluetooth/bluetooth_low_energy_win.cc
@@ -6,6 +6,7 @@
 
 #include "base/files/file.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/strings/sys_string_conversions.h"
 #include "base/win/scoped_handle.h"
 #include "base/win/windows_version.h"
diff --git a/device/bluetooth/bluetooth_low_energy_win.h b/device/bluetooth/bluetooth_low_energy_win.h
index 4efbdc2..63fc45f 100644
--- a/device/bluetooth/bluetooth_low_energy_win.h
+++ b/device/bluetooth/bluetooth_low_energy_win.h
@@ -5,7 +5,11 @@
 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_WIN_H_
 #define DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_WIN_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/files/file_path.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
 #include "base/win/scoped_handle.h"
diff --git a/device/bluetooth/bluetooth_low_energy_win_unittest.cc b/device/bluetooth/bluetooth_low_energy_win_unittest.cc
index 3e9116e..02afa0f8 100644
--- a/device/bluetooth/bluetooth_low_energy_win_unittest.cc
+++ b/device/bluetooth/bluetooth_low_energy_win_unittest.cc
@@ -2,6 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/strings/sys_string_conversions.h"
 #include "device/bluetooth/bluetooth_low_energy_win.h"
 #include "testing/gtest/include/gtest/gtest.h"
diff --git a/device/bluetooth/bluetooth_pairing_bluez.cc b/device/bluetooth/bluetooth_pairing_bluez.cc
index a798694..776d11a 100644
--- a/device/bluetooth/bluetooth_pairing_bluez.cc
+++ b/device/bluetooth/bluetooth_pairing_bluez.cc
@@ -28,7 +28,7 @@
 
 // Number of keys that will be entered for a passkey, six digits plus the
 // final enter.
-const uint16 kPasskeyMaxKeysEntered = 7;
+const uint16_t kPasskeyMaxKeysEntered = 7;
 
 }  // namespace
 
@@ -135,7 +135,7 @@
   return !passkey_callback_.is_null();
 }
 
-void BluetoothPairingBlueZ::SetPasskey(uint32 passkey) {
+void BluetoothPairingBlueZ::SetPasskey(uint32_t passkey) {
   if (passkey_callback_.is_null())
     return;
 
@@ -150,7 +150,7 @@
     device_->EndPairing();
 }
 
-void BluetoothPairingBlueZ::DisplayPasskey(uint32 passkey) {
+void BluetoothPairingBlueZ::DisplayPasskey(uint32_t passkey) {
   UMA_HISTOGRAM_ENUMERATION("Bluetooth.PairingMethod",
                             UMA_PAIRING_METHOD_DISPLAY_PASSKEY,
                             UMA_PAIRING_METHOD_COUNT);
@@ -160,7 +160,7 @@
   pairing_delegate_->DisplayPasskey(device_, passkey);
 }
 
-void BluetoothPairingBlueZ::KeysEntered(uint16 entered) {
+void BluetoothPairingBlueZ::KeysEntered(uint16_t entered) {
   pairing_delegate_used_ = true;
   pairing_delegate_->KeysEntered(device_, entered);
 
@@ -172,7 +172,7 @@
 }
 
 void BluetoothPairingBlueZ::RequestConfirmation(
-    uint32 passkey,
+    uint32_t passkey,
     const bluez::BluetoothAgentServiceProvider::Delegate::ConfirmationCallback&
         callback) {
   UMA_HISTOGRAM_ENUMERATION("Bluetooth.PairingMethod",
diff --git a/device/bluetooth/bluetooth_pairing_bluez.h b/device/bluetooth/bluetooth_pairing_bluez.h
index 2851faf..85113bf 100644
--- a/device/bluetooth/bluetooth_pairing_bluez.h
+++ b/device/bluetooth/bluetooth_pairing_bluez.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_PAIRING_BLUEZ_H_
 #define DEVICE_BLUETOOTH_BLUETOOTH_PAIRING_BLUEZ_H_
 
+#include <stdint.h>
+
 #include "base/macros.h"
 #include "device/bluetooth/bluetooth_device.h"
 #include "device/bluetooth/dbus/bluetooth_agent_service_provider.h"
@@ -67,22 +69,22 @@
   // Passkeys are generally required for Bluetooth 2.1 and later devices
   // which cannot provide input or display on their own, and don't accept
   // passkey-less pairing, and are a numeric in the range 0-999999.
-  void SetPasskey(uint32 passkey);
+  void SetPasskey(uint32_t passkey);
 
   // Requests a Passkey for the current device be displayed by the current
   // pairing delegate. No response is expected from the delegate.
-  void DisplayPasskey(uint32 passkey);
+  void DisplayPasskey(uint32_t passkey);
 
   // Informs the current pairing delegate that |entered| keys have been
   // provided to the remote device since the DisplayPasskey() call. No
   // response is expected from the delegate.
-  void KeysEntered(uint16 entered);
+  void KeysEntered(uint16_t entered);
 
   // Requests confirmation that |passkey| is displayed on the current device
   // from the current pairing delegate. The ConfirmPairing(), RejectPairing()
   // and CancelPairing() method calls on this object are translated into the
   // appropriate response to |callback|.
-  void RequestConfirmation(uint32 passkey,
+  void RequestConfirmation(uint32_t passkey,
                            const bluez::BluetoothAgentServiceProvider::
                                Delegate::ConfirmationCallback& callback);
 
diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic_android.cc b/device/bluetooth/bluetooth_remote_gatt_characteristic_android.cc
index 58e4cac..4c34412 100644
--- a/device/bluetooth/bluetooth_remote_gatt_characteristic_android.cc
+++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_android.cc
@@ -68,7 +68,7 @@
   return false;
 }
 
-const std::vector<uint8>& BluetoothRemoteGattCharacteristicAndroid::GetValue()
+const std::vector<uint8_t>& BluetoothRemoteGattCharacteristicAndroid::GetValue()
     const {
   return value_;
 }
@@ -116,7 +116,7 @@
 }
 
 bool BluetoothRemoteGattCharacteristicAndroid::UpdateValue(
-    const std::vector<uint8>& value) {
+    const std::vector<uint8_t>& value) {
   NOTIMPLEMENTED();
   return false;
 }
@@ -165,7 +165,7 @@
 }
 
 void BluetoothRemoteGattCharacteristicAndroid::WriteRemoteCharacteristic(
-    const std::vector<uint8>& new_value,
+    const std::vector<uint8_t>& new_value,
     const base::Closure& callback,
     const ErrorCallback& error_callback) {
   if (read_pending_ || write_pending_) {
diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic_android.h b/device/bluetooth/bluetooth_remote_gatt_characteristic_android.h
index 6b6c0df..f6729f3 100644
--- a/device/bluetooth/bluetooth_remote_gatt_characteristic_android.h
+++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_android.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_ANDROID_H_
 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_ANDROID_H_
 
+#include <stdint.h>
+
 #include "base/android/jni_android.h"
 #include "base/macros.h"
 #include "device/bluetooth/bluetooth_gatt_characteristic.h"
@@ -46,7 +48,7 @@
   std::string GetIdentifier() const override;
   BluetoothUUID GetUUID() const override;
   bool IsLocal() const override;
-  const std::vector<uint8>& GetValue() const override;
+  const std::vector<uint8_t>& GetValue() const override;
   BluetoothGattService* GetService() const override;
   Properties GetProperties() const override;
   Permissions GetPermissions() const override;
@@ -55,12 +57,12 @@
   BluetoothGattDescriptor* GetDescriptor(
       const std::string& identifier) const override;
   bool AddDescriptor(BluetoothGattDescriptor* descriptor) override;
-  bool UpdateValue(const std::vector<uint8>& value) override;
+  bool UpdateValue(const std::vector<uint8_t>& value) override;
   void StartNotifySession(const NotifySessionCallback& callback,
                           const ErrorCallback& error_callback) override;
   void ReadRemoteCharacteristic(const ValueCallback& callback,
                                 const ErrorCallback& error_callback) override;
-  void WriteRemoteCharacteristic(const std::vector<uint8>& new_value,
+  void WriteRemoteCharacteristic(const std::vector<uint8_t>& new_value,
                                  const base::Closure& callback,
                                  const ErrorCallback& error_callback) override;
 
@@ -95,7 +97,7 @@
   base::Closure write_callback_;
   ErrorCallback write_error_callback_;
 
-  std::vector<uint8> value_;
+  std::vector<uint8_t> value_;
 
   DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattCharacteristicAndroid);
 };
diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic_bluez.cc b/device/bluetooth/bluetooth_remote_gatt_characteristic_bluez.cc
index 75c6f1a..e76c57e4 100644
--- a/device/bluetooth/bluetooth_remote_gatt_characteristic_bluez.cc
+++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_bluez.cc
@@ -21,10 +21,10 @@
 
 namespace {
 
-// Stream operator for logging vector<uint8>.
-std::ostream& operator<<(std::ostream& out, const std::vector<uint8> bytes) {
+// Stream operator for logging vector<uint8_t>.
+std::ostream& operator<<(std::ostream& out, const std::vector<uint8_t> bytes) {
   out << "[";
-  for (std::vector<uint8>::const_iterator iter = bytes.begin();
+  for (std::vector<uint8_t>::const_iterator iter = bytes.begin();
        iter != bytes.end(); ++iter) {
     out << base::StringPrintf("%02X", *iter);
   }
@@ -94,7 +94,7 @@
   return false;
 }
 
-const std::vector<uint8>& BluetoothRemoteGattCharacteristicBlueZ::GetValue()
+const std::vector<uint8_t>& BluetoothRemoteGattCharacteristicBlueZ::GetValue()
     const {
   bluez::BluetoothGattCharacteristicClient::Properties* properties =
       bluez::BluezDBusManager::Get()
@@ -191,7 +191,7 @@
 }
 
 bool BluetoothRemoteGattCharacteristicBlueZ::UpdateValue(
-    const std::vector<uint8>& value) {
+    const std::vector<uint8_t>& value) {
   VLOG(1) << "Cannot update the value of a remote GATT characteristic.";
   return false;
 }
@@ -211,7 +211,7 @@
 }
 
 void BluetoothRemoteGattCharacteristicBlueZ::WriteRemoteCharacteristic(
-    const std::vector<uint8>& new_value,
+    const std::vector<uint8_t>& new_value,
     const base::Closure& callback,
     const ErrorCallback& error_callback) {
   VLOG(1) << "Sending GATT characteristic write request to characteristic: "
diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic_bluez.h b/device/bluetooth/bluetooth_remote_gatt_characteristic_bluez.h
index 664f0fcc..9976975 100644
--- a/device/bluetooth/bluetooth_remote_gatt_characteristic_bluez.h
+++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_bluez.h
@@ -5,6 +5,9 @@
 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_BLUEZ_H_
 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_BLUEZ_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <map>
 #include <queue>
 #include <string>
@@ -41,7 +44,7 @@
   std::string GetIdentifier() const override;
   device::BluetoothUUID GetUUID() const override;
   bool IsLocal() const override;
-  const std::vector<uint8>& GetValue() const override;
+  const std::vector<uint8_t>& GetValue() const override;
   device::BluetoothGattService* GetService() const override;
   Properties GetProperties() const override;
   Permissions GetPermissions() const override;
@@ -50,10 +53,10 @@
   device::BluetoothGattDescriptor* GetDescriptor(
       const std::string& identifier) const override;
   bool AddDescriptor(device::BluetoothGattDescriptor* descriptor) override;
-  bool UpdateValue(const std::vector<uint8>& value) override;
+  bool UpdateValue(const std::vector<uint8_t>& value) override;
   void ReadRemoteCharacteristic(const ValueCallback& callback,
                                 const ErrorCallback& error_callback) override;
-  void WriteRemoteCharacteristic(const std::vector<uint8>& new_value,
+  void WriteRemoteCharacteristic(const std::vector<uint8_t>& new_value,
                                  const base::Closure& callback,
                                  const ErrorCallback& error_callback) override;
   void StartNotifySession(const NotifySessionCallback& callback,
diff --git a/device/bluetooth/bluetooth_remote_gatt_descriptor_bluez.cc b/device/bluetooth/bluetooth_remote_gatt_descriptor_bluez.cc
index 4bf9ab0..c74b1a0 100644
--- a/device/bluetooth/bluetooth_remote_gatt_descriptor_bluez.cc
+++ b/device/bluetooth/bluetooth_remote_gatt_descriptor_bluez.cc
@@ -16,10 +16,10 @@
 
 namespace {
 
-// Stream operator for logging vector<uint8>.
-std::ostream& operator<<(std::ostream& out, const std::vector<uint8> bytes) {
+// Stream operator for logging vector<uint8_t>.
+std::ostream& operator<<(std::ostream& out, const std::vector<uint8_t> bytes) {
   out << "[";
-  for (std::vector<uint8>::const_iterator iter = bytes.begin();
+  for (std::vector<uint8_t>::const_iterator iter = bytes.begin();
        iter != bytes.end(); ++iter) {
     out << base::StringPrintf("%02X", *iter);
   }
@@ -57,7 +57,8 @@
   return false;
 }
 
-const std::vector<uint8>& BluetoothRemoteGattDescriptorBlueZ::GetValue() const {
+const std::vector<uint8_t>& BluetoothRemoteGattDescriptorBlueZ::GetValue()
+    const {
   bluez::BluetoothGattDescriptorClient::Properties* properties =
       bluez::BluezDBusManager::Get()
           ->GetBluetoothGattDescriptorClient()
@@ -94,7 +95,7 @@
 }
 
 void BluetoothRemoteGattDescriptorBlueZ::WriteRemoteDescriptor(
-    const std::vector<uint8>& new_value,
+    const std::vector<uint8_t>& new_value,
     const base::Closure& callback,
     const ErrorCallback& error_callback) {
   VLOG(1) << "Sending GATT characteristic descriptor write request to "
diff --git a/device/bluetooth/bluetooth_remote_gatt_descriptor_bluez.h b/device/bluetooth/bluetooth_remote_gatt_descriptor_bluez.h
index 90afaea..9af09136 100644
--- a/device/bluetooth/bluetooth_remote_gatt_descriptor_bluez.h
+++ b/device/bluetooth/bluetooth_remote_gatt_descriptor_bluez.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_DESCRIPTOR_BLUEZ_H_
 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_DESCRIPTOR_BLUEZ_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
@@ -34,13 +36,13 @@
   std::string GetIdentifier() const override;
   device::BluetoothUUID GetUUID() const override;
   bool IsLocal() const override;
-  const std::vector<uint8>& GetValue() const override;
+  const std::vector<uint8_t>& GetValue() const override;
   device::BluetoothGattCharacteristic* GetCharacteristic() const override;
   device::BluetoothGattCharacteristic::Permissions GetPermissions()
       const override;
   void ReadRemoteDescriptor(const ValueCallback& callback,
                             const ErrorCallback& error_callback) override;
-  void WriteRemoteDescriptor(const std::vector<uint8>& new_value,
+  void WriteRemoteDescriptor(const std::vector<uint8_t>& new_value,
                              const base::Closure& callback,
                              const ErrorCallback& error_callback) override;
 
diff --git a/device/bluetooth/bluetooth_remote_gatt_service_android.h b/device/bluetooth/bluetooth_remote_gatt_service_android.h
index 7c90954..6bcf910 100644
--- a/device/bluetooth/bluetooth_remote_gatt_service_android.h
+++ b/device/bluetooth/bluetooth_remote_gatt_service_android.h
@@ -11,6 +11,7 @@
 
 #include "base/android/jni_android.h"
 #include "base/containers/scoped_ptr_hash_map.h"
+#include "base/macros.h"
 #include "device/bluetooth/bluetooth_gatt_service.h"
 #include "device/bluetooth/bluetooth_uuid.h"
 
diff --git a/device/bluetooth/bluetooth_remote_gatt_service_bluez.cc b/device/bluetooth/bluetooth_remote_gatt_service_bluez.cc
index e3fb5b1..4906aaf 100644
--- a/device/bluetooth/bluetooth_remote_gatt_service_bluez.cc
+++ b/device/bluetooth/bluetooth_remote_gatt_service_bluez.cc
@@ -218,7 +218,7 @@
 void BluetoothRemoteGattServiceBlueZ::NotifyDescriptorValueChanged(
     BluetoothRemoteGattCharacteristicBlueZ* characteristic,
     BluetoothRemoteGattDescriptorBlueZ* descriptor,
-    const std::vector<uint8>& value) {
+    const std::vector<uint8_t>& value) {
   DCHECK(characteristic->GetService() == this);
   DCHECK(descriptor->GetCharacteristic() == characteristic);
   DCHECK(adapter_);
diff --git a/device/bluetooth/bluetooth_remote_gatt_service_bluez.h b/device/bluetooth/bluetooth_remote_gatt_service_bluez.h
index 83222f0d..483db24 100644
--- a/device/bluetooth/bluetooth_remote_gatt_service_bluez.h
+++ b/device/bluetooth/bluetooth_remote_gatt_service_bluez.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_BLUEZ_H_
 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_BLUEZ_H_
 
+#include <stdint.h>
+
 #include <map>
 #include <string>
 #include <vector>
@@ -92,7 +94,7 @@
   void NotifyDescriptorValueChanged(
       BluetoothRemoteGattCharacteristicBlueZ* characteristic,
       BluetoothRemoteGattDescriptorBlueZ* descriptor,
-      const std::vector<uint8>& value);
+      const std::vector<uint8_t>& value);
 
  private:
   friend class BluetoothDeviceBlueZ;
diff --git a/device/bluetooth/bluetooth_rfcomm_channel_mac.h b/device/bluetooth/bluetooth_rfcomm_channel_mac.h
index 5f98f27..8d613b0 100644
--- a/device/bluetooth/bluetooth_rfcomm_channel_mac.h
+++ b/device/bluetooth/bluetooth_rfcomm_channel_mac.h
@@ -7,6 +7,8 @@
 
 #import <IOBluetooth/IOBluetooth.h>
 #import <IOKit/IOReturn.h>
+#include <stddef.h>
+#include <stdint.h>
 
 #include "base/mac/scoped_nsobject.h"
 #include "base/macros.h"
diff --git a/device/bluetooth/bluetooth_service_record_win.cc b/device/bluetooth/bluetooth_service_record_win.cc
index c4fccde3..1b91e7d8 100644
--- a/device/bluetooth/bluetooth_service_record_win.cc
+++ b/device/bluetooth/bluetooth_service_record_win.cc
@@ -6,7 +6,6 @@
 
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/stringprintf.h"
 #include "device/bluetooth/bluetooth_init_win.h"
@@ -14,9 +13,9 @@
 
 namespace {
 
-const uint16 kProtocolDescriptorListId = 4;
-const uint16 kRfcommUuid = 3;
-const uint16 kUuidId = 1;
+const uint16_t kProtocolDescriptorListId = 4;
+const uint16_t kRfcommUuid = 3;
+const uint16_t kUuidId = 1;
 
 bool AdvanceToSdpType(const SDP_ELEMENT_DATA& sequence_data,
                       SDP_TYPE type,
@@ -36,7 +35,7 @@
 
 void ExtractChannels(const SDP_ELEMENT_DATA& protocol_descriptor_list_data,
                      bool* supports_rfcomm,
-                     uint8* rfcomm_channel) {
+                     uint8_t* rfcomm_channel) {
   HBLUETOOTH_CONTAINER_ELEMENT sequence_element = NULL;
   SDP_ELEMENT_DATA sequence_data;
   while (AdvanceToSdpType(protocol_descriptor_list_data,
@@ -104,12 +103,11 @@
     numbers_only += address.substr(i * 3, 2);
   }
 
-  std::vector<uint8> address_bytes;
+  std::vector<uint8_t> address_bytes;
   base::HexStringToBytes(numbers_only, &address_bytes);
   int byte_position = 0;
-  for (std::vector<uint8>::reverse_iterator iter = address_bytes.rbegin();
-      iter != address_bytes.rend();
-      ++iter) {
+  for (std::vector<uint8_t>::reverse_iterator iter = address_bytes.rbegin();
+       iter != address_bytes.rend(); ++iter) {
     bth_addr += *iter * pow(256.0, byte_position);
     byte_position++;
   }
@@ -123,7 +121,7 @@
 BluetoothServiceRecordWin::BluetoothServiceRecordWin(
     const std::string& device_address,
     const std::string& name,
-    const std::vector<uint8>& sdp_bytes,
+    const std::vector<uint8_t>& sdp_bytes,
     const BluetoothUUID& gatt_uuid)
     : device_bth_addr_(ConvertToBthAddr(device_address)),
       device_address_(device_address),
diff --git a/device/bluetooth/bluetooth_service_record_win.h b/device/bluetooth/bluetooth_service_record_win.h
index cedc67e..b7662a2 100644
--- a/device/bluetooth/bluetooth_service_record_win.h
+++ b/device/bluetooth/bluetooth_service_record_win.h
@@ -5,10 +5,12 @@
 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_SERVICE_RECORD_WIN_H_
 #define DEVICE_BLUETOOTH_BLUETOOTH_SERVICE_RECORD_WIN_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "device/bluetooth/bluetooth_export.h"
 #include "device/bluetooth/bluetooth_init_win.h"
 #include "device/bluetooth/bluetooth_uuid.h"
@@ -19,7 +21,7 @@
  public:
   BluetoothServiceRecordWin(const std::string& device_address,
                             const std::string& name,
-                            const std::vector<uint8>& sdp_bytes,
+                            const std::vector<uint8_t>& sdp_bytes,
                             const BluetoothUUID& gatt_uuid);
 
   bool IsEqual(const BluetoothServiceRecordWin& other);
@@ -42,7 +44,7 @@
 
   // The RFCOMM channel to use, if this service supports RFCOMM communication.
   // The return value is undefined if SupportsRfcomm() returns false.
-  uint8 rfcomm_channel() const { return rfcomm_channel_; }
+  uint8_t rfcomm_channel() const { return rfcomm_channel_; }
 
  private:
   BTH_ADDR device_bth_addr_;
@@ -51,7 +53,7 @@
   BluetoothUUID uuid_;
 
   bool supports_rfcomm_;
-  uint8 rfcomm_channel_;
+  uint8_t rfcomm_channel_;
 
   DISALLOW_COPY_AND_ASSIGN(BluetoothServiceRecordWin);
 };
diff --git a/device/bluetooth/bluetooth_service_record_win_unittest.cc b/device/bluetooth/bluetooth_service_record_win_unittest.cc
index 116f740..59d6c89 100644
--- a/device/bluetooth/bluetooth_service_record_win_unittest.cc
+++ b/device/bluetooth/bluetooth_service_record_win_unittest.cc
@@ -2,7 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
 #include "base/strings/string_number_conversions.h"
 #include "device/bluetooth/bluetooth_service_record_win.h"
 #include "device/bluetooth/bluetooth_uuid.h"
@@ -30,13 +31,13 @@
 class BluetoothServiceRecordWinTest : public testing::Test {
  protected:
   void ConvertSdpBytes(const char* sdp_hex_char,
-                       std::vector<uint8>* sdp_bytes_vector) {
+                       std::vector<uint8_t>* sdp_bytes_vector) {
     base::HexStringToBytes(sdp_hex_char, sdp_bytes_vector);
   }
 };
 
 TEST_F(BluetoothServiceRecordWinTest, NoRfcommSdp) {
-  std::vector<uint8> sdp_bytes_array;
+  std::vector<uint8_t> sdp_bytes_array;
   ConvertSdpBytes(kTestNoRfcommSdpBytes, &sdp_bytes_array);
   BluetoothServiceRecordWin service_record(
       "01:02:03:0A:10:A0", "NoRfcommSdp", sdp_bytes_array, BluetoothUUID());
@@ -46,7 +47,7 @@
 
 
 TEST_F(BluetoothServiceRecordWinTest, RfcommSdp) {
-  std::vector<uint8> sdp_bytes_array;
+  std::vector<uint8_t> sdp_bytes_array;
   ConvertSdpBytes(kTestRfcommSdpBytes, &sdp_bytes_array);
   BluetoothServiceRecordWin service_record(
       "01:02:03:0A:10:A0", "RfcommSdp", sdp_bytes_array, BluetoothUUID());
@@ -56,7 +57,7 @@
 }
 
 TEST_F(BluetoothServiceRecordWinTest, BthAddr) {
-  std::vector<uint8> sdp_bytes_array;
+  std::vector<uint8_t> sdp_bytes_array;
   ConvertSdpBytes(kTestRfcommSdpBytes, &sdp_bytes_array);
   BluetoothServiceRecordWin service_record(
       "01:02:03:0A:10:A0", "Sdp", sdp_bytes_array, BluetoothUUID());
diff --git a/device/bluetooth/bluetooth_socket_bluez.cc b/device/bluetooth/bluetooth_socket_bluez.cc
index 46269c9..df5a0c03 100644
--- a/device/bluetooth/bluetooth_socket_bluez.cc
+++ b/device/bluetooth/bluetooth_socket_bluez.cc
@@ -4,10 +4,11 @@
 
 #include "device/bluetooth/bluetooth_socket_bluez.h"
 
+#include <stdint.h>
+
 #include <queue>
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/bind.h"
 #include "base/callback.h"
 #include "base/logging.h"
@@ -139,11 +140,11 @@
   switch (socket_type) {
     case kRfcomm:
       options_->channel.reset(
-          new uint16(service_options.channel ? *service_options.channel : 0));
+          new uint16_t(service_options.channel ? *service_options.channel : 0));
       break;
     case kL2cap:
       options_->psm.reset(
-          new uint16(service_options.psm ? *service_options.psm : 0));
+          new uint16_t(service_options.psm ? *service_options.psm : 0));
       break;
     default:
       NOTREACHED();
diff --git a/device/bluetooth/bluetooth_socket_mac.h b/device/bluetooth/bluetooth_socket_mac.h
index 768b850..63edc66 100644
--- a/device/bluetooth/bluetooth_socket_mac.h
+++ b/device/bluetooth/bluetooth_socket_mac.h
@@ -10,8 +10,10 @@
 
 #import <IOBluetooth/IOBluetooth.h>
 #import <IOKit/IOReturn.h>
+#include <stddef.h>
 
 #include "base/mac/scoped_nsobject.h"
+#include "base/macros.h"
 #include "base/memory/linked_ptr.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
diff --git a/device/bluetooth/bluetooth_socket_mac.mm b/device/bluetooth/bluetooth_socket_mac.mm
index 261932a..0157d10 100644
--- a/device/bluetooth/bluetooth_socket_mac.mm
+++ b/device/bluetooth/bluetooth_socket_mac.mm
@@ -5,12 +5,12 @@
 #include "device/bluetooth/bluetooth_socket_mac.h"
 
 #import <IOBluetooth/IOBluetooth.h>
+#include <stdint.h>
 
 #include <limits>
 #include <sstream>
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/bind.h"
 #include "base/callback.h"
 #include "base/callback_helpers.h"
@@ -253,7 +253,7 @@
   numbers_only.erase(18, 1);
   numbers_only.erase(13, 1);
   numbers_only.erase(8, 1);
-  std::vector<uint8> uuid_bytes_vector;
+  std::vector<uint8_t> uuid_bytes_vector;
   base::HexStringToBytes(numbers_only, &uuid_bytes_vector);
   DCHECK_EQ(uuid_bytes_vector.size(), 16U);
 
diff --git a/device/bluetooth/bluetooth_socket_net.h b/device/bluetooth/bluetooth_socket_net.h
index 74117767..cc31740 100644
--- a/device/bluetooth/bluetooth_socket_net.h
+++ b/device/bluetooth/bluetooth_socket_net.h
@@ -8,7 +8,7 @@
 #include <queue>
 #include <string>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/linked_ptr.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
diff --git a/device/bluetooth/bluetooth_socket_thread.h b/device/bluetooth/bluetooth_socket_thread.h
index 0c7b65c..0e0aea6 100644
--- a/device/bluetooth/bluetooth_socket_thread.h
+++ b/device/bluetooth/bluetooth_socket_thread.h
@@ -5,6 +5,7 @@
 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_THREAD_H_
 #define DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_THREAD_H_
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/threading/thread_checker.h"
diff --git a/device/bluetooth/bluetooth_socket_win.h b/device/bluetooth/bluetooth_socket_win.h
index c7b4ab1..63029392 100644
--- a/device/bluetooth/bluetooth_socket_win.h
+++ b/device/bluetooth/bluetooth_socket_win.h
@@ -5,10 +5,12 @@
 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_WIN_H_
 #define DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_WIN_H_
 
+#include <stdint.h>
 #include <WinSock2.h>
 
 #include <string>
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "device/bluetooth/bluetooth_adapter.h"
 #include "device/bluetooth/bluetooth_service_record_win.h"
@@ -84,7 +86,7 @@
 
   std::string device_address_;
   bool supports_rfcomm_;
-  uint8 rfcomm_channel_;
+  uint8_t rfcomm_channel_;
   BTH_ADDR bth_addr_;
 
   // Data members below are only used when listening.
diff --git a/device/bluetooth/bluetooth_task_manager_win.cc b/device/bluetooth/bluetooth_task_manager_win.cc
index 53e307c..a3c75b6 100644
--- a/device/bluetooth/bluetooth_task_manager_win.cc
+++ b/device/bluetooth/bluetooth_task_manager_win.cc
@@ -4,11 +4,11 @@
 
 #include "device/bluetooth/bluetooth_task_manager_win.h"
 
+#include <stddef.h>
 #include <winsock2.h>
 
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/bind.h"
 #include "base/memory/ref_counted.h"
 #include "base/message_loop/message_loop.h"
@@ -613,7 +613,7 @@
     ServiceRecordState* service_record_state = new ServiceRecordState();
     service_record_state->name =
         base::SysWideToUTF8(sdp_result_data->lpszServiceInstanceName);
-    for (uint64 i = 0; i < sdp_result_data->lpBlob->cbSize; i++) {
+    for (uint64_t i = 0; i < sdp_result_data->lpBlob->cbSize; i++) {
       service_record_state->sdp_bytes.push_back(
           sdp_result_data->lpBlob->pBlobData[i]);
     }
diff --git a/device/bluetooth/bluetooth_task_manager_win.h b/device/bluetooth/bluetooth_task_manager_win.h
index 215acae..8882d42 100644
--- a/device/bluetooth/bluetooth_task_manager_win.h
+++ b/device/bluetooth/bluetooth_task_manager_win.h
@@ -5,10 +5,13 @@
 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_TASK_MANAGER_WIN_H_
 #define DEVICE_BLUETOOTH_BLUETOOTH_TASK_MANAGER_WIN_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
 #include "base/files/file_path.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_vector.h"
 #include "base/observer_list.h"
@@ -50,7 +53,7 @@
     // Properties common to Bluetooth Classic and LE devices.
     std::string name;
     // Properties specific to Bluetooth Classic devices.
-    std::vector<uint8> sdp_bytes;
+    std::vector<uint8_t> sdp_bytes;
     // Properties specific to Bluetooth LE devices.
     BluetoothUUID gatt_uuid;
   };
@@ -69,7 +72,7 @@
     bool authenticated;
     ScopedVector<ServiceRecordState> service_record_states;
     // Properties specific to Bluetooth Classic devices.
-    uint32 bluetooth_class;
+    uint32_t bluetooth_class;
     // Properties specific to Bluetooth LE devices.
     base::FilePath path;
   };
diff --git a/device/bluetooth/bluetooth_task_manager_win_unittest.cc b/device/bluetooth/bluetooth_task_manager_win_unittest.cc
index 5e0f3ad..5071dff 100644
--- a/device/bluetooth/bluetooth_task_manager_win_unittest.cc
+++ b/device/bluetooth/bluetooth_task_manager_win_unittest.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/memory/ref_counted.h"
 #include "base/test/test_pending_task.h"
diff --git a/device/bluetooth/bluetooth_uuid.cc b/device/bluetooth/bluetooth_uuid.cc
index 4a0ab22d..89c1ac6 100644
--- a/device/bluetooth/bluetooth_uuid.cc
+++ b/device/bluetooth/bluetooth_uuid.cc
@@ -4,7 +4,8 @@
 
 #include "device/bluetooth/bluetooth_uuid.h"
 
-#include "base/basictypes.h"
+#include <stddef.h>
+
 #include "base/logging.h"
 #include "base/strings/string_util.h"
 #include "ipc/ipc_message.h"
diff --git a/device/bluetooth/bluetooth_uuid_unittest.cc b/device/bluetooth/bluetooth_uuid_unittest.cc
index 380d151..86ffe20 100644
--- a/device/bluetooth/bluetooth_uuid_unittest.cc
+++ b/device/bluetooth/bluetooth_uuid_unittest.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
+
 #include "base/macros.h"
 #include "device/bluetooth/bluetooth_uuid.h"
 #include "testing/gtest/include/gtest/gtest.h"
diff --git a/device/bluetooth/dbus/bluetooth_adapter_client.cc b/device/bluetooth/dbus/bluetooth_adapter_client.cc
index 26081ea3..e4eb8c1 100644
--- a/device/bluetooth/dbus/bluetooth_adapter_client.cc
+++ b/device/bluetooth/dbus/bluetooth_adapter_client.cc
@@ -6,6 +6,7 @@
 
 #include "base/bind.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "dbus/bus.h"
 #include "dbus/message.h"
 #include "dbus/object_manager.h"
diff --git a/device/bluetooth/dbus/bluetooth_adapter_client.h b/device/bluetooth/dbus/bluetooth_adapter_client.h
index 4af6658..2893954 100644
--- a/device/bluetooth/dbus/bluetooth_adapter_client.h
+++ b/device/bluetooth/dbus/bluetooth_adapter_client.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_ADAPTER_CLIENT_H_
 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_ADAPTER_CLIENT_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
@@ -55,7 +57,7 @@
     dbus::Property<std::string> alias;
 
     // The Bluetooth class of the adapter device. Read-only.
-    dbus::Property<uint32> bluetooth_class;
+    dbus::Property<uint32_t> bluetooth_class;
 
     // Whether the adapter radio is powered.
     dbus::Property<bool> powered;
@@ -73,12 +75,12 @@
     // The timeout in seconds to cease accepting incoming pairing requests
     // after |pairable| is set to true. Zero means adapter remains pairable
     // forever.
-    dbus::Property<uint32> pairable_timeout;
+    dbus::Property<uint32_t> pairable_timeout;
 
     // The timeout in seconds to cease the adapter being discoverable by
     // other Bluetooth devices after |discoverable| is set to true. Zero
     // means adapter remains discoverable forever.
-    dbus::Property<uint32> discoverable_timeout;
+    dbus::Property<uint32_t> discoverable_timeout;
 
     // Indicates that the adapter is discovering other Bluetooth Devices.
     // Read-only. Use StartDiscovery() to begin discovery.
diff --git a/device/bluetooth/dbus/bluetooth_agent_manager_client.cc b/device/bluetooth/dbus/bluetooth_agent_manager_client.cc
index 6caee9b..a1032929 100644
--- a/device/bluetooth/dbus/bluetooth_agent_manager_client.cc
+++ b/device/bluetooth/dbus/bluetooth_agent_manager_client.cc
@@ -6,6 +6,7 @@
 
 #include "base/bind.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "dbus/bus.h"
 #include "dbus/message.h"
 #include "dbus/object_proxy.h"
diff --git a/device/bluetooth/dbus/bluetooth_agent_service_provider.cc b/device/bluetooth/dbus/bluetooth_agent_service_provider.cc
index 7392f2b..0592356 100644
--- a/device/bluetooth/dbus/bluetooth_agent_service_provider.cc
+++ b/device/bluetooth/dbus/bluetooth_agent_service_provider.cc
@@ -6,6 +6,7 @@
 
 #include "base/bind.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/threading/platform_thread.h"
 #include "dbus/exported_object.h"
@@ -203,8 +204,8 @@
 
     dbus::MessageReader reader(method_call);
     dbus::ObjectPath device_path;
-    uint32 passkey;
-    uint16 entered;
+    uint32_t passkey;
+    uint16_t entered;
     if (!reader.PopObjectPath(&device_path) || !reader.PopUint32(&passkey) ||
         !reader.PopUint16(&entered)) {
       LOG(WARNING) << "DisplayPasskey called with incorrect paramters: "
@@ -228,7 +229,7 @@
 
     dbus::MessageReader reader(method_call);
     dbus::ObjectPath device_path;
-    uint32 passkey;
+    uint32_t passkey;
     if (!reader.PopObjectPath(&device_path) || !reader.PopUint32(&passkey)) {
       LOG(WARNING) << "RequestConfirmation called with incorrect paramters: "
                    << method_call->ToString();
@@ -344,7 +345,7 @@
   void OnPasskey(dbus::MethodCall* method_call,
                  dbus::ExportedObject::ResponseSender response_sender,
                  Delegate::Status status,
-                 uint32 passkey) {
+                 uint32_t passkey) {
     DCHECK(OnOriginThread());
 
     switch (status) {
diff --git a/device/bluetooth/dbus/bluetooth_agent_service_provider.h b/device/bluetooth/dbus/bluetooth_agent_service_provider.h
index 162cf7e..5248a55 100644
--- a/device/bluetooth/dbus/bluetooth_agent_service_provider.h
+++ b/device/bluetooth/dbus/bluetooth_agent_service_provider.h
@@ -5,10 +5,12 @@
 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_AGENT_SERVICE_PROVIDER_H_
 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_AGENT_SERVICE_PROVIDER_H_
 
+#include <stdint.h>
+
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "dbus/bus.h"
 #include "dbus/object_path.h"
 #include "device/bluetooth/bluetooth_export.h"
@@ -51,7 +53,7 @@
     // be called with two arguments, the |status| of the request (success,
     // rejected or cancelled) and the |passkey| requested, a numeric in the
     // range 0-999999,
-    typedef base::Callback<void(Status, uint32)> PasskeyCallback;
+    typedef base::Callback<void(Status, uint32_t)> PasskeyCallback;
 
     // The ConfirmationCallback is used for methods which request confirmation
     // or authorization, it should be called with one argument, the |status|
@@ -113,8 +115,8 @@
     // As the user enters the passkey onto the device, |entered| will be
     // updated to reflect the number of digits entered so far.
     virtual void DisplayPasskey(const dbus::ObjectPath& device_path,
-                                uint32 passkey,
-                                uint16 entered) = 0;
+                                uint32_t passkey,
+                                uint16_t entered) = 0;
 
     // This method will be called when the Bluetooth daemon requires that the
     // user confirm that the Passkey |passkey| is displayed on the screen
@@ -128,7 +130,7 @@
     // range 0-999999 and should be always present zero-padded to six
     // digits.
     virtual void RequestConfirmation(const dbus::ObjectPath& device_path,
-                                     uint32 passkey,
+                                     uint32_t passkey,
                                      const ConfirmationCallback& callback) = 0;
 
     // This method will be called when the Bluetooth daemon requires
diff --git a/device/bluetooth/dbus/bluetooth_device_client.cc b/device/bluetooth/dbus/bluetooth_device_client.cc
index 7aaafa2..11626f5 100644
--- a/device/bluetooth/dbus/bluetooth_device_client.cc
+++ b/device/bluetooth/dbus/bluetooth_device_client.cc
@@ -6,6 +6,7 @@
 
 #include "base/bind.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/stl_util.h"
 #include "dbus/bus.h"
 #include "dbus/message.h"
@@ -319,9 +320,9 @@
   // Called when a response for the GetConnInfo method is received.
   void OnGetConnInfoSuccess(const ConnInfoCallback& callback,
                             dbus::Response* response) {
-    int16 rssi = kUnknownPower;
-    int16 transmit_power = kUnknownPower;
-    int16 max_transmit_power = kUnknownPower;
+    int16_t rssi = kUnknownPower;
+    int16_t transmit_power = kUnknownPower;
+    int16_t max_transmit_power = kUnknownPower;
 
     if (!response) {
       LOG(ERROR) << "GetConnInfo succeeded, but no response received.";
diff --git a/device/bluetooth/dbus/bluetooth_device_client.h b/device/bluetooth/dbus/bluetooth_device_client.h
index 33b3f5d..676b44a 100644
--- a/device/bluetooth/dbus/bluetooth_device_client.h
+++ b/device/bluetooth/dbus/bluetooth_device_client.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_DEVICE_CLIENT_H_
 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_DEVICE_CLIENT_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
@@ -37,13 +39,13 @@
     dbus::Property<std::string> icon;
 
     // The Bluetooth class of the device. Read-only.
-    dbus::Property<uint32> bluetooth_class;
+    dbus::Property<uint32_t> bluetooth_class;
 
     // The GAP external appearance of the device. Read-only.
-    dbus::Property<uint16> appearance;
+    dbus::Property<uint16_t> appearance;
 
     // Unique numeric identifier for the vendor of the device. Read-only.
-    dbus::Property<uint16> vendor;
+    dbus::Property<uint16_t> vendor;
 
     // List of 128-bit UUIDs that represent the available remote services.
     // Read-only.
@@ -51,7 +53,7 @@
 
     // Transmitted power level. This field is avaliable only for LE devices
     // that include this field in AD. Read-only.
-    dbus::Property<int16> tx_power;
+    dbus::Property<int16_t> tx_power;
 
     // Indicates that the device is currently paired. Read-only.
     dbus::Property<bool> paired;
@@ -83,7 +85,7 @@
 
     // Received signal strength indicator that is set when the device is
     // discovered during inquiry. Read-only.
-    dbus::Property<int16> rssi;
+    dbus::Property<int16_t> rssi;
 
     // List of GATT service object paths. Each referenced object exports the
     // org.bluez.GattService1 interface and represents a remote GATT service.
@@ -183,9 +185,9 @@
 
   // The callback invoked for a successful GetConnInfo API call with the
   // RSSI, TX power, and maximum TX power of the current connection.
-  typedef base::Callback<void(int16 rssi,
-                              int16 transmit_power,
-                              int16 max_transmit_power)> ConnInfoCallback;
+  typedef base::Callback<void(int16_t rssi,
+                              int16_t transmit_power,
+                              int16_t max_transmit_power)> ConnInfoCallback;
 
   // Returns the RSSI, TX power, and maximum TX power of a connection to the
   // device with object path |object_path|. If the device is not connected, then
diff --git a/device/bluetooth/dbus/bluetooth_gatt_characteristic_client.cc b/device/bluetooth/dbus/bluetooth_gatt_characteristic_client.cc
index d6229a3a..afc31ea 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_characteristic_client.cc
+++ b/device/bluetooth/dbus/bluetooth_gatt_characteristic_client.cc
@@ -4,7 +4,10 @@
 
 #include "device/bluetooth/dbus/bluetooth_gatt_characteristic_client.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "dbus/bus.h"
@@ -111,7 +114,7 @@
 
   // BluetoothGattCharacteristicClient override.
   void WriteValue(const dbus::ObjectPath& object_path,
-                  const std::vector<uint8>& value,
+                  const std::vector<uint8_t>& value,
                   const base::Closure& callback,
                   const ErrorCallback& error_callback) override {
     dbus::ObjectProxy* object_proxy =
@@ -246,13 +249,13 @@
     DCHECK(response);
     dbus::MessageReader reader(response);
 
-    const uint8* bytes = NULL;
+    const uint8_t* bytes = NULL;
     size_t length = 0;
 
     if (!reader.PopArrayOfBytes(&bytes, &length))
       VLOG(2) << "Error reading array of bytes in ValueCallback";
 
-    std::vector<uint8> value;
+    std::vector<uint8_t> value;
 
     if (bytes)
       value.assign(bytes, bytes + length);
diff --git a/device/bluetooth/dbus/bluetooth_gatt_characteristic_client.h b/device/bluetooth/dbus/bluetooth_gatt_characteristic_client.h
index 3c476eb..fe0a9f7 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_characteristic_client.h
+++ b/device/bluetooth/dbus/bluetooth_gatt_characteristic_client.h
@@ -5,11 +5,13 @@
 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_CHARACTERISTIC_CLIENT_H_
 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_CHARACTERISTIC_CLIENT_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "dbus/object_path.h"
 #include "dbus/property.h"
 #include "device/bluetooth/bluetooth_export.h"
@@ -79,7 +81,7 @@
   // Callbacks used to report the result of asynchronous methods.
   typedef base::Callback<void(const std::string& error_name,
                               const std::string& error_message)> ErrorCallback;
-  typedef base::Callback<void(const std::vector<uint8>& value)> ValueCallback;
+  typedef base::Callback<void(const std::vector<uint8_t>& value)> ValueCallback;
 
   ~BluetoothGattCharacteristicClient() override;
 
@@ -107,7 +109,7 @@
   // |object_path| with value |value|. Invokes |callback| on success and
   // |error_callback| on failure.
   virtual void WriteValue(const dbus::ObjectPath& object_path,
-                          const std::vector<uint8>& value,
+                          const std::vector<uint8_t>& value,
                           const base::Closure& callback,
                           const ErrorCallback& error_callback) = 0;
 
diff --git a/device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider.cc b/device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider.cc
index 4decdf0..6132fbf 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider.cc
+++ b/device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider.cc
@@ -4,8 +4,11 @@
 
 #include "device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/strings/string_util.h"
 #include "base/threading/platform_thread.h"
@@ -84,7 +87,7 @@
   }
 
   // BluetoothGattCharacteristicServiceProvider override.
-  void SendValueChanged(const std::vector<uint8>& value) override {
+  void SendValueChanged(const std::vector<uint8_t>& value) override {
     VLOG(2) << "Emitting a PropertiesChanged signal for characteristic value.";
     dbus::Signal signal(dbus::kDBusPropertiesInterface,
                         dbus::kDBusPropertiesChangedSignal);
@@ -244,7 +247,7 @@
     }
 
     // Obtain the value.
-    const uint8* bytes = NULL;
+    const uint8_t* bytes = NULL;
     size_t length = 0;
     if (!variant_reader.PopArrayOfBytes(&bytes, &length)) {
       scoped_ptr<dbus::ErrorResponse> error_response =
@@ -256,7 +259,7 @@
     }
 
     // Pass the set request onto the delegate.
-    std::vector<uint8> value(bytes, bytes + length);
+    std::vector<uint8_t> value(bytes, bytes + length);
     DCHECK(delegate_);
     delegate_->SetCharacteristicValue(
         value,
@@ -323,7 +326,7 @@
   // characteristic value.
   void OnGetAll(dbus::MethodCall* method_call,
                 dbus::ExportedObject::ResponseSender response_sender,
-                const std::vector<uint8>& value) {
+                const std::vector<uint8_t>& value) {
     VLOG(2) << "Characteristic value obtained from delegate. Responding to "
             << "GetAll.";
 
@@ -367,7 +370,7 @@
   // characteristic value.
   void OnGet(dbus::MethodCall* method_call,
              dbus::ExportedObject::ResponseSender response_sender,
-             const std::vector<uint8>& value) {
+             const std::vector<uint8_t>& value) {
     VLOG(2) << "Returning characteristic value obtained from delegate.";
     scoped_ptr<dbus::Response> response =
         dbus::Response::FromMethodCall(method_call);
diff --git a/device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider.h b/device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider.h
index ad5d999f..2d372390 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider.h
+++ b/device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider.h
@@ -5,11 +5,13 @@
 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_CHARACTERISTIC_SERVICE_PROVIDER_H_
 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_CHARACTERISTIC_SERVICE_PROVIDER_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "dbus/bus.h"
 #include "dbus/object_path.h"
 #include "device/bluetooth/bluetooth_export.h"
@@ -39,7 +41,7 @@
 
     // ValueCallback is used for methods that require a characteristic value
     // to be returned.
-    typedef base::Callback<void(const std::vector<uint8>&)> ValueCallback;
+    typedef base::Callback<void(const std::vector<uint8_t>&)> ValueCallback;
 
     // ErrorCallback is used by methods to report failure.
     typedef base::Closure ErrorCallback;
@@ -67,7 +69,7 @@
     // occur based on the set value and potentially send a property changed
     // signal to notify the Bluetooth daemon that the value has changed.
     virtual void SetCharacteristicValue(
-        const std::vector<uint8>& value,
+        const std::vector<uint8_t>& value,
         const base::Closure& callback,
         const ErrorCallback& error_callback) = 0;
   };
@@ -76,7 +78,7 @@
 
   // Send a PropertyChanged signal to notify the Bluetooth daemon that the value
   // of the "Value" property has changed to |value|.
-  virtual void SendValueChanged(const std::vector<uint8>& value) = 0;
+  virtual void SendValueChanged(const std::vector<uint8_t>& value) = 0;
 
   // Creates the instance, where |bus| is the D-Bus bus connection to export
   // the object onto, |uuid| is the 128-bit GATT characteristic UUID,
diff --git a/device/bluetooth/dbus/bluetooth_gatt_descriptor_client.cc b/device/bluetooth/dbus/bluetooth_gatt_descriptor_client.cc
index d3f9e5f..ddc314c 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_descriptor_client.cc
+++ b/device/bluetooth/dbus/bluetooth_gatt_descriptor_client.cc
@@ -4,7 +4,10 @@
 
 #include "device/bluetooth/dbus/bluetooth_gatt_descriptor_client.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "dbus/bus.h"
@@ -106,7 +109,7 @@
 
   // BluetoothGattDescriptorClientImpl override.
   void WriteValue(const dbus::ObjectPath& object_path,
-                  const std::vector<uint8>& value,
+                  const std::vector<uint8_t>& value,
                   const base::Closure& callback,
                   const ErrorCallback& error_callback) override {
     dbus::ObjectProxy* object_proxy =
@@ -194,13 +197,13 @@
     DCHECK(response);
     dbus::MessageReader reader(response);
 
-    const uint8* bytes = NULL;
+    const uint8_t* bytes = NULL;
     size_t length = 0;
 
     if (!reader.PopArrayOfBytes(&bytes, &length))
       VLOG(2) << "Error reading array of bytes in ValueCallback";
 
-    std::vector<uint8> value;
+    std::vector<uint8_t> value;
 
     if (bytes)
       value.assign(bytes, bytes + length);
diff --git a/device/bluetooth/dbus/bluetooth_gatt_descriptor_client.h b/device/bluetooth/dbus/bluetooth_gatt_descriptor_client.h
index 364331e..2ba7f16 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_descriptor_client.h
+++ b/device/bluetooth/dbus/bluetooth_gatt_descriptor_client.h
@@ -5,11 +5,13 @@
 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_DESCRIPTOR_CLIENT_H_
 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_DESCRIPTOR_CLIENT_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "dbus/object_path.h"
 #include "dbus/property.h"
 #include "device/bluetooth/bluetooth_export.h"
@@ -65,7 +67,7 @@
   // Callbacks used to report the result of asynchronous methods.
   typedef base::Callback<void(const std::string& error_name,
                               const std::string& error_message)> ErrorCallback;
-  typedef base::Callback<void(const std::vector<uint8>& value)> ValueCallback;
+  typedef base::Callback<void(const std::vector<uint8_t>& value)> ValueCallback;
 
   ~BluetoothGattDescriptorClient() override;
 
@@ -93,7 +95,7 @@
   // |object_path| with value |value|. Invokes |callback| on success and
   // |error_callback| on failure.
   virtual void WriteValue(const dbus::ObjectPath& object_path,
-                          const std::vector<uint8>& value,
+                          const std::vector<uint8_t>& value,
                           const base::Closure& callback,
                           const ErrorCallback& error_callback) = 0;
 
diff --git a/device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider.cc b/device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider.cc
index e4aa2454..36ae7ef 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider.cc
+++ b/device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider.cc
@@ -4,8 +4,11 @@
 
 #include "device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/strings/string_util.h"
 #include "base/threading/platform_thread.h"
@@ -83,7 +86,7 @@
   }
 
   // BluetoothGattDescriptorServiceProvider override.
-  void SendValueChanged(const std::vector<uint8>& value) override {
+  void SendValueChanged(const std::vector<uint8_t>& value) override {
     VLOG(2) << "Emitting a PropertiesChanged signal for descriptor value.";
     dbus::Signal signal(dbus::kDBusPropertiesInterface,
                         dbus::kDBusPropertiesChangedSignal);
@@ -242,7 +245,7 @@
     }
 
     // Obtain the value.
-    const uint8* bytes = NULL;
+    const uint8_t* bytes = NULL;
     size_t length = 0;
     if (!variant_reader.PopArrayOfBytes(&bytes, &length)) {
       scoped_ptr<dbus::ErrorResponse> error_response =
@@ -254,7 +257,7 @@
     }
 
     // Pass the set request onto the delegate.
-    std::vector<uint8> value(bytes, bytes + length);
+    std::vector<uint8_t> value(bytes, bytes + length);
     DCHECK(delegate_);
     delegate_->SetDescriptorValue(
         value, base::Bind(&BluetoothGattDescriptorServiceProviderImpl::OnSet,
@@ -320,7 +323,7 @@
   // descriptor value.
   void OnGetAll(dbus::MethodCall* method_call,
                 dbus::ExportedObject::ResponseSender response_sender,
-                const std::vector<uint8>& value) {
+                const std::vector<uint8_t>& value) {
     VLOG(2) << "Descriptor value obtained from delegate. Responding to "
             << "GetAll.";
 
@@ -362,7 +365,7 @@
   // descriptor value.
   void OnGet(dbus::MethodCall* method_call,
              dbus::ExportedObject::ResponseSender response_sender,
-             const std::vector<uint8>& value) {
+             const std::vector<uint8_t>& value) {
     VLOG(2) << "Returning descriptor value obtained from delegate.";
     scoped_ptr<dbus::Response> response =
         dbus::Response::FromMethodCall(method_call);
diff --git a/device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider.h b/device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider.h
index e4925fff..b9e4959 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider.h
+++ b/device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider.h
@@ -5,11 +5,13 @@
 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_DESCRIPTOR_SERVICE_PROVIDER_H_
 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_DESCRIPTOR_SERVICE_PROVIDER_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "dbus/bus.h"
 #include "dbus/object_path.h"
 #include "device/bluetooth/bluetooth_export.h"
@@ -39,7 +41,7 @@
 
     // ValueCallback is used for methods that require a descriptor value
     // to be returned.
-    typedef base::Callback<void(const std::vector<uint8>&)> ValueCallback;
+    typedef base::Callback<void(const std::vector<uint8_t>&)> ValueCallback;
 
     // ErrorCallback is used by methods to report failure.
     typedef base::Closure ErrorCallback;
@@ -65,7 +67,7 @@
     // The delegate should use this method to perform any side-effects that may
     // occur based on the set value and potentially send a property changed
     // signal to notify the Bluetooth daemon that the value has changed.
-    virtual void SetDescriptorValue(const std::vector<uint8>& value,
+    virtual void SetDescriptorValue(const std::vector<uint8_t>& value,
                                     const base::Closure& callback,
                                     const ErrorCallback& error_callback) = 0;
   };
@@ -74,7 +76,7 @@
 
   // Send a PropertyChanged signal to notify the Bluetooth daemon that the value
   // of the "Value" property has changed to |value|.
-  virtual void SendValueChanged(const std::vector<uint8>& value) = 0;
+  virtual void SendValueChanged(const std::vector<uint8_t>& value) = 0;
 
   // Creates the instance, where |bus| is the D-Bus bus connection to export
   // the object onto, |uuid| is the 128-bit GATT descriptor UUID, |permissions|
diff --git a/device/bluetooth/dbus/bluetooth_gatt_manager_client.cc b/device/bluetooth/dbus/bluetooth_gatt_manager_client.cc
index 94f79f5..2f88910 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_manager_client.cc
+++ b/device/bluetooth/dbus/bluetooth_gatt_manager_client.cc
@@ -5,6 +5,7 @@
 #include "device/bluetooth/dbus/bluetooth_gatt_manager_client.h"
 
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "dbus/bus.h"
 #include "dbus/message.h"
diff --git a/device/bluetooth/dbus/bluetooth_gatt_service_client.cc b/device/bluetooth/dbus/bluetooth_gatt_service_client.cc
index b13e5fb..469ef92 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_service_client.cc
+++ b/device/bluetooth/dbus/bluetooth_gatt_service_client.cc
@@ -5,6 +5,7 @@
 #include "device/bluetooth/dbus/bluetooth_gatt_service_client.h"
 
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "dbus/bus.h"
diff --git a/device/bluetooth/dbus/bluetooth_gatt_service_service_provider.cc b/device/bluetooth/dbus/bluetooth_gatt_service_service_provider.cc
index 06b6827f..c0e5ddb 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_service_service_provider.cc
+++ b/device/bluetooth/dbus/bluetooth_gatt_service_service_provider.cc
@@ -6,6 +6,7 @@
 
 #include "base/bind.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
 #include "base/threading/platform_thread.h"
diff --git a/device/bluetooth/dbus/bluetooth_input_client.cc b/device/bluetooth/dbus/bluetooth_input_client.cc
index 42542a8..a116e7b 100644
--- a/device/bluetooth/dbus/bluetooth_input_client.cc
+++ b/device/bluetooth/dbus/bluetooth_input_client.cc
@@ -7,6 +7,7 @@
 #include <map>
 
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/stl_util.h"
 #include "dbus/bus.h"
 #include "dbus/message.h"
diff --git a/device/bluetooth/dbus/bluetooth_le_advertisement_service_provider.cc b/device/bluetooth/dbus/bluetooth_le_advertisement_service_provider.cc
index ce50bcac..e5c5e358 100644
--- a/device/bluetooth/dbus/bluetooth_le_advertisement_service_provider.cc
+++ b/device/bluetooth/dbus/bluetooth_le_advertisement_service_provider.cc
@@ -6,6 +6,7 @@
 
 #include "base/bind.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/threading/platform_thread.h"
 #include "dbus/exported_object.h"
@@ -243,7 +244,7 @@
   // descriptor value.
   void OnGet(dbus::MethodCall* method_call,
              dbus::ExportedObject::ResponseSender response_sender,
-             const std::vector<uint8>& value) {
+             const std::vector<uint8_t>& value) {
     VLOG(2) << "Returning descriptor value obtained from delegate.";
     scoped_ptr<dbus::Response> response =
         dbus::Response::FromMethodCall(method_call);
diff --git a/device/bluetooth/dbus/bluetooth_le_advertisement_service_provider.h b/device/bluetooth/dbus/bluetooth_le_advertisement_service_provider.h
index 8f4692f8..3244f0b 100644
--- a/device/bluetooth/dbus/bluetooth_le_advertisement_service_provider.h
+++ b/device/bluetooth/dbus/bluetooth_le_advertisement_service_provider.h
@@ -11,8 +11,8 @@
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "dbus/bus.h"
 #include "dbus/file_descriptor.h"
diff --git a/device/bluetooth/dbus/bluetooth_le_advertising_manager_client.cc b/device/bluetooth/dbus/bluetooth_le_advertising_manager_client.cc
index 3c934e6..97bee7a 100644
--- a/device/bluetooth/dbus/bluetooth_le_advertising_manager_client.cc
+++ b/device/bluetooth/dbus/bluetooth_le_advertising_manager_client.cc
@@ -6,6 +6,7 @@
 
 #include "base/bind.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/observer_list.h"
 #include "dbus/bus.h"
 #include "dbus/message.h"
diff --git a/device/bluetooth/dbus/bluetooth_media_client.cc b/device/bluetooth/dbus/bluetooth_media_client.cc
index 0927d45..3815bc8 100644
--- a/device/bluetooth/dbus/bluetooth_media_client.cc
+++ b/device/bluetooth/dbus/bluetooth_media_client.cc
@@ -6,6 +6,7 @@
 
 #include "base/bind.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/observer_list.h"
 #include "dbus/bus.h"
diff --git a/device/bluetooth/dbus/bluetooth_media_client.h b/device/bluetooth/dbus/bluetooth_media_client.h
index 88597c5..7e36dca 100644
--- a/device/bluetooth/dbus/bluetooth_media_client.h
+++ b/device/bluetooth/dbus/bluetooth_media_client.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_MEDIA_CLIENT_H_
 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_MEDIA_CLIENT_H_
 
+#include <stdint.h>
+
 #include <memory>
 #include <string>
 #include <vector>
diff --git a/device/bluetooth/dbus/bluetooth_media_endpoint_service_provider.cc b/device/bluetooth/dbus/bluetooth_media_endpoint_service_provider.cc
index 864a04d..9c7a4081 100644
--- a/device/bluetooth/dbus/bluetooth_media_endpoint_service_provider.cc
+++ b/device/bluetooth/dbus/bluetooth_media_endpoint_service_provider.cc
@@ -4,8 +4,11 @@
 
 #include "device/bluetooth/dbus/bluetooth_media_endpoint_service_provider.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/threading/platform_thread.h"
diff --git a/device/bluetooth/dbus/bluetooth_media_endpoint_service_provider.h b/device/bluetooth/dbus/bluetooth_media_endpoint_service_provider.h
index 8a806cb..7bd4318 100644
--- a/device/bluetooth/dbus/bluetooth_media_endpoint_service_provider.h
+++ b/device/bluetooth/dbus/bluetooth_media_endpoint_service_provider.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_MEDIA_ENDPOINT_SERVICE_PROVIDER_H_
 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_MEDIA_ENDPOINT_SERVICE_PROVIDER_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
diff --git a/device/bluetooth/dbus/bluetooth_media_transport_client.cc b/device/bluetooth/dbus/bluetooth_media_transport_client.cc
index 7fc47d7..a690151 100644
--- a/device/bluetooth/dbus/bluetooth_media_transport_client.cc
+++ b/device/bluetooth/dbus/bluetooth_media_transport_client.cc
@@ -6,6 +6,7 @@
 
 #include "base/bind.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/observer_list.h"
 #include "dbus/bus.h"
diff --git a/device/bluetooth/dbus/bluetooth_media_transport_client.h b/device/bluetooth/dbus/bluetooth_media_transport_client.h
index 09c6ea0..728cfb5 100644
--- a/device/bluetooth/dbus/bluetooth_media_transport_client.h
+++ b/device/bluetooth/dbus/bluetooth_media_transport_client.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_MEDIA_TRANSPORT_CLIENT_H_
 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_MEDIA_TRANSPORT_CLIENT_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
diff --git a/device/bluetooth/dbus/bluetooth_profile_manager_client.cc b/device/bluetooth/dbus/bluetooth_profile_manager_client.cc
index 742988a..792ac88 100644
--- a/device/bluetooth/dbus/bluetooth_profile_manager_client.cc
+++ b/device/bluetooth/dbus/bluetooth_profile_manager_client.cc
@@ -6,6 +6,7 @@
 
 #include "base/bind.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "dbus/bus.h"
 #include "dbus/message.h"
 #include "dbus/object_proxy.h"
diff --git a/device/bluetooth/dbus/bluetooth_profile_manager_client.h b/device/bluetooth/dbus/bluetooth_profile_manager_client.h
index 4b6bd96..554b7d7 100644
--- a/device/bluetooth/dbus/bluetooth_profile_manager_client.h
+++ b/device/bluetooth/dbus/bluetooth_profile_manager_client.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_PROFILE_MANAGER_CLIENT_H_
 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_PROFILE_MANAGER_CLIENT_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
@@ -43,10 +45,10 @@
     enum ProfileRole role;
 
     // RFCOMM channel number.
-    scoped_ptr<uint16> channel;
+    scoped_ptr<uint16_t> channel;
 
     // PSM number.
-    scoped_ptr<uint16> psm;
+    scoped_ptr<uint16_t> psm;
 
     // Pairing is required before connections will be established.
     scoped_ptr<bool> require_authentication;
@@ -61,10 +63,10 @@
     scoped_ptr<std::string> service_record;
 
     // Profile version.
-    scoped_ptr<uint16> version;
+    scoped_ptr<uint16_t> version;
 
     // Profile features.
-    scoped_ptr<uint16> features;
+    scoped_ptr<uint16_t> features;
   };
 
   ~BluetoothProfileManagerClient() override;
diff --git a/device/bluetooth/dbus/bluetooth_profile_service_provider.cc b/device/bluetooth/dbus/bluetooth_profile_service_provider.cc
index a2a23bb8..1555d51 100644
--- a/device/bluetooth/dbus/bluetooth_profile_service_provider.cc
+++ b/device/bluetooth/dbus/bluetooth_profile_service_provider.cc
@@ -6,6 +6,7 @@
 
 #include "base/bind.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/threading/platform_thread.h"
 #include "dbus/exported_object.h"
diff --git a/device/bluetooth/dbus/bluetooth_profile_service_provider.h b/device/bluetooth/dbus/bluetooth_profile_service_provider.h
index 109bcaf..860ec69 100644
--- a/device/bluetooth/dbus/bluetooth_profile_service_provider.h
+++ b/device/bluetooth/dbus/bluetooth_profile_service_provider.h
@@ -5,10 +5,12 @@
 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_PROFILE_SERVICE_PROVIDER_H_
 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_PROFILE_SERVICE_PROVIDER_H_
 
+#include <stdint.h>
+
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "dbus/bus.h"
 #include "dbus/file_descriptor.h"
@@ -48,10 +50,10 @@
       ~Options() {}
 
       // Profile version.
-      uint16 version;
+      uint16_t version;
 
       // Profile features.
-      uint16 features;
+      uint16_t features;
     };
 
     // The ConfirmationCallback is used for methods which require confirmation;
diff --git a/device/bluetooth/dbus/bluez_dbus_client.h b/device/bluetooth/dbus/bluez_dbus_client.h
index 3dd0985..9d45520 100644
--- a/device/bluetooth/dbus/bluez_dbus_client.h
+++ b/device/bluetooth/dbus/bluez_dbus_client.h
@@ -5,7 +5,7 @@
 #ifndef DEVICE_BLUETOOTH_DBUS_BLUEZ_DBUS_CLIENT_H_
 #define DEVICE_BLUETOOTH_DBUS_BLUEZ_DBUS_CLIENT_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 
 namespace dbus {
 class Bus;
diff --git a/device/bluetooth/dbus/fake_bluetooth_agent_service_provider.cc b/device/bluetooth/dbus/fake_bluetooth_agent_service_provider.cc
index 777deb0e0..4d96615 100644
--- a/device/bluetooth/dbus/fake_bluetooth_agent_service_provider.cc
+++ b/device/bluetooth/dbus/fake_bluetooth_agent_service_provider.cc
@@ -61,8 +61,8 @@
 
 void FakeBluetoothAgentServiceProvider::DisplayPasskey(
     const dbus::ObjectPath& device_path,
-    uint32 passkey,
-    int16 entered) {
+    uint32_t passkey,
+    int16_t entered) {
   VLOG(1) << object_path_.value() << ": DisplayPasskey " << passkey << " ("
           << entered << " entered) for " << device_path.value();
   delegate_->DisplayPasskey(device_path, passkey, entered);
@@ -70,7 +70,7 @@
 
 void FakeBluetoothAgentServiceProvider::RequestConfirmation(
     const dbus::ObjectPath& device_path,
-    uint32 passkey,
+    uint32_t passkey,
     const Delegate::ConfirmationCallback& callback) {
   VLOG(1) << object_path_.value() << ": RequestConfirmation " << passkey
           << " for " << device_path.value();
diff --git a/device/bluetooth/dbus/fake_bluetooth_agent_service_provider.h b/device/bluetooth/dbus/fake_bluetooth_agent_service_provider.h
index e3c8cd4..b9048f8 100644
--- a/device/bluetooth/dbus/fake_bluetooth_agent_service_provider.h
+++ b/device/bluetooth/dbus/fake_bluetooth_agent_service_provider.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_AGENT_SERVICE_PROVIDER_H_
 #define DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_AGENT_SERVICE_PROVIDER_H_
 
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/callback.h"
 #include "base/observer_list.h"
@@ -37,11 +39,11 @@
   virtual void RequestPasskey(const dbus::ObjectPath& device_path,
                               const Delegate::PasskeyCallback& callback);
   virtual void DisplayPasskey(const dbus::ObjectPath& device_path,
-                              uint32 passkey,
-                              int16 entered);
+                              uint32_t passkey,
+                              int16_t entered);
   virtual void RequestConfirmation(
       const dbus::ObjectPath& device_path,
-      uint32 passkey,
+      uint32_t passkey,
       const Delegate::ConfirmationCallback& callback);
   virtual void RequestAuthorization(
       const dbus::ObjectPath& device_path,
diff --git a/device/bluetooth/dbus/fake_bluetooth_device_client.cc b/device/bluetooth/dbus/fake_bluetooth_device_client.cc
index 18eabff..efcba2c 100644
--- a/device/bluetooth/dbus/fake_bluetooth_device_client.cc
+++ b/device/bluetooth/dbus/fake_bluetooth_device_client.cc
@@ -5,6 +5,7 @@
 #include "device/bluetooth/dbus/fake_bluetooth_device_client.h"
 
 #include <fcntl.h>
+#include <stddef.h>
 #include <sys/socket.h>
 #include <sys/types.h>
 #include <unistd.h>
@@ -113,21 +114,21 @@
 const char FakeBluetoothDeviceClient::kPairedDeviceAddress[] =
     "00:11:22:33:44:55";
 const char FakeBluetoothDeviceClient::kPairedDeviceName[] = "Fake Device";
-const uint32 FakeBluetoothDeviceClient::kPairedDeviceClass = 0x000104;
+const uint32_t FakeBluetoothDeviceClient::kPairedDeviceClass = 0x000104;
 
 const char FakeBluetoothDeviceClient::kLegacyAutopairPath[] = "/fake/hci0/dev1";
 const char FakeBluetoothDeviceClient::kLegacyAutopairAddress[] =
     "28:CF:DA:00:00:00";
 const char FakeBluetoothDeviceClient::kLegacyAutopairName[] =
     "Bluetooth 2.0 Mouse";
-const uint32 FakeBluetoothDeviceClient::kLegacyAutopairClass = 0x002580;
+const uint32_t FakeBluetoothDeviceClient::kLegacyAutopairClass = 0x002580;
 
 const char FakeBluetoothDeviceClient::kDisplayPinCodePath[] = "/fake/hci0/dev2";
 const char FakeBluetoothDeviceClient::kDisplayPinCodeAddress[] =
     "28:37:37:00:00:00";
 const char FakeBluetoothDeviceClient::kDisplayPinCodeName[] =
     "Bluetooth 2.0 Keyboard";
-const uint32 FakeBluetoothDeviceClient::kDisplayPinCodeClass = 0x002540;
+const uint32_t FakeBluetoothDeviceClient::kDisplayPinCodeClass = 0x002540;
 
 const char FakeBluetoothDeviceClient::kVanishingDevicePath[] =
     "/fake/hci0/dev3";
@@ -135,7 +136,7 @@
     "01:02:03:04:05:06";
 const char FakeBluetoothDeviceClient::kVanishingDeviceName[] =
     "Vanishing Device";
-const uint32 FakeBluetoothDeviceClient::kVanishingDeviceClass = 0x000104;
+const uint32_t FakeBluetoothDeviceClient::kVanishingDeviceClass = 0x000104;
 
 const char FakeBluetoothDeviceClient::kConnectUnpairablePath[] =
     "/fake/hci0/dev4";
@@ -143,32 +144,32 @@
     "7C:ED:8D:00:00:00";
 const char FakeBluetoothDeviceClient::kConnectUnpairableName[] =
     "Unpairable Device";
-const uint32 FakeBluetoothDeviceClient::kConnectUnpairableClass = 0x002580;
+const uint32_t FakeBluetoothDeviceClient::kConnectUnpairableClass = 0x002580;
 
 const char FakeBluetoothDeviceClient::kDisplayPasskeyPath[] = "/fake/hci0/dev5";
 const char FakeBluetoothDeviceClient::kDisplayPasskeyAddress[] =
     "00:0F:F6:00:00:00";
 const char FakeBluetoothDeviceClient::kDisplayPasskeyName[] =
     "Bluetooth 2.1+ Keyboard";
-const uint32 FakeBluetoothDeviceClient::kDisplayPasskeyClass = 0x002540;
+const uint32_t FakeBluetoothDeviceClient::kDisplayPasskeyClass = 0x002540;
 
 const char FakeBluetoothDeviceClient::kRequestPinCodePath[] = "/fake/hci0/dev6";
 const char FakeBluetoothDeviceClient::kRequestPinCodeAddress[] =
     "00:24:BE:00:00:00";
 const char FakeBluetoothDeviceClient::kRequestPinCodeName[] = "PIN Device";
-const uint32 FakeBluetoothDeviceClient::kRequestPinCodeClass = 0x240408;
+const uint32_t FakeBluetoothDeviceClient::kRequestPinCodeClass = 0x240408;
 
 const char FakeBluetoothDeviceClient::kConfirmPasskeyPath[] = "/fake/hci0/dev7";
 const char FakeBluetoothDeviceClient::kConfirmPasskeyAddress[] =
     "20:7D:74:00:00:00";
 const char FakeBluetoothDeviceClient::kConfirmPasskeyName[] = "Phone";
-const uint32 FakeBluetoothDeviceClient::kConfirmPasskeyClass = 0x7a020c;
+const uint32_t FakeBluetoothDeviceClient::kConfirmPasskeyClass = 0x7a020c;
 
 const char FakeBluetoothDeviceClient::kRequestPasskeyPath[] = "/fake/hci0/dev8";
 const char FakeBluetoothDeviceClient::kRequestPasskeyAddress[] =
     "20:7D:74:00:00:01";
 const char FakeBluetoothDeviceClient::kRequestPasskeyName[] = "Passkey Device";
-const uint32 FakeBluetoothDeviceClient::kRequestPasskeyClass = 0x7a020c;
+const uint32_t FakeBluetoothDeviceClient::kRequestPasskeyClass = 0x7a020c;
 
 const char FakeBluetoothDeviceClient::kUnconnectableDevicePath[] =
     "/fake/hci0/dev9";
@@ -176,7 +177,7 @@
     "20:7D:74:00:00:02";
 const char FakeBluetoothDeviceClient::kUnconnectableDeviceName[] =
     "Unconnectable Device";
-const uint32 FakeBluetoothDeviceClient::kUnconnectableDeviceClass = 0x7a020c;
+const uint32_t FakeBluetoothDeviceClient::kUnconnectableDeviceClass = 0x7a020c;
 
 const char FakeBluetoothDeviceClient::kUnpairableDevicePath[] =
     "/fake/hci0/devA";
@@ -184,18 +185,18 @@
     "20:7D:74:00:00:03";
 const char FakeBluetoothDeviceClient::kUnpairableDeviceName[] =
     "Unpairable Device";
-const uint32 FakeBluetoothDeviceClient::kUnpairableDeviceClass = 0x002540;
+const uint32_t FakeBluetoothDeviceClient::kUnpairableDeviceClass = 0x002540;
 
 const char FakeBluetoothDeviceClient::kJustWorksPath[] = "/fake/hci0/devB";
 const char FakeBluetoothDeviceClient::kJustWorksAddress[] = "00:0C:8A:00:00:00";
 const char FakeBluetoothDeviceClient::kJustWorksName[] = "Just-Works Device";
-const uint32 FakeBluetoothDeviceClient::kJustWorksClass = 0x240428;
+const uint32_t FakeBluetoothDeviceClient::kJustWorksClass = 0x240428;
 
 const char FakeBluetoothDeviceClient::kLowEnergyPath[] = "/fake/hci0/devC";
 const char FakeBluetoothDeviceClient::kLowEnergyAddress[] = "00:1A:11:00:15:30";
 const char FakeBluetoothDeviceClient::kLowEnergyName[] =
     "Bluetooth 4.0 Heart Rate Monitor";
-const uint32 FakeBluetoothDeviceClient::kLowEnergyClass =
+const uint32_t FakeBluetoothDeviceClient::kLowEnergyClass =
     0x000918;  // Major class "Health", Minor class "Heart/Pulse Rate Monitor."
 
 const char FakeBluetoothDeviceClient::kPairedUnconnectableDevicePath[] =
@@ -204,7 +205,7 @@
     "20:7D:74:00:00:04";
 const char FakeBluetoothDeviceClient::kPairedUnconnectableDeviceName[] =
     "Paired Unconnectable Device";
-const uint32 FakeBluetoothDeviceClient::kPairedUnconnectableDeviceClass =
+const uint32_t FakeBluetoothDeviceClient::kPairedUnconnectableDeviceClass =
     0x000104;
 
 const char FakeBluetoothDeviceClient::kConnectedTrustedNotPairedDevicePath[] =
@@ -214,8 +215,8 @@
         "11:22:33:44:55:66";
 const char FakeBluetoothDeviceClient::kConnectedTrustedNotPairedDeviceName[] =
     "Connected Pairable Device";
-const uint32 FakeBluetoothDeviceClient::kConnectedTrustedNotPairedDeviceClass =
-    0x7a020c;
+const uint32_t
+    FakeBluetoothDeviceClient::kConnectedTrustedNotPairedDeviceClass = 0x7a020c;
 
 FakeBluetoothDeviceClient::Properties::Properties(
     const PropertyChangedCallback& callback)
@@ -1442,7 +1443,7 @@
 
 void FakeBluetoothDeviceClient::UpdateDeviceRSSI(
     const dbus::ObjectPath& object_path,
-    int16 rssi) {
+    int16_t rssi) {
   PropertiesMap::const_iterator iter = properties_map_.find(object_path);
   if (iter == properties_map_.end()) {
     VLOG(2) << "Fake device does not exist: " << object_path.value();
@@ -1454,9 +1455,9 @@
 }
 
 void FakeBluetoothDeviceClient::UpdateConnectionInfo(
-    uint16 connection_rssi,
-    uint16 transmit_power,
-    uint16 max_transmit_power) {
+    uint16_t connection_rssi,
+    uint16_t transmit_power,
+    uint16_t max_transmit_power) {
   connection_rssi_ = connection_rssi;
   transmit_power_ = transmit_power;
   max_transmit_power_ = max_transmit_power;
@@ -1518,7 +1519,7 @@
     const base::Closure& callback,
     const ErrorCallback& error_callback,
     BluetoothAgentServiceProvider::Delegate::Status status,
-    uint32 passkey) {
+    uint32_t passkey) {
   VLOG(1) << "PasskeyCallback: " << object_path.value();
 
   if (status == BluetoothAgentServiceProvider::Delegate::SUCCESS) {
@@ -1527,7 +1528,7 @@
     bool success = true;
 
     if (iter != pairing_options_map_.end()) {
-      success = static_cast<uint32>(
+      success = static_cast<uint32_t>(
                     std::stoi(iter->second->pairing_auth_token)) == passkey;
     }
 
@@ -1596,7 +1597,7 @@
 }
 
 void FakeBluetoothDeviceClient::SimulateKeypress(
-    uint16 entered,
+    uint16_t entered,
     const dbus::ObjectPath& object_path,
     const base::Closure& callback,
     const ErrorCallback& error_callback) {
diff --git a/device/bluetooth/dbus/fake_bluetooth_device_client.h b/device/bluetooth/dbus/fake_bluetooth_device_client.h
index cdf678b..1bf5e4d 100644
--- a/device/bluetooth/dbus/fake_bluetooth_device_client.h
+++ b/device/bluetooth/dbus/fake_bluetooth_device_client.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_
 #define DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_
 
+#include <stdint.h>
+
 #include <map>
 #include <vector>
 
@@ -140,9 +142,9 @@
 
   // Updates the connection properties of the fake device that will be returned
   // by GetConnInfo.
-  void UpdateConnectionInfo(uint16 connection_rssi,
-                            uint16 transmit_power,
-                            uint16 max_transmit_power);
+  void UpdateConnectionInfo(uint16_t connection_rssi,
+                            uint16_t transmit_power,
+                            uint16_t max_transmit_power);
 
   void set_delay_start_discovery(bool value) { delay_start_discovery_ = value; }
 
@@ -163,77 +165,77 @@
   static const char kPairedDevicePath[];
   static const char kPairedDeviceName[];
   static const char kPairedDeviceAddress[];
-  static const uint32 kPairedDeviceClass;
+  static const uint32_t kPairedDeviceClass;
 
   static const char kLegacyAutopairPath[];
   static const char kLegacyAutopairName[];
   static const char kLegacyAutopairAddress[];
-  static const uint32 kLegacyAutopairClass;
+  static const uint32_t kLegacyAutopairClass;
 
   static const char kDisplayPinCodePath[];
   static const char kDisplayPinCodeName[];
   static const char kDisplayPinCodeAddress[];
-  static const uint32 kDisplayPinCodeClass;
+  static const uint32_t kDisplayPinCodeClass;
 
   static const char kVanishingDevicePath[];
   static const char kVanishingDeviceName[];
   static const char kVanishingDeviceAddress[];
-  static const uint32 kVanishingDeviceClass;
+  static const uint32_t kVanishingDeviceClass;
 
   static const char kConnectUnpairablePath[];
   static const char kConnectUnpairableName[];
   static const char kConnectUnpairableAddress[];
-  static const uint32 kConnectUnpairableClass;
+  static const uint32_t kConnectUnpairableClass;
 
   static const char kDisplayPasskeyPath[];
   static const char kDisplayPasskeyName[];
   static const char kDisplayPasskeyAddress[];
-  static const uint32 kDisplayPasskeyClass;
+  static const uint32_t kDisplayPasskeyClass;
 
   static const char kRequestPinCodePath[];
   static const char kRequestPinCodeName[];
   static const char kRequestPinCodeAddress[];
-  static const uint32 kRequestPinCodeClass;
+  static const uint32_t kRequestPinCodeClass;
 
   static const char kConfirmPasskeyPath[];
   static const char kConfirmPasskeyName[];
   static const char kConfirmPasskeyAddress[];
-  static const uint32 kConfirmPasskeyClass;
+  static const uint32_t kConfirmPasskeyClass;
 
   static const char kRequestPasskeyPath[];
   static const char kRequestPasskeyName[];
   static const char kRequestPasskeyAddress[];
-  static const uint32 kRequestPasskeyClass;
+  static const uint32_t kRequestPasskeyClass;
 
   static const char kUnconnectableDevicePath[];
   static const char kUnconnectableDeviceName[];
   static const char kUnconnectableDeviceAddress[];
-  static const uint32 kUnconnectableDeviceClass;
+  static const uint32_t kUnconnectableDeviceClass;
 
   static const char kUnpairableDevicePath[];
   static const char kUnpairableDeviceName[];
   static const char kUnpairableDeviceAddress[];
-  static const uint32 kUnpairableDeviceClass;
+  static const uint32_t kUnpairableDeviceClass;
 
   static const char kJustWorksPath[];
   static const char kJustWorksName[];
   static const char kJustWorksAddress[];
-  static const uint32 kJustWorksClass;
+  static const uint32_t kJustWorksClass;
 
   static const char kLowEnergyPath[];
   static const char kLowEnergyName[];
   static const char kLowEnergyAddress[];
-  static const uint32 kLowEnergyClass;
+  static const uint32_t kLowEnergyClass;
 
   static const char kPairedUnconnectableDevicePath[];
   static const char kPairedUnconnectableDeviceName[];
   static const char kPairedUnconnectableDeviceAddress[];
-  static const uint32 kPairedUnconnectableDeviceClass;
+  static const uint32_t kPairedUnconnectableDeviceClass;
 
   static const char kConnectedTrustedNotPairedDevicePath[];
   static const char kConnectedTrustedNotPairedDeviceAddress[];
   static const char kConnectedTrustedNotPairedDeviceName[];
-  static const uint32 kConnectedTrustedNotPairedDeviceClass;
+  static const uint32_t kConnectedTrustedNotPairedDeviceClass;
 
  private:
   // Property callback passed when we create Properties* structures.
@@ -259,7 +261,7 @@
 
   // Updates the inquiry RSSI property of fake device with object path
   // |object_path| to |rssi|, if the fake device exists.
-  void UpdateDeviceRSSI(const dbus::ObjectPath& object_path, int16 rssi);
+  void UpdateDeviceRSSI(const dbus::ObjectPath& object_path, int16_t rssi);
 
   void PinCodeCallback(const dbus::ObjectPath& object_path,
                        const base::Closure& callback,
@@ -270,13 +272,13 @@
                        const base::Closure& callback,
                        const ErrorCallback& error_callback,
                        BluetoothAgentServiceProvider::Delegate::Status status,
-                       uint32 passkey);
+                       uint32_t passkey);
   void ConfirmationCallback(
       const dbus::ObjectPath& object_path,
       const base::Closure& callback,
       const ErrorCallback& error_callback,
       BluetoothAgentServiceProvider::Delegate::Status status);
-  void SimulateKeypress(uint16 entered,
+  void SimulateKeypress(uint16_t entered,
                         const dbus::ObjectPath& object_path,
                         const base::Closure& callback,
                         const ErrorCallback& error_callback);
@@ -311,9 +313,9 @@
   uint32_t incoming_pairing_simulation_step_;
   bool pairing_cancelled_;
 
-  int16 connection_rssi_;
-  int16 transmit_power_;
-  int16 max_transmit_power_;
+  int16_t connection_rssi_;
+  int16_t transmit_power_;
+  int16_t max_transmit_power_;
 
   // Controls the fake behavior to allow more extensive UI testing without
   // having to cycle the discovery simulation.
diff --git a/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_client.cc b/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_client.cc
index 10f073a..15a2190 100644
--- a/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_client.cc
+++ b/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_client.cc
@@ -179,7 +179,7 @@
     completed_callback =
         base::Bind(error_callback, kUnknownCharacteristicError, "");
   } else {
-    std::vector<uint8> value = {0x06};  // Location is "foot".
+    std::vector<uint8_t> value = {0x06};  // Location is "foot".
     completed_callback = base::Bind(
         &FakeBluetoothGattCharacteristicClient::DelayedReadValueCallback,
         weak_ptr_factory_.GetWeakPtr(), object_path, callback, value);
@@ -196,7 +196,7 @@
 
 void FakeBluetoothGattCharacteristicClient::WriteValue(
     const dbus::ObjectPath& object_path,
-    const std::vector<uint8>& value,
+    const std::vector<uint8_t>& value,
     const base::Closure& callback,
     const ErrorCallback& error_callback) {
   if (!authenticated_) {
@@ -485,7 +485,7 @@
     return;
 
   VLOG(2) << "Updating heart rate value.";
-  std::vector<uint8> measurement = GetHeartRateMeasurementValue();
+  std::vector<uint8_t> measurement = GetHeartRateMeasurementValue();
   heart_rate_measurement_properties_->value.ReplaceValue(measurement);
 
   base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
@@ -507,16 +507,16 @@
   callback.Run(value);
 }
 
-std::vector<uint8>
+std::vector<uint8_t>
 FakeBluetoothGattCharacteristicClient::GetHeartRateMeasurementValue() {
   // TODO(armansito): We should make sure to properly pack this struct to ensure
   // correct byte alignment and endianness. It doesn't matter too much right now
   // as this is a fake and GCC on Linux seems to do the right thing.
   struct {
-    uint8 flags;
-    uint8 bpm;
-    uint16 energy_expanded;
-    uint16 rr_interval;
+    uint8_t flags;
+    uint8_t bpm;
+    uint16_t energy_expanded;
+    uint16_t rr_interval;
   } value;
 
   // Flags in LSB:     0       11   1 1 000
@@ -532,7 +532,7 @@
   value.flags |= (0x01 << 4);
 
   // Pick a value between 117 bpm and 153 bpm for heart rate.
-  value.bpm = static_cast<uint8>(base::RandInt(117, 153));
+  value.bpm = static_cast<uint8_t>(base::RandInt(117, 153));
 
   // Total calories burned in kJoules since the last reset. Increment this by 1
   // every time. It's fine if it overflows: it becomes 0 when the user resets
@@ -543,8 +543,8 @@
   value.rr_interval = 60 / value.bpm;
 
   // Return the bytes in an array.
-  uint8* bytes = reinterpret_cast<uint8*>(&value);
-  std::vector<uint8> return_value;
+  uint8_t* bytes = reinterpret_cast<uint8_t*>(&value);
+  std::vector<uint8_t> return_value;
   return_value.assign(bytes, bytes + sizeof(value));
   return return_value;
 }
diff --git a/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_client.h b/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_client.h
index 89fefcc5..616d7752 100644
--- a/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_client.h
+++ b/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_client.h
@@ -5,10 +5,13 @@
 #ifndef DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_CHARACTERISTIC_CLIENT_H_
 #define DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_CHARACTERISTIC_CLIENT_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
@@ -52,7 +55,7 @@
                  const ValueCallback& callback,
                  const ErrorCallback& error_callback) override;
   void WriteValue(const dbus::ObjectPath& object_path,
-                  const std::vector<uint8>& value,
+                  const std::vector<uint8_t>& value,
                   const base::Closure& callback,
                   const ErrorCallback& error_callback) override;
   void StartNotify(const dbus::ObjectPath& object_path,
@@ -126,7 +129,7 @@
   // Returns a random Heart Rate Measurement value. All the fields of the value
   // are populated according to the the fake behavior. The measurement value
   // is a random value within a reasonable range.
-  std::vector<uint8> GetHeartRateMeasurementValue();
+  std::vector<uint8_t> GetHeartRateMeasurementValue();
 
   // Callback that executes a delayed ReadValue action by updating the
   // appropriate "Value" property and invoking the ValueCallback.
@@ -145,7 +148,7 @@
   bool authenticated_;
 
   // Total calories burned, used for the Heart Rate Measurement characteristic.
-  uint16 calories_burned_;
+  uint16_t calories_burned_;
 
   // Static properties returned for simulated characteristics for the Heart
   // Rate Service. These pointers are not NULL only if the characteristics are
diff --git a/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_service_provider.cc b/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_service_provider.cc
index 03f06d0..4e60936 100644
--- a/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_service_provider.cc
+++ b/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_service_provider.cc
@@ -54,7 +54,7 @@
 }
 
 void FakeBluetoothGattCharacteristicServiceProvider::SendValueChanged(
-    const std::vector<uint8>& value) {
+    const std::vector<uint8_t>& value) {
   VLOG(1) << "Sent characteristic value changed: " << object_path_.value()
           << " UUID: " << uuid_;
 }
@@ -81,7 +81,7 @@
 }
 
 void FakeBluetoothGattCharacteristicServiceProvider::SetValue(
-    const std::vector<uint8>& value,
+    const std::vector<uint8_t>& value,
     const base::Closure& callback,
     const Delegate::ErrorCallback& error_callback) {
   VLOG(1) << "GATT characteristic value Set request: " << object_path_.value()
diff --git a/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_service_provider.h b/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_service_provider.h
index 675eba9..4d70234 100644
--- a/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_service_provider.h
+++ b/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_service_provider.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_CHARACTERISTIC_SERVICE_PROVIDER_H_
 #define DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_CHARACTERISTIC_SERVICE_PROVIDER_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
@@ -31,14 +33,14 @@
   ~FakeBluetoothGattCharacteristicServiceProvider() override;
 
   // BluetoothGattCharacteristicServiceProvider override.
-  void SendValueChanged(const std::vector<uint8>& value) override;
+  void SendValueChanged(const std::vector<uint8_t>& value) override;
 
   // Methods to simulate value get/set requests issued from a remote device. The
   // methods do nothing, if the associated service was not registered with the
   // GATT manager.
   void GetValue(const Delegate::ValueCallback& callback,
                 const Delegate::ErrorCallback& error_callback);
-  void SetValue(const std::vector<uint8>& value,
+  void SetValue(const std::vector<uint8_t>& value,
                 const base::Closure& callback,
                 const Delegate::ErrorCallback& error_callback);
 
diff --git a/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.cc b/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.cc
index dcaf1ec..c0dfc3b 100644
--- a/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.cc
+++ b/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.cc
@@ -120,7 +120,7 @@
 
 void FakeBluetoothGattDescriptorClient::WriteValue(
     const dbus::ObjectPath& object_path,
-    const std::vector<uint8>& value,
+    const std::vector<uint8_t>& value,
     const base::Closure& callback,
     const ErrorCallback& error_callback) {
   if (properties_.find(object_path) == properties_.end()) {
diff --git a/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.h b/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.h
index 0e8e8565..49727cb3 100644
--- a/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.h
+++ b/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_DESCRIPTOR_CLIENT_H_
 #define DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_DESCRIPTOR_CLIENT_H_
 
+#include <stdint.h>
+
 #include <map>
 #include <string>
 
@@ -50,7 +52,7 @@
                  const ValueCallback& callback,
                  const ErrorCallback& error_callback) override;
   void WriteValue(const dbus::ObjectPath& object_path,
-                  const std::vector<uint8>& value,
+                  const std::vector<uint8_t>& value,
                   const base::Closure& callback,
                   const ErrorCallback& error_callback) override;
 
diff --git a/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_service_provider.cc b/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_service_provider.cc
index 4376ce98..78a504e 100644
--- a/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_service_provider.cc
+++ b/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_service_provider.cc
@@ -52,7 +52,7 @@
 }
 
 void FakeBluetoothGattDescriptorServiceProvider::SendValueChanged(
-    const std::vector<uint8>& value) {
+    const std::vector<uint8_t>& value) {
   VLOG(1) << "Sent descriptor value changed: " << object_path_.value()
           << " UUID: " << uuid_;
 }
@@ -88,7 +88,7 @@
 }
 
 void FakeBluetoothGattDescriptorServiceProvider::SetValue(
-    const std::vector<uint8>& value,
+    const std::vector<uint8_t>& value,
     const base::Closure& callback,
     const Delegate::ErrorCallback& error_callback) {
   VLOG(1) << "GATT descriptor value Set request: " << object_path_.value()
diff --git a/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_service_provider.h b/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_service_provider.h
index 7640acc5..ee82bcd4 100644
--- a/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_service_provider.h
+++ b/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_service_provider.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_DESCRIPTOR_SERVICE_PROVIDER_H_
 #define DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_DESCRIPTOR_SERVICE_PROVIDER_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
@@ -30,14 +32,14 @@
   ~FakeBluetoothGattDescriptorServiceProvider() override;
 
   // BluetoothGattDescriptorServiceProvider override.
-  void SendValueChanged(const std::vector<uint8>& value) override;
+  void SendValueChanged(const std::vector<uint8_t>& value) override;
 
   // Methods to simulate value get/set requests issued from a remote device. The
   // methods do nothing, if the associated service was not registered with the
   // GATT manager.
   void GetValue(const Delegate::ValueCallback& callback,
                 const Delegate::ErrorCallback& error_callback);
-  void SetValue(const std::vector<uint8>& value,
+  void SetValue(const std::vector<uint8_t>& value,
                 const base::Closure& callback,
                 const Delegate::ErrorCallback& error_callback);
 
diff --git a/device/bluetooth/dbus/fake_bluetooth_media_client.h b/device/bluetooth/dbus/fake_bluetooth_media_client.h
index 2049f43..c085f6e 100644
--- a/device/bluetooth/dbus/fake_bluetooth_media_client.h
+++ b/device/bluetooth/dbus/fake_bluetooth_media_client.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_MEDIA_CLIENT_H_
 #define DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_MEDIA_CLIENT_H_
 
+#include <stdint.h>
+
 #include <map>
 
 #include "base/callback.h"
diff --git a/device/bluetooth/dbus/fake_bluetooth_media_endpoint_service_provider.h b/device/bluetooth/dbus/fake_bluetooth_media_endpoint_service_provider.h
index 2e6b18a..89148fd 100644
--- a/device/bluetooth/dbus/fake_bluetooth_media_endpoint_service_provider.h
+++ b/device/bluetooth/dbus/fake_bluetooth_media_endpoint_service_provider.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_MEDIA_ENDPOINT_SERVICE_PROVIDER_H_
 #define DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_MEDIA_ENDPOINT_SERVICE_PROVIDER_H_
 
+#include <stdint.h>
+
 #include <vector>
 
 #include "base/logging.h"
diff --git a/device/bluetooth/dbus/fake_bluetooth_media_transport_client.cc b/device/bluetooth/dbus/fake_bluetooth_media_transport_client.cc
index 1a0a106..71311ea 100644
--- a/device/bluetooth/dbus/fake_bluetooth_media_transport_client.cc
+++ b/device/bluetooth/dbus/fake_bluetooth_media_transport_client.cc
@@ -4,12 +4,14 @@
 
 #include "device/bluetooth/dbus/fake_bluetooth_media_transport_client.h"
 
-#include <unistd.h>
+#include <stddef.h>
 #include <sys/socket.h>
+#include <unistd.h>
 
 #include <sstream>
 
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/stl_util.h"
 #include "dbus/file_descriptor.h"
 #include "device/bluetooth/dbus/bluetooth_media_client.h"
diff --git a/device/bluetooth/dbus/fake_bluetooth_media_transport_client.h b/device/bluetooth/dbus/fake_bluetooth_media_transport_client.h
index 8ad3bb9..37150b08 100644
--- a/device/bluetooth/dbus/fake_bluetooth_media_transport_client.h
+++ b/device/bluetooth/dbus/fake_bluetooth_media_transport_client.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_MEDIA_TRANSPORT_CLIENT_H_
 #define DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_MEDIA_TRANSPORT_CLIENT_H_
 
+#include <stdint.h>
+
 #include <map>
 #include <string>
 #include <vector>
diff --git a/device/bluetooth/test/bluetooth_test.cc b/device/bluetooth/test/bluetooth_test.cc
index a547e8f..0c4e891 100644
--- a/device/bluetooth/test/bluetooth_test.cc
+++ b/device/bluetooth/test/bluetooth_test.cc
@@ -115,7 +115,7 @@
 }
 
 void BluetoothTestBase::ReadValueCallback(Call expected,
-                                          const std::vector<uint8>& value) {
+                                          const std::vector<uint8_t>& value) {
   ++callback_count_;
   last_read_value_ = value;
 
diff --git a/device/bluetooth/test/bluetooth_test.h b/device/bluetooth/test/bluetooth_test.h
index 3ddfec9..807fb22 100644
--- a/device/bluetooth/test/bluetooth_test.h
+++ b/device/bluetooth/test/bluetooth_test.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_
 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_
 
+#include <stdint.h>
+
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
 #include "base/message_loop/message_loop.h"
@@ -140,7 +142,7 @@
   // RememberCharacteristicForSubsequentAction.
   virtual void SimulateGattCharacteristicRead(
       BluetoothGattCharacteristic* characteristic,
-      const std::vector<uint8>& value) {}
+      const std::vector<uint8_t>& value) {}
 
   // Simulates a Characteristic Read operation failing with a GattErrorCode.
   virtual void SimulateGattCharacteristicReadError(
@@ -178,7 +180,7 @@
   void GattConnectionCallback(Call expected,
                               scoped_ptr<BluetoothGattConnection>);
   void NotifyCallback(Call expected, scoped_ptr<BluetoothGattNotifySession>);
-  void ReadValueCallback(Call expected, const std::vector<uint8>& value);
+  void ReadValueCallback(Call expected, const std::vector<uint8_t>& value);
   void ErrorCallback(Call expected);
   void ConnectErrorCallback(Call expected,
                             enum BluetoothDevice::ConnectErrorCode);
@@ -212,8 +214,8 @@
   enum BluetoothDevice::ConnectErrorCode last_connect_error_code_ =
       BluetoothDevice::ERROR_UNKNOWN;
   ScopedVector<BluetoothGattNotifySession> notify_sessions_;
-  std::vector<uint8> last_read_value_;
-  std::vector<uint8> last_write_value_;
+  std::vector<uint8_t> last_read_value_;
+  std::vector<uint8_t> last_write_value_;
   BluetoothGattService::GattErrorCode last_gatt_error_code_;
 
   int callback_count_ = 0;
diff --git a/device/bluetooth/test/bluetooth_test_android.cc b/device/bluetooth/test/bluetooth_test_android.cc
index d822a7c..26f5f29 100644
--- a/device/bluetooth/test/bluetooth_test_android.cc
+++ b/device/bluetooth/test/bluetooth_test_android.cc
@@ -194,7 +194,7 @@
 
 void BluetoothTestAndroid::SimulateGattCharacteristicRead(
     BluetoothGattCharacteristic* characteristic,
-    const std::vector<uint8>& value) {
+    const std::vector<uint8_t>& value) {
   BluetoothRemoteGattCharacteristicAndroid* characteristic_android =
       static_cast<BluetoothRemoteGattCharacteristicAndroid*>(characteristic);
   JNIEnv* env = base::android::AttachCurrentThread();
@@ -213,7 +213,7 @@
   BluetoothRemoteGattCharacteristicAndroid* characteristic_android =
       static_cast<BluetoothRemoteGattCharacteristicAndroid*>(characteristic);
   JNIEnv* env = base::android::AttachCurrentThread();
-  std::vector<uint8> empty_value;
+  std::vector<uint8_t> empty_value;
 
   Java_FakeBluetoothGattCharacteristic_valueRead(
       env, characteristic_android->GetJavaObject().obj(),
diff --git a/device/bluetooth/test/bluetooth_test_android.h b/device/bluetooth/test/bluetooth_test_android.h
index 664863a3..584b46e 100644
--- a/device/bluetooth/test/bluetooth_test_android.h
+++ b/device/bluetooth/test/bluetooth_test_android.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_ANDROID_H_
 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_ANDROID_H_
 
+#include <stdint.h>
+
 #include "base/android/scoped_java_ref.h"
 #include "device/bluetooth/test/bluetooth_test.h"
 
@@ -47,7 +49,7 @@
       BluetoothGattCharacteristic* characteristic) override;
   void SimulateGattCharacteristicRead(
       BluetoothGattCharacteristic* characteristic,
-      const std::vector<uint8>& value) override;
+      const std::vector<uint8_t>& value) override;
   void SimulateGattCharacteristicReadError(
       BluetoothGattCharacteristic* characteristic,
       BluetoothGattService::GattErrorCode) override;
diff --git a/device/bluetooth/test/bluetooth_test_mac.mm b/device/bluetooth/test/bluetooth_test_mac.mm
index 0b02ff4..110e9f9 100644
--- a/device/bluetooth/test/bluetooth_test_mac.mm
+++ b/device/bluetooth/test/bluetooth_test_mac.mm
@@ -4,7 +4,10 @@
 
 #include "device/bluetooth/test/bluetooth_test_mac.h"
 
+#include <stdint.h>
+
 #include "base/strings/string_number_conversions.h"
+#include "build/build_config.h"
 #include "device/bluetooth/bluetooth_adapter_mac.h"
 #include "device/bluetooth/test/mock_bluetooth_central_manager_mac.h"
 #include "device/bluetooth/test/test_bluetooth_adapter_observer.h"
diff --git a/device/bluetooth/test/mock_bluetooth_adapter.cc b/device/bluetooth/test/mock_bluetooth_adapter.cc
index 4b060e5..f2d7b2a 100644
--- a/device/bluetooth/test/mock_bluetooth_adapter.cc
+++ b/device/bluetooth/test/mock_bluetooth_adapter.cc
@@ -4,6 +4,7 @@
 
 #include "device/bluetooth/test/mock_bluetooth_adapter.h"
 
+#include "build/build_config.h"
 #include "device/bluetooth/test/mock_bluetooth_advertisement.h"
 
 namespace device {
diff --git a/device/bluetooth/test/mock_bluetooth_adapter.h b/device/bluetooth/test/mock_bluetooth_adapter.h
index c5427c2..1bdb2153 100644
--- a/device/bluetooth/test/mock_bluetooth_adapter.h
+++ b/device/bluetooth/test/mock_bluetooth_adapter.h
@@ -9,6 +9,7 @@
 
 #include "base/callback.h"
 #include "base/memory/scoped_vector.h"
+#include "build/build_config.h"
 #include "device/bluetooth/bluetooth_adapter.h"
 #include "device/bluetooth/bluetooth_audio_sink.h"
 #include "device/bluetooth/bluetooth_device.h"
diff --git a/device/bluetooth/test/mock_bluetooth_central_manager_mac.h b/device/bluetooth/test/mock_bluetooth_central_manager_mac.h
index f026b77..876bd477 100644
--- a/device/bluetooth/test/mock_bluetooth_central_manager_mac.h
+++ b/device/bluetooth/test/mock_bluetooth_central_manager_mac.h
@@ -6,6 +6,7 @@
 #define DEVICE_BLUETOOTH_MOCK_BLUETOOTH_CENTRAL_MANAGER_MAC_H_
 
 #include "base/mac/sdk_forward_declarations.h"
+#include "build/build_config.h"
 
 #if defined(OS_IOS)
 #import <CoreBluetooth/CoreBluetooth.h>
diff --git a/device/bluetooth/test/mock_bluetooth_device.cc b/device/bluetooth/test/mock_bluetooth_device.cc
index 3fbfaada..230badaa 100644
--- a/device/bluetooth/test/mock_bluetooth_device.cc
+++ b/device/bluetooth/test/mock_bluetooth_device.cc
@@ -11,7 +11,7 @@
 namespace device {
 
 MockBluetoothDevice::MockBluetoothDevice(MockBluetoothAdapter* adapter,
-                                         uint32 bluetooth_class,
+                                         uint32_t bluetooth_class,
                                          const std::string& name,
                                          const std::string& address,
                                          bool paired,
diff --git a/device/bluetooth/test/mock_bluetooth_device.h b/device/bluetooth/test/mock_bluetooth_device.h
index a19937c1..5aab0921 100644
--- a/device/bluetooth/test/mock_bluetooth_device.h
+++ b/device/bluetooth/test/mock_bluetooth_device.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_
 #define DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_DEVICE_H_
 
+#include <stdint.h>
+
 #include <string>
 
 #include "base/memory/scoped_vector.h"
@@ -22,21 +24,21 @@
 class MockBluetoothDevice : public BluetoothDevice {
  public:
   MockBluetoothDevice(MockBluetoothAdapter* adapter,
-                      uint32 bluetooth_class,
+                      uint32_t bluetooth_class,
                       const std::string& name,
                       const std::string& address,
                       bool paired,
                       bool connected);
   virtual ~MockBluetoothDevice();
 
-  MOCK_CONST_METHOD0(GetBluetoothClass, uint32());
+  MOCK_CONST_METHOD0(GetBluetoothClass, uint32_t());
   MOCK_CONST_METHOD0(GetDeviceName, std::string());
   MOCK_CONST_METHOD0(GetIdentifier, std::string());
   MOCK_CONST_METHOD0(GetAddress, std::string());
   MOCK_CONST_METHOD0(GetVendorIDSource, BluetoothDevice::VendorIDSource());
-  MOCK_CONST_METHOD0(GetVendorID, uint16());
-  MOCK_CONST_METHOD0(GetProductID, uint16());
-  MOCK_CONST_METHOD0(GetDeviceID, uint16());
+  MOCK_CONST_METHOD0(GetVendorID, uint16_t());
+  MOCK_CONST_METHOD0(GetProductID, uint16_t());
+  MOCK_CONST_METHOD0(GetDeviceID, uint16_t());
   MOCK_CONST_METHOD0(GetName, base::string16());
   MOCK_CONST_METHOD0(GetDeviceType, BluetoothDevice::DeviceType());
   MOCK_CONST_METHOD0(IsPaired, bool());
@@ -45,8 +47,8 @@
   MOCK_CONST_METHOD0(IsConnectable, bool());
   MOCK_CONST_METHOD0(IsConnecting, bool());
   MOCK_CONST_METHOD0(GetUUIDs, UUIDList());
-  MOCK_CONST_METHOD0(GetInquiryRSSI, int16());
-  MOCK_CONST_METHOD0(GetInquiryTxPower, int16());
+  MOCK_CONST_METHOD0(GetInquiryRSSI, int16_t());
+  MOCK_CONST_METHOD0(GetInquiryTxPower, int16_t());
   MOCK_CONST_METHOD0(ExpectingPinCode, bool());
   MOCK_CONST_METHOD0(ExpectingPasskey, bool());
   MOCK_CONST_METHOD0(ExpectingConfirmation, bool());
@@ -62,7 +64,7 @@
            const base::Closure& callback,
            const BluetoothDevice::ConnectErrorCallback& error_callback));
   MOCK_METHOD1(SetPinCode, void(const std::string&));
-  MOCK_METHOD1(SetPasskey, void(uint32));
+  MOCK_METHOD1(SetPasskey, void(uint32_t));
   MOCK_METHOD0(ConfirmPairing, void());
   MOCK_METHOD0(RejectPairing, void());
   MOCK_METHOD0(CancelPairing, void());
@@ -102,7 +104,7 @@
   BluetoothGattService* GetMockService(const std::string& identifier) const;
 
  private:
-  uint32 bluetooth_class_;
+  uint32_t bluetooth_class_;
   std::string name_;
   std::string address_;
   BluetoothDevice::UUIDList uuids_;
diff --git a/device/bluetooth/test/mock_bluetooth_discovery_session.h b/device/bluetooth/test/mock_bluetooth_discovery_session.h
index e9009a8..754380f2 100644
--- a/device/bluetooth/test/mock_bluetooth_discovery_session.h
+++ b/device/bluetooth/test/mock_bluetooth_discovery_session.h
@@ -6,6 +6,7 @@
 #define DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_DISCOVERY_SESSION_H_
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "device/bluetooth/bluetooth_discovery_session.h"
 #include "testing/gmock/include/gmock/gmock.h"
 
diff --git a/device/bluetooth/test/mock_bluetooth_gatt_characteristic.cc b/device/bluetooth/test/mock_bluetooth_gatt_characteristic.cc
index 9cacfbe..5d012cd6 100644
--- a/device/bluetooth/test/mock_bluetooth_gatt_characteristic.cc
+++ b/device/bluetooth/test/mock_bluetooth_gatt_characteristic.cc
@@ -23,7 +23,7 @@
   ON_CALL(*this, GetUUID()).WillByDefault(Return(uuid));
   ON_CALL(*this, IsLocal()).WillByDefault(Return(is_local));
   ON_CALL(*this, GetValue())
-      .WillByDefault(ReturnRefOfCopy(std::vector<uint8>()));
+      .WillByDefault(ReturnRefOfCopy(std::vector<uint8_t>()));
   ON_CALL(*this, GetService()).WillByDefault(Return(service));
   ON_CALL(*this, GetProperties()).WillByDefault(Return(properties));
   ON_CALL(*this, GetPermissions()).WillByDefault(Return(permissions));
diff --git a/device/bluetooth/test/mock_bluetooth_gatt_characteristic.h b/device/bluetooth/test/mock_bluetooth_gatt_characteristic.h
index 8789b82..dc1a9bb0 100644
--- a/device/bluetooth/test/mock_bluetooth_gatt_characteristic.h
+++ b/device/bluetooth/test/mock_bluetooth_gatt_characteristic.h
@@ -5,11 +5,13 @@
 #ifndef DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_CHARACTERISTIC_H_
 #define DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_CHARACTERISTIC_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "device/bluetooth/bluetooth_gatt_characteristic.h"
 #include "device/bluetooth/bluetooth_uuid.h"
 #include "testing/gmock/include/gmock/gmock.h"
@@ -33,7 +35,7 @@
   MOCK_CONST_METHOD0(GetIdentifier, std::string());
   MOCK_CONST_METHOD0(GetUUID, BluetoothUUID());
   MOCK_CONST_METHOD0(IsLocal, bool());
-  MOCK_CONST_METHOD0(GetValue, const std::vector<uint8>&());
+  MOCK_CONST_METHOD0(GetValue, const std::vector<uint8_t>&());
   MOCK_CONST_METHOD0(GetService, BluetoothGattService*());
   MOCK_CONST_METHOD0(GetProperties, Properties());
   MOCK_CONST_METHOD0(GetPermissions, Permissions());
@@ -42,13 +44,13 @@
   MOCK_CONST_METHOD1(GetDescriptor,
                      BluetoothGattDescriptor*(const std::string&));
   MOCK_METHOD1(AddDescriptor, bool(BluetoothGattDescriptor*));
-  MOCK_METHOD1(UpdateValue, bool(const std::vector<uint8>&));
+  MOCK_METHOD1(UpdateValue, bool(const std::vector<uint8_t>&));
   MOCK_METHOD2(StartNotifySession,
                void(const NotifySessionCallback&, const ErrorCallback&));
   MOCK_METHOD2(ReadRemoteCharacteristic,
                void(const ValueCallback&, const ErrorCallback&));
   MOCK_METHOD3(WriteRemoteCharacteristic,
-               void(const std::vector<uint8>&,
+               void(const std::vector<uint8_t>&,
                     const base::Closure&,
                     const ErrorCallback&));
 
diff --git a/device/bluetooth/test/mock_bluetooth_gatt_descriptor.cc b/device/bluetooth/test/mock_bluetooth_gatt_descriptor.cc
index e0d1424..bbe55f0 100644
--- a/device/bluetooth/test/mock_bluetooth_gatt_descriptor.cc
+++ b/device/bluetooth/test/mock_bluetooth_gatt_descriptor.cc
@@ -21,7 +21,7 @@
   ON_CALL(*this, GetUUID()).WillByDefault(Return(uuid));
   ON_CALL(*this, IsLocal()).WillByDefault(Return(is_local));
   ON_CALL(*this, GetValue())
-      .WillByDefault(ReturnRefOfCopy(std::vector<uint8>()));
+      .WillByDefault(ReturnRefOfCopy(std::vector<uint8_t>()));
   ON_CALL(*this, GetCharacteristic()).WillByDefault(Return(characteristic));
   ON_CALL(*this, GetPermissions()).WillByDefault(Return(permissions));
 }
diff --git a/device/bluetooth/test/mock_bluetooth_gatt_descriptor.h b/device/bluetooth/test/mock_bluetooth_gatt_descriptor.h
index 8e17dd2..e98a4c8 100644
--- a/device/bluetooth/test/mock_bluetooth_gatt_descriptor.h
+++ b/device/bluetooth/test/mock_bluetooth_gatt_descriptor.h
@@ -5,11 +5,13 @@
 #ifndef DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_DESCRIPTOR_H_
 #define DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_DESCRIPTOR_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "device/bluetooth/bluetooth_gatt_characteristic.h"
 #include "device/bluetooth/bluetooth_gatt_descriptor.h"
 #include "device/bluetooth/bluetooth_uuid.h"
@@ -32,14 +34,14 @@
   MOCK_CONST_METHOD0(GetIdentifier, std::string());
   MOCK_CONST_METHOD0(GetUUID, BluetoothUUID());
   MOCK_CONST_METHOD0(IsLocal, bool());
-  MOCK_CONST_METHOD0(GetValue, const std::vector<uint8>&());
+  MOCK_CONST_METHOD0(GetValue, const std::vector<uint8_t>&());
   MOCK_CONST_METHOD0(GetCharacteristic, BluetoothGattCharacteristic*());
   MOCK_CONST_METHOD0(GetPermissions,
                      BluetoothGattCharacteristic::Permissions());
   MOCK_METHOD2(ReadRemoteDescriptor,
                void(const ValueCallback&, const ErrorCallback&));
   MOCK_METHOD3(WriteRemoteDescriptor,
-               void(const std::vector<uint8>&,
+               void(const std::vector<uint8_t>&,
                     const base::Closure&,
                     const ErrorCallback&));
 
diff --git a/device/bluetooth/test/mock_bluetooth_gatt_notify_session.h b/device/bluetooth/test/mock_bluetooth_gatt_notify_session.h
index 28536252..9d70333 100644
--- a/device/bluetooth/test/mock_bluetooth_gatt_notify_session.h
+++ b/device/bluetooth/test/mock_bluetooth_gatt_notify_session.h
@@ -5,9 +5,12 @@
 #ifndef DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_NOTIFY_SESSION_H_
 #define DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_NOTIFY_SESSION_H_
 
+#include <stdint.h>
+
 #include <string>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/timer/timer.h"
 #include "device/bluetooth/bluetooth_gatt_notify_session.h"
 #include "testing/gmock/include/gmock/gmock.h"
diff --git a/device/bluetooth/test/mock_bluetooth_gatt_service.h b/device/bluetooth/test/mock_bluetooth_gatt_service.h
index 0f36f286..9b6bd6a 100644
--- a/device/bluetooth/test/mock_bluetooth_gatt_service.h
+++ b/device/bluetooth/test/mock_bluetooth_gatt_service.h
@@ -8,6 +8,7 @@
 #include <string>
 #include <vector>
 
+#include "base/macros.h"
 #include "base/memory/scoped_vector.h"
 #include "device/bluetooth/bluetooth_gatt_service.h"
 #include "device/bluetooth/bluetooth_uuid.h"
diff --git a/device/bluetooth/test/test_bluetooth_adapter_observer.cc b/device/bluetooth/test/test_bluetooth_adapter_observer.cc
index 5d205655..eac1d9b0 100644
--- a/device/bluetooth/test/test_bluetooth_adapter_observer.cc
+++ b/device/bluetooth/test/test_bluetooth_adapter_observer.cc
@@ -277,7 +277,7 @@
 void TestBluetoothAdapterObserver::GattCharacteristicValueChanged(
     BluetoothAdapter* adapter,
     BluetoothGattCharacteristic* characteristic,
-    const std::vector<uint8>& value) {
+    const std::vector<uint8_t>& value) {
   ASSERT_EQ(adapter_.get(), adapter);
 
   ++gatt_characteristic_value_changed_count_;
@@ -296,7 +296,7 @@
 void TestBluetoothAdapterObserver::GattDescriptorValueChanged(
     BluetoothAdapter* adapter,
     BluetoothGattDescriptor* descriptor,
-    const std::vector<uint8>& value) {
+    const std::vector<uint8_t>& value) {
   ASSERT_EQ(adapter_.get(), adapter);
 
   ++gatt_descriptor_value_changed_count_;
diff --git a/device/bluetooth/test/test_bluetooth_adapter_observer.h b/device/bluetooth/test/test_bluetooth_adapter_observer.h
index 60b3088..3c48634 100644
--- a/device/bluetooth/test/test_bluetooth_adapter_observer.h
+++ b/device/bluetooth/test/test_bluetooth_adapter_observer.h
@@ -5,6 +5,9 @@
 #ifndef DEVICE_BLUETOOTH_TEST_BLUETOOTH_ADAPTER_OBSERVER_H_
 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_ADAPTER_OBSERVER_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "device/bluetooth/bluetooth_adapter.h"
 
 namespace device {
@@ -59,10 +62,10 @@
   void GattCharacteristicValueChanged(
       BluetoothAdapter* adapter,
       BluetoothGattCharacteristic* characteristic,
-      const std::vector<uint8>& value) override;
+      const std::vector<uint8_t>& value) override;
   void GattDescriptorValueChanged(BluetoothAdapter* adapter,
                                   BluetoothGattDescriptor* descriptor,
-                                  const std::vector<uint8>& value) override;
+                                  const std::vector<uint8_t>& value) override;
 
   // Adapter related:
   int present_changed_count() { return present_changed_count_; }
@@ -111,14 +114,14 @@
   BluetoothUUID last_gatt_characteristic_uuid() {
     return last_gatt_characteristic_uuid_;
   }
-  std::vector<uint8> last_changed_characteristic_value() {
+  std::vector<uint8_t> last_changed_characteristic_value() {
     return last_changed_characteristic_value_;
   }
   std::string last_gatt_descriptor_id() { return last_gatt_descriptor_id_; }
   BluetoothUUID last_gatt_descriptor_uuid() {
     return last_gatt_descriptor_uuid_;
   }
-  std::vector<uint8> last_changed_descriptor_value() {
+  std::vector<uint8_t> last_changed_descriptor_value() {
     return last_changed_descriptor_value_;
   }
 
@@ -162,10 +165,10 @@
   BluetoothUUID last_gatt_service_uuid_;
   std::string last_gatt_characteristic_id_;
   BluetoothUUID last_gatt_characteristic_uuid_;
-  std::vector<uint8> last_changed_characteristic_value_;
+  std::vector<uint8_t> last_changed_characteristic_value_;
   std::string last_gatt_descriptor_id_;
   BluetoothUUID last_gatt_descriptor_uuid_;
-  std::vector<uint8> last_changed_descriptor_value_;
+  std::vector<uint8_t> last_changed_descriptor_value_;
 
   DISALLOW_COPY_AND_ASSIGN(TestBluetoothAdapterObserver);
 };
diff --git a/device/bluetooth/uribeacon/uri_encoder.cc b/device/bluetooth/uribeacon/uri_encoder.cc
index 4c40d65a..7c982f0 100644
--- a/device/bluetooth/uribeacon/uri_encoder.cc
+++ b/device/bluetooth/uribeacon/uri_encoder.cc
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "base/macros.h"
 #include "uri_encoder.h"
 
 using base::StringPiece;
diff --git a/device/bluetooth/uribeacon/uri_encoder.h b/device/bluetooth/uribeacon/uri_encoder.h
index 30d27d6..6bf092a 100644
--- a/device/bluetooth/uribeacon/uri_encoder.h
+++ b/device/bluetooth/uribeacon/uri_encoder.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_BLUETOOTH_URIBEACON_URI_ENCODER_H_
 #define DEVICE_BLUETOOTH_URIBEACON_URI_ENCODER_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
diff --git a/device/bluetooth/uribeacon/uri_encoder_unittest.cc b/device/bluetooth/uribeacon/uri_encoder_unittest.cc
index 2e4fa9c..41b93fd3 100644
--- a/device/bluetooth/uribeacon/uri_encoder_unittest.cc
+++ b/device/bluetooth/uribeacon/uri_encoder_unittest.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stdint.h>
+
 #include "device/bluetooth/uribeacon/uri_encoder.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
diff --git a/device/core/device_info_query_win.cc b/device/core/device_info_query_win.cc
index 4d62b32..2d8864b7 100644
--- a/device/core/device_info_query_win.cc
+++ b/device/core/device_info_query_win.cc
@@ -4,6 +4,7 @@
 
 #include "device/core/device_info_query_win.h"
 
+#include <stddef.h>
 #include <string.h>
 
 #include "base/strings/string_util.h"
diff --git a/device/core/device_monitor_win.cc b/device/core/device_monitor_win.cc
index eab9e16..7f3d67d2 100644
--- a/device/core/device_monitor_win.cc
+++ b/device/core/device_monitor_win.cc
@@ -4,12 +4,13 @@
 
 #include "device/core/device_monitor_win.h"
 
+#include <windows.h>
 #include <dbt.h>
 #include <map>
-#include <windows.h>
 
 #include "base/at_exit.h"
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/strings/string_util.h"
 #include "base/strings/sys_string_conversions.h"
 #include "base/win/message_window.h"
diff --git a/device/devices_app/devices_app.cc b/device/devices_app/devices_app.cc
index 6e9cc9f..67675847 100644
--- a/device/devices_app/devices_app.cc
+++ b/device/devices_app/devices_app.cc
@@ -4,6 +4,8 @@
 
 #include "device/devices_app/devices_app.h"
 
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/callback.h"
 #include "base/macros.h"
@@ -25,7 +27,7 @@
 
 // The number of seconds to wait without any bound DeviceManagers before
 // exiting the app.
-const int64 kIdleTimeoutInSeconds = 10;
+const int64_t kIdleTimeoutInSeconds = 10;
 
 // A DeviceClient implementation to be constructed iff the app is not running
 // in an embedder that provides a DeviceClient (i.e. running as a standalone
diff --git a/device/devices_app/devices_app.h b/device/devices_app/devices_app.h
index 1671570..f561929 100644
--- a/device/devices_app/devices_app.h
+++ b/device/devices_app/devices_app.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_DEVICES_DEVICES_APP_H_
 #define DEVICE_DEVICES_DEVICES_APP_H_
 
+#include <stddef.h>
+
 #include "base/cancelable_callback.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
diff --git a/device/devices_app/usb/device_impl.cc b/device/devices_app/usb/device_impl.cc
index 307ab4fd..c8268e6 100644
--- a/device/devices_app/usb/device_impl.cc
+++ b/device/devices_app/usb/device_impl.cc
@@ -4,6 +4,8 @@
 
 #include "device/devices_app/usb/device_impl.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/callback.h"
 #include "base/stl_util.h"
diff --git a/device/devices_app/usb/device_impl.h b/device/devices_app/usb/device_impl.h
index ffaf5c8..5290fa7 100644
--- a/device/devices_app/usb/device_impl.h
+++ b/device/devices_app/usb/device_impl.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_USB_DEVICE_IMPL_H_
 #define DEVICE_USB_DEVICE_IMPL_H_
 
+#include <stdint.h>
+
 #include "base/callback_forward.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
diff --git a/device/devices_app/usb/device_impl_unittest.cc b/device/devices_app/usb/device_impl_unittest.cc
index a7147bc..15ece7c 100644
--- a/device/devices_app/usb/device_impl_unittest.cc
+++ b/device/devices_app/usb/device_impl_unittest.cc
@@ -2,6 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <map>
 #include <queue>
 #include <set>
diff --git a/device/devices_app/usb/device_manager_impl.cc b/device/devices_app/usb/device_manager_impl.cc
index 423ce29..02b6bdd 100644
--- a/device/devices_app/usb/device_manager_impl.cc
+++ b/device/devices_app/usb/device_manager_impl.cc
@@ -4,6 +4,8 @@
 
 #include "device/devices_app/usb/device_manager_impl.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/location.h"
 #include "base/memory/scoped_ptr.h"
diff --git a/device/devices_app/usb/device_manager_impl_unittest.cc b/device/devices_app/usb/device_manager_impl_unittest.cc
index 6ab03f6..c7f5f85d 100644
--- a/device/devices_app/usb/device_manager_impl_unittest.cc
+++ b/device/devices_app/usb/device_manager_impl_unittest.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
+
 #include <set>
 #include <string>
 
diff --git a/device/devices_app/usb/fake_permission_provider.cc b/device/devices_app/usb/fake_permission_provider.cc
index b4760f2..b660b27 100644
--- a/device/devices_app/usb/fake_permission_provider.cc
+++ b/device/devices_app/usb/fake_permission_provider.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
+
 #include "device/devices_app/usb/fake_permission_provider.h"
 
 namespace device {
diff --git a/device/devices_app/usb/fake_permission_provider.h b/device/devices_app/usb/fake_permission_provider.h
index 078c267..62947b4 100644
--- a/device/devices_app/usb/fake_permission_provider.h
+++ b/device/devices_app/usb/fake_permission_provider.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_USB_FAKE_PERMISSION_PROVIDER_H_
 #define DEVICE_USB_FAKE_PERMISSION_PROVIDER_H_
 
+#include <stdint.h>
+
 #include "device/devices_app/usb/public/interfaces/permission_provider.mojom.h"
 #include "mojo/common/weak_binding_set.h"
 #include "mojo/public/cpp/bindings/array.h"
diff --git a/device/devices_app/usb/type_converters.cc b/device/devices_app/usb/type_converters.cc
index 2e14e4f..cc6852b4 100644
--- a/device/devices_app/usb/type_converters.cc
+++ b/device/devices_app/usb/type_converters.cc
@@ -4,6 +4,9 @@
 
 #include "device/devices_app/usb/type_converters.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <map>
 #include <utility>
 
diff --git a/device/hid/fake_input_service_linux.h b/device/hid/fake_input_service_linux.h
index 1b46d98..f4fe8d7 100644
--- a/device/hid/fake_input_service_linux.h
+++ b/device/hid/fake_input_service_linux.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "device/hid/input_service_linux.h"
 
 namespace device {
diff --git a/device/hid/hid_connection.h b/device/hid/hid_connection.h
index 1c71075..9cc8aaf 100644
--- a/device/hid/hid_connection.h
+++ b/device/hid/hid_connection.h
@@ -5,9 +5,11 @@
 #ifndef DEVICE_HID_HID_CONNECTION_H_
 #define DEVICE_HID_HID_CONNECTION_H_
 
+#include <stddef.h>
 #include <stdint.h>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/threading/thread_checker.h"
 #include "device/hid/hid_device_info.h"
diff --git a/device/hid/hid_connection_linux.cc b/device/hid/hid_connection_linux.cc
index ec47bf7..a2a4ebc 100644
--- a/device/hid/hid_connection_linux.cc
+++ b/device/hid/hid_connection_linux.cc
@@ -12,6 +12,7 @@
 
 #include "base/bind.h"
 #include "base/files/file_path.h"
+#include "base/macros.h"
 #include "base/message_loop/message_loop.h"
 #include "base/message_loop/message_pump_libevent.h"
 #include "base/posix/eintr_wrapper.h"
diff --git a/device/hid/hid_connection_linux.h b/device/hid/hid_connection_linux.h
index 1f32420..bcdb99c1 100644
--- a/device/hid/hid_connection_linux.h
+++ b/device/hid/hid_connection_linux.h
@@ -5,9 +5,13 @@
 #ifndef DEVICE_HID_HID_CONNECTION_LINUX_H_
 #define DEVICE_HID_HID_CONNECTION_LINUX_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <queue>
 
 #include "base/files/file.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "device/hid/hid_connection.h"
 
diff --git a/device/hid/hid_connection_mac.h b/device/hid/hid_connection_mac.h
index 7e6df025..10ee839 100644
--- a/device/hid/hid_connection_mac.h
+++ b/device/hid/hid_connection_mac.h
@@ -7,10 +7,13 @@
 
 #include <CoreFoundation/CoreFoundation.h>
 #include <IOKit/hid/IOHIDManager.h>
+#include <stddef.h>
+#include <stdint.h>
 
 #include <queue>
 
 #include "base/mac/foundation_util.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "device/hid/hid_connection.h"
 
diff --git a/device/hid/hid_connection_unittest.cc b/device/hid/hid_connection_unittest.cc
index 9552aa4..b9b30c3c 100644
--- a/device/hid/hid_connection_unittest.cc
+++ b/device/hid/hid_connection_unittest.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
+
 #include <string>
 #include <vector>
 
diff --git a/device/hid/hid_connection_win.cc b/device/hid/hid_connection_win.cc
index 827416d..833fabd 100644
--- a/device/hid/hid_connection_win.cc
+++ b/device/hid/hid_connection_win.cc
@@ -8,6 +8,7 @@
 
 #include "base/bind.h"
 #include "base/files/file.h"
+#include "base/macros.h"
 #include "base/message_loop/message_loop.h"
 #include "base/numerics/safe_conversions.h"
 #include "base/win/object_watcher.h"
diff --git a/device/hid/hid_connection_win.h b/device/hid/hid_connection_win.h
index b1c4bf8..fe906eb 100644
--- a/device/hid/hid_connection_win.h
+++ b/device/hid/hid_connection_win.h
@@ -6,9 +6,12 @@
 #define DEVICE_HID_HID_CONNECTION_WIN_H_
 
 #include <windows.h>
+#include <stddef.h>
+#include <stdint.h>
 
 #include <set>
 
+#include "base/macros.h"
 #include "base/win/scoped_handle.h"
 #include "device/hid/hid_connection.h"
 
diff --git a/device/hid/hid_device_filter_unittest.cc b/device/hid/hid_device_filter_unittest.cc
index b829a69..c19a7346 100644
--- a/device/hid/hid_device_filter_unittest.cc
+++ b/device/hid/hid_device_filter_unittest.cc
@@ -2,6 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stdint.h>
+
+#include "build/build_config.h"
 #include "device/hid/hid_device_filter.h"
 #include "device/hid/hid_device_info.h"
 #include "device/hid/test_report_descriptors.h"
@@ -25,7 +28,7 @@
     device_info_ = new HidDeviceInfo(
         kTestDeviceId, 0x046d, 0xc31c, "Test Keyboard", "123ABC",
         kHIDBusTypeUSB,
-        std::vector<uint8>(kKeyboard, kKeyboard + kKeyboardSize));
+        std::vector<uint8_t>(kKeyboard, kKeyboard + kKeyboardSize));
   }
 
  protected:
diff --git a/device/hid/hid_device_info.cc b/device/hid/hid_device_info.cc
index c8e6f66..1e8a4f1 100644
--- a/device/hid/hid_device_info.cc
+++ b/device/hid/hid_device_info.cc
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "build/build_config.h"
 #include "device/hid/hid_device_info.h"
 #include "device/hid/hid_report_descriptor.h"
 
@@ -17,7 +18,7 @@
                              const std::string& product_name,
                              const std::string& serial_number,
                              HidBusType bus_type,
-                             const std::vector<uint8> report_descriptor)
+                             const std::vector<uint8_t> report_descriptor)
     : device_id_(device_id),
       vendor_id_(vendor_id),
       product_id_(product_id),
diff --git a/device/hid/hid_device_info.h b/device/hid/hid_device_info.h
index bc89832..15a957d 100644
--- a/device/hid/hid_device_info.h
+++ b/device/hid/hid_device_info.h
@@ -5,9 +5,13 @@
 #ifndef DEVICE_HID_HID_DEVICE_INFO_H_
 #define DEVICE_HID_HID_DEVICE_INFO_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "build/build_config.h"
 #include "device/hid/hid_collection_info.h"
@@ -35,7 +39,7 @@
                 const std::string& product_name,
                 const std::string& serial_number,
                 HidBusType bus_type,
-                const std::vector<uint8> report_descriptor);
+                const std::vector<uint8_t> report_descriptor);
 
   HidDeviceInfo(const HidDeviceId& device_id,
                 uint16_t vendor_id,
@@ -66,7 +70,7 @@
   size_t max_feature_report_size() const { return max_feature_report_size_; }
 
   // The raw HID report descriptor is not available on Windows.
-  const std::vector<uint8>& report_descriptor() const {
+  const std::vector<uint8_t>& report_descriptor() const {
     return report_descriptor_;
   }
 
@@ -83,7 +87,7 @@
   std::string product_name_;
   std::string serial_number_;
   HidBusType bus_type_;
-  std::vector<uint8> report_descriptor_;
+  std::vector<uint8_t> report_descriptor_;
 
   // Top-Level Collections information.
   std::vector<HidCollectionInfo> collections_;
diff --git a/device/hid/hid_device_info_linux.cc b/device/hid/hid_device_info_linux.cc
index bddac36f..b8d95a3b3 100644
--- a/device/hid/hid_device_info_linux.cc
+++ b/device/hid/hid_device_info_linux.cc
@@ -14,7 +14,7 @@
     const std::string& product_name,
     const std::string& serial_number,
     HidBusType bus_type,
-    const std::vector<uint8> report_descriptor)
+    const std::vector<uint8_t> report_descriptor)
     : HidDeviceInfo(device_id,
                     vendor_id,
                     product_id,
@@ -22,8 +22,7 @@
                     serial_number,
                     bus_type,
                     report_descriptor),
-      device_node_(device_node) {
-}
+      device_node_(device_node) {}
 
 HidDeviceInfoLinux::~HidDeviceInfoLinux() {
 }
diff --git a/device/hid/hid_device_info_linux.h b/device/hid/hid_device_info_linux.h
index df2cd972..6546c8a 100644
--- a/device/hid/hid_device_info_linux.h
+++ b/device/hid/hid_device_info_linux.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_HID_HID_DEVICE_INFO_LINUX_H_
 #define DEVICE_HID_HID_DEVICE_INFO_LINUX_H_
 
+#include <stdint.h>
+
 #include "device/hid/hid_device_info.h"
 
 namespace device {
@@ -18,7 +20,7 @@
                      const std::string& product_name,
                      const std::string& serial_number,
                      HidBusType bus_type,
-                     const std::vector<uint8> report_descriptor);
+                     const std::vector<uint8_t> report_descriptor);
 
   const std::string& device_node() const { return device_node_; }
 
diff --git a/device/hid/hid_report_descriptor.cc b/device/hid/hid_report_descriptor.cc
index f211eb46..a97ef60 100644
--- a/device/hid/hid_report_descriptor.cc
+++ b/device/hid/hid_report_descriptor.cc
@@ -14,7 +14,7 @@
 
 }  // namespace
 
-HidReportDescriptor::HidReportDescriptor(const std::vector<uint8>& bytes) {
+HidReportDescriptor::HidReportDescriptor(const std::vector<uint8_t>& bytes) {
   size_t header_index = 0;
   HidReportDescriptorItem* item = NULL;
   while (header_index < bytes.size()) {
diff --git a/device/hid/hid_report_descriptor.h b/device/hid/hid_report_descriptor.h
index 40a576c..94927fd6 100644
--- a/device/hid/hid_report_descriptor.h
+++ b/device/hid/hid_report_descriptor.h
@@ -5,6 +5,9 @@
 #ifndef DEVICE_HID_HID_REPORT_DESCRIPTOR_H_
 #define DEVICE_HID_HID_REPORT_DESCRIPTOR_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <vector>
 
 #include "base/memory/linked_ptr.h"
@@ -18,7 +21,7 @@
 class HidReportDescriptor {
 
  public:
-  HidReportDescriptor(const std::vector<uint8>& bytes);
+  HidReportDescriptor(const std::vector<uint8_t>& bytes);
   ~HidReportDescriptor();
 
   const std::vector<linked_ptr<HidReportDescriptorItem> >& items() const {
diff --git a/device/hid/hid_report_descriptor_item.h b/device/hid/hid_report_descriptor_item.h
index d3392330..1720858 100644
--- a/device/hid/hid_report_descriptor_item.h
+++ b/device/hid/hid_report_descriptor_item.h
@@ -5,7 +5,8 @@
 #ifndef DEVICE_HID_HID_REPORT_DESCRIPTOR_ITEM_H_
 #define DEVICE_HID_HID_REPORT_DESCRIPTOR_ITEM_H_
 
-#include "base/basictypes.h"
+#include <stddef.h>
+#include <stdint.h>
 
 namespace device {
 
diff --git a/device/hid/hid_report_descriptor_unittest.cc b/device/hid/hid_report_descriptor_unittest.cc
index 308780cd..74dd7ab 100644
--- a/device/hid/hid_report_descriptor_unittest.cc
+++ b/device/hid/hid_report_descriptor_unittest.cc
@@ -2,8 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <sstream>
 
+#include "base/macros.h"
 #include "device/hid/hid_report_descriptor.h"
 #include "device/hid/test_report_descriptors.h"
 #include "testing/gmock/include/gmock/gmock.h"
@@ -34,7 +38,7 @@
       const uint8_t* bytes,
       size_t size) {
     descriptor_ =
-        new HidReportDescriptor(std::vector<uint8>(bytes, bytes + size));
+        new HidReportDescriptor(std::vector<uint8_t>(bytes, bytes + size));
 
     std::vector<HidCollectionInfo> actual_collections;
     bool actual_has_report_id;
diff --git a/device/hid/hid_service.cc b/device/hid/hid_service.cc
index 29c9174..ef4635e 100644
--- a/device/hid/hid_service.cc
+++ b/device/hid/hid_service.cc
@@ -9,6 +9,7 @@
 #include "base/logging.h"
 #include "base/message_loop/message_loop.h"
 #include "base/stl_util.h"
+#include "build/build_config.h"
 #include "components/device_event_log/device_event_log.h"
 
 #if defined(OS_LINUX) && defined(USE_UDEV)
diff --git a/device/hid/hid_service.h b/device/hid/hid_service.h
index c2805c8..d7877b70 100644
--- a/device/hid/hid_service.h
+++ b/device/hid/hid_service.h
@@ -10,6 +10,7 @@
 #include <vector>
 
 #include "base/bind_helpers.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/observer_list.h"
 #include "base/single_thread_task_runner.h"
diff --git a/device/hid/hid_service_linux.cc b/device/hid/hid_service_linux.cc
index 94abfcc..6b48cda 100644
--- a/device/hid/hid_service_linux.cc
+++ b/device/hid/hid_service_linux.cc
@@ -5,6 +5,7 @@
 #include "device/hid/hid_service_linux.h"
 
 #include <fcntl.h>
+#include <stdint.h>
 #include <limits>
 #include <string>
 
@@ -13,11 +14,13 @@
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/scoped_observer.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_split.h"
 #include "base/thread_task_runner_handle.h"
 #include "base/threading/thread_restrictions.h"
+#include "build/build_config.h"
 #include "components/device_event_log/device_event_log.h"
 #include "device/hid/device_monitor_linux.h"
 #include "device/hid/hid_connection_linux.h"
@@ -170,8 +173,8 @@
         device_id, device_node, vendor_id, product_id, product_name,
         serial_number,
         kHIDBusTypeUSB,  // TODO(reillyg): Detect Bluetooth. crbug.com/443335
-        std::vector<uint8>(report_descriptor_str.begin(),
-                           report_descriptor_str.end())));
+        std::vector<uint8_t>(report_descriptor_str.begin(),
+                             report_descriptor_str.end())));
 
     task_runner_->PostTask(FROM_HERE, base::Bind(&HidServiceLinux::AddDevice,
                                                  service_, device_info));
diff --git a/device/hid/hid_service_linux.h b/device/hid/hid_service_linux.h
index 45c782d..9f87504 100644
--- a/device/hid/hid_service_linux.h
+++ b/device/hid/hid_service_linux.h
@@ -8,6 +8,7 @@
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
+#include "build/build_config.h"
 #include "device/hid/hid_device_info.h"
 #include "device/hid/hid_service.h"
 
diff --git a/device/hid/hid_service_mac.cc b/device/hid/hid_service_mac.cc
index 3dd8019..dbb7737 100644
--- a/device/hid/hid_service_mac.cc
+++ b/device/hid/hid_service_mac.cc
@@ -6,6 +6,7 @@
 
 #include <CoreFoundation/CoreFoundation.h>
 #include <IOKit/hid/IOHIDDevice.h>
+#include <stdint.h>
 
 #include <set>
 #include <string>
@@ -67,14 +68,14 @@
 
 bool TryGetHidDataProperty(IOHIDDeviceRef device,
                            CFStringRef key,
-                           std::vector<uint8>* result) {
+                           std::vector<uint8_t>* result) {
   CFDataRef ref =
       base::mac::CFCast<CFDataRef>(IOHIDDeviceGetProperty(device, key));
   if (!ref) {
     return false;
   }
   STLClearObject(result);
-  const uint8* bytes = CFDataGetBytePtr(ref);
+  const uint8_t* bytes = CFDataGetBytePtr(ref);
   result->insert(result->begin(), bytes, bytes + CFDataGetLength(ref));
   return true;
 }
@@ -251,7 +252,7 @@
     return nullptr;
   }
 
-  std::vector<uint8> report_descriptor;
+  std::vector<uint8_t> report_descriptor;
   if (!TryGetHidDataProperty(hid_device, CFSTR(kIOHIDReportDescriptorKey),
                              &report_descriptor)) {
     HID_LOG(DEBUG) << "Device report descriptor not available.";
diff --git a/device/hid/hid_service_mac.h b/device/hid/hid_service_mac.h
index f79c6e5..ca9fc4ae 100644
--- a/device/hid/hid_service_mac.h
+++ b/device/hid/hid_service_mac.h
@@ -12,6 +12,7 @@
 
 #include "base/mac/foundation_util.h"
 #include "base/mac/scoped_ioobject.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "device/hid/hid_service.h"
 
diff --git a/device/hid/hid_service_win.cc b/device/hid/hid_service_win.cc
index 72ddd4c..61f2dcb3 100644
--- a/device/hid/hid_service_win.cc
+++ b/device/hid/hid_service_win.cc
@@ -8,6 +8,7 @@
 
 #include <dbt.h>
 #include <setupapi.h>
+#include <stddef.h>
 #include <winioctl.h>
 
 #include "base/bind.h"
diff --git a/device/hid/hid_service_win.h b/device/hid/hid_service_win.h
index ad86251..54b8d3e 100644
--- a/device/hid/hid_service_win.h
+++ b/device/hid/hid_service_win.h
@@ -13,6 +13,7 @@
 #include <hidpi.h>
 }
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/scoped_observer.h"
diff --git a/device/hid/hid_usage_and_page.h b/device/hid/hid_usage_and_page.h
index 635e9b3c..1015854 100644
--- a/device/hid/hid_usage_and_page.h
+++ b/device/hid/hid_usage_and_page.h
@@ -5,7 +5,7 @@
 #ifndef DEVICE_HID_HID_USAGE_AND_PAGE_H_
 #define DEVICE_HID_HID_USAGE_AND_PAGE_H_
 
-#include "base/basictypes.h"
+#include <stdint.h>
 
 namespace device {
 
diff --git a/device/hid/input_service_linux.cc b/device/hid/input_service_linux.cc
index 81cac1a..c39a73d 100644
--- a/device/hid/input_service_linux.cc
+++ b/device/hid/input_service_linux.cc
@@ -7,6 +7,7 @@
 #include "base/bind.h"
 #include "base/lazy_instance.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_util.h"
 #include "base/threading/thread_restrictions.h"
diff --git a/device/hid/input_service_linux_unittest.cc b/device/hid/input_service_linux_unittest.cc
index 9825c06f..8b93cb5 100644
--- a/device/hid/input_service_linux_unittest.cc
+++ b/device/hid/input_service_linux_unittest.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
+
 #include <vector>
 
 #include "base/message_loop/message_loop.h"
diff --git a/device/hid/test_report_descriptors.cc b/device/hid/test_report_descriptors.cc
index cf2758b..d4998e2e 100644
--- a/device/hid/test_report_descriptors.cc
+++ b/device/hid/test_report_descriptors.cc
@@ -8,7 +8,7 @@
 
 // Digitizer descriptor from HID descriptor tool
 // http://www.usb.org/developers/hidpage/dt2_4.zip
-const uint8 kDigitizer[] = {
+const uint8_t kDigitizer[] = {
     0x05, 0x0d,        // Usage Page (Digitizer)
     0x09, 0x01,        // Usage (0x1)
     0xa1, 0x01,        // Collection (Application)
@@ -108,7 +108,7 @@
 
 // Keyboard descriptor from HID descriptor tool
 // http://www.usb.org/developers/hidpage/dt2_4.zip
-const uint8 kKeyboard[] = {
+const uint8_t kKeyboard[] = {
     0x05, 0x01,  // Usage Page (Generic Desktop)
     0x09, 0x06,  // Usage (0x6)
     0xa1, 0x01,  // Collection (Application)
@@ -146,7 +146,7 @@
 
 // Monitor descriptor from HID descriptor tool
 // http://www.usb.org/developers/hidpage/dt2_4.zip
-const uint8 kMonitor[] = {
+const uint8_t kMonitor[] = {
     0x05, 0x80,        // Usage Page (Monitor 0)
     0x09, 0x01,        // Usage (0x1)
     0xa1, 0x01,        // Collection (Application)
@@ -196,7 +196,7 @@
 
 // Mouse descriptor from HID descriptor tool
 // http://www.usb.org/developers/hidpage/dt2_4.zip
-const uint8 kMouse[] = {
+const uint8_t kMouse[] = {
     0x05, 0x01,  // Usage Page (Generic Desktop)
     0x09, 0x02,  // Usage (0x2)
     0xa1, 0x01,  // Collection (Application)
@@ -227,7 +227,7 @@
 const size_t kMouseSize = sizeof(kMouse);
 
 // Logitech Unifying receiver descriptor
-const uint8 kLogitechUnifyingReceiver[] = {
+const uint8_t kLogitechUnifyingReceiver[] = {
     0x06, 0x00, 0xFF,  // Usage Page (Vendor)
     0x09, 0x01,        // Usage (0x1)
     0xA1, 0x01,        // Collection (Application)
diff --git a/device/hid/test_report_descriptors.h b/device/hid/test_report_descriptors.h
index bd4d914..7808a898 100644
--- a/device/hid/test_report_descriptors.h
+++ b/device/hid/test_report_descriptors.h
@@ -5,32 +5,33 @@
 #ifndef DEVICE_HID_TEST_REPORT_DESCRIPTORS_H_
 #define DEVICE_HID_TEST_REPORT_DESCRIPTORS_H_
 
-#include "base/basictypes.h"
+#include <stddef.h>
+#include <stdint.h>
 
 namespace device {
 
 // Digitizer descriptor from HID descriptor tool
 // http://www.usb.org/developers/hidpage/dt2_4.zip
-extern const uint8 kDigitizer[];
+extern const uint8_t kDigitizer[];
 extern const size_t kDigitizerSize;
 
 // Keyboard descriptor from HID descriptor tool
 // http://www.usb.org/developers/hidpage/dt2_4.zip
-extern const uint8 kKeyboard[];
+extern const uint8_t kKeyboard[];
 extern const size_t kKeyboardSize;
 
 // Monitor descriptor from HID descriptor tool
 // http://www.usb.org/developers/hidpage/dt2_4.zip
-extern const uint8 kMonitor[];
+extern const uint8_t kMonitor[];
 extern const size_t kMonitorSize;
 
 // Mouse descriptor from HID descriptor tool
 // http://www.usb.org/developers/hidpage/dt2_4.zip
-extern const uint8 kMouse[];
+extern const uint8_t kMouse[];
 extern const size_t kMouseSize;
 
 // Logitech Unifying receiver descriptor
-extern const uint8 kLogitechUnifyingReceiver[];
+extern const uint8_t kLogitechUnifyingReceiver[];
 extern const size_t kLogitechUnifyingReceiverSize;
 
 }  // namespace device
diff --git a/device/media_transfer_protocol/media_transfer_protocol_daemon_client.cc b/device/media_transfer_protocol/media_transfer_protocol_daemon_client.cc
index 1d2ca8c..c18ebf0 100644
--- a/device/media_transfer_protocol/media_transfer_protocol_daemon_client.cc
+++ b/device/media_transfer_protocol/media_transfer_protocol_daemon_client.cc
@@ -7,6 +7,7 @@
 #include <algorithm>
 
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "dbus/bus.h"
 #include "dbus/message.h"
@@ -21,7 +22,7 @@
 namespace {
 
 const char kInvalidResponseMsg[] = "Invalid Response: ";
-uint32 kMaxChunkSize = 1024*1024;  // D-Bus has message size limits.
+uint32_t kMaxChunkSize = 1024 * 1024;  // D-Bus has message size limits.
 
 // The MediaTransferProtocolDaemonClient implementation.
 class MediaTransferProtocolDaemonClientImpl
@@ -112,7 +113,7 @@
   }
 
   void CreateDirectory(const std::string& handle,
-                       const uint32 parent_id,
+                       const uint32_t parent_id,
                        const std::string& directory_name,
                        const CreateDirectoryCallback& callback,
                        const ErrorCallback& error_callback) override {
@@ -129,7 +130,7 @@
 
   // MediaTransferProtocolDaemonClient override.
   void ReadDirectoryEntryIds(const std::string& handle,
-                             uint32 file_id,
+                             uint32_t file_id,
                              const ReadDirectoryEntryIdsCallback& callback,
                              const ErrorCallback& error_callback) override {
     dbus::MethodCall method_call(mtpd::kMtpdInterface,
@@ -146,7 +147,7 @@
   }
 
   void GetFileInfo(const std::string& handle,
-                   const std::vector<uint32>& file_ids,
+                   const std::vector<uint32_t>& file_ids,
                    size_t offset,
                    size_t entries_to_read,
                    const GetFileInfoCallback& callback,
@@ -181,9 +182,9 @@
 
   // MediaTransferProtocolDaemonClient override.
   void ReadFileChunk(const std::string& handle,
-                     uint32 file_id,
-                     uint32 offset,
-                     uint32 bytes_to_read,
+                     uint32_t file_id,
+                     uint32_t offset,
+                     uint32_t bytes_to_read,
                      const ReadFileCallback& callback,
                      const ErrorCallback& error_callback) override {
     DCHECK_LE(bytes_to_read, kMaxChunkSize);
@@ -202,7 +203,7 @@
   }
 
   void RenameObject(const std::string& handle,
-                    const uint32 object_id,
+                    const uint32_t object_id,
                     const std::string& new_name,
                     const RenameObjectCallback& callback,
                     const ErrorCallback& error_callback) override {
@@ -219,7 +220,7 @@
 
   void CopyFileFromLocal(const std::string& handle,
                          const int source_file_descriptor,
-                         const uint32 parent_id,
+                         const uint32_t parent_id,
                          const std::string& file_name,
                          const CopyFileFromLocalCallback& callback,
                          const ErrorCallback& error_callback) override {
@@ -240,7 +241,7 @@
   }
 
   void DeleteObject(const std::string& handle,
-                    const uint32 object_id,
+                    const uint32_t object_id,
                     const DeleteObjectCallback& callback,
                     const ErrorCallback& error_callback) override {
     dbus::MethodCall method_call(mtpd::kMtpdInterface, mtpd::kDeleteObject);
@@ -375,7 +376,7 @@
       return;
     }
 
-    std::vector<uint32> file_ids;
+    std::vector<uint32_t> file_ids;
     dbus::MessageReader reader(response);
     dbus::MessageReader array_reader(NULL);
     if (!reader.PopArray(&array_reader) || reader.HasMoreData()) {
@@ -385,7 +386,7 @@
     }
 
     while (array_reader.HasMoreData()) {
-      uint32 file_id;
+      uint32_t file_id;
       if (array_reader.PopUint32(&file_id)) {
         file_ids.push_back(file_id);
       } else {
@@ -430,7 +431,7 @@
       return;
     }
 
-    const uint8* data_bytes = NULL;
+    const uint8_t* data_bytes = NULL;
     size_t data_length = 0;
     dbus::MessageReader reader(response);
     if (!reader.PopArrayOfBytes(&data_bytes, &data_length)) {
diff --git a/device/media_transfer_protocol/media_transfer_protocol_daemon_client.h b/device/media_transfer_protocol/media_transfer_protocol_daemon_client.h
index ad059bb..761c168 100644
--- a/device/media_transfer_protocol/media_transfer_protocol_daemon_client.h
+++ b/device/media_transfer_protocol/media_transfer_protocol_daemon_client.h
@@ -9,11 +9,14 @@
 #ifndef DEVICE_MEDIA_TRANSFER_PROTOCOL_MEDIA_TRANSFER_PROTOCOL_DAEMON_CLIENT_H_
 #define DEVICE_MEDIA_TRANSFER_PROTOCOL_MEDIA_TRANSFER_PROTOCOL_DAEMON_CLIENT_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "build/build_config.h"
 
 #if !defined(OS_LINUX)
@@ -59,8 +62,8 @@
 
   // A callback to handle the result of ReadDirectoryEntryIds.
   // The argument is a vector of file ids.
-  typedef base::Callback<void(const std::vector<uint32>& file_ids)
-                         > ReadDirectoryEntryIdsCallback;
+  typedef base::Callback<void(const std::vector<uint32_t>& file_ids)>
+      ReadDirectoryEntryIdsCallback;
 
   // A callback to handle the result of GetFileInfo.
   // The argument is a vector of file entries.
@@ -128,7 +131,7 @@
   // |parent_id| is an id of the parent directory.
   // |directory_name| is name of new directory.
   virtual void CreateDirectory(const std::string& handle,
-                               const uint32 parent_id,
+                               const uint32_t parent_id,
                                const std::string& directory_name,
                                const CreateDirectoryCallback& callback,
                                const ErrorCallback& error_callback) = 0;
@@ -138,7 +141,7 @@
   // |file_id| is a MTP-device specific id for a file.
   virtual void ReadDirectoryEntryIds(
       const std::string& handle,
-      uint32 file_id,
+      uint32_t file_id,
       const ReadDirectoryEntryIdsCallback& callback,
       const ErrorCallback& error_callback) = 0;
 
@@ -148,7 +151,7 @@
   // |offset| is the index into |file_ids| to read from.
   // |entries_to_read| is the maximum number of file entries to read.
   virtual void GetFileInfo(const std::string& handle,
-                           const std::vector<uint32>& file_ids,
+                           const std::vector<uint32_t>& file_ids,
                            size_t offset,
                            size_t entries_to_read,
                            const GetFileInfoCallback& callback,
@@ -160,9 +163,9 @@
   // |offset| is the offset into the file.
   // |bytes_to_read| cannot exceed 1 MiB.
   virtual void ReadFileChunk(const std::string& handle,
-                             uint32 file_id,
-                             uint32 offset,
-                             uint32 bytes_to_read,
+                             uint32_t file_id,
+                             uint32_t offset,
+                             uint32_t bytes_to_read,
                              const ReadFileCallback& callback,
                              const ErrorCallback& error_callback) = 0;
 
@@ -171,7 +174,7 @@
   // |object_is| is an id of object to be renamed.
   // |new_name| is new name of the object.
   virtual void RenameObject(const std::string& handle,
-                            const uint32 object_id,
+                            const uint32_t object_id,
                             const std::string& new_name,
                             const RenameObjectCallback& callback,
                             const ErrorCallback& error_callback) = 0;
@@ -183,7 +186,7 @@
   // |file_name| is a file name of a target file.
   virtual void CopyFileFromLocal(const std::string& handle,
                                  const int source_file_descriptor,
-                                 const uint32 parent_id,
+                                 const uint32_t parent_id,
                                  const std::string& file_name,
                                  const CopyFileFromLocalCallback& callback,
                                  const ErrorCallback& error_callback) = 0;
@@ -192,7 +195,7 @@
   // succeeds, otherwise, |error_callback| is called.
   // |object_id| is an object id of a file or directory which is deleted.
   virtual void DeleteObject(const std::string& handle,
-                            const uint32 object_id,
+                            const uint32_t object_id,
                             const DeleteObjectCallback& callback,
                             const ErrorCallback& error_callback) = 0;
 
diff --git a/device/media_transfer_protocol/media_transfer_protocol_manager.cc b/device/media_transfer_protocol/media_transfer_protocol_manager.cc
index 898b393..974ceb3 100644
--- a/device/media_transfer_protocol/media_transfer_protocol_manager.cc
+++ b/device/media_transfer_protocol/media_transfer_protocol_manager.cc
@@ -13,11 +13,13 @@
 #include "base/bind.h"
 #include "base/command_line.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "base/sequenced_task_runner.h"
 #include "base/stl_util.h"
 #include "base/threading/thread_checker.h"
+#include "build/build_config.h"
 #include "dbus/bus.h"
 #include "device/media_transfer_protocol/media_transfer_protocol_daemon_client.h"
 #include "device/media_transfer_protocol/mtp_file_entry.pb.h"
@@ -181,7 +183,7 @@
   }
 
   void CreateDirectory(const std::string& storage_handle,
-                       const uint32 parent_id,
+                       const uint32_t parent_id,
                        const std::string& directory_name,
                        const CreateDirectoryCallback& callback) override {
     DCHECK(thread_checker_.CalledOnValidThread());
@@ -200,7 +202,7 @@
 
   // MediaTransferProtocolManager override.
   void ReadDirectory(const std::string& storage_handle,
-                     const uint32 file_id,
+                     const uint32_t file_id,
                      const size_t max_size,
                      const ReadDirectoryCallback& callback) override {
     DCHECK(thread_checker_.CalledOnValidThread());
@@ -222,9 +224,9 @@
 
   // MediaTransferProtocolManager override.
   void ReadFileChunk(const std::string& storage_handle,
-                     uint32 file_id,
-                     uint32 offset,
-                     uint32 count,
+                     uint32_t file_id,
+                     uint32_t offset,
+                     uint32_t count,
                      const ReadFileCallback& callback) override {
     DCHECK(thread_checker_.CalledOnValidThread());
     if (!ContainsKey(handles_, storage_handle) || !mtp_client_) {
@@ -241,14 +243,14 @@
   }
 
   void GetFileInfo(const std::string& storage_handle,
-                   uint32 file_id,
+                   uint32_t file_id,
                    const GetFileInfoCallback& callback) override {
     DCHECK(thread_checker_.CalledOnValidThread());
     if (!ContainsKey(handles_, storage_handle) || !mtp_client_) {
       callback.Run(MtpFileEntry(), true);
       return;
     }
-    std::vector<uint32> file_ids;
+    std::vector<uint32_t> file_ids;
     file_ids.push_back(file_id);
     get_file_info_callbacks_.push(callback);
     mtp_client_->GetFileInfo(
@@ -263,7 +265,7 @@
   }
 
   void RenameObject(const std::string& storage_handle,
-                    const uint32 object_id,
+                    const uint32_t object_id,
                     const std::string& new_name,
                     const RenameObjectCallback& callback) override {
     DCHECK(thread_checker_.CalledOnValidThread());
@@ -282,7 +284,7 @@
 
   void CopyFileFromLocal(const std::string& storage_handle,
                          const int source_file_descriptor,
-                         const uint32 parent_id,
+                         const uint32_t parent_id,
                          const std::string& file_name,
                          const CopyFileFromLocalCallback& callback) override {
     DCHECK(thread_checker_.CalledOnValidThread());
@@ -300,7 +302,7 @@
   }
 
   void DeleteObject(const std::string& storage_handle,
-                    const uint32 object_id,
+                    const uint32_t object_id,
                     const DeleteObjectCallback& callback) override {
     DCHECK(thread_checker_.CalledOnValidThread());
     if (!ContainsKey(handles_, storage_handle) || !mtp_client_) {
@@ -463,7 +465,7 @@
   void OnReadDirectoryEntryIdsToReadDirectory(
       const std::string& storage_handle,
       const size_t max_size,
-      const std::vector<uint32>& file_ids) {
+      const std::vector<uint32_t>& file_ids) {
     DCHECK(thread_checker_.CalledOnValidThread());
 
     if (file_ids.empty()) {
@@ -472,7 +474,7 @@
       return;
     }
 
-    std::vector<uint32> sorted_file_ids = file_ids;
+    std::vector<uint32_t> sorted_file_ids = file_ids;
     std::sort(sorted_file_ids.begin(), sorted_file_ids.end());
 
     const size_t chunk_size =
@@ -489,10 +491,10 @@
   }
 
   void OnGotDirectoryEntries(const std::string& storage_handle,
-                             const std::vector<uint32>& file_ids,
+                             const std::vector<uint32_t>& file_ids,
                              const size_t offset,
                              const size_t max_size,
-                             const std::vector<uint32>& sorted_file_ids,
+                             const std::vector<uint32_t>& sorted_file_ids,
                              const std::vector<MtpFileEntry>& file_entries) {
     DCHECK(thread_checker_.CalledOnValidThread());
     DCHECK_EQ(file_ids.size(), sorted_file_ids.size());
@@ -500,9 +502,8 @@
     // Use |sorted_file_ids| to sanity check and make sure the results are a
     // subset of the requested file ids.
     for (size_t i = 0; i < file_entries.size(); ++i) {
-      std::vector<uint32>::const_iterator it =
-          std::lower_bound(sorted_file_ids.begin(),
-                           sorted_file_ids.end(),
+      std::vector<uint32_t>::const_iterator it =
+          std::lower_bound(sorted_file_ids.begin(), sorted_file_ids.end(),
                            file_entries[i].item_id());
       if (it == sorted_file_ids.end()) {
         OnReadDirectoryError();
diff --git a/device/media_transfer_protocol/media_transfer_protocol_manager.h b/device/media_transfer_protocol/media_transfer_protocol_manager.h
index 048e75b..95ba1512 100644
--- a/device/media_transfer_protocol/media_transfer_protocol_manager.h
+++ b/device/media_transfer_protocol/media_transfer_protocol_manager.h
@@ -5,6 +5,9 @@
 #ifndef DEVICE_MEDIA_TRANSFER_PROTOCOL_MEDIA_TRANSFER_PROTOCOL_MANAGER_H_
 #define DEVICE_MEDIA_TRANSFER_PROTOCOL_MEDIA_TRANSFER_PROTOCOL_MANAGER_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
@@ -125,34 +128,34 @@
 
   // Creates |directory_name| in |parent_id|.
   virtual void CreateDirectory(const std::string& storage_handle,
-                               const uint32 parent_id,
+                               const uint32_t parent_id,
                                const std::string& directory_name,
                                const CreateDirectoryCallback& callback) = 0;
 
   // Reads directory entries from |file_id| on |storage_handle| and runs
   // |callback|. |max_size| is a maximum number of files to be read.
   virtual void ReadDirectory(const std::string& storage_handle,
-                             const uint32 file_id,
+                             const uint32_t file_id,
                              const size_t max_size,
                              const ReadDirectoryCallback& callback) = 0;
 
   // Reads file data from |file_id| on |storage_handle| and runs |callback|.
   // Reads |count| bytes of data starting at |offset|.
   virtual void ReadFileChunk(const std::string& storage_handle,
-                             uint32 file_id,
-                             uint32 offset,
-                             uint32 count,
+                             uint32_t file_id,
+                             uint32_t offset,
+                             uint32_t count,
                              const ReadFileCallback& callback) = 0;
 
   // Gets the file metadata for |file_id| on |storage_handle| and runs
   // |callback|.
   virtual void GetFileInfo(const std::string& storage_handle,
-                           uint32 file_id,
+                           uint32_t file_id,
                            const GetFileInfoCallback& callback) = 0;
 
   // Renames |object_id| to |new_name|.
   virtual void RenameObject(const std::string& storage_handle,
-                            const uint32 object_id,
+                            const uint32_t object_id,
                             const std::string& new_name,
                             const RenameObjectCallback& callback) = 0;
 
@@ -160,13 +163,13 @@
   // |parent_id|.
   virtual void CopyFileFromLocal(const std::string& storage_handle,
                                  const int source_file_descriptor,
-                                 const uint32 parent_id,
+                                 const uint32_t parent_id,
                                  const std::string& file_name,
                                  const CopyFileFromLocalCallback& callback) = 0;
 
   // Deletes |object_id|.
   virtual void DeleteObject(const std::string& storage_handle,
-                            const uint32 object_id,
+                            const uint32_t object_id,
                             const DeleteObjectCallback& callback) = 0;
 
   // Creates and returns the global MediaTransferProtocolManager instance.
diff --git a/device/nfc/nfc_adapter.h b/device/nfc/nfc_adapter.h
index 455b142..d7ae094d 100644
--- a/device/nfc/nfc_adapter.h
+++ b/device/nfc/nfc_adapter.h
@@ -10,6 +10,7 @@
 #include <vector>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 
 namespace device {
diff --git a/device/nfc/nfc_adapter_chromeos.h b/device/nfc/nfc_adapter_chromeos.h
index 1a8c248..a35b76d 100644
--- a/device/nfc/nfc_adapter_chromeos.h
+++ b/device/nfc/nfc_adapter_chromeos.h
@@ -5,6 +5,7 @@
 #ifndef DEVICE_NFC_NFC_ADAPTER_CHROMEOS_H_
 #define DEVICE_NFC_NFC_ADAPTER_CHROMEOS_H_
 
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "chromeos/dbus/nfc_adapter_client.h"
diff --git a/device/nfc/nfc_adapter_factory.cc b/device/nfc/nfc_adapter_factory.cc
index 1ba533a..785925e 100644
--- a/device/nfc/nfc_adapter_factory.cc
+++ b/device/nfc/nfc_adapter_factory.cc
@@ -7,6 +7,7 @@
 #include "base/lazy_instance.h"
 #include "base/logging.h"
 #include "base/memory/weak_ptr.h"
+#include "build/build_config.h"
 
 #if defined(OS_CHROMEOS)
 #include "device/nfc/nfc_adapter_chromeos.h"
diff --git a/device/nfc/nfc_chromeos_unittest.cc b/device/nfc/nfc_chromeos_unittest.cc
index 0cf3ad9..9002f1b 100644
--- a/device/nfc/nfc_chromeos_unittest.cc
+++ b/device/nfc/nfc_chromeos_unittest.cc
@@ -2,6 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/callback.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
@@ -756,7 +759,7 @@
   const char kEncoding[] = "encoding";
   const char kLanguageCode[] = "en";
   const char kMimeType[] = "mime-type";
-  const uint32 kSize = 5;
+  const uint32_t kSize = 5;
 
   FakeNfcRecordClient::Properties record_properties(
       base::Bind(&OnPropertyChangedCallback));
diff --git a/device/nfc/nfc_ndef_record.cc b/device/nfc/nfc_ndef_record.cc
index 5b8bb994..0914cea 100644
--- a/device/nfc/nfc_ndef_record.cc
+++ b/device/nfc/nfc_ndef_record.cc
@@ -4,6 +4,9 @@
 
 #include "device/nfc/nfc_ndef_record.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <map>
 
 #include "base/logging.h"
@@ -117,8 +120,8 @@
   optional_fields[NfcNdefRecord::kFieldAction] = base::Value::TYPE_STRING;
   optional_fields[NfcNdefRecord::kFieldMimeType] = base::Value::TYPE_STRING;
   // base::Value restricts the number types to BOOL, INTEGER, and DOUBLE only.
-  // uint32 will automatically get converted to a double. "target size" is
-  // really a uint32 but we define it as a double for this reason.
+  // uint32_t will automatically get converted to a double. "target size" is
+  // really a uint32_t but we define it as a double for this reason.
   // (See dbus/values_util.h).
   optional_fields[NfcNdefRecord::kFieldTargetSize] = base::Value::TYPE_DOUBLE;
   optional_fields[NfcNdefRecord::kFieldTitles] = base::Value::TYPE_LIST;
diff --git a/device/nfc/nfc_ndef_record.h b/device/nfc/nfc_ndef_record.h
index 24cbc120..05c019c 100644
--- a/device/nfc/nfc_ndef_record.h
+++ b/device/nfc/nfc_ndef_record.h
@@ -8,6 +8,7 @@
 #include <string>
 #include <vector>
 
+#include "base/macros.h"
 #include "base/values.h"
 
 namespace device {
diff --git a/device/nfc/nfc_ndef_record_unittest.cc b/device/nfc/nfc_ndef_record_unittest.cc
index 2b6ef48..38c19e5 100644
--- a/device/nfc/nfc_ndef_record_unittest.cc
+++ b/device/nfc/nfc_ndef_record_unittest.cc
@@ -2,6 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/memory/scoped_ptr.h"
 #include "base/values.h"
 #include "device/nfc/nfc_ndef_record.h"
@@ -19,7 +22,7 @@
 const char kTestEncoding[] = "test-encoding";
 const char kTestLanguageCode[] = "test-language-code";
 const char kTestMimeType[] = "test-mime-type";
-const uint32 kTestTargetSize = 0;
+const uint32_t kTestTargetSize = 0;
 const char kTestText[] = "test-text";
 const char kTestURI[] = "test://uri";
 
@@ -135,7 +138,7 @@
   EXPECT_EQ(kTestMimeType, string_value);
   EXPECT_TRUE(record->data().GetDouble(
       NfcNdefRecord::kFieldTargetSize, &double_value));
-  EXPECT_EQ(kTestTargetSize, static_cast<uint32>(double_value));
+  EXPECT_EQ(kTestTargetSize, static_cast<uint32_t>(double_value));
 }
 
 TEST(NfcNdefRecordTest, PopulateSmartPoster) {
@@ -225,7 +228,7 @@
   EXPECT_EQ(kTestMimeType, string_value);
   EXPECT_TRUE(record->data().GetDouble(
       NfcNdefRecord::kFieldTargetSize, &double_value));
-  EXPECT_EQ(kTestTargetSize, static_cast<uint32>(double_value));
+  EXPECT_EQ(kTestTargetSize, static_cast<uint32_t>(double_value));
   EXPECT_TRUE(record->data().GetString(
       NfcNdefRecord::kFieldAction, &string_value));
   EXPECT_EQ(kTestAction, string_value);
diff --git a/device/nfc/nfc_peer.h b/device/nfc/nfc_peer.h
index a38192f..93392e5 100644
--- a/device/nfc/nfc_peer.h
+++ b/device/nfc/nfc_peer.h
@@ -10,6 +10,7 @@
 #include <vector>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "device/nfc/nfc_ndef_record.h"
 
 namespace device {
diff --git a/device/nfc/nfc_peer_chromeos.h b/device/nfc/nfc_peer_chromeos.h
index 645c42e..6099067d 100644
--- a/device/nfc/nfc_peer_chromeos.h
+++ b/device/nfc/nfc_peer_chromeos.h
@@ -7,6 +7,7 @@
 
 #include <map>
 
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "chromeos/dbus/nfc_record_client.h"
diff --git a/device/nfc/nfc_tag.h b/device/nfc/nfc_tag.h
index 039fc78..83d4e7f 100644
--- a/device/nfc/nfc_tag.h
+++ b/device/nfc/nfc_tag.h
@@ -5,6 +5,7 @@
 #ifndef DEVICE_NFC_NFC_TAG_H_
 #define DEVICE_NFC_NFC_TAG_H_
 
+#include "base/macros.h"
 #include "device/nfc/nfc_tag_technology.h"
 
 namespace device {
diff --git a/device/nfc/nfc_tag_chromeos.h b/device/nfc/nfc_tag_chromeos.h
index d9a29d8..5903493 100644
--- a/device/nfc/nfc_tag_chromeos.h
+++ b/device/nfc/nfc_tag_chromeos.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/observer_list.h"
 #include "chromeos/dbus/nfc_tag_client.h"
diff --git a/device/nfc/nfc_tag_technology.h b/device/nfc/nfc_tag_technology.h
index 8ada39b..849bf27 100644
--- a/device/nfc/nfc_tag_technology.h
+++ b/device/nfc/nfc_tag_technology.h
@@ -5,7 +5,10 @@
 #ifndef DEVICE_NFC_NFC_TAG_TECHNOLOGY_H_
 #define DEVICE_NFC_NFC_TAG_TECHNOLOGY_H_
 
+#include <stdint.h>
+
 #include "base/callback.h"
+#include "base/macros.h"
 #include "device/nfc/nfc_ndef_record.h"
 
 namespace device {
@@ -28,7 +31,7 @@
     kTechnologyTypeIsoDep = 1 << 4,
     kTechnologyTypeNdef = 1 << 5
   };
-  typedef uint32 TechnologyTypeMask;
+  typedef uint32_t TechnologyTypeMask;
 
   virtual ~NfcTagTechnology();
 
diff --git a/device/nfc/nfc_tag_technology_chromeos.h b/device/nfc/nfc_tag_technology_chromeos.h
index 75f407c..3e49e9e 100644
--- a/device/nfc/nfc_tag_technology_chromeos.h
+++ b/device/nfc/nfc_tag_technology_chromeos.h
@@ -7,6 +7,7 @@
 
 #include <map>
 
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "chromeos/dbus/nfc_record_client.h"
diff --git a/device/serial/buffer.h b/device/serial/buffer.h
index 44436a5..53ef909 100644
--- a/device/serial/buffer.h
+++ b/device/serial/buffer.h
@@ -5,7 +5,8 @@
 #ifndef DEVICE_SERIAL_BUFFER_H_
 #define DEVICE_SERIAL_BUFFER_H_
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
 #include "base/callback.h"
 #include "device/serial/serial.mojom.h"
 #include "net/base/io_buffer.h"
diff --git a/device/serial/data_receiver.h b/device/serial/data_receiver.h
index 622e366..7393517 100644
--- a/device/serial/data_receiver.h
+++ b/device/serial/data_receiver.h
@@ -5,9 +5,12 @@
 #ifndef DEVICE_SERIAL_DATA_RECEIVER_H_
 #define DEVICE_SERIAL_DATA_RECEIVER_H_
 
+#include <stdint.h>
+
 #include <queue>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/linked_ptr.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
diff --git a/device/serial/data_sender.h b/device/serial/data_sender.h
index 435f6998..57ff0dc 100644
--- a/device/serial/data_sender.h
+++ b/device/serial/data_sender.h
@@ -5,9 +5,12 @@
 #ifndef DEVICE_SERIAL_DATA_SENDER_H_
 #define DEVICE_SERIAL_DATA_SENDER_H_
 
+#include <stdint.h>
+
 #include <queue>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/linked_ptr.h"
 #include "base/strings/string_piece.h"
 #include "device/serial/buffer.h"
diff --git a/device/serial/data_sink_receiver.h b/device/serial/data_sink_receiver.h
index dfba848..3f2220f 100644
--- a/device/serial/data_sink_receiver.h
+++ b/device/serial/data_sink_receiver.h
@@ -5,9 +5,12 @@
 #ifndef DEVICE_SERIAL_DATA_SINK_RECEIVER_H_
 #define DEVICE_SERIAL_DATA_SINK_RECEIVER_H_
 
+#include <stdint.h>
+
 #include <queue>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/linked_ptr.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
diff --git a/device/serial/data_sink_unittest.cc b/device/serial/data_sink_unittest.cc
index 6661fefb..2b17791 100644
--- a/device/serial/data_sink_unittest.cc
+++ b/device/serial/data_sink_unittest.cc
@@ -2,7 +2,11 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
 #include "base/strings/string_piece.h"
diff --git a/device/serial/data_source_sender.h b/device/serial/data_source_sender.h
index 6c9748a6..33cf024f 100644
--- a/device/serial/data_source_sender.h
+++ b/device/serial/data_source_sender.h
@@ -5,9 +5,12 @@
 #ifndef DEVICE_SERIAL_DATA_SOURCE_SENDER_H_
 #define DEVICE_SERIAL_DATA_SOURCE_SENDER_H_
 
+#include <stdint.h>
+
 #include <vector>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
 #include "device/serial/buffer.h"
diff --git a/device/serial/data_source_unittest.cc b/device/serial/data_source_unittest.cc
index 4a87a77..ea871edf 100644
--- a/device/serial/data_source_unittest.cc
+++ b/device/serial/data_source_unittest.cc
@@ -2,7 +2,10 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stdint.h>
+
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
 #include "base/strings/string_piece.h"
diff --git a/device/serial/serial_connection.h b/device/serial/serial_connection.h
index 47fb52d9..7a88d6b7 100644
--- a/device/serial/serial_connection.h
+++ b/device/serial/serial_connection.h
@@ -5,6 +5,9 @@
 #ifndef DEVICE_SERIAL_SERIAL_CONNECTION_H_
 #define DEVICE_SERIAL_SERIAL_CONNECTION_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "device/serial/serial.mojom.h"
diff --git a/device/serial/serial_connection_factory.cc b/device/serial/serial_connection_factory.cc
index 4b812847..49b9bc8 100644
--- a/device/serial/serial_connection_factory.cc
+++ b/device/serial/serial_connection_factory.cc
@@ -6,6 +6,7 @@
 
 #include "base/bind.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "device/serial/serial_connection.h"
 #include "device/serial/serial_io_handler.h"
 
diff --git a/device/serial/serial_connection_factory.h b/device/serial/serial_connection_factory.h
index a7c1b77..d5d89843 100644
--- a/device/serial/serial_connection_factory.h
+++ b/device/serial/serial_connection_factory.h
@@ -8,6 +8,7 @@
 #include <string>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
diff --git a/device/serial/serial_connection_unittest.cc b/device/serial/serial_connection_unittest.cc
index 929d39e9..f5b153a 100644
--- a/device/serial/serial_connection_unittest.cc
+++ b/device/serial/serial_connection_unittest.cc
@@ -2,9 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stdint.h>
+
 #include <string>
 
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
 #include "base/strings/string_piece.h"
diff --git a/device/serial/serial_device_enumerator_linux.cc b/device/serial/serial_device_enumerator_linux.cc
index 389b8035..9e308e7 100644
--- a/device/serial/serial_device_enumerator_linux.cc
+++ b/device/serial/serial_device_enumerator_linux.cc
@@ -4,6 +4,8 @@
 
 #include "device/serial/serial_device_enumerator_linux.h"
 
+#include <stdint.h>
+
 #include "base/logging.h"
 #include "base/strings/string_number_conversions.h"
 
@@ -71,7 +73,7 @@
       const char* product_name =
           udev_device_get_property_value(device.get(), kProductNameKey);
 
-      uint32 int_value;
+      uint32_t int_value;
       if (vendor_id && base::HexStringToUInt(vendor_id, &int_value)) {
         info->vendor_id = int_value;
         info->has_vendor_id = true;
diff --git a/device/serial/serial_device_enumerator_linux.h b/device/serial/serial_device_enumerator_linux.h
index edd8a5d..a887d50 100644
--- a/device/serial/serial_device_enumerator_linux.h
+++ b/device/serial/serial_device_enumerator_linux.h
@@ -5,6 +5,7 @@
 #ifndef DEVICE_SERIAL_SERIAL_DEVICE_ENUMERATOR_LINUX_H_
 #define DEVICE_SERIAL_SERIAL_DEVICE_ENUMERATOR_LINUX_H_
 
+#include "base/macros.h"
 #include "device/serial/serial_device_enumerator.h"
 #include "device/udev_linux/scoped_udev.h"
 
diff --git a/device/serial/serial_device_enumerator_mac.cc b/device/serial/serial_device_enumerator_mac.cc
index 671555d..3a81f1d1 100644
--- a/device/serial/serial_device_enumerator_mac.cc
+++ b/device/serial/serial_device_enumerator_mac.cc
@@ -6,6 +6,7 @@
 
 #include <IOKit/serial/IOSerialKeys.h>
 #include <IOKit/usb/IOUSBLib.h>
+#include <stdint.h>
 
 #include <algorithm>
 
@@ -72,9 +73,9 @@
   return false;
 }
 
-// Searches the specified service for a uint16 property with the specified key,
-// sets value to that property's value, and returns whether the operation was
-// successful.
+// Searches the specified service for a uint16_t property with the specified
+// key, sets value to that property's value, and returns whether the operation
+// was successful.
 bool GetUInt16Property(io_service_t service,
                        const CFStringRef key,
                        uint16_t* value) {
diff --git a/device/serial/serial_device_enumerator_mac.h b/device/serial/serial_device_enumerator_mac.h
index 125b4bf..d5cd2c6 100644
--- a/device/serial/serial_device_enumerator_mac.h
+++ b/device/serial/serial_device_enumerator_mac.h
@@ -5,6 +5,7 @@
 #ifndef DEVICE_SERIAL_SERIAL_DEVICE_ENUMERATOR_MAC_H_
 #define DEVICE_SERIAL_SERIAL_DEVICE_ENUMERATOR_MAC_H_
 
+#include "base/macros.h"
 #include "device/serial/serial_device_enumerator.h"
 
 namespace device {
diff --git a/device/serial/serial_device_enumerator_win.cc b/device/serial/serial_device_enumerator_win.cc
index 10e18dd1..fe735af 100644
--- a/device/serial/serial_device_enumerator_win.cc
+++ b/device/serial/serial_device_enumerator_win.cc
@@ -8,6 +8,7 @@
 
 #include <devguid.h>
 #include <setupapi.h>
+#include <stdint.h>
 
 #include "base/memory/scoped_ptr.h"
 #include "base/metrics/sparse_histogram.h"
diff --git a/device/serial/serial_device_enumerator_win.h b/device/serial/serial_device_enumerator_win.h
index 541a2bf..0acb1c0 100644
--- a/device/serial/serial_device_enumerator_win.h
+++ b/device/serial/serial_device_enumerator_win.h
@@ -5,6 +5,7 @@
 #ifndef DEVICE_SERIAL_SERIAL_DEVICE_ENUMERATOR_WIN_H_
 #define DEVICE_SERIAL_SERIAL_DEVICE_ENUMERATOR_WIN_H_
 
+#include "base/macros.h"
 #include "device/serial/serial_device_enumerator.h"
 
 namespace device {
diff --git a/device/serial/serial_io_handler.cc b/device/serial/serial_io_handler.cc
index b9df970..480771b 100644
--- a/device/serial/serial_io_handler.cc
+++ b/device/serial/serial_io_handler.cc
@@ -8,6 +8,7 @@
 #include "base/files/file_path.h"
 #include "base/message_loop/message_loop.h"
 #include "base/strings/string_util.h"
+#include "build/build_config.h"
 
 #if defined(OS_CHROMEOS)
 #include "chromeos/dbus/dbus_thread_manager.h"
diff --git a/device/serial/serial_io_handler.h b/device/serial/serial_io_handler.h
index 63e6c90..f4947438 100644
--- a/device/serial/serial_io_handler.h
+++ b/device/serial/serial_io_handler.h
@@ -5,12 +5,16 @@
 #ifndef DEVICE_SERIAL_SERIAL_IO_HANDLER_H_
 #define DEVICE_SERIAL_SERIAL_IO_HANDLER_H_
 
+#include <stdint.h>
+
 #include "base/callback.h"
 #include "base/files/file.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
 #include "base/threading/non_thread_safe.h"
+#include "build/build_config.h"
 #include "device/serial/buffer.h"
 #include "device/serial/serial.mojom.h"
 
diff --git a/device/serial/serial_io_handler_posix.cc b/device/serial/serial_io_handler_posix.cc
index 01b6a27..b560174 100644
--- a/device/serial/serial_io_handler_posix.cc
+++ b/device/serial/serial_io_handler_posix.cc
@@ -8,6 +8,7 @@
 #include <termios.h>
 
 #include "base/posix/eintr_wrapper.h"
+#include "build/build_config.h"
 
 #if defined(OS_LINUX)
 #include <linux/serial.h>
diff --git a/device/serial/serial_io_handler_posix.h b/device/serial/serial_io_handler_posix.h
index 5050d23..ea05733 100644
--- a/device/serial/serial_io_handler_posix.h
+++ b/device/serial/serial_io_handler_posix.h
@@ -5,6 +5,7 @@
 #ifndef DEVICE_SERIAL_SERIAL_IO_HANDLER_POSIX_H_
 #define DEVICE_SERIAL_SERIAL_IO_HANDLER_POSIX_H_
 
+#include "base/macros.h"
 #include "base/message_loop/message_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
diff --git a/device/serial/serial_io_handler_posix_unittest.cc b/device/serial/serial_io_handler_posix_unittest.cc
index e4c15532..75e11d2 100644
--- a/device/serial/serial_io_handler_posix_unittest.cc
+++ b/device/serial/serial_io_handler_posix_unittest.cc
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "base/macros.h"
 #include "device/serial/serial_io_handler_posix.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
diff --git a/device/serial/serial_io_handler_win.cc b/device/serial/serial_io_handler_win.cc
index a8498cf..f95c3a0 100644
--- a/device/serial/serial_io_handler_win.cc
+++ b/device/serial/serial_io_handler_win.cc
@@ -8,6 +8,7 @@
 #include <setupapi.h>
 
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/scoped_observer.h"
 #include "base/threading/thread_checker.h"
 #include "device/core/device_info_query_win.h"
diff --git a/device/serial/serial_io_handler_win.h b/device/serial/serial_io_handler_win.h
index cc0414f..88439bf9 100644
--- a/device/serial/serial_io_handler_win.h
+++ b/device/serial/serial_io_handler_win.h
@@ -5,6 +5,7 @@
 #ifndef DEVICE_SERIAL_SERIAL_IO_HANDLER_WIN_H_
 #define DEVICE_SERIAL_SERIAL_IO_HANDLER_WIN_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/single_thread_task_runner.h"
diff --git a/device/serial/serial_service_impl.cc b/device/serial/serial_service_impl.cc
index 98ae1e0..962de63 100644
--- a/device/serial/serial_service_impl.cc
+++ b/device/serial/serial_service_impl.cc
@@ -4,6 +4,8 @@
 
 #include "device/serial/serial_service_impl.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/location.h"
 #include "device/serial/serial_io_handler.h"
diff --git a/device/serial/serial_service_impl.h b/device/serial/serial_service_impl.h
index 53d04f1..e33661f4 100644
--- a/device/serial/serial_service_impl.h
+++ b/device/serial/serial_service_impl.h
@@ -5,6 +5,7 @@
 #ifndef DEVICE_SERIAL_SERIAL_SERVICE_IMPL_H_
 #define DEVICE_SERIAL_SERIAL_SERVICE_IMPL_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
diff --git a/device/serial/serial_service_unittest.cc b/device/serial/serial_service_unittest.cc
index 80cf9cc..e0105a00e 100644
--- a/device/serial/serial_service_unittest.cc
+++ b/device/serial/serial_service_unittest.cc
@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
 #include "device/serial/serial.mojom.h"
diff --git a/device/serial/test_serial_io_handler.cc b/device/serial/test_serial_io_handler.cc
index 0dcb048..dec818486 100644
--- a/device/serial/test_serial_io_handler.cc
+++ b/device/serial/test_serial_io_handler.cc
@@ -4,6 +4,9 @@
 
 #include "device/serial/test_serial_io_handler.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <algorithm>
 
 #include "base/bind.h"
diff --git a/device/serial/test_serial_io_handler.h b/device/serial/test_serial_io_handler.h
index edded0e..50891784 100644
--- a/device/serial/test_serial_io_handler.h
+++ b/device/serial/test_serial_io_handler.h
@@ -8,6 +8,7 @@
 #include <string>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "device/serial/serial.mojom.h"
 #include "device/serial/serial_io_handler.h"
 
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 @@
 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 @@
     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 @@
 
   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) {
diff --git a/device/udev_linux/udev.cc b/device/udev_linux/udev.cc
index 6055fb9d..6532921 100644
--- a/device/udev_linux/udev.cc
+++ b/device/udev_linux/udev.cc
@@ -4,6 +4,8 @@
 
 #include "device/udev_linux/udev.h"
 
+#include <stddef.h>
+
 #include "base/strings/string_util.h"
 #include "device/udev_linux/udev_loader.h"
 
diff --git a/device/udev_linux/udev0_loader.h b/device/udev_linux/udev0_loader.h
index 8108ff9..2459193 100644
--- a/device/udev_linux/udev0_loader.h
+++ b/device/udev_linux/udev0_loader.h
@@ -5,6 +5,7 @@
 #ifndef DEVICE_UDEV_LINUX_UDEV0_LOADER_H_
 #define DEVICE_UDEV_LINUX_UDEV0_LOADER_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "device/udev_linux/udev_loader.h"
 
diff --git a/device/udev_linux/udev1_loader.h b/device/udev_linux/udev1_loader.h
index c765671..5a74e1b 100644
--- a/device/udev_linux/udev1_loader.h
+++ b/device/udev_linux/udev1_loader.h
@@ -5,6 +5,7 @@
 #ifndef DEVICE_UDEV_LINUX_UDEV1_LOADER_H_
 #define DEVICE_UDEV_LINUX_UDEV1_LOADER_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "device/udev_linux/udev_loader.h"
 
diff --git a/device/usb/mock_usb_device.h b/device/usb/mock_usb_device.h
index bed751c..c25a915 100644
--- a/device/usb/mock_usb_device.h
+++ b/device/usb/mock_usb_device.h
@@ -7,6 +7,8 @@
 
 #include "device/usb/usb_device.h"
 
+#include <stdint.h>
+
 #include <string>
 
 #include "device/usb/usb_device_handle.h"
diff --git a/device/usb/mock_usb_device_handle.h b/device/usb/mock_usb_device_handle.h
index 30b23d9..dfa798e 100644
--- a/device/usb/mock_usb_device_handle.h
+++ b/device/usb/mock_usb_device_handle.h
@@ -7,6 +7,9 @@
 
 #include "device/usb/usb_device_handle.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "testing/gmock/include/gmock/gmock.h"
 
 namespace device {
@@ -27,7 +30,8 @@
                     int alternate_setting,
                     const ResultCallback& callback));
   MOCK_METHOD1(ResetDevice, void(const ResultCallback& callback));
-  MOCK_METHOD2(ClearHalt, void(uint8 endpoint, const ResultCallback& callback));
+  MOCK_METHOD2(ClearHalt,
+               void(uint8_t endpoint, const ResultCallback& callback));
   MOCK_METHOD10(ControlTransfer,
                 void(UsbEndpointDirection direction,
                      TransferRequestType request_type,
diff --git a/device/usb/tools/usb_ids.py b/device/usb/tools/usb_ids.py
index e07bd4c..55c2f695 100644
--- a/device/usb/tools/usb_ids.py
+++ b/device/usb/tools/usb_ids.py
@@ -91,6 +91,8 @@
 #ifndef GENERATED_USB_IDS_H_
 #define GENERATED_USB_IDS_H_
 
+#include <stddef.h>
+
 #include "device/usb/usb_ids.h"
 
 namespace device {
diff --git a/device/usb/usb_context.cc b/device/usb/usb_context.cc
index 89246bc8..6959fab0 100644
--- a/device/usb/usb_context.cc
+++ b/device/usb/usb_context.cc
@@ -6,6 +6,7 @@
 
 #include "base/atomicops.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/threading/simple_thread.h"
 #include "device/usb/usb_error.h"
 #include "third_party/libusb/src/libusb/interrupt.h"
diff --git a/device/usb/usb_context.h b/device/usb/usb_context.h
index 3d52f678..1d3e512 100644
--- a/device/usb/usb_context.h
+++ b/device/usb/usb_context.h
@@ -5,6 +5,7 @@
 #ifndef DEVICE_USB_USB_CONTEXT_H_
 #define DEVICE_USB_USB_CONTEXT_H_
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/threading/thread_checker.h"
diff --git a/device/usb/usb_context_unittest.cc b/device/usb/usb_context_unittest.cc
index e3fb017..1ad9426 100644
--- a/device/usb/usb_context_unittest.cc
+++ b/device/usb/usb_context_unittest.cc
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "base/macros.h"
 #include "base/threading/platform_thread.h"
 #include "build/build_config.h"
 #include "device/usb/usb_context.h"
diff --git a/device/usb/usb_descriptors.cc b/device/usb/usb_descriptors.cc
index c783b70..a7f8ad4 100644
--- a/device/usb/usb_descriptors.cc
+++ b/device/usb/usb_descriptors.cc
@@ -4,6 +4,8 @@
 
 #include "device/usb/usb_descriptors.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 
 namespace device {
diff --git a/device/usb/usb_descriptors_unittest.cc b/device/usb/usb_descriptors_unittest.cc
index 2db06cb..03533ae 100644
--- a/device/usb/usb_descriptors_unittest.cc
+++ b/device/usb/usb_descriptors_unittest.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stdint.h>
+
 #include "base/strings/utf_string_conversions.h"
 #include "device/usb/usb_descriptors.h"
 #include "testing/gtest/include/gtest/gtest.h"
diff --git a/device/usb/usb_device.h b/device/usb/usb_device.h
index beb78036..9822a38 100644
--- a/device/usb/usb_device.h
+++ b/device/usb/usb_device.h
@@ -5,9 +5,12 @@
 #ifndef DEVICE_USB_USB_DEVICE_H_
 #define DEVICE_USB_USB_DEVICE_H_
 
+#include <stdint.h>
+
 #include <vector>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/strings/string16.h"
 #include "device/usb/usb_descriptors.h"
diff --git a/device/usb/usb_device_filter.h b/device/usb/usb_device_filter.h
index ba8a9d9..8455304 100644
--- a/device/usb/usb_device_filter.h
+++ b/device/usb/usb_device_filter.h
@@ -5,6 +5,8 @@
 #ifndef DEVICE_USB_USB_DEVICE_FILTER_H_
 #define DEVICE_USB_USB_DEVICE_FILTER_H_
 
+#include <stdint.h>
+
 #include <vector>
 
 #include "base/memory/ref_counted.h"
diff --git a/device/usb/usb_device_handle.h b/device/usb/usb_device_handle.h
index 23d2fd5c..3e608d5 100644
--- a/device/usb/usb_device_handle.h
+++ b/device/usb/usb_device_handle.h
@@ -5,10 +5,14 @@
 #ifndef DEVICE_USB_USB_DEVICE_HANDLE_H_
 #define DEVICE_USB_USB_DEVICE_HANDLE_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <map>
 #include <vector>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/strings/string16.h"
 #include "base/threading/thread_checker.h"
diff --git a/device/usb/usb_device_handle_impl.cc b/device/usb/usb_device_handle_impl.cc
index cdb0210..16401fe 100644
--- a/device/usb/usb_device_handle_impl.cc
+++ b/device/usb/usb_device_handle_impl.cc
@@ -9,6 +9,7 @@
 
 #include "base/bind.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/single_thread_task_runner.h"
 #include "base/stl_util.h"
 #include "base/strings/string16.h"
@@ -255,11 +256,11 @@
     return nullptr;
   }
 
-  libusb_fill_control_setup(reinterpret_cast<uint8*>(buffer->data()), type,
+  libusb_fill_control_setup(reinterpret_cast<uint8_t*>(buffer->data()), type,
                             request, value, index, length);
   libusb_fill_control_transfer(transfer->platform_transfer_,
                                device_handle->handle_,
-                               reinterpret_cast<uint8*>(buffer->data()),
+                               reinterpret_cast<uint8_t*>(buffer->data()),
                                &UsbDeviceHandleImpl::Transfer::PlatformCallback,
                                transfer.get(), timeout);
 
@@ -288,7 +289,7 @@
 
   libusb_fill_bulk_transfer(
       transfer->platform_transfer_, device_handle->handle_, endpoint,
-      reinterpret_cast<uint8*>(buffer->data()), static_cast<int>(length),
+      reinterpret_cast<uint8_t*>(buffer->data()), static_cast<int>(length),
       &UsbDeviceHandleImpl::Transfer::PlatformCallback, transfer.get(),
       timeout);
 
@@ -317,7 +318,7 @@
 
   libusb_fill_interrupt_transfer(
       transfer->platform_transfer_, device_handle->handle_, endpoint,
-      reinterpret_cast<uint8*>(buffer->data()), static_cast<int>(length),
+      reinterpret_cast<uint8_t*>(buffer->data()), static_cast<int>(length),
       &UsbDeviceHandleImpl::Transfer::PlatformCallback, transfer.get(),
       timeout);
 
@@ -352,7 +353,7 @@
 
   libusb_fill_iso_transfer(
       transfer->platform_transfer_, device_handle->handle_, endpoint,
-      reinterpret_cast<uint8*>(buffer->data()), static_cast<int>(length),
+      reinterpret_cast<uint8_t*>(buffer->data()), static_cast<int>(length),
       packets, &Transfer::PlatformCallback, transfer.get(), timeout);
   libusb_set_iso_packet_lengths(transfer->platform_transfer_, packet_length);
 
diff --git a/device/usb/usb_device_handle_impl.h b/device/usb/usb_device_handle_impl.h
index 6d45e1e..7d10e42 100644
--- a/device/usb/usb_device_handle_impl.h
+++ b/device/usb/usb_device_handle_impl.h
@@ -5,11 +5,15 @@
 #ifndef DEVICE_USB_USB_DEVICE_HANDLE_IMPL_H_
 #define DEVICE_USB_USB_DEVICE_HANDLE_IMPL_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <map>
 #include <set>
 #include <vector>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/threading/thread_checker.h"
 #include "device/usb/usb_device_handle.h"
diff --git a/device/usb/usb_device_handle_unittest.cc b/device/usb/usb_device_handle_unittest.cc
index 27014fde..4d4a55a1 100644
--- a/device/usb/usb_device_handle_unittest.cc
+++ b/device/usb/usb_device_handle_unittest.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
diff --git a/device/usb/usb_device_impl.cc b/device/usb/usb_device_impl.cc
index ab9bd4ae..874ccad 100644
--- a/device/usb/usb_device_impl.cc
+++ b/device/usb/usb_device_impl.cc
@@ -4,6 +4,8 @@
 
 #include "device/usb/usb_device_impl.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 
 #include "base/bind.h"
@@ -12,6 +14,7 @@
 #include "base/single_thread_task_runner.h"
 #include "base/stl_util.h"
 #include "base/thread_task_runner_handle.h"
+#include "build/build_config.h"
 #include "components/device_event_log/device_event_log.h"
 #include "device/usb/usb_context.h"
 #include "device/usb/usb_descriptors.h"
diff --git a/device/usb/usb_device_impl.h b/device/usb/usb_device_impl.h
index ccd119a..fed3db8 100644
--- a/device/usb/usb_device_impl.h
+++ b/device/usb/usb_device_impl.h
@@ -5,10 +5,14 @@
 #ifndef DEVICE_USB_USB_DEVICE_IMPL_H_
 #define DEVICE_USB_USB_DEVICE_IMPL_H_
 
+#include <stdint.h>
+
 #include <vector>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/threading/thread_checker.h"
+#include "build/build_config.h"
 #include "device/usb/usb_descriptors.h"
 #include "device/usb/usb_device.h"
 #include "device/usb/webusb_descriptors.h"
diff --git a/device/usb/usb_ids.h b/device/usb/usb_ids.h
index 150b905..c69aca4 100644
--- a/device/usb/usb_ids.h
+++ b/device/usb/usb_ids.h
@@ -5,6 +5,7 @@
 #ifndef DEVICE_USB_USB_IDS_H_
 #define DEVICE_USB_USB_IDS_H_
 
+#include <stddef.h>
 #include <stdint.h>
 
 #include "base/macros.h"
diff --git a/device/usb/usb_ids_unittest.cc b/device/usb/usb_ids_unittest.cc
index decce1e..29a4062 100644
--- a/device/usb/usb_ids_unittest.cc
+++ b/device/usb/usb_ids_unittest.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stdint.h>
+
 #include <string>
 
 #include "device/usb/usb_ids.h"
diff --git a/device/usb/usb_service.cc b/device/usb/usb_service.cc
index 807934ed8..6909d96 100644
--- a/device/usb/usb_service.cc
+++ b/device/usb/usb_service.cc
@@ -6,6 +6,7 @@
 
 #include "base/at_exit.h"
 #include "base/bind.h"
+#include "build/build_config.h"
 #include "components/device_event_log/device_event_log.h"
 #include "device/usb/usb_device.h"
 
diff --git a/device/usb/usb_service.h b/device/usb/usb_service.h
index 519feb6..afc5809 100644
--- a/device/usb/usb_service.h
+++ b/device/usb/usb_service.h
@@ -9,6 +9,7 @@
 #include <vector>
 
 #include "base/bind_helpers.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/observer_list.h"
diff --git a/device/usb/usb_service_impl.cc b/device/usb/usb_service_impl.cc
index 97700078..1f6ca57f 100644
--- a/device/usb/usb_service_impl.cc
+++ b/device/usb/usb_service_impl.cc
@@ -4,6 +4,8 @@
 
 #include "device/usb/usb_service_impl.h"
 
+#include <stdint.h>
+
 #include <list>
 #include <set>
 
@@ -16,6 +18,7 @@
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/thread_task_runner_handle.h"
+#include "build/build_config.h"
 #include "components/device_event_log/device_event_log.h"
 #include "device/usb/usb_device_handle.h"
 #include "device/usb/usb_error.h"
@@ -125,7 +128,7 @@
   base::string16 string;
   if (status == USB_TRANSFER_COMPLETED &&
       ParseUsbStringDescriptor(
-          std::vector<uint8>(buffer->data(), buffer->data() + length),
+          std::vector<uint8_t>(buffer->data(), buffer->data() + length),
           &string)) {
     callback.Run(string);
   } else {
@@ -192,7 +195,7 @@
 
   scoped_ptr<WebUsbDescriptorSet> descriptors(new WebUsbDescriptorSet());
   if (descriptors->Parse(
-          std::vector<uint8>(buffer->data(), buffer->data() + length))) {
+          std::vector<uint8_t>(buffer->data(), buffer->data() + length))) {
     UsbDeviceImpl* device_impl = static_cast<UsbDeviceImpl*>(device.get());
     device_impl->set_webusb_allowed_origins(descriptors.Pass());
   }
@@ -247,7 +250,7 @@
 
   WebUsbPlatformCapabilityDescriptor descriptor;
   if (!descriptor.ParseFromBosDescriptor(
-          std::vector<uint8>(buffer->data(), buffer->data() + length))) {
+          std::vector<uint8_t>(buffer->data(), buffer->data() + length))) {
     callback.Run();
     return;
   }
diff --git a/device/usb/usb_service_impl.h b/device/usb/usb_service_impl.h
index 3362e779..7b05904 100644
--- a/device/usb/usb_service_impl.h
+++ b/device/usb/usb_service_impl.h
@@ -4,11 +4,15 @@
 
 #include "device/usb/usb_service.h"
 
+#include <stddef.h>
+
 #include <map>
 #include <queue>
 #include <set>
 
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
+#include "build/build_config.h"
 #include "device/usb/usb_context.h"
 #include "device/usb/usb_device_impl.h"
 #include "third_party/libusb/src/libusb/libusb.h"
diff --git a/device/usb/webusb_descriptors.cc b/device/usb/webusb_descriptors.cc
index 034a119..1ecdfc2 100644
--- a/device/usb/webusb_descriptors.cc
+++ b/device/usb/webusb_descriptors.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
+
 #include <iterator>
 
 #include "base/logging.h"
diff --git a/device/usb/webusb_descriptors_unittest.cc b/device/usb/webusb_descriptors_unittest.cc
index 15c4589..0049497 100644
--- a/device/usb/webusb_descriptors_unittest.cc
+++ b/device/usb/webusb_descriptors_unittest.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stdint.h>
+
 #include "device/usb/webusb_descriptors.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
diff --git a/device/vibration/vibration_manager_impl_default.cc b/device/vibration/vibration_manager_impl_default.cc
index 7661827..25dba50c 100644
--- a/device/vibration/vibration_manager_impl_default.cc
+++ b/device/vibration/vibration_manager_impl_default.cc
@@ -4,7 +4,8 @@
 
 #include "device/vibration/vibration_manager_impl.h"
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
 #include "mojo/public/cpp/bindings/strong_binding.h"
 
 namespace device {
@@ -13,7 +14,7 @@
 
 class VibrationManagerEmptyImpl : public VibrationManager {
  public:
-  void Vibrate(int64 milliseconds) override {}
+  void Vibrate(int64_t milliseconds) override {}
   void Cancel() override {}
 
  private: