diff --git a/DEPS b/DEPS
index 9d51ba8d..52a08c4 100644
--- a/DEPS
+++ b/DEPS
@@ -43,7 +43,7 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling V8
   # and whatever else without interference from each other.
-  'v8_revision': 'b54905dd98404ab97a254420619e1477a3c85fe3',
+  'v8_revision': '7215192b9ade13e2d073dc9a73c40213e50fdda3',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling swarming_client
   # and whatever else without interference from each other.
@@ -59,7 +59,7 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling PDFium
   # and whatever else without interference from each other.
-  'pdfium_revision': 'bab9a98b71f351cf9f4eb39138bca55e3be4ef15',
+  'pdfium_revision': '1f1c1970259b696a9b1e5ca1a3c199f221846409',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling openmax_dl
   # and whatever else without interference from each other.
diff --git a/base/i18n/icu_string_conversions_unittest.cc b/base/i18n/icu_string_conversions_unittest.cc
index 4753c55..99e4b90 100644
--- a/base/i18n/icu_string_conversions_unittest.cc
+++ b/base/i18n/icu_string_conversions_unittest.cc
@@ -16,6 +16,7 @@
 #include "base/strings/string_piece.h"
 #include "base/strings/stringprintf.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace base {
diff --git a/base/scoped_native_library.h b/base/scoped_native_library.h
index bfe5566..e58297b2 100644
--- a/base/scoped_native_library.h
+++ b/base/scoped_native_library.h
@@ -6,6 +6,7 @@
 #define BASE_SCOPED_NATIVE_LIBRARY_H_
 
 #include "base/base_export.h"
+#include "base/macros.h"
 #include "base/native_library.h"
 
 namespace base {
diff --git a/base/strings/latin1_string_conversions.h b/base/strings/latin1_string_conversions.h
index 387cb65a..42113ef6 100644
--- a/base/strings/latin1_string_conversions.h
+++ b/base/strings/latin1_string_conversions.h
@@ -5,6 +5,8 @@
 #ifndef BASE_STRINGS_LATIN1_STRING_CONVERSIONS_H_
 #define BASE_STRINGS_LATIN1_STRING_CONVERSIONS_H_
 
+#include <stddef.h>
+
 #include <string>
 
 #include "base/base_export.h"
diff --git a/base/strings/safe_sprintf.cc b/base/strings/safe_sprintf.cc
index 9719abd..a51c778 100644
--- a/base/strings/safe_sprintf.cc
+++ b/base/strings/safe_sprintf.cc
@@ -9,6 +9,9 @@
 
 #include <limits>
 
+#include "base/macros.h"
+#include "build/build_config.h"
+
 #if !defined(NDEBUG)
 // In debug builds, we use RAW_CHECK() to print useful error messages, if
 // SafeSPrintf() is called with broken arguments.
diff --git a/base/strings/safe_sprintf.h b/base/strings/safe_sprintf.h
index 2d17320..65524a50 100644
--- a/base/strings/safe_sprintf.h
+++ b/base/strings/safe_sprintf.h
@@ -17,7 +17,6 @@
 #endif
 
 #include "base/base_export.h"
-#include "base/basictypes.h"
 
 namespace base {
 namespace strings {
diff --git a/base/strings/safe_sprintf_unittest.cc b/base/strings/safe_sprintf_unittest.cc
index ff05c6e..931ace8 100644
--- a/base/strings/safe_sprintf_unittest.cc
+++ b/base/strings/safe_sprintf_unittest.cc
@@ -4,13 +4,17 @@
 
 #include "base/strings/safe_sprintf.h"
 
+#include <stddef.h>
+#include <stdint.h>
 #include <stdio.h>
 #include <string.h>
 
 #include <limits>
 
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
+#include "build/build_config.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 // Death tests on Android are currently very flaky. No need to add more flaky
diff --git a/base/strings/string16.h b/base/strings/string16.h
index ba4ffe7..e47669c 100644
--- a/base/strings/string16.h
+++ b/base/strings/string16.h
@@ -26,11 +26,13 @@
 // libc functions with custom, 2-byte-char compatible routines. It is capable
 // of carrying UTF-16-encoded data.
 
+#include <stddef.h>
+#include <stdint.h>
 #include <stdio.h>
 #include <string>
 
 #include "base/base_export.h"
-#include "base/basictypes.h"
+#include "build/build_config.h"
 
 #if defined(WCHAR_T_IS_UTF16)
 
@@ -46,7 +48,7 @@
 
 namespace base {
 
-typedef uint16 char16;
+typedef uint16_t char16;
 
 // char16 versions of the functions required by string16_char_traits; these
 // are based on the wide character functions of similar names ("w" or "wcs"
diff --git a/base/strings/string_number_conversions.cc b/base/strings/string_number_conversions.cc
index 0f4f381..0724850 100644
--- a/base/strings/string_number_conversions.cc
+++ b/base/strings/string_number_conversions.cc
@@ -63,9 +63,9 @@
 // Faster specialization for bases <= 10
 template<typename CHAR, int BASE> class BaseCharToDigit<CHAR, BASE, true> {
  public:
-  static bool Convert(CHAR c, uint8* digit) {
+  static bool Convert(CHAR c, uint8_t* digit) {
     if (c >= '0' && c < '0' + BASE) {
-      *digit = static_cast<uint8>(c - '0');
+      *digit = static_cast<uint8_t>(c - '0');
       return true;
     }
     return false;
@@ -75,7 +75,7 @@
 // Specialization for bases where 10 < base <= 36
 template<typename CHAR, int BASE> class BaseCharToDigit<CHAR, BASE, false> {
  public:
-  static bool Convert(CHAR c, uint8* digit) {
+  static bool Convert(CHAR c, uint8_t* digit) {
     if (c >= '0' && c <= '9') {
       *digit = c - '0';
     } else if (c >= 'a' && c < 'a' + BASE - 10) {
@@ -89,7 +89,8 @@
   }
 };
 
-template<int BASE, typename CHAR> bool CharToDigit(CHAR c, uint8* digit) {
+template <int BASE, typename CHAR>
+bool CharToDigit(CHAR c, uint8_t* digit) {
   return BaseCharToDigit<CHAR, BASE, BASE <= 10>::Convert(c, digit);
 }
 
@@ -186,7 +187,7 @@
       }
 
       for (const_iterator current = begin; current != end; ++current) {
-        uint8 new_digit = 0;
+        uint8_t new_digit = 0;
 
         if (!CharToDigit<traits::kBase>(*current, &new_digit)) {
           return false;
@@ -207,7 +208,7 @@
 
   class Positive : public Base<Positive> {
    public:
-    static bool CheckBounds(value_type* output, uint8 new_digit) {
+    static bool CheckBounds(value_type* output, uint8_t new_digit) {
       if (*output > static_cast<value_type>(traits::max() / traits::kBase) ||
           (*output == static_cast<value_type>(traits::max() / traits::kBase) &&
            new_digit > traits::max() % traits::kBase)) {
@@ -216,14 +217,14 @@
       }
       return true;
     }
-    static void Increment(uint8 increment, value_type* output) {
+    static void Increment(uint8_t increment, value_type* output) {
       *output += increment;
     }
   };
 
   class Negative : public Base<Negative> {
    public:
-    static bool CheckBounds(value_type* output, uint8 new_digit) {
+    static bool CheckBounds(value_type* output, uint8_t new_digit) {
       if (*output < traits::min() / traits::kBase ||
           (*output == traits::min() / traits::kBase &&
            new_digit > 0 - traits::min() % traits::kBase)) {
@@ -232,7 +233,7 @@
       }
       return true;
     }
-    static void Increment(uint8 increment, value_type* output) {
+    static void Increment(uint8_t increment, value_type* output) {
       *output -= increment;
     }
   };
@@ -257,20 +258,17 @@
     : public BaseIteratorRangeToNumberTraits<ITERATOR, int, 16> {
 };
 
-template<typename ITERATOR>
+template <typename ITERATOR>
 class BaseHexIteratorRangeToUIntTraits
-    : public BaseIteratorRangeToNumberTraits<ITERATOR, uint32, 16> {
-};
+    : public BaseIteratorRangeToNumberTraits<ITERATOR, uint32_t, 16> {};
 
-template<typename ITERATOR>
+template <typename ITERATOR>
 class BaseHexIteratorRangeToInt64Traits
-    : public BaseIteratorRangeToNumberTraits<ITERATOR, int64, 16> {
-};
+    : public BaseIteratorRangeToNumberTraits<ITERATOR, int64_t, 16> {};
 
-template<typename ITERATOR>
+template <typename ITERATOR>
 class BaseHexIteratorRangeToUInt64Traits
-    : public BaseIteratorRangeToNumberTraits<ITERATOR, uint64, 16> {
-};
+    : public BaseIteratorRangeToNumberTraits<ITERATOR, uint64_t, 16> {};
 
 typedef BaseHexIteratorRangeToIntTraits<StringPiece::const_iterator>
     HexIteratorRangeToIntTraits;
@@ -284,15 +282,15 @@
 typedef BaseHexIteratorRangeToUInt64Traits<StringPiece::const_iterator>
     HexIteratorRangeToUInt64Traits;
 
-template<typename STR>
-bool HexStringToBytesT(const STR& input, std::vector<uint8>* output) {
+template <typename STR>
+bool HexStringToBytesT(const STR& input, std::vector<uint8_t>* output) {
   DCHECK_EQ(output->size(), 0u);
   size_t count = input.size();
   if (count == 0 || (count % 2) != 0)
     return false;
   for (uintptr_t i = 0; i < count / 2; ++i) {
-    uint8 msb = 0;  // most significant 4 bits
-    uint8 lsb = 0;  // least significant 4 bits
+    uint8_t msb = 0;  // most significant 4 bits
+    uint8_t lsb = 0;  // least significant 4 bits
     if (!CharToDigit<16>(input[i * 2], &msb) ||
         !CharToDigit<16>(input[i * 2 + 1], &lsb))
       return false;
@@ -345,20 +343,20 @@
   return IntToStringT<string16, unsigned int>::IntToString(value);
 }
 
-std::string Int64ToString(int64 value) {
-  return IntToStringT<std::string, int64>::IntToString(value);
+std::string Int64ToString(int64_t value) {
+  return IntToStringT<std::string, int64_t>::IntToString(value);
 }
 
-string16 Int64ToString16(int64 value) {
-  return IntToStringT<string16, int64>::IntToString(value);
+string16 Int64ToString16(int64_t value) {
+  return IntToStringT<string16, int64_t>::IntToString(value);
 }
 
-std::string Uint64ToString(uint64 value) {
-  return IntToStringT<std::string, uint64>::IntToString(value);
+std::string Uint64ToString(uint64_t value) {
+  return IntToStringT<std::string, uint64_t>::IntToString(value);
 }
 
-string16 Uint64ToString16(uint64 value) {
-  return IntToStringT<string16, uint64>::IntToString(value);
+string16 Uint64ToString16(uint64_t value) {
+  return IntToStringT<string16, uint64_t>::IntToString(value);
 }
 
 std::string SizeTToString(size_t value) {
@@ -392,19 +390,19 @@
   return String16ToIntImpl(input, output);
 }
 
-bool StringToInt64(const StringPiece& input, int64* output) {
+bool StringToInt64(const StringPiece& input, int64_t* output) {
   return StringToIntImpl(input, output);
 }
 
-bool StringToInt64(const StringPiece16& input, int64* output) {
+bool StringToInt64(const StringPiece16& input, int64_t* output) {
   return String16ToIntImpl(input, output);
 }
 
-bool StringToUint64(const StringPiece& input, uint64* output) {
+bool StringToUint64(const StringPiece& input, uint64_t* output) {
   return StringToIntImpl(input, output);
 }
 
-bool StringToUint64(const StringPiece16& input, uint64* output) {
+bool StringToUint64(const StringPiece16& input, uint64_t* output) {
   return String16ToIntImpl(input, output);
 }
 
@@ -465,22 +463,22 @@
     input.begin(), input.end(), output);
 }
 
-bool HexStringToUInt(const StringPiece& input, uint32* output) {
+bool HexStringToUInt(const StringPiece& input, uint32_t* output) {
   return IteratorRangeToNumber<HexIteratorRangeToUIntTraits>::Invoke(
       input.begin(), input.end(), output);
 }
 
-bool HexStringToInt64(const StringPiece& input, int64* output) {
+bool HexStringToInt64(const StringPiece& input, int64_t* output) {
   return IteratorRangeToNumber<HexIteratorRangeToInt64Traits>::Invoke(
     input.begin(), input.end(), output);
 }
 
-bool HexStringToUInt64(const StringPiece& input, uint64* output) {
+bool HexStringToUInt64(const StringPiece& input, uint64_t* output) {
   return IteratorRangeToNumber<HexIteratorRangeToUInt64Traits>::Invoke(
       input.begin(), input.end(), output);
 }
 
-bool HexStringToBytes(const std::string& input, std::vector<uint8>* output) {
+bool HexStringToBytes(const std::string& input, std::vector<uint8_t>* output) {
   return HexStringToBytesT(input, output);
 }
 
diff --git a/base/strings/string_number_conversions.h b/base/strings/string_number_conversions.h
index cf1c3b46..1265f0d 100644
--- a/base/strings/string_number_conversions.h
+++ b/base/strings/string_number_conversions.h
@@ -5,11 +5,13 @@
 #ifndef BASE_STRINGS_STRING_NUMBER_CONVERSIONS_H_
 #define BASE_STRINGS_STRING_NUMBER_CONVERSIONS_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
 #include "base/base_export.h"
-#include "base/basictypes.h"
 #include "base/strings/string16.h"
 #include "base/strings/string_piece.h"
 
@@ -35,11 +37,11 @@
 BASE_EXPORT std::string UintToString(unsigned value);
 BASE_EXPORT string16 UintToString16(unsigned value);
 
-BASE_EXPORT std::string Int64ToString(int64 value);
-BASE_EXPORT string16 Int64ToString16(int64 value);
+BASE_EXPORT std::string Int64ToString(int64_t value);
+BASE_EXPORT string16 Int64ToString16(int64_t value);
 
-BASE_EXPORT std::string Uint64ToString(uint64 value);
-BASE_EXPORT string16 Uint64ToString16(uint64 value);
+BASE_EXPORT std::string Uint64ToString(uint64_t value);
+BASE_EXPORT string16 Uint64ToString16(uint64_t value);
 
 BASE_EXPORT std::string SizeTToString(size_t value);
 BASE_EXPORT string16 SizeTToString16(size_t value);
@@ -72,11 +74,11 @@
 BASE_EXPORT bool StringToUint(const StringPiece& input, unsigned* output);
 BASE_EXPORT bool StringToUint(const StringPiece16& input, unsigned* output);
 
-BASE_EXPORT bool StringToInt64(const StringPiece& input, int64* output);
-BASE_EXPORT bool StringToInt64(const StringPiece16& input, int64* output);
+BASE_EXPORT bool StringToInt64(const StringPiece& input, int64_t* output);
+BASE_EXPORT bool StringToInt64(const StringPiece16& input, int64_t* output);
 
-BASE_EXPORT bool StringToUint64(const StringPiece& input, uint64* output);
-BASE_EXPORT bool StringToUint64(const StringPiece16& input, uint64* output);
+BASE_EXPORT bool StringToUint64(const StringPiece& input, uint64_t* output);
+BASE_EXPORT bool StringToUint64(const StringPiece16& input, uint64_t* output);
 
 BASE_EXPORT bool StringToSizeT(const StringPiece& input, size_t* output);
 BASE_EXPORT bool StringToSizeT(const StringPiece16& input, size_t* output);
@@ -110,25 +112,25 @@
 // Will only successful parse hex values that will fit into |output|, i.e.
 // 0x00000000 < |input| < 0xFFFFFFFF.
 // The string is not required to start with 0x.
-BASE_EXPORT bool HexStringToUInt(const StringPiece& input, uint32* output);
+BASE_EXPORT bool HexStringToUInt(const StringPiece& input, uint32_t* output);
 
 // Best effort conversion, see StringToInt above for restrictions.
 // Will only successful parse hex values that will fit into |output|, i.e.
 // -0x8000000000000000 < |input| < 0x7FFFFFFFFFFFFFFF.
-BASE_EXPORT bool HexStringToInt64(const StringPiece& input, int64* output);
+BASE_EXPORT bool HexStringToInt64(const StringPiece& input, int64_t* output);
 
 // Best effort conversion, see StringToInt above for restrictions.
 // Will only successful parse hex values that will fit into |output|, i.e.
 // 0x0000000000000000 < |input| < 0xFFFFFFFFFFFFFFFF.
 // The string is not required to start with 0x.
-BASE_EXPORT bool HexStringToUInt64(const StringPiece& input, uint64* output);
+BASE_EXPORT bool HexStringToUInt64(const StringPiece& input, uint64_t* output);
 
 // Similar to the previous functions, except that output is a vector of bytes.
 // |*output| will contain as many bytes as were successfully parsed prior to the
 // error.  There is no overflow, but input.size() must be evenly divisible by 2.
 // Leading 0x or +/- are not allowed.
 BASE_EXPORT bool HexStringToBytes(const std::string& input,
-                                  std::vector<uint8>* output);
+                                  std::vector<uint8_t>* output);
 
 }  // namespace base
 
diff --git a/base/strings/string_number_conversions_unittest.cc b/base/strings/string_number_conversions_unittest.cc
index a7d9064..f4bdbce 100644
--- a/base/strings/string_number_conversions_unittest.cc
+++ b/base/strings/string_number_conversions_unittest.cc
@@ -5,6 +5,7 @@
 #include "base/strings/string_number_conversions.h"
 
 #include <errno.h>
+#include <stddef.h>
 #include <stdint.h>
 #include <stdio.h>
 
@@ -12,6 +13,7 @@
 #include <limits>
 
 #include "base/format_macros.h"
+#include "base/macros.h"
 #include "base/strings/stringprintf.h"
 #include "base/strings/utf_string_conversions.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -65,7 +67,7 @@
 
 TEST(StringNumberConversionsTest, Uint64ToString) {
   static const struct {
-    uint64 input;
+    uint64_t input;
     std::string output;
   } cases[] = {
       {0, "0"},
@@ -296,7 +298,7 @@
 TEST(StringNumberConversionsTest, StringToUint64) {
   static const struct {
     std::string input;
-    uint64 output;
+    uint64_t output;
     bool success;
   } cases[] = {
       {"0", 0, true},
@@ -335,7 +337,7 @@
   };
 
   for (size_t i = 0; i < arraysize(cases); ++i) {
-    uint64 output = 0;
+    uint64_t output = 0;
     EXPECT_EQ(cases[i].success, StringToUint64(cases[i].input, &output));
     EXPECT_EQ(cases[i].output, output);
 
@@ -350,7 +352,7 @@
   // interpreted as junk after the number.
   const char input[] = "6\06";
   std::string input_string(input, arraysize(input) - 1);
-  uint64 output;
+  uint64_t output;
   EXPECT_FALSE(StringToUint64(input_string, &output));
   EXPECT_EQ(6U, output);
 
@@ -608,7 +610,7 @@
 TEST(StringNumberConversionsTest, HexStringToUInt64) {
   static const struct {
     std::string input;
-    uint64 output;
+    uint64_t output;
     bool success;
   } cases[] = {
       {"0", 0, true},
@@ -654,7 +656,7 @@
   };
 
   for (size_t i = 0; i < arraysize(cases); ++i) {
-    uint64 output = 0;
+    uint64_t output = 0;
     EXPECT_EQ(cases[i].success, HexStringToUInt64(cases[i].input, &output));
     EXPECT_EQ(cases[i].output, output);
   }
@@ -663,7 +665,7 @@
   // interpreted as junk after the number.
   const char input[] = "0xc0ffee\0" "9";
   std::string input_string(input, arraysize(input) - 1);
-  uint64 output;
+  uint64_t output;
   EXPECT_FALSE(HexStringToUInt64(input_string, &output));
   EXPECT_EQ(0xc0ffeeU, output);
 }
diff --git a/base/strings/string_piece.h b/base/strings/string_piece.h
index eb82d33..31e7596d 100644
--- a/base/strings/string_piece.h
+++ b/base/strings/string_piece.h
@@ -28,7 +28,6 @@
 #include <string>
 
 #include "base/base_export.h"
-#include "base/basictypes.h"
 #include "base/containers/hash_tables.h"
 #include "base/logging.h"
 #include "base/strings/string16.h"
diff --git a/base/strings/string_piece_unittest.cc b/base/strings/string_piece_unittest.cc
index 5336603..f05aa152 100644
--- a/base/strings/string_piece_unittest.cc
+++ b/base/strings/string_piece_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 "base/strings/string16.h"
diff --git a/base/strings/string_split.cc b/base/strings/string_split.cc
index 4253e2f8..093680d8 100644
--- a/base/strings/string_split.cc
+++ b/base/strings/string_split.cc
@@ -4,6 +4,8 @@
 
 #include "base/strings/string_split.h"
 
+#include <stddef.h>
+
 #include "base/logging.h"
 #include "base/strings/string_util.h"
 #include "base/third_party/icu/icu_utf.h"
diff --git a/base/strings/string_split_unittest.cc b/base/strings/string_split_unittest.cc
index 0416776..0e9ca9f 100644
--- a/base/strings/string_split_unittest.cc
+++ b/base/strings/string_split_unittest.cc
@@ -4,6 +4,9 @@
 
 #include "base/strings/string_split.h"
 
+#include <stddef.h>
+
+#include "base/macros.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
 #include "testing/gmock/include/gmock/gmock.h"
diff --git a/base/strings/string_util.cc b/base/strings/string_util.cc
index 39cc6f5..e8000ab 100644
--- a/base/strings/string_util.cc
+++ b/base/strings/string_util.cc
@@ -21,6 +21,7 @@
 #include <vector>
 
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/singleton.h"
 #include "base/strings/string_split.h"
 #include "base/strings/utf_string_conversion_utils.h"
diff --git a/base/strings/string_util.h b/base/strings/string_util.h
index af7b6e6ae9..e369f294 100644
--- a/base/strings/string_util.h
+++ b/base/strings/string_util.h
@@ -9,15 +9,17 @@
 
 #include <ctype.h>
 #include <stdarg.h>   // va_list
+#include <stddef.h>
+#include <stdint.h>
 
 #include <string>
 #include <vector>
 
 #include "base/base_export.h"
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
 #include "base/strings/string16.h"
 #include "base/strings/string_piece.h"  // For implicit conversions.
+#include "build/build_config.h"
 
 namespace base {
 
@@ -363,7 +365,7 @@
 // appropriate for use in any UI; use of FormatBytes and friends in ui/base is
 // highly recommended instead. TODO(avi): Figure out how to get callers to use
 // FormatBytes instead; remove this.
-BASE_EXPORT string16 FormatBytesUnlocalized(int64 bytes);
+BASE_EXPORT string16 FormatBytesUnlocalized(int64_t bytes);
 
 // Starting at |start_offset| (usually 0), replace the first instance of
 // |find_this| with |replace_with|.
diff --git a/base/strings/string_util_posix.h b/base/strings/string_util_posix.h
index 9e96697f..8299118 100644
--- a/base/strings/string_util_posix.h
+++ b/base/strings/string_util_posix.h
@@ -6,6 +6,7 @@
 #define BASE_STRINGS_STRING_UTIL_POSIX_H_
 
 #include <stdarg.h>
+#include <stddef.h>
 #include <stdio.h>
 #include <string.h>
 #include <wchar.h>
diff --git a/base/strings/string_util_unittest.cc b/base/strings/string_util_unittest.cc
index 1db7746..79eed61d 100644
--- a/base/strings/string_util_unittest.cc
+++ b/base/strings/string_util_unittest.cc
@@ -6,10 +6,12 @@
 
 #include <math.h>
 #include <stdarg.h>
+#include <stddef.h>
+#include <stdint.h>
 
 #include <algorithm>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/strings/string16.h"
 #include "base/strings/utf_string_conversions.h"
 #include "testing/gmock/include/gmock/gmock.h"
@@ -549,7 +551,7 @@
 
 TEST(StringUtilTest, FormatBytesUnlocalized) {
   static const struct {
-    int64 bytes;
+    int64_t bytes;
     const char* expected;
   } cases[] = {
     // Expected behavior: we show one post-decimal digit when we have
diff --git a/base/strings/string_util_win.h b/base/strings/string_util_win.h
index 839a799..7f260bf 100644
--- a/base/strings/string_util_win.h
+++ b/base/strings/string_util_win.h
@@ -6,6 +6,7 @@
 #define BASE_STRINGS_STRING_UTIL_WIN_H_
 
 #include <stdarg.h>
+#include <stddef.h>
 #include <stdio.h>
 #include <string.h>
 #include <wchar.h>
diff --git a/base/strings/stringprintf.cc b/base/strings/stringprintf.cc
index 537873d7..415845d6 100644
--- a/base/strings/stringprintf.cc
+++ b/base/strings/stringprintf.cc
@@ -5,12 +5,15 @@
 #include "base/strings/stringprintf.h"
 
 #include <errno.h>
+#include <stddef.h>
 
 #include <vector>
 
+#include "base/macros.h"
 #include "base/scoped_clear_errno.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 
 namespace base {
 
diff --git a/base/strings/stringprintf_unittest.cc b/base/strings/stringprintf_unittest.cc
index e0b320f..e2d3a90 100644
--- a/base/strings/stringprintf_unittest.cc
+++ b/base/strings/stringprintf_unittest.cc
@@ -5,8 +5,10 @@
 #include "base/strings/stringprintf.h"
 
 #include <errno.h>
+#include <stddef.h>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
+#include "build/build_config.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace base {
diff --git a/base/strings/sys_string_conversions.h b/base/strings/sys_string_conversions.h
index 42f2389a..b41a228 100644
--- a/base/strings/sys_string_conversions.h
+++ b/base/strings/sys_string_conversions.h
@@ -9,12 +9,14 @@
 // necessary to not use ICU. Generally, you should not need this in Chrome,
 // but it is used in some shared code. Dependencies should be minimal.
 
+#include <stdint.h>
+
 #include <string>
 
 #include "base/base_export.h"
-#include "base/basictypes.h"
 #include "base/strings/string16.h"
 #include "base/strings/string_piece.h"
+#include "build/build_config.h"
 
 #if defined(OS_MACOSX)
 #include <CoreFoundation/CoreFoundation.h>
@@ -46,9 +48,9 @@
 // code page identifier is one accepted by the Windows function
 // MultiByteToWideChar().
 BASE_EXPORT std::wstring SysMultiByteToWide(const StringPiece& mb,
-                                            uint32 code_page);
+                                            uint32_t code_page);
 BASE_EXPORT std::string SysWideToMultiByte(const std::wstring& wide,
-                                           uint32 code_page);
+                                           uint32_t code_page);
 
 #endif  // defined(OS_WIN)
 
diff --git a/base/strings/sys_string_conversions_mac.mm b/base/strings/sys_string_conversions_mac.mm
index 9479e78..32fe89c 100644
--- a/base/strings/sys_string_conversions_mac.mm
+++ b/base/strings/sys_string_conversions_mac.mm
@@ -5,6 +5,7 @@
 #include "base/strings/sys_string_conversions.h"
 
 #import <Foundation/Foundation.h>
+#include <stddef.h>
 
 #include <vector>
 
diff --git a/base/strings/sys_string_conversions_posix.cc b/base/strings/sys_string_conversions_posix.cc
index 3b18456..a8dcfd0 100644
--- a/base/strings/sys_string_conversions_posix.cc
+++ b/base/strings/sys_string_conversions_posix.cc
@@ -4,10 +4,12 @@
 
 #include "base/strings/sys_string_conversions.h"
 
+#include <stddef.h>
 #include <wchar.h>
 
 #include "base/strings/string_piece.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 
 namespace base {
 
diff --git a/base/strings/sys_string_conversions_unittest.cc b/base/strings/sys_string_conversions_unittest.cc
index 90c4767e..f5ffaec 100644
--- a/base/strings/sys_string_conversions_unittest.cc
+++ b/base/strings/sys_string_conversions_unittest.cc
@@ -2,13 +2,16 @@
 // 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 "base/basictypes.h"
+#include "base/macros.h"
 #include "base/strings/string_piece.h"
 #include "base/strings/sys_string_conversions.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/test/scoped_locale.h"
+#include "build/build_config.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 #ifdef WCHAR_T_IS_UTF32
diff --git a/base/strings/sys_string_conversions_win.cc b/base/strings/sys_string_conversions_win.cc
index 94d4466..b708544 100644
--- a/base/strings/sys_string_conversions_win.cc
+++ b/base/strings/sys_string_conversions_win.cc
@@ -5,6 +5,7 @@
 #include "base/strings/sys_string_conversions.h"
 
 #include <windows.h>
+#include <stdint.h>
 
 #include "base/strings/string_piece.h"
 
@@ -29,7 +30,7 @@
 }
 
 // Do not assert in this function since it is used by the asssertion code!
-std::wstring SysMultiByteToWide(const StringPiece& mb, uint32 code_page) {
+std::wstring SysMultiByteToWide(const StringPiece& mb, uint32_t code_page) {
   if (mb.empty())
     return std::wstring();
 
@@ -48,7 +49,7 @@
 }
 
 // Do not assert in this function since it is used by the asssertion code!
-std::string SysWideToMultiByte(const std::wstring& wide, uint32 code_page) {
+std::string SysWideToMultiByte(const std::wstring& wide, uint32_t code_page) {
   int wide_length = static_cast<int>(wide.length());
   if (wide_length == 0)
     return std::string();
diff --git a/base/strings/utf_offset_string_conversions.cc b/base/strings/utf_offset_string_conversions.cc
index c2270bf..322c7a2 100644
--- a/base/strings/utf_offset_string_conversions.cc
+++ b/base/strings/utf_offset_string_conversions.cc
@@ -4,6 +4,8 @@
 
 #include "base/strings/utf_offset_string_conversions.h"
 
+#include <stdint.h>
+
 #include <algorithm>
 
 #include "base/logging.h"
@@ -188,9 +190,9 @@
     adjustments->clear();
   // ICU requires 32-bit numbers.
   bool success = true;
-  int32 src_len32 = static_cast<int32>(src_len);
-  for (int32 i = 0; i < src_len32; i++) {
-    uint32 code_point;
+  int32_t src_len32 = static_cast<int32_t>(src_len);
+  for (int32_t i = 0; i < src_len32; i++) {
+    uint32_t code_point;
     size_t original_i = i;
     size_t chars_written = 0;
     if (ReadUnicodeCharacter(src, src_len32, &i, &code_point)) {
diff --git a/base/strings/utf_offset_string_conversions.h b/base/strings/utf_offset_string_conversions.h
index d449489..1844601 100644
--- a/base/strings/utf_offset_string_conversions.h
+++ b/base/strings/utf_offset_string_conversions.h
@@ -5,6 +5,8 @@
 #ifndef BASE_STRINGS_UTF_OFFSET_STRING_CONVERSIONS_H_
 #define BASE_STRINGS_UTF_OFFSET_STRING_CONVERSIONS_H_
 
+#include <stddef.h>
+
 #include <string>
 #include <vector>
 
diff --git a/base/strings/utf_offset_string_conversions_unittest.cc b/base/strings/utf_offset_string_conversions_unittest.cc
index 9398a56..fe0e4da8 100644
--- a/base/strings/utf_offset_string_conversions_unittest.cc
+++ b/base/strings/utf_offset_string_conversions_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 <stddef.h>
+
 #include <algorithm>
 
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/strings/string_piece.h"
 #include "base/strings/utf_offset_string_conversions.h"
 #include "testing/gtest/include/gtest/gtest.h"
diff --git a/base/strings/utf_string_conversion_utils.cc b/base/strings/utf_string_conversion_utils.cc
index 022c0dffd..3101a60 100644
--- a/base/strings/utf_string_conversion_utils.cc
+++ b/base/strings/utf_string_conversion_utils.cc
@@ -11,15 +11,15 @@
 // ReadUnicodeCharacter --------------------------------------------------------
 
 bool ReadUnicodeCharacter(const char* src,
-                          int32 src_len,
-                          int32* char_index,
-                          uint32* code_point_out) {
+                          int32_t src_len,
+                          int32_t* char_index,
+                          uint32_t* code_point_out) {
   // U8_NEXT expects to be able to use -1 to signal an error, so we must
   // use a signed type for code_point.  But this function returns false
   // on error anyway, so code_point_out is unsigned.
-  int32 code_point;
+  int32_t code_point;
   CBU8_NEXT(src, *char_index, src_len, code_point);
-  *code_point_out = static_cast<uint32>(code_point);
+  *code_point_out = static_cast<uint32_t>(code_point);
 
   // The ICU macro above moves to the next char, we want to point to the last
   // char consumed.
@@ -30,9 +30,9 @@
 }
 
 bool ReadUnicodeCharacter(const char16* src,
-                          int32 src_len,
-                          int32* char_index,
-                          uint32* code_point) {
+                          int32_t src_len,
+                          int32_t* char_index,
+                          uint32_t* code_point) {
   if (CBU16_IS_SURROGATE(src[*char_index])) {
     if (!CBU16_IS_SURROGATE_LEAD(src[*char_index]) ||
         *char_index + 1 >= src_len ||
@@ -55,9 +55,9 @@
 
 #if defined(WCHAR_T_IS_UTF32)
 bool ReadUnicodeCharacter(const wchar_t* src,
-                          int32 src_len,
-                          int32* char_index,
-                          uint32* code_point) {
+                          int32_t src_len,
+                          int32_t* char_index,
+                          uint32_t* code_point) {
   // Conversion is easy since the source is 32-bit.
   *code_point = src[*char_index];
 
@@ -68,7 +68,7 @@
 
 // WriteUnicodeCharacter -------------------------------------------------------
 
-size_t WriteUnicodeCharacter(uint32 code_point, std::string* output) {
+size_t WriteUnicodeCharacter(uint32_t code_point, std::string* output) {
   if (code_point <= 0x7f) {
     // Fast path the common case of one byte.
     output->push_back(static_cast<char>(code_point));
@@ -89,7 +89,7 @@
   return char_offset - original_char_offset;
 }
 
-size_t WriteUnicodeCharacter(uint32 code_point, string16* output) {
+size_t WriteUnicodeCharacter(uint32_t code_point, string16* output) {
   if (CBU16_LENGTH(code_point) == 1) {
     // Thie code point is in the Basic Multilingual Plane (BMP).
     output->push_back(static_cast<char16>(code_point));
diff --git a/base/strings/utf_string_conversion_utils.h b/base/strings/utf_string_conversion_utils.h
index a1b2e64a..c7164045 100644
--- a/base/strings/utf_string_conversion_utils.h
+++ b/base/strings/utf_string_conversion_utils.h
@@ -7,12 +7,15 @@
 
 // This should only be used by the various UTF string conversion files.
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/base_export.h"
 #include "base/strings/string16.h"
 
 namespace base {
 
-inline bool IsValidCodepoint(uint32 code_point) {
+inline bool IsValidCodepoint(uint32_t code_point) {
   // Excludes the surrogate code points ([0xD800, 0xDFFF]) and
   // codepoints larger than 0x10FFFF (the highest codepoint allowed).
   // Non-characters and unassigned codepoints are allowed.
@@ -20,7 +23,7 @@
          (code_point >= 0xE000u && code_point <= 0x10FFFFu);
 }
 
-inline bool IsValidCharacter(uint32 code_point) {
+inline bool IsValidCharacter(uint32_t code_point) {
   // Excludes non-characters (U+FDD0..U+FDEF, and all codepoints ending in
   // 0xFFFE or 0xFFFF) from the set of valid code points.
   return code_point < 0xD800u || (code_point >= 0xE000u &&
@@ -38,39 +41,39 @@
 //
 // Returns true on success. On false, |*code_point| will be invalid.
 BASE_EXPORT bool ReadUnicodeCharacter(const char* src,
-                                      int32 src_len,
-                                      int32* char_index,
-                                      uint32* code_point_out);
+                                      int32_t src_len,
+                                      int32_t* char_index,
+                                      uint32_t* code_point_out);
 
 // Reads a UTF-16 character. The usage is the same as the 8-bit version above.
 BASE_EXPORT bool ReadUnicodeCharacter(const char16* src,
-                                      int32 src_len,
-                                      int32* char_index,
-                                      uint32* code_point);
+                                      int32_t src_len,
+                                      int32_t* char_index,
+                                      uint32_t* code_point);
 
 #if defined(WCHAR_T_IS_UTF32)
 // Reads UTF-32 character. The usage is the same as the 8-bit version above.
 BASE_EXPORT bool ReadUnicodeCharacter(const wchar_t* src,
-                                      int32 src_len,
-                                      int32* char_index,
-                                      uint32* code_point);
+                                      int32_t src_len,
+                                      int32_t* char_index,
+                                      uint32_t* code_point);
 #endif  // defined(WCHAR_T_IS_UTF32)
 
 // WriteUnicodeCharacter -------------------------------------------------------
 
 // Appends a UTF-8 character to the given 8-bit string.  Returns the number of
 // bytes written.
-BASE_EXPORT size_t WriteUnicodeCharacter(uint32 code_point,
+BASE_EXPORT size_t WriteUnicodeCharacter(uint32_t code_point,
                                          std::string* output);
 
 // Appends the given code point as a UTF-16 character to the given 16-bit
 // string.  Returns the number of 16-bit values written.
-BASE_EXPORT size_t WriteUnicodeCharacter(uint32 code_point, string16* output);
+BASE_EXPORT size_t WriteUnicodeCharacter(uint32_t code_point, string16* output);
 
 #if defined(WCHAR_T_IS_UTF32)
 // Appends the given UTF-32 character to the given 32-bit string.  Returns the
 // number of 32-bit values written.
-inline size_t WriteUnicodeCharacter(uint32 code_point, std::wstring* output) {
+inline size_t WriteUnicodeCharacter(uint32_t code_point, std::wstring* output) {
   // This is the easy case, just append the character.
   output->push_back(code_point);
   return 1;
diff --git a/base/strings/utf_string_conversions.cc b/base/strings/utf_string_conversions.cc
index b6cf6ff9..6b17eacd6 100644
--- a/base/strings/utf_string_conversions.cc
+++ b/base/strings/utf_string_conversions.cc
@@ -4,9 +4,12 @@
 
 #include "base/strings/utf_string_conversions.h"
 
+#include <stdint.h>
+
 #include "base/strings/string_piece.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversion_utils.h"
+#include "build/build_config.h"
 
 namespace base {
 
@@ -24,9 +27,9 @@
                     DEST_STRING* output) {
   // ICU requires 32-bit numbers.
   bool success = true;
-  int32 src_len32 = static_cast<int32>(src_len);
-  for (int32 i = 0; i < src_len32; i++) {
-    uint32 code_point;
+  int32_t src_len32 = static_cast<int32_t>(src_len);
+  for (int32_t i = 0; i < src_len32; i++) {
+    uint32_t code_point;
     if (ReadUnicodeCharacter(src, src_len32, &i, &code_point)) {
       WriteUnicodeCharacter(code_point, output);
     } else {
diff --git a/base/strings/utf_string_conversions.h b/base/strings/utf_string_conversions.h
index 9b15730d..2995f4c 100644
--- a/base/strings/utf_string_conversions.h
+++ b/base/strings/utf_string_conversions.h
@@ -5,6 +5,8 @@
 #ifndef BASE_STRINGS_UTF_STRING_CONVERSIONS_H_
 #define BASE_STRINGS_UTF_STRING_CONVERSIONS_H_
 
+#include <stddef.h>
+
 #include <string>
 
 #include "base/base_export.h"
diff --git a/base/strings/utf_string_conversions_unittest.cc b/base/strings/utf_string_conversions_unittest.cc
index 2d5eb41..81077135 100644
--- a/base/strings/utf_string_conversions_unittest.cc
+++ b/base/strings/utf_string_conversions_unittest.cc
@@ -2,11 +2,14 @@
 // 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 <stddef.h>
+
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/strings/string_piece.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace base {
diff --git a/chrome/VERSION b/chrome/VERSION
index 39cac0d..f37b29c 100644
--- a/chrome/VERSION
+++ b/chrome/VERSION
@@ -1,4 +1,4 @@
 MAJOR=49
 MINOR=0
-BUILD=2602
+BUILD=2603
 PATCH=0
diff --git a/chrome/browser/ui/android/android_about_app_info.cc b/chrome/browser/ui/android/android_about_app_info.cc
index b3a96f7..417e703 100644
--- a/chrome/browser/ui/android/android_about_app_info.cc
+++ b/chrome/browser/ui/android/android_about_app_info.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/android/android_about_app_info.h"
 
+#include <stdint.h>
+
 #include <string>
 
 #include "base/strings/stringprintf.h"
@@ -13,9 +15,9 @@
   std::string android_info_str;
 
   // Append information about the OS version.
-  int32 os_major_version = 0;
-  int32 os_minor_version = 0;
-  int32 os_bugfix_version = 0;
+  int32_t os_major_version = 0;
+  int32_t os_minor_version = 0;
+  int32_t os_bugfix_version = 0;
   base::SysInfo::OperatingSystemVersionNumbers(&os_major_version,
                                                &os_minor_version,
                                                &os_bugfix_version);
diff --git a/chrome/browser/ui/android/autofill/autofill_dialog_controller_android.cc b/chrome/browser/ui/android/autofill/autofill_dialog_controller_android.cc
index d640290..cacad43c 100644
--- a/chrome/browser/ui/android/autofill/autofill_dialog_controller_android.cc
+++ b/chrome/browser/ui/android/autofill/autofill_dialog_controller_android.cc
@@ -4,12 +4,15 @@
 
 #include "chrome/browser/ui/android/autofill/autofill_dialog_controller_android.h"
 
+#include <stddef.h>
+
 #include "base/android/jni_android.h"
 #include "base/android/jni_array.h"
 #include "base/android/jni_string.h"
 #include "base/android/scoped_java_ref.h"
 #include "base/bind.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/prefs/pref_service.h"
 #include "base/prefs/scoped_user_pref_update.h"
 #include "base/strings/utf_string_conversions.h"
diff --git a/chrome/browser/ui/android/autofill/autofill_dialog_controller_android.h b/chrome/browser/ui/android/autofill/autofill_dialog_controller_android.h
index e37eda5..9c40f0c 100644
--- a/chrome/browser/ui/android/autofill/autofill_dialog_controller_android.h
+++ b/chrome/browser/ui/android/autofill/autofill_dialog_controller_android.h
@@ -9,6 +9,7 @@
 
 #include "base/android/jni_string.h"
 #include "base/android/scoped_java_ref.h"
+#include "base/macros.h"
 #include "base/time/time.h"
 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h"
 #include "chrome/browser/ui/autofill/autofill_dialog_types.h"
diff --git a/chrome/browser/ui/android/autofill/autofill_dialog_result.h b/chrome/browser/ui/android/autofill/autofill_dialog_result.h
index 2fe26a9..b0420e4c 100644
--- a/chrome/browser/ui/android/autofill/autofill_dialog_result.h
+++ b/chrome/browser/ui/android/autofill/autofill_dialog_result.h
@@ -8,6 +8,7 @@
 #include <jni.h>
 #include <string>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/strings/string16.h"
 
diff --git a/chrome/browser/ui/android/autofill/autofill_keyboard_accessory_view.h b/chrome/browser/ui/android/autofill/autofill_keyboard_accessory_view.h
index 31ecd26..fafdb2a6 100644
--- a/chrome/browser/ui/android/autofill/autofill_keyboard_accessory_view.h
+++ b/chrome/browser/ui/android/autofill/autofill_keyboard_accessory_view.h
@@ -6,10 +6,12 @@
 #define CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_KEYBOARD_ACCESSORY_VIEW_H_
 
 #include <jni.h>
+#include <stddef.h>
 #include <vector>
 
 #include "base/android/scoped_java_ref.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/autofill/autofill_popup_view.h"
 
 namespace gfx {
diff --git a/chrome/browser/ui/android/autofill/autofill_logger_android.h b/chrome/browser/ui/android/autofill/autofill_logger_android.h
index b8bfa605..e3655c3 100644
--- a/chrome/browser/ui/android/autofill/autofill_logger_android.h
+++ b/chrome/browser/ui/android/autofill/autofill_logger_android.h
@@ -7,6 +7,7 @@
 
 #include "base/android/jni_android.h"
 #include "base/android/jni_string.h"
+#include "base/macros.h"
 #include "base/strings/string16.h"
 
 namespace autofill {
diff --git a/chrome/browser/ui/android/autofill/autofill_popup_view_android.h b/chrome/browser/ui/android/autofill/autofill_popup_view_android.h
index db8aff58..4d36b1a 100644
--- a/chrome/browser/ui/android/autofill/autofill_popup_view_android.h
+++ b/chrome/browser/ui/android/autofill/autofill_popup_view_android.h
@@ -6,9 +6,11 @@
 #define CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_POPUP_VIEW_ANDROID_H_
 
 #include <jni.h>
+#include <stddef.h>
 
 #include "base/android/scoped_java_ref.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/autofill/autofill_popup_view.h"
 
 namespace gfx {
diff --git a/chrome/browser/ui/android/autofill/card_unmask_prompt_view_android.h b/chrome/browser/ui/android/autofill/card_unmask_prompt_view_android.h
index 15dd9c15..e0d7ea9 100644
--- a/chrome/browser/ui/android/autofill/card_unmask_prompt_view_android.h
+++ b/chrome/browser/ui/android/autofill/card_unmask_prompt_view_android.h
@@ -9,6 +9,7 @@
 
 #include "base/android/jni_string.h"
 #include "base/android/scoped_java_ref.h"
+#include "base/macros.h"
 #include "base/strings/string16.h"
 #include "components/autofill/core/browser/ui/card_unmask_prompt_view.h"
 
diff --git a/chrome/browser/ui/android/autofill/password_generation_popup_view_android.h b/chrome/browser/ui/android/autofill/password_generation_popup_view_android.h
index 27f4ce8..530214f3 100644
--- a/chrome/browser/ui/android/autofill/password_generation_popup_view_android.h
+++ b/chrome/browser/ui/android/autofill/password_generation_popup_view_android.h
@@ -9,6 +9,7 @@
 
 #include "base/android/scoped_java_ref.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/autofill/password_generation_popup_view.h"
 
 namespace autofill {
diff --git a/chrome/browser/ui/android/chrome_http_auth_handler.h b/chrome/browser/ui/android/chrome_http_auth_handler.h
index 771047e..b6f0486 100644
--- a/chrome/browser/ui/android/chrome_http_auth_handler.h
+++ b/chrome/browser/ui/android/chrome_http_auth_handler.h
@@ -8,6 +8,7 @@
 #include <jni.h>
 
 #include "base/android/scoped_java_ref.h"
+#include "base/macros.h"
 #include "base/strings/string16.h"
 #include "chrome/browser/ui/login/login_prompt.h"
 
diff --git a/chrome/browser/ui/android/connection_info_popup_android.h b/chrome/browser/ui/android/connection_info_popup_android.h
index fe9288a2..42293fc3 100644
--- a/chrome/browser/ui/android/connection_info_popup_android.h
+++ b/chrome/browser/ui/android/connection_info_popup_android.h
@@ -8,7 +8,7 @@
 #include <jni.h>
 
 #include "base/android/scoped_java_ref.h"
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "chrome/browser/ui/website_settings/website_settings_ui.h"
 
diff --git a/chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.cc b/chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.cc
index 4d058f9..d4446ce70 100644
--- a/chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.cc
+++ b/chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.h"
 
+#include <stddef.h>
+
 #include "base/prefs/pref_service.h"
 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
 #include "chrome/browser/infobars/infobar_service.h"
diff --git a/chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.h b/chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.h
index 1571627..1377ff6 100644
--- a/chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.h
+++ b/chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_ANDROID_CONTENT_SETTINGS_POPUP_BLOCKED_INFOBAR_DELEGATE_H_
 #define CHROME_BROWSER_UI_ANDROID_CONTENT_SETTINGS_POPUP_BLOCKED_INFOBAR_DELEGATE_H_
 
+#include "base/macros.h"
 #include "components/infobars/core/confirm_infobar_delegate.h"
 #include "url/gurl.h"
 
diff --git a/chrome/browser/ui/android/context_menu_helper.cc b/chrome/browser/ui/android/context_menu_helper.cc
index 5379877..0dc0ade 100644
--- a/chrome/browser/ui/android/context_menu_helper.cc
+++ b/chrome/browser/ui/android/context_menu_helper.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/android/context_menu_helper.h"
 
+#include <stdint.h>
+
 #include "base/android/jni_android.h"
 #include "base/android/jni_array.h"
 #include "base/android/jni_string.h"
@@ -161,8 +163,7 @@
   JNIEnv* env = base::android::AttachCurrentThread();
   base::android::ScopedJavaLocalRef<jbyteArray> j_bytes =
       base::android::ToJavaByteArray(
-          env,
-          reinterpret_cast<const uint8*>(thumbnail_data.data()),
+          env, reinterpret_cast<const uint8_t*>(thumbnail_data.data()),
           thumbnail_data.length());
 
   Java_ContextMenuHelper_onShareImageReceived(
diff --git a/chrome/browser/ui/android/context_menu_helper.h b/chrome/browser/ui/android/context_menu_helper.h
index 5850209..7b77463 100644
--- a/chrome/browser/ui/android/context_menu_helper.h
+++ b/chrome/browser/ui/android/context_menu_helper.h
@@ -9,6 +9,7 @@
 
 #include "base/android/jni_android.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "content/public/browser/web_contents_user_data.h"
 #include "content/public/common/context_menu_params.h"
diff --git a/chrome/browser/ui/android/infobars/app_banner_infobar_android.h b/chrome/browser/ui/android/infobars/app_banner_infobar_android.h
index 9cc364ec..f05b0c3a 100644
--- a/chrome/browser/ui/android/infobars/app_banner_infobar_android.h
+++ b/chrome/browser/ui/android/infobars/app_banner_infobar_android.h
@@ -6,7 +6,7 @@
 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_APP_BANNER_INFOBAR_ANDROID_H_
 
 #include "base/android/scoped_java_ref.h"
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/android/infobars/confirm_infobar.h"
 #include "url/gurl.h"
 
diff --git a/chrome/browser/ui/android/infobars/confirm_infobar.cc b/chrome/browser/ui/android/infobars/confirm_infobar.cc
index 53003b65..c909911 100644
--- a/chrome/browser/ui/android/infobars/confirm_infobar.cc
+++ b/chrome/browser/ui/android/infobars/confirm_infobar.cc
@@ -10,6 +10,7 @@
 #include "base/android/jni_array.h"
 #include "base/android/jni_string.h"
 #include "base/logging.h"
+#include "build/build_config.h"
 #include "chrome/browser/android/resource_mapper.h"
 #include "chrome/browser/infobars/infobar_service.h"
 #include "chrome/browser/permissions/permission_infobar_delegate.h"
diff --git a/chrome/browser/ui/android/infobars/confirm_infobar.h b/chrome/browser/ui/android/infobars/confirm_infobar.h
index 98c26ce..9dfbe86 100644
--- a/chrome/browser/ui/android/infobars/confirm_infobar.h
+++ b/chrome/browser/ui/android/infobars/confirm_infobar.h
@@ -5,7 +5,7 @@
 #ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_CONFIRM_INFOBAR_H_
 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_CONFIRM_INFOBAR_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/strings/string16.h"
 #include "chrome/browser/ui/android/infobars/infobar_android.h"
 #include "components/infobars/core/confirm_infobar_delegate.h"
diff --git a/chrome/browser/ui/android/infobars/data_reduction_proxy_infobar.h b/chrome/browser/ui/android/infobars/data_reduction_proxy_infobar.h
index 54d3d77..20d7729 100644
--- a/chrome/browser/ui/android/infobars/data_reduction_proxy_infobar.h
+++ b/chrome/browser/ui/android/infobars/data_reduction_proxy_infobar.h
@@ -5,7 +5,7 @@
 #ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_DATA_REDUCTION_PROXY_INFOBAR_H_
 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_DATA_REDUCTION_PROXY_INFOBAR_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/strings/string16.h"
 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_infobar_delegate_android.h"
 #include "chrome/browser/ui/android/infobars/confirm_infobar.h"
diff --git a/chrome/browser/ui/android/infobars/download_overwrite_infobar.h b/chrome/browser/ui/android/infobars/download_overwrite_infobar.h
index 403ee4d..fa7215a1 100644
--- a/chrome/browser/ui/android/infobars/download_overwrite_infobar.h
+++ b/chrome/browser/ui/android/infobars/download_overwrite_infobar.h
@@ -6,7 +6,7 @@
 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_DOWNLOAD_OVERWRITE_INFOBAR_H_
 
 #include "base/android/scoped_java_ref.h"
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/android/infobars/infobar_android.h"
 
 namespace chrome {
diff --git a/chrome/browser/ui/android/infobars/infobar_android.h b/chrome/browser/ui/android/infobars/infobar_android.h
index bad778f..bbcec428 100644
--- a/chrome/browser/ui/android/infobars/infobar_android.h
+++ b/chrome/browser/ui/android/infobars/infobar_android.h
@@ -9,8 +9,8 @@
 
 #include "base/android/jni_weak_ref.h"
 #include "base/android/scoped_java_ref.h"
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "components/infobars/core/infobar.h"
 
 class InfoBarService;
diff --git a/chrome/browser/ui/android/infobars/infobar_container_android.h b/chrome/browser/ui/android/infobars/infobar_container_android.h
index 652151ff..dd7ab8d 100644
--- a/chrome/browser/ui/android/infobars/infobar_container_android.h
+++ b/chrome/browser/ui/android/infobars/infobar_container_android.h
@@ -5,13 +5,15 @@
 #ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_INFOBAR_CONTAINER_ANDROID_H_
 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_INFOBAR_CONTAINER_ANDROID_H_
 
+#include <stddef.h>
+
 #include <map>
 #include <string>
 
 #include "base/android/jni_weak_ref.h"
 #include "base/android/scoped_java_ref.h"
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "components/infobars/core/infobar_container.h"
 
 class InfoBarAndroid;
diff --git a/chrome/browser/ui/android/infobars/save_password_infobar.h b/chrome/browser/ui/android/infobars/save_password_infobar.h
index 2521dd9..a14fcf0 100644
--- a/chrome/browser/ui/android/infobars/save_password_infobar.h
+++ b/chrome/browser/ui/android/infobars/save_password_infobar.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_SAVE_PASSWORD_INFOBAR_H_
 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_SAVE_PASSWORD_INFOBAR_H_
 
+#include "base/macros.h"
 #include "chrome/browser/password_manager/save_password_infobar_delegate.h"
 #include "chrome/browser/ui/android/infobars/confirm_infobar.h"
 
diff --git a/chrome/browser/ui/android/infobars/translate_infobar.cc b/chrome/browser/ui/android/infobars/translate_infobar.cc
index 96f5d433..85e9020 100644
--- a/chrome/browser/ui/android/infobars/translate_infobar.cc
+++ b/chrome/browser/ui/android/infobars/translate_infobar.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/android/infobars/translate_infobar.h"
 
+#include <stddef.h>
+
 #include "base/android/jni_android.h"
 #include "base/android/jni_array.h"
 #include "base/android/jni_string.h"
diff --git a/chrome/browser/ui/android/infobars/translate_infobar.h b/chrome/browser/ui/android/infobars/translate_infobar.h
index 393887f..3d760a7 100644
--- a/chrome/browser/ui/android/infobars/translate_infobar.h
+++ b/chrome/browser/ui/android/infobars/translate_infobar.h
@@ -6,7 +6,7 @@
 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_TRANSLATE_INFOBAR_H_
 
 #include "base/android/scoped_java_ref.h"
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "chrome/browser/translate/chrome_translate_client.h"
 #include "chrome/browser/ui/android/infobars/infobar_android.h"
 
diff --git a/chrome/browser/ui/android/javascript_app_modal_dialog_android.cc b/chrome/browser/ui/android/javascript_app_modal_dialog_android.cc
index cc91515..b56bf48 100644
--- a/chrome/browser/ui/android/javascript_app_modal_dialog_android.cc
+++ b/chrome/browser/ui/android/javascript_app_modal_dialog_android.cc
@@ -6,6 +6,7 @@
 
 #include "base/android/jni_android.h"
 #include "base/android/jni_string.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/app_modal/chrome_javascript_native_dialog_factory.h"
 #include "components/app_modal/app_modal_dialog_queue.h"
 #include "components/app_modal/javascript_app_modal_dialog.h"
diff --git a/chrome/browser/ui/android/javascript_app_modal_dialog_android.h b/chrome/browser/ui/android/javascript_app_modal_dialog_android.h
index b6a6fc0..723b186 100644
--- a/chrome/browser/ui/android/javascript_app_modal_dialog_android.h
+++ b/chrome/browser/ui/android/javascript_app_modal_dialog_android.h
@@ -7,6 +7,7 @@
 
 #include "base/android/jni_weak_ref.h"
 #include "base/android/scoped_java_ref.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "components/app_modal/native_app_modal_dialog.h"
 
diff --git a/chrome/browser/ui/android/ssl_client_certificate_request.cc b/chrome/browser/ui/android/ssl_client_certificate_request.cc
index dfb94c1..2c04a6ca 100644
--- a/chrome/browser/ui/android/ssl_client_certificate_request.cc
+++ b/chrome/browser/ui/android/ssl_client_certificate_request.cc
@@ -4,10 +4,11 @@
 
 #include "chrome/browser/ui/android/ssl_client_certificate_request.h"
 
+#include <stddef.h>
+
 #include "base/android/jni_array.h"
 #include "base/android/jni_string.h"
 #include "base/android/scoped_java_ref.h"
-#include "base/basictypes.h"
 #include "base/bind.h"
 #include "base/compiler_specific.h"
 #include "base/logging.h"
diff --git a/chrome/browser/ui/android/tab_contents/chrome_web_contents_view_delegate_android.h b/chrome/browser/ui/android/tab_contents/chrome_web_contents_view_delegate_android.h
index 10afe4a..b2e2329 100644
--- a/chrome/browser/ui/android/tab_contents/chrome_web_contents_view_delegate_android.h
+++ b/chrome/browser/ui/android/tab_contents/chrome_web_contents_view_delegate_android.h
@@ -5,8 +5,8 @@
 #ifndef CHROME_BROWSER_UI_ANDROID_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGATE_ANDROID_H_
 #define CHROME_BROWSER_UI_ANDROID_TAB_CONTENTS_CHROME_WEB_CONTENTS_VIEW_DELEGATE_ANDROID_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "content/public/browser/web_contents_view_delegate.h"
 
 namespace content {
diff --git a/chrome/browser/ui/android/tab_model/tab_model.h b/chrome/browser/ui/android/tab_model/tab_model.h
index 5d6b52b..90fd2c3 100644
--- a/chrome/browser/ui/android/tab_model/tab_model.h
+++ b/chrome/browser/ui/android/tab_model/tab_model.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_H_
 #define CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "chrome/browser/ui/toolbar/toolbar_model_delegate.h"
 #include "components/sessions/core/session_id.h"
diff --git a/chrome/browser/ui/android/tab_model/tab_model_jni_bridge.cc b/chrome/browser/ui/android/tab_model/tab_model_jni_bridge.cc
index 0d3949f..defeca5 100644
--- a/chrome/browser/ui/android/tab_model/tab_model_jni_bridge.cc
+++ b/chrome/browser/ui/android/tab_model/tab_model_jni_bridge.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/android/tab_model/tab_model_jni_bridge.h"
 
+#include <stdint.h>
+
 #include "base/android/jni_android.h"
 #include "base/android/jni_string.h"
 #include "base/android/jni_weak_ref.h"
@@ -153,7 +155,7 @@
 }
 
 inline static base::TimeDelta GetTimeDelta(jlong ms) {
-  return base::TimeDelta::FromMilliseconds(static_cast<int64>(ms));
+  return base::TimeDelta::FromMilliseconds(static_cast<int64_t>(ms));
 }
 
 void LogFromCloseMetric(JNIEnv* env,
diff --git a/chrome/browser/ui/android/tab_model/tab_model_jni_bridge.h b/chrome/browser/ui/android/tab_model/tab_model_jni_bridge.h
index 96bae65..0b393f0 100644
--- a/chrome/browser/ui/android/tab_model/tab_model_jni_bridge.h
+++ b/chrome/browser/ui/android/tab_model/tab_model_jni_bridge.h
@@ -12,6 +12,7 @@
 #include "base/android/scoped_java_ref.h"
 #include "base/compiler_specific.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/android/tab_model/tab_model.h"
 
 class Profile;
diff --git a/chrome/browser/ui/android/tab_model/tab_model_list.h b/chrome/browser/ui/android/tab_model/tab_model_list.h
index 319dbae2..ca2afe0a 100644
--- a/chrome/browser/ui/android/tab_model/tab_model_list.h
+++ b/chrome/browser/ui/android/tab_model/tab_model_list.h
@@ -5,8 +5,11 @@
 #ifndef CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_LIST_H_
 #define CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_LIST_H_
 
+#include <stddef.h>
+
 #include <vector>
 
+#include "base/macros.h"
 #include "components/sessions/core/session_id.h"
 
 class Profile;
diff --git a/chrome/browser/ui/android/toolbar/toolbar_model_android.h b/chrome/browser/ui/android/toolbar/toolbar_model_android.h
index 6500cdc..09b7e02 100644
--- a/chrome/browser/ui/android/toolbar/toolbar_model_android.h
+++ b/chrome/browser/ui/android/toolbar/toolbar_model_android.h
@@ -8,7 +8,7 @@
 #include "base/android/jni_android.h"
 #include "base/android/jni_weak_ref.h"
 #include "base/android/scoped_java_ref.h"
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "chrome/browser/ui/toolbar/toolbar_model_delegate.h"
 #include "components/toolbar/toolbar_model.h"
diff --git a/chrome/browser/ui/android/view_android_helper.h b/chrome/browser/ui/android/view_android_helper.h
index 2f855b1..7d560026 100644
--- a/chrome/browser/ui/android/view_android_helper.h
+++ b/chrome/browser/ui/android/view_android_helper.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_ANDROID_VIEW_ANDROID_HELPER_H_
 #define CHROME_BROWSER_UI_ANDROID_VIEW_ANDROID_HELPER_H_
 
+#include "base/macros.h"
 #include "content/public/browser/web_contents_user_data.h"
 
 namespace ui {
diff --git a/chrome/browser/ui/android/website_settings_popup_android.h b/chrome/browser/ui/android/website_settings_popup_android.h
index efdd32e..b063c5d7 100644
--- a/chrome/browser/ui/android/website_settings_popup_android.h
+++ b/chrome/browser/ui/android/website_settings_popup_android.h
@@ -8,7 +8,7 @@
 #include <jni.h>
 
 #include "base/android/scoped_java_ref.h"
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "chrome/browser/ui/website_settings/website_settings_ui.h"
 
diff --git a/chrome/browser/ui/app_list/app_context_menu.cc b/chrome/browser/ui/app_list/app_context_menu.cc
index afde21ce..31a43a3 100644
--- a/chrome/browser/ui/app_list/app_context_menu.cc
+++ b/chrome/browser/ui/app_list/app_context_menu.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/app_list/app_context_menu.h"
 
 #include "base/bind.h"
+#include "build/build_config.h"
 #include "chrome/browser/extensions/context_menu_matcher.h"
 #include "chrome/browser/extensions/extension_util.h"
 #include "chrome/browser/extensions/menu_manager.h"
diff --git a/chrome/browser/ui/app_list/app_context_menu.h b/chrome/browser/ui/app_list/app_context_menu.h
index 2a961bb..95dd5b1 100644
--- a/chrome/browser/ui/app_list/app_context_menu.h
+++ b/chrome/browser/ui/app_list/app_context_menu.h
@@ -7,7 +7,7 @@
 
 #include <string>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "ui/base/models/simple_menu_model.h"
 
diff --git a/chrome/browser/ui/app_list/app_list_controller_browsertest.cc b/chrome/browser/ui/app_list/app_list_controller_browsertest.cc
index 2d88b3f..cb6f2959 100644
--- a/chrome/browser/ui/app_list/app_list_controller_browsertest.cc
+++ b/chrome/browser/ui/app_list/app_list_controller_browsertest.cc
@@ -2,10 +2,14 @@
 // 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/command_line.h"
+#include "base/macros.h"
 #include "base/path_service.h"
 #include "base/run_loop.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/browser/extensions/extension_browsertest.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
diff --git a/chrome/browser/ui/app_list/app_list_controller_delegate.cc b/chrome/browser/ui/app_list/app_list_controller_delegate.cc
index 76a54164..ebd14c13 100644
--- a/chrome/browser/ui/app_list/app_list_controller_delegate.cc
+++ b/chrome/browser/ui/app_list/app_list_controller_delegate.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
 
 #include "base/metrics/histogram.h"
+#include "build/build_config.h"
 #include "chrome/browser/extensions/extension_util.h"
 #include "chrome/browser/extensions/install_tracker_factory.h"
 #include "chrome/browser/extensions/launch_util.h"
diff --git a/chrome/browser/ui/app_list/app_list_controller_delegate_impl.h b/chrome/browser/ui/app_list/app_list_controller_delegate_impl.h
index 780776a..8aefc2a8 100644
--- a/chrome/browser/ui/app_list/app_list_controller_delegate_impl.h
+++ b/chrome/browser/ui/app_list/app_list_controller_delegate_impl.h
@@ -6,6 +6,7 @@
 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_CONTROLLER_DELEGATE_IMPL_H_
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
 
 struct AppLaunchParams;
diff --git a/chrome/browser/ui/app_list/app_list_controller_delegate_views.h b/chrome/browser/ui/app_list/app_list_controller_delegate_views.h
index 7550ae7..d5da711 100644
--- a/chrome/browser/ui/app_list/app_list_controller_delegate_views.h
+++ b/chrome/browser/ui/app_list/app_list_controller_delegate_views.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_CONTROLLER_DELEGATE_VIEWS_H_
 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_CONTROLLER_DELEGATE_VIEWS_H_
 
+#include "base/macros.h"
 #include "chrome/browser/ui/app_list/app_list_controller_delegate_impl.h"
 
 class AppListServiceViews;
diff --git a/chrome/browser/ui/app_list/app_list_prefs.h b/chrome/browser/ui/app_list/app_list_prefs.h
index feaf889..ef6894d2 100644
--- a/chrome/browser/ui/app_list/app_list_prefs.h
+++ b/chrome/browser/ui/app_list/app_list_prefs.h
@@ -9,7 +9,7 @@
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/observer_list.h"
 #include "base/values.h"
 #include "components/keyed_service/core/keyed_service.h"
diff --git a/chrome/browser/ui/app_list/app_list_service.cc b/chrome/browser/ui/app_list/app_list_service.cc
index 210e8f4..a3a232c 100644
--- a/chrome/browser/ui/app_list/app_list_service.cc
+++ b/chrome/browser/ui/app_list/app_list_service.cc
@@ -4,12 +4,15 @@
 
 #include "chrome/browser/ui/app_list/app_list_service.h"
 
+#include <stdint.h>
+
 #include "base/command_line.h"
 #include "base/metrics/histogram.h"
 #include "base/prefs/pref_registry_simple.h"
 #include "base/process/process_info.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/time/time.h"
+#include "build/build_config.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/common/chrome_switches.h"
 #include "chrome/common/pref_names.h"
@@ -35,7 +38,7 @@
   if (command_line.HasSwitch(switches::kOriginalProcessStartTime)) {
     std::string start_time_string =
         command_line.GetSwitchValueASCII(switches::kOriginalProcessStartTime);
-    int64 remote_start_time;
+    int64_t remote_start_time;
     base::StringToInt64(start_time_string, &remote_start_time);
     return base::Time::FromInternalValue(remote_start_time);
   }
@@ -62,7 +65,7 @@
 // The time the process that caused the app list to be shown started. This isn't
 // necessarily the currently executing process as we may be processing a command
 // line given to a short-lived Chrome instance.
-int64 g_original_process_start_time;
+int64_t g_original_process_start_time;
 
 // The type of startup the the current app list show has gone through.
 StartupType g_app_show_startup_type;
diff --git a/chrome/browser/ui/app_list/app_list_service.h b/chrome/browser/ui/app_list/app_list_service.h
index 99fbd65..2b0c08d 100644
--- a/chrome/browser/ui/app_list/app_list_service.h
+++ b/chrome/browser/ui/app_list/app_list_service.h
@@ -7,8 +7,8 @@
 
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "chrome/browser/ui/host_desktop.h"
 #include "ui/gfx/native_widget_types.h"
diff --git a/chrome/browser/ui/app_list/app_list_service_cocoa_mac.h b/chrome/browser/ui/app_list/app_list_service_cocoa_mac.h
index 9bc8df5..59612b3 100644
--- a/chrome/browser/ui/app_list/app_list_service_cocoa_mac.h
+++ b/chrome/browser/ui/app_list/app_list_service_cocoa_mac.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_COCOA_MAC_H_
 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_COCOA_MAC_H_
 
+#include "base/macros.h"
 #include "chrome/browser/ui/app_list/app_list_service_mac.h"
 
 namespace test {
diff --git a/chrome/browser/ui/app_list/app_list_service_disabled.cc b/chrome/browser/ui/app_list/app_list_service_disabled.cc
index cdb4f4e..c7ecc67 100644
--- a/chrome/browser/ui/app_list/app_list_service_disabled.cc
+++ b/chrome/browser/ui/app_list/app_list_service_disabled.cc
@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 
 #include "base/files/file_path.h"
+#include "base/macros.h"
 #include "base/memory/singleton.h"
 #include "chrome/browser/ui/app_list/app_list_service.h"
 
diff --git a/chrome/browser/ui/app_list/app_list_service_impl.cc b/chrome/browser/ui/app_list/app_list_service_impl.cc
index 5ee1dee0..8111ed0 100644
--- a/chrome/browser/ui/app_list/app_list_service_impl.cc
+++ b/chrome/browser/ui/app_list/app_list_service_impl.cc
@@ -4,6 +4,9 @@
 
 #include "chrome/browser/ui/app_list/app_list_service_impl.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <string>
 
 #include "base/bind.h"
@@ -166,7 +169,7 @@
   if (browser_shutdown::IsTryingToQuit())
     return;
 
-  int64 enable_time_value = local_state->GetInt64(prefs::kAppListEnableTime);
+  int64_t enable_time_value = local_state->GetInt64(prefs::kAppListEnableTime);
   if (enable_time_value == 0)
     return;  // Already recorded or never enabled.
 
diff --git a/chrome/browser/ui/app_list/app_list_service_impl.h b/chrome/browser/ui/app_list/app_list_service_impl.h
index 92826fa..29e719e 100644
--- a/chrome/browser/ui/app_list/app_list_service_impl.h
+++ b/chrome/browser/ui/app_list/app_list_service_impl.h
@@ -7,9 +7,9 @@
 
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/command_line.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "chrome/browser/profiles/profile.h"
diff --git a/chrome/browser/ui/app_list/app_list_service_impl_browsertest.cc b/chrome/browser/ui/app_list/app_list_service_impl_browsertest.cc
index b3fb469..8639e71 100644
--- a/chrome/browser/ui/app_list/app_list_service_impl_browsertest.cc
+++ b/chrome/browser/ui/app_list/app_list_service_impl_browsertest.cc
@@ -4,7 +4,9 @@
 
 #include "chrome/browser/ui/app_list/app_list_service_impl.h"
 
+#include "base/macros.h"
 #include "base/prefs/pref_service.h"
+#include "build/build_config.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/profiles/profile_manager.h"
 #include "chrome/browser/ui/app_list/app_list_service.h"
diff --git a/chrome/browser/ui/app_list/app_list_service_interactive_uitest.cc b/chrome/browser/ui/app_list/app_list_service_interactive_uitest.cc
index b779ea2..f280cbaf 100644
--- a/chrome/browser/ui/app_list/app_list_service_interactive_uitest.cc
+++ b/chrome/browser/ui/app_list/app_list_service_interactive_uitest.cc
@@ -6,10 +6,12 @@
 
 #include "base/command_line.h"
 #include "base/json/json_file_value_serializer.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/path_service.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/profiles/profile_info_cache.h"
diff --git a/chrome/browser/ui/app_list/app_list_service_mac.h b/chrome/browser/ui/app_list/app_list_service_mac.h
index f8211ca3..f92cc47 100644
--- a/chrome/browser/ui/app_list/app_list_service_mac.h
+++ b/chrome/browser/ui/app_list/app_list_service_mac.h
@@ -8,6 +8,7 @@
 #import <Cocoa/Cocoa.h>
 
 #include "base/mac/scoped_nsobject.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "chrome/browser/apps/app_shim/app_shim_handler_mac.h"
 #include "chrome/browser/ui/app_list/app_list_service_impl.h"
diff --git a/chrome/browser/ui/app_list/app_list_service_mac.mm b/chrome/browser/ui/app_list/app_list_service_mac.mm
index be61096c..699dcfd 100644
--- a/chrome/browser/ui/app_list/app_list_service_mac.mm
+++ b/chrome/browser/ui/app_list/app_list_service_mac.mm
@@ -6,6 +6,7 @@
 
 #include <ApplicationServices/ApplicationServices.h>
 #import <Cocoa/Cocoa.h>
+#include <stddef.h>
 
 #include "base/bind.h"
 #include "base/command_line.h"
diff --git a/chrome/browser/ui/app_list/app_list_service_mac_interactive_uitest.mm b/chrome/browser/ui/app_list/app_list_service_mac_interactive_uitest.mm
index 3c99dc38f..3f5cbb2 100644
--- a/chrome/browser/ui/app_list/app_list_service_mac_interactive_uitest.mm
+++ b/chrome/browser/ui/app_list/app_list_service_mac_interactive_uitest.mm
@@ -7,6 +7,7 @@
 #include <vector>
 
 #include "base/command_line.h"
+#include "base/macros.h"
 #include "chrome/browser/apps/app_shim/app_shim_handler_mac.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/common/chrome_switches.h"
diff --git a/chrome/browser/ui/app_list/app_list_service_unittest.cc b/chrome/browser/ui/app_list/app_list_service_unittest.cc
index 157c5889..c1768b1 100644
--- a/chrome/browser/ui/app_list/app_list_service_unittest.cc
+++ b/chrome/browser/ui/app_list/app_list_service_unittest.cc
@@ -4,6 +4,7 @@
 
 #include "base/command_line.h"
 #include "base/files/file_path.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/prefs/pref_registry_simple.h"
 #include "base/prefs/pref_service.h"
diff --git a/chrome/browser/ui/app_list/app_list_service_views.h b/chrome/browser/ui/app_list/app_list_service_views.h
index 7ba7417..92216a0 100644
--- a/chrome/browser/ui/app_list/app_list_service_views.h
+++ b/chrome/browser/ui/app_list/app_list_service_views.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_VIEWS_H_
 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_SERVICE_VIEWS_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "chrome/browser/ui/app_list/app_list_service_impl.h"
 #include "chrome/browser/ui/app_list/app_list_shower_delegate.h"
diff --git a/chrome/browser/ui/app_list/app_list_service_views_browsertest.cc b/chrome/browser/ui/app_list/app_list_service_views_browsertest.cc
index 0a6485c..763c0b4 100644
--- a/chrome/browser/ui/app_list/app_list_service_views_browsertest.cc
+++ b/chrome/browser/ui/app_list/app_list_service_views_browsertest.cc
@@ -4,8 +4,10 @@
 
 #include "chrome/browser/ui/app_list/app_list_service_views.h"
 
+#include "base/macros.h"
 #include "base/path_service.h"
 #include "base/run_loop.h"
+#include "build/build_config.h"
 #include "chrome/browser/extensions/extension_browsertest.h"
 #include "chrome/browser/lifetime/application_lifetime.h"
 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
diff --git a/chrome/browser/ui/app_list/app_list_shower_views.h b/chrome/browser/ui/app_list/app_list_shower_views.h
index 6feb12c..4fc56529 100644
--- a/chrome/browser/ui/app_list/app_list_shower_views.h
+++ b/chrome/browser/ui/app_list/app_list_shower_views.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_SHOWER_VIEWS_H_
 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_SHOWER_VIEWS_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "ui/gfx/native_widget_types.h"
 
diff --git a/chrome/browser/ui/app_list/app_list_shower_views_unittest.cc b/chrome/browser/ui/app_list/app_list_shower_views_unittest.cc
index a2ffb32..aa779fbb 100644
--- a/chrome/browser/ui/app_list/app_list_shower_views_unittest.cc
+++ b/chrome/browser/ui/app_list/app_list_shower_views_unittest.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/app_list/app_list_shower_views.h"
 
 #include "base/files/file_path.h"
+#include "base/macros.h"
 #include "chrome/browser/apps/scoped_keep_alive.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/ui/app_list/app_list_shower_delegate.h"
diff --git a/chrome/browser/ui/app_list/app_list_syncable_service.cc b/chrome/browser/ui/app_list/app_list_syncable_service.cc
index 909a17b..d610844 100644
--- a/chrome/browser/ui/app_list/app_list_syncable_service.cc
+++ b/chrome/browser/ui/app_list/app_list_syncable_service.cc
@@ -5,7 +5,9 @@
 #include "chrome/browser/ui/app_list/app_list_syncable_service.h"
 
 #include "base/command_line.h"
+#include "base/macros.h"
 #include "base/strings/string_util.h"
+#include "build/build_config.h"
 #include "chrome/browser/apps/drive/drive_app_provider.h"
 #include "chrome/browser/extensions/extension_service.h"
 #include "chrome/browser/profiles/profile.h"
diff --git a/chrome/browser/ui/app_list/app_list_syncable_service.h b/chrome/browser/ui/app_list/app_list_syncable_service.h
index c4258051..0fc6f73 100644
--- a/chrome/browser/ui/app_list/app_list_syncable_service.h
+++ b/chrome/browser/ui/app_list/app_list_syncable_service.h
@@ -5,9 +5,13 @@
 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_H_
 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_H_
 
+#include <stddef.h>
+
 #include <map>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
+#include "build/build_config.h"
 #include "chrome/browser/apps/drive/drive_app_uninstall_sync_service.h"
 #include "chrome/browser/sync/glue/sync_start_util.h"
 #include "components/keyed_service/core/keyed_service.h"
diff --git a/chrome/browser/ui/app_list/app_list_syncable_service_factory.cc b/chrome/browser/ui/app_list/app_list_syncable_service_factory.cc
index c2e2eb1..cf75714 100644
--- a/chrome/browser/ui/app_list/app_list_syncable_service_factory.cc
+++ b/chrome/browser/ui/app_list/app_list_syncable_service_factory.cc
@@ -7,6 +7,7 @@
 #include <set>
 
 #include "base/prefs/pref_service.h"
+#include "build/build_config.h"
 #include "chrome/browser/apps/drive/drive_app_provider.h"
 #include "chrome/browser/profiles/incognito_helpers.h"
 #include "chrome/browser/profiles/profile.h"
diff --git a/chrome/browser/ui/app_list/app_list_syncable_service_factory.h b/chrome/browser/ui/app_list/app_list_syncable_service_factory.h
index e8faff9..6d8c910 100644
--- a/chrome/browser/ui/app_list/app_list_syncable_service_factory.h
+++ b/chrome/browser/ui/app_list/app_list_syncable_service_factory.h
@@ -5,7 +5,7 @@
 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_FACTORY_H_
 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_FACTORY_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/singleton.h"
 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
diff --git a/chrome/browser/ui/app_list/app_list_util.cc b/chrome/browser/ui/app_list/app_list_util.cc
index f86451cf..ca7828a 100644
--- a/chrome/browser/ui/app_list/app_list_util.cc
+++ b/chrome/browser/ui/app_list/app_list_util.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/app_list/app_list_util.h"
 
 #include "base/prefs/pref_service.h"
+#include "build/build_config.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/ui/host_desktop.h"
 #include "chrome/common/pref_names.h"
diff --git a/chrome/browser/ui/app_list/app_list_view_delegate.cc b/chrome/browser/ui/app_list/app_list_view_delegate.cc
index 73c4982..c26a1ba 100644
--- a/chrome/browser/ui/app_list/app_list_view_delegate.cc
+++ b/chrome/browser/ui/app_list/app_list_view_delegate.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/app_list/app_list_view_delegate.h"
 
+#include <stddef.h>
+
 #include <vector>
 
 #include "apps/custom_launcher_page_contents.h"
@@ -14,6 +16,7 @@
 #include "base/prefs/pref_service.h"
 #include "base/profiler/scoped_tracker.h"
 #include "base/stl_util.h"
+#include "build/build_config.h"
 #include "chrome/browser/apps/scoped_keep_alive.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/chrome_notification_types.h"
@@ -661,7 +664,7 @@
   }
 }
 
-void AppListViewDelegate::OnSpeechSoundLevelChanged(int16 level) {
+void AppListViewDelegate::OnSpeechSoundLevelChanged(int16_t level) {
   speech_ui_->UpdateSoundLevel(level);
 }
 
diff --git a/chrome/browser/ui/app_list/app_list_view_delegate.h b/chrome/browser/ui/app_list/app_list_view_delegate.h
index d9a7dc1a..6730749 100644
--- a/chrome/browser/ui/app_list/app_list_view_delegate.h
+++ b/chrome/browser/ui/app_list/app_list_view_delegate.h
@@ -5,11 +5,13 @@
 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_
 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_
 
+#include <stdint.h>
+
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/callback_forward.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
@@ -134,7 +136,7 @@
 
   // Overridden from app_list::StartPageObserver:
   void OnSpeechResult(const base::string16& result, bool is_final) override;
-  void OnSpeechSoundLevelChanged(int16 level) override;
+  void OnSpeechSoundLevelChanged(int16_t level) override;
   void OnSpeechRecognitionStateChanged(
       app_list::SpeechRecognitionState new_state) override;
 
diff --git a/chrome/browser/ui/app_list/arc/arc_app_icon.cc b/chrome/browser/ui/app_list/arc/arc_app_icon.cc
index 26adfab..97f3158 100644
--- a/chrome/browser/ui/app_list/arc/arc_app_icon.cc
+++ b/chrome/browser/ui/app_list/arc/arc_app_icon.cc
@@ -9,6 +9,7 @@
 #include "base/bind.h"
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
+#include "base/macros.h"
 #include "base/task_runner_util.h"
 #include "chrome/browser/image_decoder.h"
 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
diff --git a/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc b/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc
index 9f1a8c9..fd534ed 100644
--- a/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc
+++ b/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc
@@ -4,9 +4,12 @@
 
 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
 
+#include <stddef.h>
+
 #include <string>
 
 #include "base/files/file_util.h"
+#include "base/macros.h"
 #include "base/prefs/scoped_user_pref_update.h"
 #include "base/task_runner_util.h"
 #include "chrome/browser/profiles/profile.h"
@@ -51,7 +54,7 @@
 bool InstallIconFromFileThread(const std::string& app_id,
                                ui::ScaleFactor scale_factor,
                                const base::FilePath& icon_path,
-                               const std::vector<uint8>& content_png) {
+                               const std::vector<uint8_t>& content_png) {
   DCHECK(content::BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread());
   DCHECK(!content_png.empty());
 
@@ -304,10 +307,10 @@
                       OnAppRegistered(app_id, app_info));
   }
 
-  std::map<std::string, uint32>::iterator deferred_icons =
+  std::map<std::string, uint32_t>::iterator deferred_icons =
       request_icon_deferred_.find(app_id);
   if (deferred_icons != request_icon_deferred_.end()) {
-    for (uint32 i = ui::SCALE_FACTOR_100P; i < ui::NUM_SCALE_FACTORS; ++i) {
+    for (uint32_t i = ui::SCALE_FACTOR_100P; i < ui::NUM_SCALE_FACTORS; ++i) {
       if (deferred_icons->second & (1 << i)) {
          RequestIcon(app_id, static_cast<ui::ScaleFactor>(i));
       }
@@ -352,10 +355,9 @@
               icon_png_data.To<std::vector<uint8_t>>());
 }
 
-
 void ArcAppListPrefs::InstallIcon(const std::string& app_id,
                                   ui::ScaleFactor scale_factor,
-                                  const std::vector<uint8>& content_png) {
+                                  const std::vector<uint8_t>& content_png) {
   base::FilePath icon_path = GetIconPath(app_id, scale_factor);
   base::PostTaskAndReplyWithResult(content::BrowserThread::GetBlockingPool(),
                                    FROM_HERE,
diff --git a/chrome/browser/ui/app_list/arc/arc_app_list_prefs.h b/chrome/browser/ui/app_list/arc/arc_app_list_prefs.h
index dac64473..4a3e755 100644
--- a/chrome/browser/ui/app_list/arc/arc_app_list_prefs.h
+++ b/chrome/browser/ui/app_list/arc/arc_app_list_prefs.h
@@ -5,6 +5,8 @@
 #ifndef CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_LIST_PREFS_H_
 #define CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_LIST_PREFS_H_
 
+#include <stdint.h>
+
 #include <map>
 #include <set>
 #include <string>
@@ -125,7 +127,7 @@
   // directory.
   void InstallIcon(const std::string& app_id,
                    ui::ScaleFactor scale_factor,
-                   const std::vector<uint8>& contentPng);
+                   const std::vector<uint8_t>& contentPng);
   void OnIconInstalled(const std::string& app_id,
                        ui::ScaleFactor scale_factor,
                        bool install_succeed);
@@ -143,7 +145,7 @@
   // Keeps deferred icon load requests. Each app may contain several requests
   // for different scale factor. Scale factor is defined by specific bit
   // position.
-  std::map<std::string, uint32> request_icon_deferred_;
+  std::map<std::string, uint32_t> request_icon_deferred_;
 
   mojo::Binding<arc::AppHost> binding_;
 
diff --git a/chrome/browser/ui/app_list/arc/arc_app_model_builder.h b/chrome/browser/ui/app_list/arc/arc_app_model_builder.h
index 04439c7..ec9b85da 100644
--- a/chrome/browser/ui/app_list/arc/arc_app_model_builder.h
+++ b/chrome/browser/ui/app_list/arc/arc_app_model_builder.h
@@ -5,6 +5,8 @@
 #ifndef CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_MODEL_BUILDER_H_
 #define CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_MODEL_BUILDER_H_
 
+#include <stddef.h>
+
 #include <string>
 
 #include "base/macros.h"
diff --git a/chrome/browser/ui/app_list/arc/arc_app_unittest.cc b/chrome/browser/ui/app_list/arc/arc_app_unittest.cc
index 4ddd3ed..7168327 100644
--- a/chrome/browser/ui/app_list/arc/arc_app_unittest.cc
+++ b/chrome/browser/ui/app_list/arc/arc_app_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 <algorithm>
 #include <map>
 #include <string>
@@ -9,6 +12,7 @@
 
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
+#include "base/macros.h"
 #include "base/memory/scoped_vector.h"
 #include "base/run_loop.h"
 #include "base/strings/string_util.h"
diff --git a/chrome/browser/ui/app_list/extension_app_item.cc b/chrome/browser/ui/app_list/extension_app_item.cc
index 8c06f60e..d66ad97 100644
--- a/chrome/browser/ui/app_list/extension_app_item.cc
+++ b/chrome/browser/ui/app_list/extension_app_item.cc
@@ -4,7 +4,11 @@
 
 #include "chrome/browser/ui/app_list/extension_app_item.h"
 
+#include <stddef.h>
+
+#include "base/macros.h"
 #include "base/prefs/pref_service.h"
+#include "build/build_config.h"
 #include "chrome/browser/extensions/extension_util.h"
 #include "chrome/browser/extensions/launch_util.h"
 #include "chrome/browser/profiles/profile.h"
diff --git a/chrome/browser/ui/app_list/extension_app_item.h b/chrome/browser/ui/app_list/extension_app_item.h
index 9c024d0..6742802 100644
--- a/chrome/browser/ui/app_list/extension_app_item.h
+++ b/chrome/browser/ui/app_list/extension_app_item.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "chrome/browser/ui/app_list/app_context_menu_delegate.h"
 #include "chrome/browser/ui/app_list/app_list_syncable_service.h"
diff --git a/chrome/browser/ui/app_list/extension_app_model_builder.h b/chrome/browser/ui/app_list/extension_app_model_builder.h
index 9303e38..7012ae6 100644
--- a/chrome/browser/ui/app_list/extension_app_model_builder.h
+++ b/chrome/browser/ui/app_list/extension_app_model_builder.h
@@ -5,9 +5,12 @@
 #ifndef CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_MODEL_BUILDER_H_
 #define CHROME_BROWSER_UI_APP_LIST_EXTENSION_APP_MODEL_BUILDER_H_
 
+#include <stddef.h>
+
 #include <string>
 #include <vector>
 
+#include "base/macros.h"
 #include "base/prefs/pref_change_registrar.h"
 #include "chrome/browser/extensions/install_observer.h"
 #include "chrome/browser/ui/app_list/app_list_model_builder.h"
diff --git a/chrome/browser/ui/app_list/extension_app_model_builder_unittest.cc b/chrome/browser/ui/app_list/extension_app_model_builder_unittest.cc
index f9dbfb8..5e8aa23b 100644
--- a/chrome/browser/ui/app_list/extension_app_model_builder_unittest.cc
+++ b/chrome/browser/ui/app_list/extension_app_model_builder_unittest.cc
@@ -4,9 +4,12 @@
 
 #include "chrome/browser/ui/app_list/extension_app_model_builder.h"
 
+#include <stddef.h>
+
 #include <string>
 
 #include "base/files/file_path.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/prefs/pref_service.h"
 #include "base/run_loop.h"
diff --git a/chrome/browser/ui/app_list/extension_uninstaller.h b/chrome/browser/ui/app_list/extension_uninstaller.h
index 7004229..dbbdea55 100644
--- a/chrome/browser/ui/app_list/extension_uninstaller.h
+++ b/chrome/browser/ui/app_list/extension_uninstaller.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_APP_LIST_EXTENSION_UNINSTALLER_H_
 #define CHROME_BROWSER_UI_APP_LIST_EXTENSION_UNINSTALLER_H_
 
+#include "base/macros.h"
 #include "chrome/browser/extensions/extension_uninstall_dialog.h"
 
 class AppListControllerDelegate;
diff --git a/chrome/browser/ui/app_list/fast_show_pickler.cc b/chrome/browser/ui/app_list/fast_show_pickler.cc
index 35d5b50..3dc3cdaf 100644
--- a/chrome/browser/ui/app_list/fast_show_pickler.cc
+++ b/chrome/browser/ui/app_list/fast_show_pickler.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/app_list/fast_show_pickler.h"
 
+#include <stddef.h>
+
 #include "third_party/skia/include/core/SkBitmap.h"
 #include "ui/app_list/app_list_item.h"
 #include "ui/gfx/image/image_skia_rep.h"
diff --git a/chrome/browser/ui/app_list/model_pref_updater.cc b/chrome/browser/ui/app_list/model_pref_updater.cc
index 8c0255723..5acd7c4 100644
--- a/chrome/browser/ui/app_list/model_pref_updater.cc
+++ b/chrome/browser/ui/app_list/model_pref_updater.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/browser/ui/app_list/model_pref_updater.h"
 
+#include "build/build_config.h"
 #include "chrome/browser/ui/app_list/app_list_prefs.h"
 #include "chrome/browser/ui/app_list/extension_app_item.h"
 #include "ui/app_list/app_list_folder_item.h"
diff --git a/chrome/browser/ui/app_list/model_pref_updater_unittest.cc b/chrome/browser/ui/app_list/model_pref_updater_unittest.cc
index 78acf79..27ca9cd 100644
--- a/chrome/browser/ui/app_list/model_pref_updater_unittest.cc
+++ b/chrome/browser/ui/app_list/model_pref_updater_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/memory/scoped_ptr.h"
 #include "chrome/browser/ui/app_list/app_list_prefs.h"
 #include "chrome/browser/ui/app_list/extension_app_item.h"
diff --git a/chrome/browser/ui/app_list/profile_loader.h b/chrome/browser/ui/app_list/profile_loader.h
index 724ea825..5af1bfba 100644
--- a/chrome/browser/ui/app_list/profile_loader.h
+++ b/chrome/browser/ui/app_list/profile_loader.h
@@ -6,6 +6,7 @@
 #define CHROME_BROWSER_UI_APP_LIST_PROFILE_LOADER_H_
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 
 namespace base {
diff --git a/chrome/browser/ui/app_list/search/app_result.h b/chrome/browser/ui/app_list/search/app_result.h
index 3f82b5e..620fe99 100644
--- a/chrome/browser/ui/app_list/search/app_result.h
+++ b/chrome/browser/ui/app_list/search/app_result.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "chrome/browser/ui/app_list/app_context_menu_delegate.h"
 #include "chrome/browser/ui/extensions/extension_enable_flow_delegate.h"
diff --git a/chrome/browser/ui/app_list/search/app_search_provider.cc b/chrome/browser/ui/app_list/search/app_search_provider.cc
index 9fd5c76..4537617 100644
--- a/chrome/browser/ui/app_list/search/app_search_provider.cc
+++ b/chrome/browser/ui/app_list/search/app_search_provider.cc
@@ -4,10 +4,13 @@
 
 #include "chrome/browser/ui/app_list/search/app_search_provider.h"
 
+#include <stddef.h>
+
 #include <string>
 
 #include "base/bind.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/single_thread_task_runner.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/thread_task_runner_handle.h"
diff --git a/chrome/browser/ui/app_list/search/app_search_provider.h b/chrome/browser/ui/app_list/search/app_search_provider.h
index d2ce5fd..6b26516 100644
--- a/chrome/browser/ui/app_list/search/app_search_provider.h
+++ b/chrome/browser/ui/app_list/search/app_search_provider.h
@@ -5,7 +5,7 @@
 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_APP_SEARCH_PROVIDER_H_
 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_APP_SEARCH_PROVIDER_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_vector.h"
 #include "base/memory/weak_ptr.h"
 #include "base/scoped_observer.h"
diff --git a/chrome/browser/ui/app_list/search/app_search_provider_unittest.cc b/chrome/browser/ui/app_list/search/app_search_provider_unittest.cc
index 01c506de..3dcb112 100644
--- a/chrome/browser/ui/app_list/search/app_search_provider_unittest.cc
+++ b/chrome/browser/ui/app_list/search/app_search_provider_unittest.cc
@@ -2,9 +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 <string>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/strings/utf_string_conversions.h"
diff --git a/chrome/browser/ui/app_list/search/common/json_response_fetcher.h b/chrome/browser/ui/app_list/search/common/json_response_fetcher.h
index 0158748..1a94c19 100644
--- a/chrome/browser/ui/app_list/search/common/json_response_fetcher.h
+++ b/chrome/browser/ui/app_list/search/common/json_response_fetcher.h
@@ -7,8 +7,8 @@
 
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "net/url_request/url_fetcher_delegate.h"
diff --git a/chrome/browser/ui/app_list/search/common/url_icon_source.h b/chrome/browser/ui/app_list/search/common/url_icon_source.h
index 63c74f57..3da32d8a 100644
--- a/chrome/browser/ui/app_list/search/common/url_icon_source.h
+++ b/chrome/browser/ui/app_list/search/common/url_icon_source.h
@@ -5,8 +5,8 @@
 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_COMMON_URL_ICON_SOURCE_H_
 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_COMMON_URL_ICON_SOURCE_H_
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "chrome/browser/image_decoder.h"
diff --git a/chrome/browser/ui/app_list/search/common/webservice_cache.cc b/chrome/browser/ui/app_list/search/common/webservice_cache.cc
index cfe23a0..8fa41ca 100644
--- a/chrome/browser/ui/app_list/search/common/webservice_cache.cc
+++ b/chrome/browser/ui/app_list/search/common/webservice_cache.cc
@@ -4,6 +4,9 @@
 
 #include "chrome/browser/ui/app_list/search/common/webservice_cache.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/strings/string_number_conversions.h"
 #include "base/values.h"
 #include "content/public/browser/browser_context.h"
@@ -115,7 +118,7 @@
   if (!dict->GetDictionary(kKeyResult, &result))
     return false;
 
-  int64 time_val;
+  int64_t time_val;
   base::StringToInt64(time_string, &time_val);
 
   // The result dictionary will be owned by the cache, hence create a copy
diff --git a/chrome/browser/ui/app_list/search/common/webservice_cache.h b/chrome/browser/ui/app_list/search/common/webservice_cache.h
index 64e87b6..39ce709 100644
--- a/chrome/browser/ui/app_list/search/common/webservice_cache.h
+++ b/chrome/browser/ui/app_list/search/common/webservice_cache.h
@@ -7,8 +7,8 @@
 
 #include <utility>
 
-#include "base/basictypes.h"
 #include "base/containers/mru_cache.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
diff --git a/chrome/browser/ui/app_list/search/common/webservice_cache_factory.h b/chrome/browser/ui/app_list/search/common/webservice_cache_factory.h
index 9873015..fb5e6c78 100644
--- a/chrome/browser/ui/app_list/search/common/webservice_cache_factory.h
+++ b/chrome/browser/ui/app_list/search/common/webservice_cache_factory.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_COMMON_WEBSERVICE_CACHE_FACTORY_H_
 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_COMMON_WEBSERVICE_CACHE_FACTORY_H_
 
+#include "base/macros.h"
 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
 
 namespace base {
diff --git a/chrome/browser/ui/app_list/search/common/webservice_search_provider.cc b/chrome/browser/ui/app_list/search/common/webservice_search_provider.cc
index 833ed43..60b9c0ff 100644
--- a/chrome/browser/ui/app_list/search/common/webservice_search_provider.cc
+++ b/chrome/browser/ui/app_list/search/common/webservice_search_provider.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/app_list/search/common/webservice_search_provider.h"
 
+#include <stddef.h>
+
 #include <string>
 
 #include "base/callback.h"
diff --git a/chrome/browser/ui/app_list/search/common/webservice_search_provider.h b/chrome/browser/ui/app_list/search/common/webservice_search_provider.h
index f332f60..093e8c2 100644
--- a/chrome/browser/ui/app_list/search/common/webservice_search_provider.h
+++ b/chrome/browser/ui/app_list/search/common/webservice_search_provider.h
@@ -6,6 +6,7 @@
 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_COMMON_WEBSERVICE_SEARCH_PROVIDER_H_
 
 #include "base/callback_forward.h"
+#include "base/macros.h"
 #include "base/strings/string16.h"
 #include "base/time/time.h"
 #include "base/timer/timer.h"
diff --git a/chrome/browser/ui/app_list/search/history_factory.h b/chrome/browser/ui/app_list/search/history_factory.h
index 4a0f6af..50f89ec 100644
--- a/chrome/browser/ui/app_list/search/history_factory.h
+++ b/chrome/browser/ui/app_list/search/history_factory.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_HISTORY_FACTORY_H_
 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_HISTORY_FACTORY_H_
 
+#include "base/macros.h"
 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
 
 namespace base {
diff --git a/chrome/browser/ui/app_list/search/history_unittest.cc b/chrome/browser/ui/app_list/search/history_unittest.cc
index 41578f1..fb7c439 100644
--- a/chrome/browser/ui/app_list/search/history_unittest.cc
+++ b/chrome/browser/ui/app_list/search/history_unittest.cc
@@ -2,9 +2,11 @@
 // 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 <stddef.h>
+
 #include "base/bind.h"
 #include "base/files/scoped_temp_dir.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
diff --git a/chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader.cc b/chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader.cc
index d153d1f..562c538 100644
--- a/chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader.cc
+++ b/chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader.cc
@@ -149,7 +149,7 @@
 }
 
 std::string LauncherSearchIconImageLoader::GetTruncatedIconUrl(
-    const uint32 max_size) {
+    const uint32_t max_size) {
   CHECK(max_size > 3);
 
   if (icon_url_.spec().size() <= max_size)
diff --git a/chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader.h b/chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader.h
index d14db35..c52ce61b 100644
--- a/chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader.h
+++ b/chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader.h
@@ -5,6 +5,9 @@
 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_LAUNCHER_SEARCH_LAUNCHER_SEARCH_ICON_IMAGE_LOADER_H_
 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_LAUNCHER_SEARCH_LAUNCHER_SEARCH_ICON_IMAGE_LOADER_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "chrome/browser/chromeos/launcher_search_provider/error_reporter.h"
 #include "chrome/browser/profiles/profile.h"
@@ -85,7 +88,7 @@
 
   // Returns truncated icon url. Since max_size includes trailing ..., it should
   // be larger than 3.
-  std::string GetTruncatedIconUrl(const uint32 max_size);
+  std::string GetTruncatedIconUrl(const uint32_t max_size);
 
   scoped_ptr<chromeos::launcher_search_provider::ErrorReporter> error_reporter_;
 
diff --git a/chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader_impl.h b/chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader_impl.h
index 9e8d813..86530730e 100644
--- a/chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader_impl.h
+++ b/chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader_impl.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_LAUNCHER_SEARCH_LAUNCHER_SEARCH_ICON_IMAGE_LOADER_IMPL_H_
 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_LAUNCHER_SEARCH_LAUNCHER_SEARCH_ICON_IMAGE_LOADER_IMPL_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader.h"
diff --git a/chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader_unittest.cc b/chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader_unittest.cc
index 55fba9c..babed7e 100644
--- a/chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader_unittest.cc
+++ b/chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader_unittest.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader.h"
 
+#include "base/macros.h"
 #include "chrome/browser/chromeos/launcher_search_provider/error_reporter.h"
 #include "extensions/common/manifest_constants.h"
 #include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/ui/app_list/search/launcher_search/launcher_search_provider.h b/chrome/browser/ui/app_list/search/launcher_search/launcher_search_provider.h
index a1ba785..bca8c62 100644
--- a/chrome/browser/ui/app_list/search/launcher_search/launcher_search_provider.h
+++ b/chrome/browser/ui/app_list/search/launcher_search/launcher_search_provider.h
@@ -7,6 +7,7 @@
 
 #include <map>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
 #include "base/stl_util.h"
diff --git a/chrome/browser/ui/app_list/search/launcher_search/launcher_search_result.h b/chrome/browser/ui/app_list/search/launcher_search/launcher_search_result.h
index 0cd21e72..047575be 100644
--- a/chrome/browser/ui/app_list/search/launcher_search/launcher_search_result.h
+++ b/chrome/browser/ui/app_list/search/launcher_search/launcher_search_result.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader.h"
diff --git a/chrome/browser/ui/app_list/search/omnibox_provider.h b/chrome/browser/ui/app_list/search/omnibox_provider.h
index 17203b5..46dfcd80 100644
--- a/chrome/browser/ui/app_list/search/omnibox_provider.h
+++ b/chrome/browser/ui/app_list/search/omnibox_provider.h
@@ -5,7 +5,7 @@
 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_OMNIBOX_PROVIDER_H_
 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_OMNIBOX_PROVIDER_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "components/omnibox/browser/autocomplete_controller_delegate.h"
 #include "ui/app_list/search_provider.h"
diff --git a/chrome/browser/ui/app_list/search/omnibox_result.cc b/chrome/browser/ui/app_list/search/omnibox_result.cc
index 0c629c1a..ff681f9 100644
--- a/chrome/browser/ui/app_list/search/omnibox_result.cc
+++ b/chrome/browser/ui/app_list/search/omnibox_result.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/app_list/search/omnibox_result.h"
 
+#include <stddef.h>
+
 #include "base/strings/string_split.h"
 #include "base/strings/utf_string_conversions.h"
 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
diff --git a/chrome/browser/ui/app_list/search/omnibox_result.h b/chrome/browser/ui/app_list/search/omnibox_result.h
index b0162bd..4459ddf 100644
--- a/chrome/browser/ui/app_list/search/omnibox_result.h
+++ b/chrome/browser/ui/app_list/search/omnibox_result.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_OMNIBOX_RESULT_H_
 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_OMNIBOX_RESULT_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "components/omnibox/browser/autocomplete_match.h"
 #include "ui/app_list/search_result.h"
diff --git a/chrome/browser/ui/app_list/search/omnibox_result_unittest.cc b/chrome/browser/ui/app_list/search/omnibox_result_unittest.cc
index 3b43e3c..d8519800 100644
--- a/chrome/browser/ui/app_list/search/omnibox_result_unittest.cc
+++ b/chrome/browser/ui/app_list/search/omnibox_result_unittest.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/browser/ui/app_list/search/omnibox_result.h"
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/strings/utf_string_conversions.h"
 #include "chrome/browser/ui/app_list/app_list_test_util.h"
diff --git a/chrome/browser/ui/app_list/search/people/people_provider.h b/chrome/browser/ui/app_list/search/people/people_provider.h
index 18231099..ed2f624 100644
--- a/chrome/browser/ui/app_list/search/people/people_provider.h
+++ b/chrome/browser/ui/app_list/search/people/people_provider.h
@@ -5,8 +5,8 @@
 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_PEOPLE_PEOPLE_PROVIDER_H_
 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_PEOPLE_PEOPLE_PROVIDER_H_
 
-#include "base/basictypes.h"
 #include "base/callback_forward.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "chrome/browser/ui/app_list/search/common/webservice_search_provider.h"
 #include "google_apis/gaia/oauth2_token_service.h"
diff --git a/chrome/browser/ui/app_list/search/people/people_provider_browsertest.cc b/chrome/browser/ui/app_list/search/people/people_provider_browsertest.cc
index ff1529b..b06e363 100644
--- a/chrome/browser/ui/app_list/search/people/people_provider_browsertest.cc
+++ b/chrome/browser/ui/app_list/search/people/people_provider_browsertest.cc
@@ -2,11 +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 <string>
 
-#include "base/basictypes.h"
 #include "base/bind.h"
 #include "base/command_line.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/strings/utf_string_conversions.h"
diff --git a/chrome/browser/ui/app_list/search/people/people_result.cc b/chrome/browser/ui/app_list/search/people/people_result.cc
index dd3ffd24..2d48013 100644
--- a/chrome/browser/ui/app_list/search/people/people_result.cc
+++ b/chrome/browser/ui/app_list/search/people/people_result.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/app_list/search/people/people_result.h"
 
+#include <stddef.h>
+
 #include <vector>
 
 #include "base/bind.h"
diff --git a/chrome/browser/ui/app_list/search/people/people_result.h b/chrome/browser/ui/app_list/search/people/people_result.h
index 65b741cc..317d433c 100644
--- a/chrome/browser/ui/app_list/search/people/people_result.h
+++ b/chrome/browser/ui/app_list/search/people/people_result.h
@@ -7,7 +7,7 @@
 
 #include <string>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "ui/app_list/search_result.h"
 #include "url/gurl.h"
diff --git a/chrome/browser/ui/app_list/search/search_controller_factory.cc b/chrome/browser/ui/app_list/search/search_controller_factory.cc
index 957e172..d305df0 100644
--- a/chrome/browser/ui/app_list/search/search_controller_factory.cc
+++ b/chrome/browser/ui/app_list/search/search_controller_factory.cc
@@ -4,10 +4,13 @@
 
 #include "chrome/browser/ui/app_list/search/search_controller_factory.h"
 
+#include <stddef.h>
+
 #include "base/command_line.h"
 #include "base/metrics/field_trial.h"
 #include "base/strings/string_util.h"
 #include "base/time/default_clock.h"
+#include "build/build_config.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/ui/app_list/search/app_search_provider.h"
 #include "chrome/browser/ui/app_list/search/history_factory.h"
diff --git a/chrome/browser/ui/app_list/search/search_resource_manager.h b/chrome/browser/ui/app_list/search/search_resource_manager.h
index 369f6cf..d7b957cd 100644
--- a/chrome/browser/ui/app_list/search/search_resource_manager.h
+++ b/chrome/browser/ui/app_list/search/search_resource_manager.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_SEARCH_RESOURCE_MANAGER_H_
 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_SEARCH_RESOURCE_MANAGER_H_
 
+#include "base/macros.h"
 #include "ui/app_list/speech_ui_model_observer.h"
 
 class Profile;
diff --git a/chrome/browser/ui/app_list/search/search_webstore_result.h b/chrome/browser/ui/app_list/search/search_webstore_result.h
index 38c07a8..277a870 100644
--- a/chrome/browser/ui/app_list/search/search_webstore_result.h
+++ b/chrome/browser/ui/app_list/search/search_webstore_result.h
@@ -7,7 +7,7 @@
 
 #include <string>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "ui/app_list/search_result.h"
 #include "url/gurl.h"
 
diff --git a/chrome/browser/ui/app_list/search/suggestions/suggestions_search_provider.h b/chrome/browser/ui/app_list/search/suggestions/suggestions_search_provider.h
index bf06e4e..21e2c8c 100644
--- a/chrome/browser/ui/app_list/search/suggestions/suggestions_search_provider.h
+++ b/chrome/browser/ui/app_list/search/suggestions/suggestions_search_provider.h
@@ -5,7 +5,6 @@
 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_SUGGESTIONS_SUGGESTIONS_SEARCH_PROVIDER_H_
 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_SUGGESTIONS_SUGGESTIONS_SEARCH_PROVIDER_H_
 
-#include "base/basictypes.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "ui/app_list/search_provider.h"
diff --git a/chrome/browser/ui/app_list/search/suggestions/suggestions_search_provider_unittest.cc b/chrome/browser/ui/app_list/search/suggestions/suggestions_search_provider_unittest.cc
index 54b8a56a..75d9eac 100644
--- a/chrome/browser/ui/app_list/search/suggestions/suggestions_search_provider_unittest.cc
+++ b/chrome/browser/ui/app_list/search/suggestions/suggestions_search_provider_unittest.cc
@@ -4,11 +4,13 @@
 
 #include "chrome/browser/ui/app_list/search/suggestions/suggestions_search_provider.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/strings/utf_string_conversions.h"
 #include "chrome/browser/sync/profile_sync_test_util.h"
diff --git a/chrome/browser/ui/app_list/search/suggestions/url_suggestion_result.h b/chrome/browser/ui/app_list/search/suggestions/url_suggestion_result.h
index b4204e4..3eb4993 100644
--- a/chrome/browser/ui/app_list/search/suggestions/url_suggestion_result.h
+++ b/chrome/browser/ui/app_list/search/suggestions/url_suggestion_result.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_SUGGESTIONS_URL_SUGGESTION_RESULT_H_
 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_SUGGESTIONS_URL_SUGGESTION_RESULT_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/task/cancelable_task_tracker.h"
 #include "components/suggestions/proto/suggestions.pb.h"
diff --git a/chrome/browser/ui/app_list/search/webstore/webstore_installer.h b/chrome/browser/ui/app_list/search/webstore/webstore_installer.h
index 8f0fc922..0d946988 100644
--- a/chrome/browser/ui/app_list/search/webstore/webstore_installer.h
+++ b/chrome/browser/ui/app_list/search/webstore/webstore_installer.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_WEBSTORE_WEBSTORE_INSTALLER_H_
 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_WEBSTORE_WEBSTORE_INSTALLER_H_
 
+#include "base/macros.h"
 #include "chrome/browser/extensions/webstore_install_with_prompt.h"
 
 class Profile;
diff --git a/chrome/browser/ui/app_list/search/webstore/webstore_provider.h b/chrome/browser/ui/app_list/search/webstore/webstore_provider.h
index eb9570f..80b4516c 100644
--- a/chrome/browser/ui/app_list/search/webstore/webstore_provider.h
+++ b/chrome/browser/ui/app_list/search/webstore/webstore_provider.h
@@ -5,8 +5,8 @@
 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_WEBSTORE_WEBSTORE_PROVIDER_H_
 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_WEBSTORE_WEBSTORE_PROVIDER_H_
 
-#include "base/basictypes.h"
 #include "base/callback_forward.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "chrome/browser/ui/app_list/search/common/webservice_search_provider.h"
 
diff --git a/chrome/browser/ui/app_list/search/webstore/webstore_provider_browsertest.cc b/chrome/browser/ui/app_list/search/webstore/webstore_provider_browsertest.cc
index 4bb888a..3ecab31 100644
--- a/chrome/browser/ui/app_list/search/webstore/webstore_provider_browsertest.cc
+++ b/chrome/browser/ui/app_list/search/webstore/webstore_provider_browsertest.cc
@@ -2,11 +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 <string>
 
-#include "base/basictypes.h"
 #include "base/bind.h"
 #include "base/command_line.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/strings/utf_string_conversions.h"
diff --git a/chrome/browser/ui/app_list/search/webstore/webstore_result.cc b/chrome/browser/ui/app_list/search/webstore/webstore_result.cc
index f97a5f0..986e90c 100644
--- a/chrome/browser/ui/app_list/search/webstore/webstore_result.cc
+++ b/chrome/browser/ui/app_list/search/webstore/webstore_result.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/app_list/search/webstore/webstore_result.h"
 
+#include <stddef.h>
+
 #include <vector>
 
 #include "base/bind.h"
diff --git a/chrome/browser/ui/app_list/search/webstore/webstore_result.h b/chrome/browser/ui/app_list/search/webstore/webstore_result.h
index 2f710ea..65fbf69 100644
--- a/chrome/browser/ui/app_list/search/webstore/webstore_result.h
+++ b/chrome/browser/ui/app_list/search/webstore/webstore_result.h
@@ -7,7 +7,7 @@
 
 #include <string>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "chrome/browser/extensions/install_observer.h"
 #include "chrome/common/extensions/webstore_install_result.h"
diff --git a/chrome/browser/ui/app_list/speech_auth_helper.h b/chrome/browser/ui/app_list/speech_auth_helper.h
index d5b9094a..57e2397 100644
--- a/chrome/browser/ui/app_list/speech_auth_helper.h
+++ b/chrome/browser/ui/app_list/speech_auth_helper.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "components/signin/core/browser/profile_oauth2_token_service.h"
diff --git a/chrome/browser/ui/app_list/speech_recognizer.cc b/chrome/browser/ui/app_list/speech_recognizer.cc
index ffa73ba8..80c9673 100644
--- a/chrome/browser/ui/app_list/speech_recognizer.cc
+++ b/chrome/browser/ui/app_list/speech_recognizer.cc
@@ -4,9 +4,13 @@
 
 #include "chrome/browser/ui/app_list/speech_recognizer.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <algorithm>
 
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/strings/string16.h"
 #include "base/timer/timer.h"
 #include "chrome/browser/ui/app_list/speech_recognizer_delegate.h"
diff --git a/chrome/browser/ui/app_list/speech_recognizer.h b/chrome/browser/ui/app_list/speech_recognizer.h
index 9b6a502..2e3f90e0 100644
--- a/chrome/browser/ui/app_list/speech_recognizer.h
+++ b/chrome/browser/ui/app_list/speech_recognizer.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 
 namespace content {
diff --git a/chrome/browser/ui/app_list/speech_recognizer_browsertest.cc b/chrome/browser/ui/app_list/speech_recognizer_browsertest.cc
index 930d07e..2eb4115 100644
--- a/chrome/browser/ui/app_list/speech_recognizer_browsertest.cc
+++ b/chrome/browser/ui/app_list/speech_recognizer_browsertest.cc
@@ -4,7 +4,10 @@
 
 #include "chrome/browser/ui/app_list/speech_recognizer.h"
 
+#include <stdint.h>
+
 #include "base/command_line.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/run_loop.h"
 #include "base/strings/utf_string_conversions.h"
diff --git a/chrome/browser/ui/app_list/start_page_observer.h b/chrome/browser/ui/app_list/start_page_observer.h
index 8949fa2..585a743 100644
--- a/chrome/browser/ui/app_list/start_page_observer.h
+++ b/chrome/browser/ui/app_list/start_page_observer.h
@@ -5,6 +5,8 @@
 #ifndef CHROME_BROWSER_UI_APP_LIST_START_PAGE_OBSERVER_H_
 #define CHROME_BROWSER_UI_APP_LIST_START_PAGE_OBSERVER_H_
 
+#include <stdint.h>
+
 #include "base/strings/string16.h"
 #include "ui/app_list/speech_ui_model_observer.h"
 
@@ -16,7 +18,7 @@
   virtual void OnSpeechResult(const base::string16& query, bool is_final) = 0;
 
   // Invoked when a sound level of speech recognition is changed.
-  virtual void OnSpeechSoundLevelChanged(int16 level) = 0;
+  virtual void OnSpeechSoundLevelChanged(int16_t level) = 0;
 
   // Invoked when the online speech recognition state is changed.
   virtual void OnSpeechRecognitionStateChanged(
diff --git a/chrome/browser/ui/app_list/start_page_service.cc b/chrome/browser/ui/app_list/start_page_service.cc
index ac805cb..6f4244b 100644
--- a/chrome/browser/ui/app_list/start_page_service.cc
+++ b/chrome/browser/ui/app_list/start_page_service.cc
@@ -4,15 +4,19 @@
 
 #include "chrome/browser/ui/app_list/start_page_service.h"
 
+#include <stddef.h>
+
 #include <string>
 
 #include "base/bind.h"
 #include "base/command_line.h"
 #include "base/json/json_string_value_serializer.h"
+#include "base/macros.h"
 #include "base/memory/singleton.h"
 #include "base/metrics/user_metrics.h"
 #include "base/prefs/pref_service.h"
 #include "base/strings/string_piece.h"
+#include "build/build_config.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/media/media_stream_devices_controller.h"
diff --git a/chrome/browser/ui/app_list/start_page_service.h b/chrome/browser/ui/app_list/start_page_service.h
index 2f506fa9..c26edd7a 100644
--- a/chrome/browser/ui/app_list/start_page_service.h
+++ b/chrome/browser/ui/app_list/start_page_service.h
@@ -9,14 +9,15 @@
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "base/strings/string16.h"
 #include "base/time/default_clock.h"
+#include "build/build_config.h"
 #include "chrome/browser/ui/app_list/speech_recognizer_delegate.h"
 #include "components/keyed_service/core/keyed_service.h"
 #include "content/public/browser/web_contents.h"
diff --git a/chrome/browser/ui/app_list/start_page_service_factory.h b/chrome/browser/ui/app_list/start_page_service_factory.h
index 93afd18..02dcc11 100644
--- a/chrome/browser/ui/app_list/start_page_service_factory.h
+++ b/chrome/browser/ui/app_list/start_page_service_factory.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_APP_LIST_START_PAGE_SERVICE_FACTORY_H_
 #define CHROME_BROWSER_UI_APP_LIST_START_PAGE_SERVICE_FACTORY_H_
 
+#include "base/macros.h"
 #include "base/memory/singleton.h"
 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
 
diff --git a/chrome/browser/ui/app_list/test/chrome_app_list_test_support.cc b/chrome/browser/ui/app_list/test/chrome_app_list_test_support.cc
index 23a8d99..4ddeec6f 100644
--- a/chrome/browser/ui/app_list/test/chrome_app_list_test_support.cc
+++ b/chrome/browser/ui/app_list/test/chrome_app_list_test_support.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/browser/ui/app_list/test/chrome_app_list_test_support.h"
 
+#include "base/macros.h"
 #include "base/run_loop.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/profiles/profile_manager.h"
diff --git a/chrome/browser/ui/app_list/test/fake_profile.cc b/chrome/browser/ui/app_list/test/fake_profile.cc
index 8a8108a..b79996b 100644
--- a/chrome/browser/ui/app_list/test/fake_profile.cc
+++ b/chrome/browser/ui/app_list/test/fake_profile.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 "chrome/browser/ui/app_list/test/fake_profile.h"
 
 FakeProfile::FakeProfile(const std::string& name)
diff --git a/chrome/browser/ui/app_list/test/fake_profile.h b/chrome/browser/ui/app_list/test/fake_profile.h
index ad0dcac..a2fce4a 100644
--- a/chrome/browser/ui/app_list/test/fake_profile.h
+++ b/chrome/browser/ui/app_list/test/fake_profile.h
@@ -8,6 +8,7 @@
 #include "base/files/file_path.h"
 #include "base/memory/ref_counted.h"
 #include "base/sequenced_task_runner.h"
+#include "build/build_config.h"
 #include "chrome/browser/profiles/profile.h"
 #include "components/domain_reliability/clear_mode.h"
 #include "content/public/browser/browser_context.h"
diff --git a/chrome/browser/ui/app_list/test/fast_show_pickler_unittest.cc b/chrome/browser/ui/app_list/test/fast_show_pickler_unittest.cc
index 9e9dd1b4..5538b297 100644
--- a/chrome/browser/ui/app_list/test/fast_show_pickler_unittest.cc
+++ b/chrome/browser/ui/app_list/test/fast_show_pickler_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 "chrome/browser/ui/app_list/fast_show_pickler.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/skia/include/core/SkBitmap.h"
diff --git a/chrome/browser/ui/apps/chrome_app_delegate.cc b/chrome/browser/ui/apps/chrome_app_delegate.cc
index 906cdeb..467121a0 100644
--- a/chrome/browser/ui/apps/chrome_app_delegate.cc
+++ b/chrome/browser/ui/apps/chrome_app_delegate.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/browser/ui/apps/chrome_app_delegate.h"
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/strings/stringprintf.h"
 #include "chrome/browser/app_mode/app_mode_utils.h"
diff --git a/chrome/browser/ui/apps/chrome_app_delegate.h b/chrome/browser/ui/apps/chrome_app_delegate.h
index 1a7ac1f1..f1fed82 100644
--- a/chrome/browser/ui/apps/chrome_app_delegate.h
+++ b/chrome/browser/ui/apps/chrome_app_delegate.h
@@ -6,6 +6,7 @@
 #define CHROME_BROWSER_UI_APPS_CHROME_APP_DELEGATE_H_
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "content/public/browser/notification_observer.h"
diff --git a/chrome/browser/ui/apps/chrome_app_window_client.cc b/chrome/browser/ui/apps/chrome_app_window_client.cc
index 9cf6b04..8f99a49 100644
--- a/chrome/browser/ui/apps/chrome_app_window_client.cc
+++ b/chrome/browser/ui/apps/chrome_app_window_client.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/apps/chrome_app_window_client.h"
 
 #include "base/memory/singleton.h"
+#include "build/build_config.h"
 #include "chrome/browser/apps/scoped_keep_alive.h"
 #include "chrome/browser/devtools/devtools_window.h"
 #include "chrome/common/extensions/features/feature_channel.h"
diff --git a/chrome/browser/ui/apps/chrome_app_window_client.h b/chrome/browser/ui/apps/chrome_app_window_client.h
index 3f4378d..343281a0 100644
--- a/chrome/browser/ui/apps/chrome_app_window_client.h
+++ b/chrome/browser/ui/apps/chrome_app_window_client.h
@@ -5,8 +5,8 @@
 #ifndef CHROME_BROWSER_UI_APPS_CHROME_APP_WINDOW_CLIENT_H_
 #define CHROME_BROWSER_UI_APPS_CHROME_APP_WINDOW_CLIENT_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "extensions/browser/app_window/app_window_client.h"
 
 namespace base {
diff --git a/chrome/browser/ui/ash/accelerator_commands_browsertest.cc b/chrome/browser/ui/ash/accelerator_commands_browsertest.cc
index 380d058..7669767 100644
--- a/chrome/browser/ui/ash/accelerator_commands_browsertest.cc
+++ b/chrome/browser/ui/ash/accelerator_commands_browsertest.cc
@@ -8,6 +8,8 @@
 #include "ash/shell.h"
 #include "ash/wm/window_state.h"
 #include "base/command_line.h"
+#include "base/macros.h"
+#include "build/build_config.h"
 #include "chrome/browser/apps/app_browsertest_util.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_commands.h"
diff --git a/chrome/browser/ui/ash/accelerator_controller_browsertest.cc b/chrome/browser/ui/ash/accelerator_controller_browsertest.cc
index ea25bcd..0818cb5d 100644
--- a/chrome/browser/ui/ash/accelerator_controller_browsertest.cc
+++ b/chrome/browser/ui/ash/accelerator_controller_browsertest.cc
@@ -6,6 +6,7 @@
 
 #include "ash/shell.h"
 #include "ash/wm/window_state.h"
+#include "build/build_config.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_window.h"
 #include "chrome/test/base/in_process_browser_test.h"
diff --git a/chrome/browser/ui/ash/accessibility/ax_tree_source_aura_unittest.cc b/chrome/browser/ui/ash/accessibility/ax_tree_source_aura_unittest.cc
index b6be9e0..c1c7ff2 100644
--- a/chrome/browser/ui/ash/accessibility/ax_tree_source_aura_unittest.cc
+++ b/chrome/browser/ui/ash/accessibility/ax_tree_source_aura_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 <stddef.h>
+
 #include <vector>
 
 #include "ash/test/ash_test_base.h"
+#include "base/macros.h"
 #include "base/strings/utf_string_conversions.h"
 #include "chrome/browser/ui/aura/accessibility/ax_tree_source_aura.h"
 #include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/ui/ash/app_list/app_list_controller_ash.h b/chrome/browser/ui/ash/app_list/app_list_controller_ash.h
index 4bb2c5ab..b426da4 100644
--- a/chrome/browser/ui/ash/app_list/app_list_controller_ash.h
+++ b/chrome/browser/ui/ash/app_list/app_list_controller_ash.h
@@ -5,8 +5,8 @@
 #ifndef CHROME_BROWSER_UI_ASH_APP_LIST_APP_LIST_CONTROLLER_ASH_H_
 #define CHROME_BROWSER_UI_ASH_APP_LIST_APP_LIST_CONTROLLER_ASH_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
 #include "chrome/browser/ui/ash/launcher/chrome_launcher_types.h"
 
diff --git a/chrome/browser/ui/ash/app_list/app_list_service_ash.cc b/chrome/browser/ui/ash/app_list/app_list_service_ash.cc
index b5ce2a0..b1506721 100644
--- a/chrome/browser/ui/ash/app_list/app_list_service_ash.cc
+++ b/chrome/browser/ui/ash/app_list/app_list_service_ash.cc
@@ -7,6 +7,7 @@
 #include "ash/shell.h"
 #include "base/files/file_path.h"
 #include "base/memory/singleton.h"
+#include "build/build_config.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/ui/app_list/start_page_service.h"
 #include "chrome/browser/ui/ash/app_list/app_list_controller_ash.h"
diff --git a/chrome/browser/ui/ash/app_list/app_list_service_ash.h b/chrome/browser/ui/ash/app_list/app_list_service_ash.h
index f11f7095..55349f0 100644
--- a/chrome/browser/ui/ash/app_list/app_list_service_ash.h
+++ b/chrome/browser/ui/ash/app_list/app_list_service_ash.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_ASH_APP_LIST_APP_LIST_SERVICE_ASH_H_
 #define CHROME_BROWSER_UI_ASH_APP_LIST_APP_LIST_SERVICE_ASH_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "chrome/browser/ui/app_list/app_list_service_impl.h"
 #include "ui/app_list/app_list_model.h"
diff --git a/chrome/browser/ui/ash/app_list/app_sync_ui_state_watcher.h b/chrome/browser/ui/ash/app_list/app_sync_ui_state_watcher.h
index 32d7c7f..aad0feb 100644
--- a/chrome/browser/ui/ash/app_list/app_sync_ui_state_watcher.h
+++ b/chrome/browser/ui/ash/app_list/app_sync_ui_state_watcher.h
@@ -5,8 +5,8 @@
 #ifndef CHROME_BROWSER_UI_ASH_APP_LIST_APP_SYNC_UI_STATE_WATCHER_H_
 #define CHROME_BROWSER_UI_ASH_APP_LIST_APP_SYNC_UI_STATE_WATCHER_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/ash/app_sync_ui_state_observer.h"
 
 namespace app_list {
diff --git a/chrome/browser/ui/ash/app_sync_ui_state.cc b/chrome/browser/ui/ash/app_sync_ui_state.cc
index 92404d64..9ff5dc0 100644
--- a/chrome/browser/ui/ash/app_sync_ui_state.cc
+++ b/chrome/browser/ui/ash/app_sync_ui_state.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/ash/app_sync_ui_state.h"
 
 #include "base/prefs/pref_service.h"
+#include "build/build_config.h"
 #include "chrome/browser/extensions/extension_service.h"
 #include "chrome/browser/extensions/pending_extension_manager.h"
 #include "chrome/browser/profiles/profile.h"
diff --git a/chrome/browser/ui/ash/app_sync_ui_state.h b/chrome/browser/ui/ash/app_sync_ui_state.h
index 6604031..9b59c9c 100644
--- a/chrome/browser/ui/ash/app_sync_ui_state.h
+++ b/chrome/browser/ui/ash/app_sync_ui_state.h
@@ -5,8 +5,8 @@
 #ifndef CHROME_BROWSER_UI_ASH_APP_SYNC_UI_STATE_H_
 #define CHROME_BROWSER_UI_ASH_APP_SYNC_UI_STATE_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/observer_list.h"
 #include "base/timer/timer.h"
 #include "components/keyed_service/core/keyed_service.h"
diff --git a/chrome/browser/ui/ash/app_sync_ui_state_factory.h b/chrome/browser/ui/ash/app_sync_ui_state_factory.h
index 99c830b..250b62de 100644
--- a/chrome/browser/ui/ash/app_sync_ui_state_factory.h
+++ b/chrome/browser/ui/ash/app_sync_ui_state_factory.h
@@ -5,8 +5,8 @@
 #ifndef CHROME_BROWSER_UI_ASH_APP_SYNC_UI_STATE_FACTORY_H_
 #define CHROME_BROWSER_UI_ASH_APP_SYNC_UI_STATE_FACTORY_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/singleton.h"
 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
 
diff --git a/chrome/browser/ui/ash/ash_init.cc b/chrome/browser/ui/ash/ash_init.cc
index ccbe576a..35535bf 100644
--- a/chrome/browser/ui/ash/ash_init.cc
+++ b/chrome/browser/ui/ash/ash_init.cc
@@ -12,6 +12,7 @@
 #include "ash/shell.h"
 #include "ash/shell_init_params.h"
 #include "base/command_line.h"
+#include "build/build_config.h"
 #include "chrome/browser/browser_shutdown.h"
 #include "chrome/browser/lifetime/application_lifetime.h"
 #include "chrome/browser/ui/ash/chrome_screenshot_grabber.h"
diff --git a/chrome/browser/ui/ash/ash_util.cc b/chrome/browser/ui/ash/ash_util.cc
index 775003f0..04f3980 100644
--- a/chrome/browser/ui/ash/ash_util.cc
+++ b/chrome/browser/ui/ash/ash_util.cc
@@ -6,6 +6,7 @@
 
 #include "ash/accelerators/accelerator_controller.h"
 #include "ash/shell.h"
+#include "build/build_config.h"
 #include "chrome/browser/ui/ash/ash_init.h"
 #include "chrome/browser/ui/host_desktop.h"
 #include "ui/aura/window_event_dispatcher.h"
diff --git a/chrome/browser/ui/ash/cast_config_delegate_chromeos.cc b/chrome/browser/ui/ash/cast_config_delegate_chromeos.cc
index f2398ec..d723b1d 100644
--- a/chrome/browser/ui/ash/cast_config_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/cast_config_delegate_chromeos.cc
@@ -4,8 +4,11 @@
 
 #include "chrome/browser/ui/ash/cast_config_delegate_chromeos.h"
 
+#include <stddef.h>
+
 #include <string>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/strings/utf_string_conversions.h"
 #include "chrome/browser/extensions/api/cast_devices_private/cast_devices_private_api.h"
diff --git a/chrome/browser/ui/ash/cast_config_delegate_chromeos.h b/chrome/browser/ui/ash/cast_config_delegate_chromeos.h
index 94e6297..41b3770 100644
--- a/chrome/browser/ui/ash/cast_config_delegate_chromeos.h
+++ b/chrome/browser/ui/ash/cast_config_delegate_chromeos.h
@@ -8,8 +8,8 @@
 #include <string>
 
 #include "ash/cast_config_delegate.h"
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/values.h"
 
 namespace chromeos {
diff --git a/chrome/browser/ui/ash/cast_config_delegate_media_router.cc b/chrome/browser/ui/ash/cast_config_delegate_media_router.cc
index f3af04a..221c6b2 100644
--- a/chrome/browser/ui/ash/cast_config_delegate_media_router.cc
+++ b/chrome/browser/ui/ash/cast_config_delegate_media_router.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/browser/ui/ash/cast_config_delegate_media_router.h"
 
+#include "base/macros.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
 #include "chrome/browser/media/router/media_router.h"
diff --git a/chrome/browser/ui/ash/chrome_keyboard_ui.cc b/chrome/browser/ui/ash/chrome_keyboard_ui.cc
index 7af78fd..f890e53 100644
--- a/chrome/browser/ui/ash/chrome_keyboard_ui.cc
+++ b/chrome/browser/ui/ash/chrome_keyboard_ui.cc
@@ -7,6 +7,7 @@
 #include "ash/root_window_controller.h"
 #include "ash/shell.h"
 #include "ash/shell_window_ids.h"
+#include "base/macros.h"
 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h"
 #include "chrome/browser/media/media_capture_devices_dispatcher.h"
 #include "content/public/browser/host_zoom_map.h"
diff --git a/chrome/browser/ui/ash/chrome_keyboard_ui.h b/chrome/browser/ui/ash/chrome_keyboard_ui.h
index a005fd8..48e1bb2 100644
--- a/chrome/browser/ui/ash/chrome_keyboard_ui.h
+++ b/chrome/browser/ui/ash/chrome_keyboard_ui.h
@@ -5,7 +5,7 @@
 #ifndef CHROME_BROWSER_UI_ASH_CHROME_KEYBOARD_UI_H_
 #define CHROME_BROWSER_UI_ASH_CHROME_KEYBOARD_UI_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "content/public/browser/web_contents_observer.h"
 #include "ui/keyboard/content/keyboard_ui_content.h"
diff --git a/chrome/browser/ui/ash/chrome_launcher_prefs.cc b/chrome/browser/ui/ash/chrome_launcher_prefs.cc
index 050cd27d..ee412eb9 100644
--- a/chrome/browser/ui/ash/chrome_launcher_prefs.cc
+++ b/chrome/browser/ui/ash/chrome_launcher_prefs.cc
@@ -4,7 +4,9 @@
 
 #include "chrome/browser/ui/ash/chrome_launcher_prefs.h"
 
-#include "base/basictypes.h"
+#include <stddef.h>
+
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/values.h"
 #include "chrome/common/extensions/extension_constants.h"
diff --git a/chrome/browser/ui/ash/chrome_new_window_delegate.cc b/chrome/browser/ui/ash/chrome_new_window_delegate.cc
index 34c5a9cf..65fee13 100644
--- a/chrome/browser/ui/ash/chrome_new_window_delegate.cc
+++ b/chrome/browser/ui/ash/chrome_new_window_delegate.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/ash/chrome_new_window_delegate.h"
 
 #include "ash/wm/window_util.h"
+#include "base/macros.h"
 #include "chrome/browser/profiles/profile_manager.h"
 #include "chrome/browser/sessions/tab_restore_service_factory.h"
 #include "chrome/browser/ui/ash/chrome_shell_delegate.h"
diff --git a/chrome/browser/ui/ash/chrome_new_window_delegate.h b/chrome/browser/ui/ash/chrome_new_window_delegate.h
index f357313..eedddd5a 100644
--- a/chrome/browser/ui/ash/chrome_new_window_delegate.h
+++ b/chrome/browser/ui/ash/chrome_new_window_delegate.h
@@ -7,6 +7,7 @@
 
 #include "ash/new_window_delegate.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 
 class Browser;
diff --git a/chrome/browser/ui/ash/chrome_new_window_delegate_chromeos.h b/chrome/browser/ui/ash/chrome_new_window_delegate_chromeos.h
index 5ae83fbf..c37243d 100644
--- a/chrome/browser/ui/ash/chrome_new_window_delegate_chromeos.h
+++ b/chrome/browser/ui/ash/chrome_new_window_delegate_chromeos.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_ASH_CHROME_NEW_WINDOW_DELEGATE_CHROMEOS_H_
 #define CHROME_BROWSER_UI_ASH_CHROME_NEW_WINDOW_DELEGATE_CHROMEOS_H_
 
+#include "base/macros.h"
 #include "chrome/browser/ui/ash/chrome_new_window_delegate.h"
 
 class ChromeNewWindowDelegateChromeos : public ChromeNewWindowDelegate {
diff --git a/chrome/browser/ui/ash/chrome_screenshot_grabber.cc b/chrome/browser/ui/ash/chrome_screenshot_grabber.cc
index 8e308b1..b9a0bf3 100644
--- a/chrome/browser/ui/ash/chrome_screenshot_grabber.cc
+++ b/chrome/browser/ui/ash/chrome_screenshot_grabber.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/ash/chrome_screenshot_grabber.h"
 
+#include <stddef.h>
+
 #include "ash/shell.h"
 #include "ash/system/system_notifier.h"
 #include "base/base64.h"
@@ -11,9 +13,11 @@
 #include "base/callback.h"
 #include "base/files/file_util.h"
 #include "base/i18n/time_formatting.h"
+#include "base/macros.h"
 #include "base/prefs/pref_service.h"
 #include "base/strings/stringprintf.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/download/download_prefs.h"
 #include "chrome/browser/notifications/notification_ui_manager.h"
diff --git a/chrome/browser/ui/ash/chrome_screenshot_grabber.h b/chrome/browser/ui/ash/chrome_screenshot_grabber.h
index 083f32d..66e9074 100644
--- a/chrome/browser/ui/ash/chrome_screenshot_grabber.h
+++ b/chrome/browser/ui/ash/chrome_screenshot_grabber.h
@@ -6,6 +6,8 @@
 #define CHROME_BROWSER_UI_ASH_CHROME_SCREENSHOT_GRABBER_H_
 
 #include "ash/screenshot_delegate.h"
+#include "base/macros.h"
+#include "build/build_config.h"
 #include "chrome/browser/notifications/notification.h"
 #include "ui/snapshot/screenshot_grabber.h"
 
diff --git a/chrome/browser/ui/ash/chrome_screenshot_grabber_unittest.cc b/chrome/browser/ui/ash/chrome_screenshot_grabber_unittest.cc
index b917912..046df0c2 100644
--- a/chrome/browser/ui/ash/chrome_screenshot_grabber_unittest.cc
+++ b/chrome/browser/ui/ash/chrome_screenshot_grabber_unittest.cc
@@ -11,7 +11,9 @@
 #include "base/command_line.h"
 #include "base/files/file_util.h"
 #include "base/files/scoped_temp_dir.h"
+#include "base/macros.h"
 #include "base/message_loop/message_loop.h"
+#include "build/build_config.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/notifications/notification_ui_manager.h"
 #include "chrome/browser/profiles/profile_manager.h"
diff --git a/chrome/browser/ui/ash/chrome_shell_content_state.cc b/chrome/browser/ui/ash/chrome_shell_content_state.cc
index 248b67b..a7205714 100644
--- a/chrome/browser/ui/ash/chrome_shell_content_state.cc
+++ b/chrome/browser/ui/ash/chrome_shell_content_state.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/browser/ui/ash/chrome_shell_content_state.h"
 
+#include "build/build_config.h"
 #include "chrome/browser/profiles/profile_manager.h"
 #include "content/public/browser/browser_context.h"
 
diff --git a/chrome/browser/ui/ash/chrome_shell_content_state.h b/chrome/browser/ui/ash/chrome_shell_content_state.h
index 3ed8320..d3f3e80 100644
--- a/chrome/browser/ui/ash/chrome_shell_content_state.h
+++ b/chrome/browser/ui/ash/chrome_shell_content_state.h
@@ -6,6 +6,7 @@
 #define CHROME_BROWSER_UI_ASH_CHROME_SHELL_CONTENT_STATE_H_
 
 #include "ash/content/shell_content_state.h"
+#include "base/macros.h"
 
 class ChromeShellContentState : public ash::ShellContentState {
  public:
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate.cc b/chrome/browser/ui/ash/chrome_shell_delegate.cc
index 0059c8b..04a1788 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate.cc
@@ -4,10 +4,13 @@
 
 #include "chrome/browser/ui/ash/chrome_shell_delegate.h"
 
+#include <stddef.h>
+
 #include "ash/content/gpu_support_impl.h"
 #include "ash/session/session_state_delegate.h"
 #include "ash/wm/window_state.h"
 #include "ash/wm/window_util.h"
+#include "build/build_config.h"
 #include "chrome/browser/app_mode/app_mode_utils.h"
 #include "chrome/browser/lifetime/application_lifetime.h"
 #include "chrome/browser/profiles/profile_manager.h"
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate.h b/chrome/browser/ui/ash/chrome_shell_delegate.h
index e109d82..c3caca1 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate.h
+++ b/chrome/browser/ui/ash/chrome_shell_delegate.h
@@ -9,10 +9,11 @@
 
 #include "ash/shelf/shelf_item_types.h"
 #include "ash/shell_delegate.h"
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/observer_list.h"
+#include "build/build_config.h"
 #include "chrome/browser/ui/ash/metrics/chrome_user_metrics_recorder.h"
 #include "content/public/browser/notification_observer.h"
 #include "content/public/browser/notification_registrar.h"
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc b/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
index ef5c7e8..08d97c4 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
@@ -10,6 +10,7 @@
 #include "ash/wm/mru_window_tracker.h"
 #include "ash/wm/window_util.h"
 #include "base/command_line.h"
+#include "base/macros.h"
 #include "base/prefs/pref_service.h"
 #include "chrome/browser/app_mode/app_mode_utils.h"
 #include "chrome/browser/chrome_notification_types.h"
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate_views.cc b/chrome/browser/ui/ash/chrome_shell_delegate_views.cc
index e4f0e073..57db107 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate_views.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate_views.cc
@@ -10,6 +10,8 @@
 #include "ash/media_delegate.h"
 #include "ash/wm/window_util.h"
 #include "base/command_line.h"
+#include "base/macros.h"
+#include "build/build_config.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/prefs/session_startup_pref.h"
diff --git a/chrome/browser/ui/ash/ime_controller_chromeos.h b/chrome/browser/ui/ash/ime_controller_chromeos.h
index 15480b0..0d9025dc 100644
--- a/chrome/browser/ui/ash/ime_controller_chromeos.h
+++ b/chrome/browser/ui/ash/ime_controller_chromeos.h
@@ -6,8 +6,8 @@
 #define CHROME_BROWSER_UI_ASH_IME_CONTROLLER_CHROMEOS_H_
 
 #include "ash/ime_control_delegate.h"
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 
 // A class which controls ime when an IME shortcut key such as Control+space is
 // pressed.
diff --git a/chrome/browser/ui/ash/ime_controller_chromeos_unittest.cc b/chrome/browser/ui/ash/ime_controller_chromeos_unittest.cc
index 39217f18..15db840 100644
--- a/chrome/browser/ui/ash/ime_controller_chromeos_unittest.cc
+++ b/chrome/browser/ui/ash/ime_controller_chromeos_unittest.cc
@@ -4,7 +4,7 @@
 
 #include "chrome/browser/ui/ash/ime_controller_chromeos.h"
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "chrome/browser/chromeos/input_method/input_method_configuration.h"
 #include "chrome/browser/chromeos/input_method/mock_input_method_manager.h"
 #include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/ui/ash/keyboard_controller_browsertest.cc b/chrome/browser/ui/ash/keyboard_controller_browsertest.cc
index c5c6dec..f5b05ba 100644
--- a/chrome/browser/ui/ash/keyboard_controller_browsertest.cc
+++ b/chrome/browser/ui/ash/keyboard_controller_browsertest.cc
@@ -4,6 +4,7 @@
 
 #include "ash/shell.h"
 #include "base/command_line.h"
+#include "base/macros.h"
 #include "chrome/browser/apps/app_browsertest_util.h"
 #include "chrome/browser/profiles/profile_manager.h"
 #include "chrome/test/base/in_process_browser_test.h"
diff --git a/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc
index 9ca8d13..d4eb5bc 100644
--- a/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc
+++ b/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.h"
 
+#include <stddef.h>
+
 #include "ash/shelf/shelf_model.h"
 #include "ash/shell.h"
 #include "ash/wm/window_util.h"
diff --git a/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.h b/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.h
index 6ea63840..fd25ebc 100644
--- a/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.h
+++ b/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.h
@@ -8,6 +8,7 @@
 #include <string>
 #include <vector>
 
+#include "base/macros.h"
 #include "base/time/time.h"
 #include "chrome/browser/ui/ash/launcher/launcher_item_controller.h"
 #include "url/gurl.h"
diff --git a/chrome/browser/ui/ash/launcher/app_window_launcher_controller.h b/chrome/browser/ui/ash/launcher/app_window_launcher_controller.h
index a4993dc..c4e1979 100644
--- a/chrome/browser/ui/ash/launcher/app_window_launcher_controller.h
+++ b/chrome/browser/ui/ash/launcher/app_window_launcher_controller.h
@@ -9,6 +9,7 @@
 #include <map>
 #include <string>
 
+#include "base/macros.h"
 #include "extensions/browser/app_window/app_window_registry.h"
 #include "ui/aura/window_observer.h"
 #include "ui/wm/public/activation_change_observer.h"
diff --git a/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h b/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h
index 3a7b0ec8..c5b4645 100644
--- a/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h
+++ b/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h
@@ -5,9 +5,12 @@
 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_APP_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_
 #define CHROME_BROWSER_UI_ASH_LAUNCHER_APP_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_
 
+#include <stddef.h>
+
 #include <list>
 #include <string>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/scoped_observer.h"
 #include "chrome/browser/ui/ash/launcher/launcher_item_controller.h"
diff --git a/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.h b/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.h
index 0974dcc..82055d6 100644
--- a/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.h
+++ b/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_BROWSER_SHORTCUT_LAUNCHER_ITEM_CONTROLLER_H_
 #define CHROME_BROWSER_UI_ASH_LAUNCHER_BROWSER_SHORTCUT_LAUNCHER_ITEM_CONTROLLER_H_
 
+#include "base/macros.h"
 #include "chrome/browser/ui/ash/launcher/launcher_item_controller.h"
 
 namespace content {
diff --git a/chrome/browser/ui/ash/launcher/browser_status_monitor.cc b/chrome/browser/ui/ash/launcher/browser_status_monitor.cc
index e1b81d3..55e4006 100644
--- a/chrome/browser/ui/ash/launcher/browser_status_monitor.cc
+++ b/chrome/browser/ui/ash/launcher/browser_status_monitor.cc
@@ -8,6 +8,7 @@
 #include "ash/shelf/shelf_util.h"
 #include "ash/shell.h"
 #include "ash/wm/window_util.h"
+#include "base/macros.h"
 #include "base/stl_util.h"
 #include "chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.h"
 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
diff --git a/chrome/browser/ui/ash/launcher/browser_status_monitor.h b/chrome/browser/ui/ash/launcher/browser_status_monitor.h
index 1f63488..9e676b4b 100644
--- a/chrome/browser/ui/ash/launcher/browser_status_monitor.h
+++ b/chrome/browser/ui/ash/launcher/browser_status_monitor.h
@@ -5,12 +5,14 @@
 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_BROWSER_STATUS_MONITOR_H_
 #define CHROME_BROWSER_UI_ASH_LAUNCHER_BROWSER_STATUS_MONITOR_H_
 
+#include <stdint.h>
+
 #include <map>
 #include <string>
 
 #include "ash/shelf/scoped_observer_with_duplicated_sources.h"
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/scoped_observer.h"
 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
 #include "chrome/browser/ui/browser_list_observer.h"
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h b/chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h
index ee0cf576..05b1e26 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_APP_MENU_ITEM_H_
 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_APP_MENU_ITEM_H_
 
+#include "base/macros.h"
 #include "base/strings/string16.h"
 #include "ui/gfx/image/image.h"
 
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_browser.h b/chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_browser.h
index 33558ec9..9e60497 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_browser.h
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_browser.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_APP_MENU_ITEM_BROWSER_H_
 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_APP_MENU_ITEM_BROWSER_H_
 
+#include "base/macros.h"
 #include "base/values.h"
 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h"
 #include "content/public/browser/notification_observer.h"
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_tab.h b/chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_tab.h
index 7b10c6e1..0b8bbd3 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_tab.h
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_tab.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_APP_MENU_ITEM_TAB_H_
 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_APP_MENU_ITEM_TAB_H_
 
+#include "base/macros.h"
 #include "base/strings/string16.h"
 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h"
 #include "content/public/browser/web_contents_observer.h"
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_v2app.h b/chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_v2app.h
index e05d25c..9d29320 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_v2app.h
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_v2app.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h"
 
 namespace gfx {
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
index 994a2821..c84f9fe1 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
 
+#include <stddef.h>
+
 #include <vector>
 
 #include "ash/ash_switches.h"
@@ -19,12 +21,14 @@
 #include "ash/system/tray/system_tray_delegate.h"
 #include "ash/wm/window_util.h"
 #include "base/command_line.h"
+#include "base/macros.h"
 #include "base/prefs/scoped_user_pref_update.h"
 #include "base/strings/pattern.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/values.h"
+#include "build/build_config.h"
 #include "chrome/browser/app_mode/app_mode_utils.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/defaults.h"
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h
index a27e920..9315d5ba 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h
@@ -20,11 +20,12 @@
 #include "ash/shelf/shelf_model_observer.h"
 #include "ash/shelf/shelf_types.h"
 #include "ash/shell_observer.h"
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
 #include "base/prefs/pref_change_registrar.h"
+#include "build/build_config.h"
 #include "chrome/browser/extensions/app_icon_loader.h"
 #include "chrome/browser/ui/ash/app_sync_ui_state_observer.h"
 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h"
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
index 2d7d934..a61718e 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
 
+#include <stddef.h>
+
 #include "ash/ash_switches.h"
 #include "ash/shelf/shelf.h"
 #include "ash/shelf/shelf_button.h"
@@ -18,8 +20,10 @@
 #include "ash/test/shell_test_api.h"
 #include "ash/wm/window_state.h"
 #include "ash/wm/window_util.h"
+#include "base/macros.h"
 #include "base/strings/stringprintf.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/browser/apps/app_browsertest_util.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/extensions/extension_apitest.h"
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc
index 35deab5..b5b603f5 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 #include <string>
 #include <vector>
@@ -17,10 +19,12 @@
 #include "base/command_line.h"
 #include "base/compiler_specific.h"
 #include "base/files/file_path.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/values.h"
+#include "build/build_config.h"
 #include "chrome/browser/extensions/extension_service.h"
 #include "chrome/browser/extensions/test_extension_system.h"
 #include "chrome/browser/ui/ash/chrome_launcher_prefs.h"
diff --git a/chrome/browser/ui/ash/launcher/launcher_app_tab_helper.h b/chrome/browser/ui/ash/launcher/launcher_app_tab_helper.h
index cc4c67c..8b53a13 100644
--- a/chrome/browser/ui/ash/launcher/launcher_app_tab_helper.h
+++ b/chrome/browser/ui/ash/launcher/launcher_app_tab_helper.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
 
 class Profile;
diff --git a/chrome/browser/ui/ash/launcher/launcher_application_menu_item_model.cc b/chrome/browser/ui/ash/launcher/launcher_application_menu_item_model.cc
index 26a4d24c..5106b2e6 100644
--- a/chrome/browser/ui/ash/launcher/launcher_application_menu_item_model.cc
+++ b/chrome/browser/ui/ash/launcher/launcher_application_menu_item_model.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/ash/launcher/launcher_application_menu_item_model.h"
 
+#include <stddef.h>
+
 #include "base/metrics/histogram_macros.h"
 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h"
 
diff --git a/chrome/browser/ui/ash/launcher/launcher_application_menu_item_model.h b/chrome/browser/ui/ash/launcher/launcher_application_menu_item_model.h
index 6acadce..5c7de81 100644
--- a/chrome/browser/ui/ash/launcher/launcher_application_menu_item_model.h
+++ b/chrome/browser/ui/ash/launcher/launcher_application_menu_item_model.h
@@ -6,6 +6,7 @@
 #define CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_APPLICATION_MENU_ITEM_MODEL_H_
 
 #include "ash/shelf/shelf_menu_model.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
 
diff --git a/chrome/browser/ui/ash/launcher/launcher_context_menu.cc b/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
index 63cffe2..b72aab1 100644
--- a/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
+++ b/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
@@ -15,6 +15,7 @@
 #include "ash/shell.h"
 #include "base/bind.h"
 #include "base/prefs/pref_service.h"
+#include "build/build_config.h"
 #include "chrome/browser/extensions/context_menu_matcher.h"
 #include "chrome/browser/extensions/extension_util.h"
 #include "chrome/browser/fullscreen.h"
diff --git a/chrome/browser/ui/ash/launcher/launcher_context_menu.h b/chrome/browser/ui/ash/launcher/launcher_context_menu.h
index 9995cc6..6a2477b 100644
--- a/chrome/browser/ui/ash/launcher/launcher_context_menu.h
+++ b/chrome/browser/ui/ash/launcher/launcher_context_menu.h
@@ -7,9 +7,10 @@
 
 #include "ash/shelf/shelf_alignment_menu.h"
 #include "ash/shelf/shelf_item_types.h"
-#include "base/basictypes.h"
 #include "base/gtest_prod_util.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
+#include "build/build_config.h"
 #include "ui/base/models/simple_menu_model.h"
 
 class ChromeLauncherController;
diff --git a/chrome/browser/ui/ash/launcher/launcher_context_menu_unittest.cc b/chrome/browser/ui/ash/launcher/launcher_context_menu_unittest.cc
index 3c5b2ac..3d730a8 100644
--- a/chrome/browser/ui/ash/launcher/launcher_context_menu_unittest.cc
+++ b/chrome/browser/ui/ash/launcher/launcher_context_menu_unittest.cc
@@ -9,6 +9,7 @@
 #include "ash/shelf/shelf_model.h"
 #include "ash/shell.h"
 #include "ash/test/ash_test_base.h"
+#include "base/macros.h"
 #include "base/prefs/pref_service.h"
 #include "chrome/app/chrome_command_ids.h"
 #include "chrome/browser/prefs/incognito_mode_prefs.h"
diff --git a/chrome/browser/ui/ash/launcher/launcher_favicon_loader.cc b/chrome/browser/ui/ash/launcher/launcher_favicon_loader.cc
index 1fd9bfa..1024346 100644
--- a/chrome/browser/ui/ash/launcher/launcher_favicon_loader.cc
+++ b/chrome/browser/ui/ash/launcher/launcher_favicon_loader.cc
@@ -7,6 +7,7 @@
 #include "ash/shelf/shelf_constants.h"
 #include "base/bind.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "content/public/browser/render_view_host.h"
 #include "content/public/browser/web_contents.h"
diff --git a/chrome/browser/ui/ash/launcher/launcher_favicon_loader.h b/chrome/browser/ui/ash/launcher/launcher_favicon_loader.h
index ce24292..2a91b37a 100644
--- a/chrome/browser/ui/ash/launcher/launcher_favicon_loader.h
+++ b/chrome/browser/ui/ash/launcher/launcher_favicon_loader.h
@@ -7,8 +7,8 @@
 
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "content/public/common/favicon_url.h"
 
 class GURL;
diff --git a/chrome/browser/ui/ash/launcher/launcher_favicon_loader_browsertest.cc b/chrome/browser/ui/ash/launcher/launcher_favicon_loader_browsertest.cc
index 384fed0e..c8d19765 100644
--- a/chrome/browser/ui/ash/launcher/launcher_favicon_loader_browsertest.cc
+++ b/chrome/browser/ui/ash/launcher/launcher_favicon_loader_browsertest.cc
@@ -4,7 +4,10 @@
 
 #include "chrome/browser/ui/ash/launcher/launcher_favicon_loader.h"
 
+#include <stdint.h>
+
 #include "ash/shelf/shelf_constants.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/strings/stringprintf.h"
 #include "chrome/browser/ui/browser.h"
@@ -86,7 +89,7 @@
   }
 
   bool WaitForContentsLoaded() {
-    const int64 max_seconds = 10;
+    const int64_t max_seconds = 10;
     base::Time start_time = base::Time::Now();
     while (!(contents_observer_->loaded() &&
              contents_observer_->got_favicons())) {
@@ -101,7 +104,7 @@
   }
 
   bool WaitForFaviconUpdated() {
-    const int64 max_seconds = 10;
+    const int64_t max_seconds = 10;
     base::Time start_time = base::Time::Now();
     while (favicon_loader_->HasPendingDownloads()) {
       content::RunAllPendingInMessageLoop();
diff --git a/chrome/browser/ui/ash/launcher/launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/launcher_item_controller.cc
index 1f0a30f..c718ff5 100644
--- a/chrome/browser/ui/ash/launcher/launcher_item_controller.cc
+++ b/chrome/browser/ui/ash/launcher/launcher_item_controller.cc
@@ -4,7 +4,6 @@
 
 #include "chrome/browser/ui/ash/launcher/launcher_item_controller.h"
 
-#include "base/basictypes.h"
 #include "base/strings/utf_string_conversions.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
diff --git a/chrome/browser/ui/ash/launcher/launcher_item_controller.h b/chrome/browser/ui/ash/launcher/launcher_item_controller.h
index fee31b2e..d485c4be 100644
--- a/chrome/browser/ui/ash/launcher/launcher_item_controller.h
+++ b/chrome/browser/ui/ash/launcher/launcher_item_controller.h
@@ -9,8 +9,8 @@
 
 #include "ash/shelf/shelf_item_delegate.h"
 #include "ash/shelf/shelf_item_types.h"
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_vector.h"
 #include "base/strings/string16.h"
 #include "chrome/browser/ui/ash/launcher/chrome_launcher_types.h"
diff --git a/chrome/browser/ui/ash/launcher/multi_profile_app_window_launcher_controller.h b/chrome/browser/ui/ash/launcher/multi_profile_app_window_launcher_controller.h
index d998ab6..ef857697 100644
--- a/chrome/browser/ui/ash/launcher/multi_profile_app_window_launcher_controller.h
+++ b/chrome/browser/ui/ash/launcher/multi_profile_app_window_launcher_controller.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_MULTI_PROFILE_APP_WINDOW_LAUNCHER_CONTROLLER_H_
 #define CHROME_BROWSER_UI_ASH_LAUNCHER_MULTI_PROFILE_APP_WINDOW_LAUNCHER_CONTROLLER_H_
 
+#include "base/macros.h"
 #include "chrome/browser/ui/ash/launcher/app_window_launcher_controller.h"
 
 // Inherits from AppWindowLauncherController and overwrites the AppWindow
diff --git a/chrome/browser/ui/ash/launcher/multi_profile_browser_status_monitor.h b/chrome/browser/ui/ash/launcher/multi_profile_browser_status_monitor.h
index 60061c5e..e7b2fb17 100644
--- a/chrome/browser/ui/ash/launcher/multi_profile_browser_status_monitor.h
+++ b/chrome/browser/ui/ash/launcher/multi_profile_browser_status_monitor.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_MULTI_PROFILE_BROWSER_STATUS_MONITOR_H_
 #define CHROME_BROWSER_UI_ASH_LAUNCHER_MULTI_PROFILE_BROWSER_STATUS_MONITOR_H_
 
+#include "base/macros.h"
 #include "chrome/browser/ui/ash/launcher/browser_status_monitor.h"
 
 // MultiProfileBrowserStatusMonitor uses mainly the BrowserStatusMonitor
diff --git a/chrome/browser/ui/ash/media_delegate_chromeos.h b/chrome/browser/ui/ash/media_delegate_chromeos.h
index ca78fbb..a3e525e 100644
--- a/chrome/browser/ui/ash/media_delegate_chromeos.h
+++ b/chrome/browser/ui/ash/media_delegate_chromeos.h
@@ -6,6 +6,7 @@
 #define CHROME_BROWSER_UI_ASH_MEDIA_DELEGATE_CHROMEOS_H_
 
 #include "ash/media_delegate.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "chrome/browser/media/media_capture_devices_dispatcher.h"
 
diff --git a/chrome/browser/ui/ash/multi_user/multi_user_context_menu_chromeos.cc b/chrome/browser/ui/ash/multi_user/multi_user_context_menu_chromeos.cc
index 4cf0a184..26f3dae 100644
--- a/chrome/browser/ui/ash/multi_user/multi_user_context_menu_chromeos.cc
+++ b/chrome/browser/ui/ash/multi_user/multi_user_context_menu_chromeos.cc
@@ -9,6 +9,7 @@
 #include "ash/shell.h"
 #include "base/bind.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/prefs/pref_service.h"
 #include "base/strings/utf_string_conversions.h"
 #include "chrome/app/chrome_command_ids.h"
diff --git a/chrome/browser/ui/ash/multi_user/multi_user_context_menu_chromeos_unittest.cc b/chrome/browser/ui/ash/multi_user/multi_user_context_menu_chromeos_unittest.cc
index bd3fecc..4521aab 100644
--- a/chrome/browser/ui/ash/multi_user/multi_user_context_menu_chromeos_unittest.cc
+++ b/chrome/browser/ui/ash/multi_user/multi_user_context_menu_chromeos_unittest.cc
@@ -9,6 +9,7 @@
 #include "base/command_line.h"
 #include "base/compiler_specific.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/ash/multi_user/multi_user_context_menu.h"
 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h"
 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h"
diff --git a/chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chromeos.h b/chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chromeos.h
index b39e537..3be60a7b 100644
--- a/chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chromeos.h
+++ b/chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chromeos.h
@@ -9,6 +9,7 @@
 #include <set>
 #include <string>
 
+#include "base/macros.h"
 #include "components/signin/core/account_id/account_id.h"
 #include "ui/message_center/notification_blocker.h"
 
diff --git a/chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chromeos_unittest.cc b/chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chromeos_unittest.cc
index a5d807c..7f14643 100644
--- a/chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chromeos_unittest.cc
+++ b/chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chromeos_unittest.cc
@@ -8,6 +8,7 @@
 #include "ash/test/ash_test_base.h"
 #include "ash/test/test_session_state_delegate.h"
 #include "ash/test/test_shell_delegate.h"
+#include "base/macros.h"
 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h"
 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h"
 #include "chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chromeos.h"
diff --git a/chrome/browser/ui/ash/multi_user/multi_user_util.cc b/chrome/browser/ui/ash/multi_user/multi_user_util.cc
index 5194df2d..f9b4655 100644
--- a/chrome/browser/ui/ash/multi_user/multi_user_util.cc
+++ b/chrome/browser/ui/ash/multi_user/multi_user_util.cc
@@ -7,6 +7,7 @@
 #include <vector>
 
 #include "base/strings/string_util.h"
+#include "build/build_config.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/profiles/profile_manager.h"
diff --git a/chrome/browser/ui/ash/multi_user/multi_user_warning_dialog.cc b/chrome/browser/ui/ash/multi_user/multi_user_warning_dialog.cc
index 426eea8..e92773f7 100644
--- a/chrome/browser/ui/ash/multi_user/multi_user_warning_dialog.cc
+++ b/chrome/browser/ui/ash/multi_user/multi_user_warning_dialog.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/ash/multi_user/multi_user_warning_dialog.h"
 
 #include "ash/shell.h"
+#include "base/macros.h"
 #include "chrome/grit/generated_resources.h"
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/base/resource/resource_bundle.h"
diff --git a/chrome/browser/ui/ash/multi_user/multi_user_window_manager.cc b/chrome/browser/ui/ash/multi_user/multi_user_window_manager.cc
index 36d187e..b2b51be 100644
--- a/chrome/browser/ui/ash/multi_user/multi_user_window_manager.cc
+++ b/chrome/browser/ui/ash/multi_user/multi_user_window_manager.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h"
 
 #include "base/logging.h"
+#include "build/build_config.h"
 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager_stub.h"
 
 #if defined(OS_CHROMEOS)
diff --git a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc
index 320288d..febe3ea 100644
--- a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc
+++ b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc
@@ -16,6 +16,7 @@
 #include "ash/wm/maximize_mode/maximize_mode_controller.h"
 #include "ash/wm/window_state.h"
 #include "base/auto_reset.h"
+#include "base/macros.h"
 #include "base/message_loop/message_loop.h"
 #include "base/strings/string_util.h"
 #include "chrome/browser/browser_process.h"
diff --git a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h
index 53f1a41e..c623f6d 100644
--- a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h
+++ b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h
@@ -10,6 +10,7 @@
 
 #include "ash/session/session_state_observer.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/observer_list.h"
 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h"
diff --git a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc
index 37a0b3df..016613dd 100644
--- a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc
+++ b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_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 "ash/content/shell_content_state.h"
 #include "ash/root_window_controller.h"
 #include "ash/shelf/shelf_widget.h"
@@ -18,6 +20,7 @@
 #include "base/command_line.h"
 #include "base/compiler_specific.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/strings/string_util.h"
 #include "base/time/time.h"
 #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h"
diff --git a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_stub.h b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_stub.h
index f7f7faf..f7e1be3b 100644
--- a/chrome/browser/ui/ash/multi_user/multi_user_window_manager_stub.h
+++ b/chrome/browser/ui/ash/multi_user/multi_user_window_manager_stub.h
@@ -8,8 +8,8 @@
 #include <map>
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h"
 
 class AccountId;
diff --git a/chrome/browser/ui/ash/multi_user/user_switch_animator_chromeos.cc b/chrome/browser/ui/ash/multi_user/user_switch_animator_chromeos.cc
index e9fdcdb..c3b5757 100644
--- a/chrome/browser/ui/ash/multi_user/user_switch_animator_chromeos.cc
+++ b/chrome/browser/ui/ash/multi_user/user_switch_animator_chromeos.cc
@@ -13,6 +13,7 @@
 #include "ash/wm/window_positioner.h"
 #include "ash/wm/window_state.h"
 #include "ash/wm/window_util.h"
+#include "base/macros.h"
 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h"
 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
 #include "chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chromeos.h"
diff --git a/chrome/browser/ui/ash/multi_user/user_switch_animator_chromeos.h b/chrome/browser/ui/ash/multi_user/user_switch_animator_chromeos.h
index 76e67ca9..9385cda 100644
--- a/chrome/browser/ui/ash/multi_user/user_switch_animator_chromeos.h
+++ b/chrome/browser/ui/ash/multi_user/user_switch_animator_chromeos.h
@@ -8,6 +8,7 @@
 #include <map>
 #include <string>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/timer/timer.h"
 #include "components/signin/core/account_id/account_id.h"
diff --git a/chrome/browser/ui/ash/network_connect_delegate_chromeos.h b/chrome/browser/ui/ash/network_connect_delegate_chromeos.h
index 03708e6..d83bdb4b 100644
--- a/chrome/browser/ui/ash/network_connect_delegate_chromeos.h
+++ b/chrome/browser/ui/ash/network_connect_delegate_chromeos.h
@@ -7,7 +7,7 @@
 
 #include <string>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "ui/chromeos/network/network_connect.h"
 
 namespace chromeos {
diff --git a/chrome/browser/ui/ash/networking_config_delegate_chromeos.h b/chrome/browser/ui/ash/networking_config_delegate_chromeos.h
index 1e71a06..de528f7fb 100644
--- a/chrome/browser/ui/ash/networking_config_delegate_chromeos.h
+++ b/chrome/browser/ui/ash/networking_config_delegate_chromeos.h
@@ -8,8 +8,8 @@
 #include <string>
 
 #include "ash/networking_config_delegate.h"
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "content/public/browser/browser_context.h"
 
 namespace chromeos {
diff --git a/chrome/browser/ui/ash/session_state_delegate_chromeos.h b/chrome/browser/ui/ash/session_state_delegate_chromeos.h
index 04ce9a48..f6113d5 100644
--- a/chrome/browser/ui/ash/session_state_delegate_chromeos.h
+++ b/chrome/browser/ui/ash/session_state_delegate_chromeos.h
@@ -6,8 +6,8 @@
 #define CHROME_BROWSER_UI_ASH_SESSION_STATE_DELEGATE_CHROMEOS_H_
 
 #include "ash/session/session_state_delegate.h"
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/observer_list.h"
 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h"
 #include "chromeos/login/login_state.h"
diff --git a/chrome/browser/ui/ash/session_state_delegate_chromeos_unittest.cc b/chrome/browser/ui/ash/session_state_delegate_chromeos_unittest.cc
index 04a620f..25e5a730 100644
--- a/chrome/browser/ui/ash/session_state_delegate_chromeos_unittest.cc
+++ b/chrome/browser/ui/ash/session_state_delegate_chromeos_unittest.cc
@@ -7,6 +7,7 @@
 #include <string>
 #include <vector>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h"
diff --git a/chrome/browser/ui/ash/session_state_delegate_views.h b/chrome/browser/ui/ash/session_state_delegate_views.h
index f8b5659..cb6944f 100644
--- a/chrome/browser/ui/ash/session_state_delegate_views.h
+++ b/chrome/browser/ui/ash/session_state_delegate_views.h
@@ -6,8 +6,8 @@
 #define CHROME_BROWSER_UI_ASH_SESSION_STATE_DELEGATE_VIEWS_H_
 
 #include "ash/session/session_state_delegate.h"
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/observer_list.h"
 #include "ui/gfx/image/image_skia.h"
 
diff --git a/chrome/browser/ui/ash/session_util.cc b/chrome/browser/ui/ash/session_util.cc
index a002b877..2b7d0fc6 100644
--- a/chrome/browser/ui/ash/session_util.cc
+++ b/chrome/browser/ui/ash/session_util.cc
@@ -7,6 +7,7 @@
 #include "ash/content/shell_content_state.h"
 #include "ash/session/session_state_delegate.h"
 #include "ash/shell.h"
+#include "build/build_config.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/profiles/profile_manager.h"
 #include "content/public/browser/browser_context.h"
diff --git a/chrome/browser/ui/ash/solid_color_user_wallpaper_delegate.cc b/chrome/browser/ui/ash/solid_color_user_wallpaper_delegate.cc
index 4f825ab..c09ef57 100644
--- a/chrome/browser/ui/ash/solid_color_user_wallpaper_delegate.cc
+++ b/chrome/browser/ui/ash/solid_color_user_wallpaper_delegate.cc
@@ -8,7 +8,7 @@
 #include "ash/desktop_background/user_wallpaper_delegate.h"
 #include "ash/shell.h"
 #include "ash/wm/window_animations.h"
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "ui/gfx/image/image_skia.h"
 
 namespace {
diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
index a7b9e4d..4f8f8c6 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 #include <set>
 #include <string>
diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos.h b/chrome/browser/ui/ash/system_tray_delegate_chromeos.h
index 7ebf7da..c4b15140 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.h
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.h
@@ -5,6 +5,8 @@
 #ifndef CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_
 #define CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
@@ -16,6 +18,7 @@
 #include "base/callback_forward.h"
 #include "base/callback_list.h"
 #include "base/compiler_specific.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/chrome/browser/ui/ash/system_tray_delegate_chromeos_browsertest_chromeos.cc b/chrome/browser/ui/ash/system_tray_delegate_chromeos_browsertest_chromeos.cc
index 6d28e8e..e23d68ab3 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos_browsertest_chromeos.cc
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos_browsertest_chromeos.cc
@@ -12,6 +12,7 @@
 #include "ash/system/date/date_view.h"
 #include "ash/system/date/tray_date.h"
 #include "ash/test/display_manager_test_api.h"
+#include "base/macros.h"
 #include "base/prefs/pref_service.h"
 #include "chrome/browser/chromeos/login/login_manager_test.h"
 #include "chrome/browser/chromeos/login/session/user_session_manager.h"
diff --git a/chrome/browser/ui/ash/system_tray_delegate_common.cc b/chrome/browser/ui/ash/system_tray_delegate_common.cc
index fa6b9e6..a68917e9 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_common.cc
+++ b/chrome/browser/ui/ash/system_tray_delegate_common.cc
@@ -11,6 +11,7 @@
 #include "ash/system/tray/system_tray_notifier.h"
 #include "ash/volume_control_delegate.h"
 #include "base/time/time.h"
+#include "build/build_config.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/lifetime/application_lifetime.h"
 #include "chrome/browser/profiles/profile_manager.h"
diff --git a/chrome/browser/ui/ash/system_tray_tray_cast_browsertest_chromeos.cc b/chrome/browser/ui/ash/system_tray_tray_cast_browsertest_chromeos.cc
index 99ea1880c..5075a35 100644
--- a/chrome/browser/ui/ash/system_tray_tray_cast_browsertest_chromeos.cc
+++ b/chrome/browser/ui/ash/system_tray_tray_cast_browsertest_chromeos.cc
@@ -8,6 +8,7 @@
 #include "ash/system/tray/system_tray_delegate.h"
 #include "ash/system/tray/system_tray_item.h"
 #include "ash/test/tray_cast_test_api.h"
+#include "base/macros.h"
 #include "chrome/browser/extensions/extension_browsertest.h"
 #include "chrome/browser/profiles/profile_manager.h"
 #include "chrome/browser/ui/tabs/tab_strip_model.h"
diff --git a/chrome/browser/ui/ash/system_tray_tray_cast_browsertest_media_router_chromeos.cc b/chrome/browser/ui/ash/system_tray_tray_cast_browsertest_media_router_chromeos.cc
index a66dad47..0f236f4 100644
--- a/chrome/browser/ui/ash/system_tray_tray_cast_browsertest_media_router_chromeos.cc
+++ b/chrome/browser/ui/ash/system_tray_tray_cast_browsertest_media_router_chromeos.cc
@@ -6,6 +6,7 @@
 #include "ash/system/tray/system_tray.h"
 #include "ash/system/tray/system_tray_delegate.h"
 #include "ash/test/tray_cast_test_api.h"
+#include "base/macros.h"
 #include "chrome/browser/media/router/media_routes_observer.h"
 #include "chrome/browser/media/router/media_sinks_observer.h"
 #include "chrome/browser/media/router/media_source_helper.h"
diff --git a/chrome/browser/ui/ash/volume_controller_browsertest_chromeos.cc b/chrome/browser/ui/ash/volume_controller_browsertest_chromeos.cc
index e2daa71..22d710a 100644
--- a/chrome/browser/ui/ash/volume_controller_browsertest_chromeos.cc
+++ b/chrome/browser/ui/ash/volume_controller_browsertest_chromeos.cc
@@ -7,6 +7,7 @@
 #include "ash/accessibility_delegate.h"
 #include "ash/ash_switches.h"
 #include "base/command_line.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
diff --git a/chrome/browser/ui/ash/volume_controller_chromeos.h b/chrome/browser/ui/ash/volume_controller_chromeos.h
index e1b2737..f51540c 100644
--- a/chrome/browser/ui/ash/volume_controller_chromeos.h
+++ b/chrome/browser/ui/ash/volume_controller_chromeos.h
@@ -5,8 +5,11 @@
 #ifndef CHROME_BROWSER_UI_ASH_VOLUME_CONTROLLER_CHROMEOS_H_
 #define CHROME_BROWSER_UI_ASH_VOLUME_CONTROLLER_CHROMEOS_H_
 
+#include <stdint.h>
+
 #include "ash/volume_control_delegate.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "chromeos/audio/cras_audio_handler.h"
 
 // A class which controls volume when F8-10 or a multimedia key for volume is
diff --git a/chrome/browser/ui/ash/window_positioner_unittest.cc b/chrome/browser/ui/ash/window_positioner_unittest.cc
index 0b70440a..35e1f2a 100644
--- a/chrome/browser/ui/ash/window_positioner_unittest.cc
+++ b/chrome/browser/ui/ash/window_positioner_unittest.cc
@@ -10,6 +10,7 @@
 #include "ash/wm/window_resizer.h"
 #include "base/compiler_specific.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/host_desktop.h"
 #include "chrome/test/base/test_browser_window_aura.h"
diff --git a/chrome/browser/ui/aura/accessibility/automation_manager_aura.cc b/chrome/browser/ui/aura/accessibility/automation_manager_aura.cc
index 54e7600..0c40a5a 100644
--- a/chrome/browser/ui/aura/accessibility/automation_manager_aura.cc
+++ b/chrome/browser/ui/aura/accessibility/automation_manager_aura.cc
@@ -4,9 +4,12 @@
 
 #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h"
 
+#include <stddef.h>
+
 #include <vector>
 
 #include "base/memory/singleton.h"
+#include "build/build_config.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/extensions/api/automation_internal/automation_event_router.h"
 #include "chrome/browser/profiles/profile_manager.h"
@@ -86,25 +89,25 @@
   SendEvent(context, obj, ui::AX_EVENT_ALERT);
 }
 
-void AutomationManagerAura::DoDefault(int32 id) {
+void AutomationManagerAura::DoDefault(int32_t id) {
   CHECK(enabled_);
   current_tree_->DoDefault(id);
 }
 
-void AutomationManagerAura::Focus(int32 id) {
+void AutomationManagerAura::Focus(int32_t id) {
   CHECK(enabled_);
   current_tree_->Focus(id);
 }
 
-void AutomationManagerAura::MakeVisible(int32 id) {
+void AutomationManagerAura::MakeVisible(int32_t id) {
   CHECK(enabled_);
   current_tree_->MakeVisible(id);
 }
 
-void AutomationManagerAura::SetSelection(int32 anchor_id,
-                                         int32 anchor_offset,
-                                         int32 focus_id,
-                                         int32 focus_offset) {
+void AutomationManagerAura::SetSelection(int32_t anchor_id,
+                                         int32_t anchor_offset,
+                                         int32_t focus_id,
+                                         int32_t focus_offset) {
   CHECK(enabled_);
   if (anchor_id != focus_id) {
     NOTREACHED();
@@ -113,7 +116,7 @@
   current_tree_->SetSelection(anchor_id, anchor_offset, focus_offset);
 }
 
-void AutomationManagerAura::ShowContextMenu(int32 id) {
+void AutomationManagerAura::ShowContextMenu(int32_t id) {
   CHECK(enabled_);
   current_tree_->ShowContextMenu(id);
 }
diff --git a/chrome/browser/ui/aura/accessibility/automation_manager_aura.h b/chrome/browser/ui/aura/accessibility/automation_manager_aura.h
index 503252c..159edb4 100644
--- a/chrome/browser/ui/aura/accessibility/automation_manager_aura.h
+++ b/chrome/browser/ui/aura/accessibility/automation_manager_aura.h
@@ -5,7 +5,9 @@
 #ifndef CHROME_BROWSER_UI_AURA_ACCESSIBILITY_AUTOMATION_MANAGER_AURA_H_
 #define CHROME_BROWSER_UI_AURA_ACCESSIBILITY_AUTOMATION_MANAGER_AURA_H_
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "chrome/browser/extensions/api/automation_internal/automation_action_adapter.h"
 #include "chrome/browser/ui/aura/accessibility/ax_tree_source_aura.h"
@@ -50,14 +52,14 @@
   void HandleAlert(content::BrowserContext* context, const std::string& text);
 
   // AutomationActionAdapter implementation.
-  void DoDefault(int32 id) override;
-  void Focus(int32 id) override;
-  void MakeVisible(int32 id) override;
-  void SetSelection(int32 anchor_id,
-                    int32 anchor_offset,
-                    int32 focus_id,
-                    int32 focus_offset) override;
-  void ShowContextMenu(int32 id) override;
+  void DoDefault(int32_t id) override;
+  void Focus(int32_t id) override;
+  void MakeVisible(int32_t id) override;
+  void SetSelection(int32_t anchor_id,
+                    int32_t anchor_offset,
+                    int32_t focus_id,
+                    int32_t focus_offset) override;
+  void ShowContextMenu(int32_t id) override;
 
  private:
   friend struct base::DefaultSingletonTraits<AutomationManagerAura>;
diff --git a/chrome/browser/ui/aura/accessibility/ax_root_obj_wrapper.cc b/chrome/browser/ui/aura/accessibility/ax_root_obj_wrapper.cc
index 9e5dc1b..87fb0e32 100644
--- a/chrome/browser/ui/aura/accessibility/ax_root_obj_wrapper.cc
+++ b/chrome/browser/ui/aura/accessibility/ax_root_obj_wrapper.cc
@@ -11,7 +11,7 @@
 #include "ui/views/accessibility/ax_aura_obj_cache.h"
 #include "ui/views/accessibility/ax_window_obj_wrapper.h"
 
-AXRootObjWrapper::AXRootObjWrapper(int32 id)
+AXRootObjWrapper::AXRootObjWrapper(int32_t id)
     : id_(id), alert_window_(new aura::Window(NULL)) {
   alert_window_->Init(ui::LAYER_NOT_DRAWN);
 }
@@ -55,6 +55,6 @@
   out_node_data->state = 0;
 }
 
-int32 AXRootObjWrapper::GetID() {
+int32_t AXRootObjWrapper::GetID() {
   return id_;
 }
diff --git a/chrome/browser/ui/aura/accessibility/ax_root_obj_wrapper.h b/chrome/browser/ui/aura/accessibility/ax_root_obj_wrapper.h
index 57f85df..fab9ced 100644
--- a/chrome/browser/ui/aura/accessibility/ax_root_obj_wrapper.h
+++ b/chrome/browser/ui/aura/accessibility/ax_root_obj_wrapper.h
@@ -5,9 +5,11 @@
 #ifndef CHROME_BROWSER_UI_AURA_ACCESSIBILITY_AX_ROOT_OBJ_WRAPPER_H_
 #define CHROME_BROWSER_UI_AURA_ACCESSIBILITY_AX_ROOT_OBJ_WRAPPER_H_
 
+#include <stdint.h>
+
 #include <string>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "ui/views/accessibility/ax_aura_obj_wrapper.h"
 
 namespace aura {
@@ -16,7 +18,7 @@
 
 class AXRootObjWrapper : public views::AXAuraObjWrapper {
  public:
-  explicit AXRootObjWrapper(int32 id);
+  explicit AXRootObjWrapper(int32_t id);
   ~AXRootObjWrapper() override;
 
   // Returns an AXAuraObjWrapper for an alert window with title set to |text|.
@@ -30,10 +32,10 @@
   void GetChildren(
       std::vector<views::AXAuraObjWrapper*>* out_children) override;
   void Serialize(ui::AXNodeData* out_node_data) override;
-  int32 GetID() override;
+  int32_t GetID() override;
 
  private:
-  int32 id_;
+  int32_t id_;
 
   aura::Window* alert_window_;
 
diff --git a/chrome/browser/ui/aura/accessibility/ax_tree_source_aura.cc b/chrome/browser/ui/aura/accessibility/ax_tree_source_aura.cc
index 856b701c..5723ec55 100644
--- a/chrome/browser/ui/aura/accessibility/ax_tree_source_aura.cc
+++ b/chrome/browser/ui/aura/accessibility/ax_tree_source_aura.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/aura/accessibility/ax_tree_source_aura.h"
 
+#include <stddef.h>
+
 #include <vector>
 
 #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h"
@@ -26,31 +28,31 @@
   root_.reset();
 }
 
-void AXTreeSourceAura::DoDefault(int32 id) {
+void AXTreeSourceAura::DoDefault(int32_t id) {
   AXAuraObjWrapper* obj = AXAuraObjCache::GetInstance()->Get(id);
   if (obj)
     obj->DoDefault();
 }
 
-void AXTreeSourceAura::Focus(int32 id) {
+void AXTreeSourceAura::Focus(int32_t id) {
   AXAuraObjWrapper* obj = AXAuraObjCache::GetInstance()->Get(id);
   if (obj)
     obj->Focus();
 }
 
-void AXTreeSourceAura::MakeVisible(int32 id) {
+void AXTreeSourceAura::MakeVisible(int32_t id) {
   AXAuraObjWrapper* obj = AXAuraObjCache::GetInstance()->Get(id);
   if (obj)
     obj->MakeVisible();
 }
 
-void AXTreeSourceAura::SetSelection(int32 id, int32 start, int32 end) {
+void AXTreeSourceAura::SetSelection(int32_t id, int32_t start, int32_t end) {
   AXAuraObjWrapper* obj = AXAuraObjCache::GetInstance()->Get(id);
   if (obj)
     obj->SetSelection(start, end);
 }
 
-void AXTreeSourceAura::ShowContextMenu(int32 id) {
+void AXTreeSourceAura::ShowContextMenu(int32_t id) {
   AXAuraObjWrapper* obj = AXAuraObjCache::GetInstance()->Get(id);
   if (obj)
     obj->ShowContextMenu();
@@ -68,13 +70,13 @@
   return root_.get();
 }
 
-AXAuraObjWrapper* AXTreeSourceAura::GetFromId(int32 id) const {
+AXAuraObjWrapper* AXTreeSourceAura::GetFromId(int32_t id) const {
   if (id == root_->GetID())
     return root_.get();
   return AXAuraObjCache::GetInstance()->Get(id);
 }
 
-int32 AXTreeSourceAura::GetId(AXAuraObjWrapper* node) const {
+int32_t AXTreeSourceAura::GetId(AXAuraObjWrapper* node) const {
   return node->GetID();
 }
 
diff --git a/chrome/browser/ui/aura/accessibility/ax_tree_source_aura.h b/chrome/browser/ui/aura/accessibility/ax_tree_source_aura.h
index 2c119cc..9fd2851 100644
--- a/chrome/browser/ui/aura/accessibility/ax_tree_source_aura.h
+++ b/chrome/browser/ui/aura/accessibility/ax_tree_source_aura.h
@@ -5,9 +5,11 @@
 #ifndef CHROME_BROWSER_UI_AURA_ACCESSIBILITY_AX_TREE_SOURCE_AURA_H_
 #define CHROME_BROWSER_UI_AURA_ACCESSIBILITY_AX_TREE_SOURCE_AURA_H_
 
+#include <stdint.h>
+
 #include <map>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "chrome/browser/ui/aura/accessibility/ax_root_obj_wrapper.h"
 #include "ui/accessibility/ax_tree_data.h"
@@ -28,17 +30,17 @@
   ~AXTreeSourceAura() override;
 
   // A set of actions invoked on an Aura view.
-  void DoDefault(int32 id);
-  void Focus(int32 id);
-  void MakeVisible(int32 id);
-  void SetSelection(int32 id, int32 start, int32 end);
-  void ShowContextMenu(int32 id);
+  void DoDefault(int32_t id);
+  void Focus(int32_t id);
+  void MakeVisible(int32_t id);
+  void SetSelection(int32_t id, int32_t start, int32_t end);
+  void ShowContextMenu(int32_t id);
 
   // AXTreeSource implementation.
   ui::AXTreeData GetTreeData() const override;
   views::AXAuraObjWrapper* GetRoot() const override;
-  views::AXAuraObjWrapper* GetFromId(int32 id) const override;
-  int32 GetId(views::AXAuraObjWrapper* node) const override;
+  views::AXAuraObjWrapper* GetFromId(int32_t id) const override;
+  int32_t GetId(views::AXAuraObjWrapper* node) const override;
   void GetChildren(
       views::AXAuraObjWrapper* node,
       std::vector<views::AXAuraObjWrapper*>* out_children) const override;
diff --git a/chrome/browser/ui/aura/active_desktop_monitor.cc b/chrome/browser/ui/aura/active_desktop_monitor.cc
index f6c5a7b8..66937ff 100644
--- a/chrome/browser/ui/aura/active_desktop_monitor.cc
+++ b/chrome/browser/ui/aura/active_desktop_monitor.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/browser/ui/aura/active_desktop_monitor.h"
 
+#include "build/build_config.h"
 #include "ui/aura/env.h"
 #include "ui/aura/window_tree_host.h"
 
diff --git a/chrome/browser/ui/aura/active_desktop_monitor.h b/chrome/browser/ui/aura/active_desktop_monitor.h
index bd33d604c..4a00e7b 100644
--- a/chrome/browser/ui/aura/active_desktop_monitor.h
+++ b/chrome/browser/ui/aura/active_desktop_monitor.h
@@ -5,8 +5,8 @@
 #ifndef CHROME_BROWSER_UI_AURA_ACTIVE_DESKTOP_MONITOR_H_
 #define CHROME_BROWSER_UI_AURA_ACTIVE_DESKTOP_MONITOR_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/host_desktop.h"
 #include "ui/aura/env_observer.h"
 
diff --git a/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc b/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc
index 62c391d9..7c836e3 100644
--- a/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc
+++ b/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc
@@ -6,6 +6,7 @@
 
 #include "base/command_line.h"
 #include "base/run_loop.h"
+#include "build/build_config.h"
 #include "chrome/browser/chrome_browser_main.h"
 #include "chrome/browser/ui/aura/active_desktop_monitor.h"
 #include "chrome/browser/ui/host_desktop.h"
diff --git a/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.h b/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.h
index f8884cc..7ad66a4 100644
--- a/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.h
+++ b/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.h
@@ -5,9 +5,10 @@
 #ifndef CHROME_BROWSER_UI_AURA_CHROME_BROWSER_MAIN_EXTRA_PARTS_AURA_H_
 #define CHROME_BROWSER_UI_AURA_CHROME_BROWSER_MAIN_EXTRA_PARTS_AURA_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
+#include "build/build_config.h"
 #include "chrome/browser/chrome_browser_main_extra_parts.h"
 
 class ActiveDesktopMonitor;
diff --git a/chrome/browser/ui/aura/native_window_tracker_aura.h b/chrome/browser/ui/aura/native_window_tracker_aura.h
index cdd85ea..015141cf 100644
--- a/chrome/browser/ui/aura/native_window_tracker_aura.h
+++ b/chrome/browser/ui/aura/native_window_tracker_aura.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_AURA_NATIVE_WINDOW_TRACKER_AURA_H_
 #define CHROME_BROWSER_UI_AURA_NATIVE_WINDOW_TRACKER_AURA_H_
 
+#include "base/macros.h"
 #include "chrome/browser/ui/native_window_tracker.h"
 #include "ui/aura/window_observer.h"
 
diff --git a/chrome/browser/ui/aura/tab_contents/web_drag_bookmark_handler_aura.h b/chrome/browser/ui/aura/tab_contents/web_drag_bookmark_handler_aura.h
index 3ec56e7..0a022a6 100644
--- a/chrome/browser/ui/aura/tab_contents/web_drag_bookmark_handler_aura.h
+++ b/chrome/browser/ui/aura/tab_contents/web_drag_bookmark_handler_aura.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_AURA_TAB_CONTENTS_WEB_DRAG_BOOKMARK_HANDLER_AURA_H_
 #define CHROME_BROWSER_UI_AURA_TAB_CONTENTS_WEB_DRAG_BOOKMARK_HANDLER_AURA_H_
 
+#include "base/macros.h"
 #include "components/bookmarks/browser/bookmark_node_data.h"
 #include "content/public/browser/web_contents.h"
 #include "content/public/browser/web_drag_dest_delegate.h"
diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_browsertest.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_browsertest.cc
index a3f176a..5d6bde0 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_browsertest.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_browsertest.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 <stddef.h>
+
 #include "base/bind.h"
 #include "base/command_line.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
 #include "base/message_loop/message_loop.h"
@@ -12,6 +15,7 @@
 #include "base/strings/utf_string_conversions.h"
 #include "base/test/histogram_tester.h"
 #include "base/time/time.h"
+#include "build/build_config.h"
 #include "chrome/browser/autofill/personal_data_manager_factory.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/signin/account_tracker_service_factory.h"
diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
index baf7ef4..df81dae 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
@@ -14,6 +14,7 @@
 #include "base/i18n/rtl.h"
 #include "base/location.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/prefs/pref_registry_simple.h"
 #include "base/prefs/pref_service.h"
 #include "base/prefs/scoped_user_pref_update.h"
diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.h b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.h
index 17238f21..8327e5e 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.h
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.h
@@ -5,10 +5,13 @@
 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_
 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_
 
+#include <stddef.h>
+
 #include <set>
 #include <vector>
 
 #include "base/gtest_prod_util.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/strings/string16.h"
diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
index e70873ea..6ea9484 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
@@ -2,15 +2,17 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
+
 #include <map>
 #include <utility>
 
-#include "base/basictypes.h"
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/callback.h"
 #include "base/command_line.h"
 #include "base/guid.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/prefs/pref_service.h"
@@ -18,6 +20,7 @@
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_piece.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/browser/signin/account_tracker_service_factory.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
 #include "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h"
diff --git a/chrome/browser/ui/autofill/autofill_dialog_i18n_input.cc b/chrome/browser/ui/autofill/autofill_dialog_i18n_input.cc
index 582a2b3..36e11d7 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_i18n_input.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_i18n_input.cc
@@ -4,6 +4,9 @@
 
 #include "chrome/browser/ui/autofill/autofill_dialog_i18n_input.h"
 
+#include <stddef.h>
+
+#include "base/macros.h"
 #include "base/strings/string_split.h"
 #include "base/strings/utf_string_conversions.h"
 #include "chrome/browser/browser_process.h"
diff --git a/chrome/browser/ui/autofill/autofill_dialog_i18n_input_unittest.cc b/chrome/browser/ui/autofill/autofill_dialog_i18n_input_unittest.cc
index d8ea9dd..a58eed03 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_i18n_input_unittest.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_i18n_input_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/autofill/autofill_dialog_i18n_input.h"
 
+#include <stddef.h>
+
 #include "components/autofill/core/browser/field_types.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_ui.h"
diff --git a/chrome/browser/ui/autofill/autofill_dialog_models.h b/chrome/browser/ui/autofill/autofill_dialog_models.h
index 37b2f73..3b5b33d 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_models.h
+++ b/chrome/browser/ui/autofill/autofill_dialog_models.h
@@ -5,11 +5,13 @@
 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_MODELS_H_
 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_MODELS_H_
 
+#include <stddef.h>
+
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/strings/string16.h"
 #include "ui/base/models/combobox_model.h"
 #include "ui/base/models/simple_menu_model.h"
diff --git a/chrome/browser/ui/autofill/autofill_dialog_types.cc b/chrome/browser/ui/autofill/autofill_dialog_types.cc
index 730e924..51dc012b 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_types.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_types.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/autofill/autofill_dialog_types.h"
 
+#include <stddef.h>
+
 #include "base/logging.h"
 #include "base/strings/string_split.h"
 #include "base/strings/string_util.h"
diff --git a/chrome/browser/ui/autofill/autofill_popup_controller.h b/chrome/browser/ui/autofill/autofill_popup_controller.h
index 2b4927cf..0845688f 100644
--- a/chrome/browser/ui/autofill/autofill_popup_controller.h
+++ b/chrome/browser/ui/autofill/autofill_popup_controller.h
@@ -5,10 +5,13 @@
 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_
 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_
 
+#include <stddef.h>
+
 #include <vector>
 
 #include "base/compiler_specific.h"
 #include "base/strings/string16.h"
+#include "build/build_config.h"
 #include "chrome/browser/ui/autofill/autofill_popup_view_delegate.h"
 
 namespace gfx {
diff --git a/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc b/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc
index 1827dc7..3d09213 100644
--- a/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc
+++ b/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc
@@ -9,7 +9,9 @@
 
 #include "base/command_line.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/browser/ui/autofill/autofill_popup_view.h"
 #include "chrome/browser/ui/autofill/popup_constants.h"
 #include "components/autofill/core/browser/autofill_popup_delegate.h"
diff --git a/chrome/browser/ui/autofill/autofill_popup_controller_impl.h b/chrome/browser/ui/autofill/autofill_popup_controller_impl.h
index ecb981d..ef6b4f1 100644
--- a/chrome/browser/ui/autofill/autofill_popup_controller_impl.h
+++ b/chrome/browser/ui/autofill/autofill_popup_controller_impl.h
@@ -5,10 +5,13 @@
 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_IMPL_H_
 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_IMPL_H_
 
+#include <stddef.h>
+
 #include "base/gtest_prod_util.h"
 #include "base/i18n/rtl.h"
 #include "base/memory/weak_ptr.h"
 #include "base/strings/string16.h"
+#include "build/build_config.h"
 #include "chrome/browser/ui/autofill/autofill_popup_controller.h"
 #include "chrome/browser/ui/autofill/popup_controller_common.h"
 #include "ui/gfx/font_list.h"
diff --git a/chrome/browser/ui/autofill/autofill_popup_controller_interactive_uitest.cc b/chrome/browser/ui/autofill/autofill_popup_controller_interactive_uitest.cc
index c1aa7ae..8236f09 100644
--- a/chrome/browser/ui/autofill/autofill_popup_controller_interactive_uitest.cc
+++ b/chrome/browser/ui/autofill/autofill_popup_controller_interactive_uitest.cc
@@ -2,8 +2,9 @@
 // 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/macros.h"
 #include "base/memory/scoped_ptr.h"
+#include "build/build_config.h"
 #include "chrome/browser/ui/autofill/autofill_popup_view.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_window.h"
diff --git a/chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc b/chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc
index 336a6e7..c54b2f1 100644
--- a/chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc
+++ b/chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc
@@ -2,10 +2,14 @@
 // 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 "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/prefs/pref_service.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h"
 #include "chrome/browser/ui/autofill/autofill_popup_view.h"
 #include "chrome/browser/ui/autofill/popup_constants.h"
diff --git a/chrome/browser/ui/autofill/autofill_popup_view.h b/chrome/browser/ui/autofill/autofill_popup_view.h
index d01f774..82bf79d0cc 100644
--- a/chrome/browser/ui/autofill/autofill_popup_view.h
+++ b/chrome/browser/ui/autofill/autofill_popup_view.h
@@ -5,6 +5,8 @@
 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_VIEW_H_
 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_VIEW_H_
 
+#include <stddef.h>
+
 #include "ui/gfx/native_widget_types.h"
 
 namespace gfx {
diff --git a/chrome/browser/ui/autofill/card_unmask_prompt_view_browsertest.cc b/chrome/browser/ui/autofill/card_unmask_prompt_view_browsertest.cc
index cd4c2943..bcbd179 100644
--- a/chrome/browser/ui/autofill/card_unmask_prompt_view_browsertest.cc
+++ b/chrome/browser/ui/autofill/card_unmask_prompt_view_browsertest.cc
@@ -4,8 +4,10 @@
 
 #include "base/bind.h"
 #include "base/guid.h"
+#include "base/macros.h"
 #include "base/message_loop/message_loop.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/browser/ui/autofill/card_unmask_prompt_view_tester.h"
 #include "chrome/browser/ui/autofill/create_card_unmask_prompt_view.h"
 #include "chrome/browser/ui/browser.h"
diff --git a/chrome/browser/ui/autofill/chrome_autofill_client.cc b/chrome/browser/ui/autofill/chrome_autofill_client.cc
index 437b841..94a6934 100644
--- a/chrome/browser/ui/autofill/chrome_autofill_client.cc
+++ b/chrome/browser/ui/autofill/chrome_autofill_client.cc
@@ -8,6 +8,7 @@
 #include "base/command_line.h"
 #include "base/logging.h"
 #include "base/prefs/pref_service.h"
+#include "build/build_config.h"
 #include "chrome/browser/autofill/personal_data_manager_factory.h"
 #include "chrome/browser/autofill/risk_util.h"
 #include "chrome/browser/browser_process.h"
diff --git a/chrome/browser/ui/autofill/chrome_autofill_client.h b/chrome/browser/ui/autofill/chrome_autofill_client.h
index 271678e..620151fa 100644
--- a/chrome/browser/ui/autofill/chrome_autofill_client.h
+++ b/chrome/browser/ui/autofill/chrome_autofill_client.h
@@ -10,6 +10,7 @@
 #include "base/callback.h"
 #include "base/compiler_specific.h"
 #include "base/i18n/rtl.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "components/autofill/core/browser/autofill_client.h"
diff --git a/chrome/browser/ui/autofill/country_combobox_model.cc b/chrome/browser/ui/autofill/country_combobox_model.cc
index 5cff9434..dbaac7a 100644
--- a/chrome/browser/ui/autofill/country_combobox_model.cc
+++ b/chrome/browser/ui/autofill/country_combobox_model.cc
@@ -9,6 +9,7 @@
 
 #include "base/logging.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/browser/browser_process.h"
 #include "components/autofill/core/browser/autofill_country.h"
 #include "components/autofill/core/browser/personal_data_manager.h"
diff --git a/chrome/browser/ui/autofill/country_combobox_model.h b/chrome/browser/ui/autofill/country_combobox_model.h
index e2341ee..947ca4f 100644
--- a/chrome/browser/ui/autofill/country_combobox_model.h
+++ b/chrome/browser/ui/autofill/country_combobox_model.h
@@ -11,6 +11,7 @@
 
 #include "base/callback.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_vector.h"
 #include "ui/base/models/combobox_model.h"
 
diff --git a/chrome/browser/ui/autofill/credit_card_scanner_view.cc b/chrome/browser/ui/autofill/credit_card_scanner_view.cc
index 0d1bb08a..8e6fab0 100644
--- a/chrome/browser/ui/autofill/credit_card_scanner_view.cc
+++ b/chrome/browser/ui/autofill/credit_card_scanner_view.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 "chrome/browser/ui/autofill/credit_card_scanner_view.h"
 #include "chrome/common/features.h"
 
diff --git a/chrome/browser/ui/autofill/data_model_wrapper.cc b/chrome/browser/ui/autofill/data_model_wrapper.cc
index 76b3641..6a71ee36 100644
--- a/chrome/browser/ui/autofill/data_model_wrapper.cc
+++ b/chrome/browser/ui/autofill/data_model_wrapper.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/autofill/data_model_wrapper.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/callback.h"
 #include "base/strings/string_util.h"
diff --git a/chrome/browser/ui/autofill/data_model_wrapper.h b/chrome/browser/ui/autofill/data_model_wrapper.h
index b9595ec..9bd3eaa 100644
--- a/chrome/browser/ui/autofill/data_model_wrapper.h
+++ b/chrome/browser/ui/autofill/data_model_wrapper.h
@@ -8,6 +8,7 @@
 #include <vector>
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/strings/string16.h"
 #include "chrome/browser/ui/autofill/autofill_dialog_types.h"
 #include "components/autofill/core/browser/detail_input.h"
diff --git a/chrome/browser/ui/autofill/loading_animation.cc b/chrome/browser/ui/autofill/loading_animation.cc
index 38e257cd..3e0aeb0 100644
--- a/chrome/browser/ui/autofill/loading_animation.cc
+++ b/chrome/browser/ui/autofill/loading_animation.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/autofill/loading_animation.h"
 
 #include "base/logging.h"
+#include "base/macros.h"
 #include "ui/gfx/animation/tween.h"
 
 namespace autofill {
diff --git a/chrome/browser/ui/autofill/loading_animation.h b/chrome/browser/ui/autofill/loading_animation.h
index 4a1bb21e..0177f276 100644
--- a/chrome/browser/ui/autofill/loading_animation.h
+++ b/chrome/browser/ui/autofill/loading_animation.h
@@ -5,6 +5,8 @@
 #ifndef CHROME_BROWSER_UI_AUTOFILL_LOADING_ANIMATION_H_
 #define CHROME_BROWSER_UI_AUTOFILL_LOADING_ANIMATION_H_
 
+#include <stddef.h>
+
 #include "ui/gfx/animation/linear_animation.h"
 
 namespace autofill {
diff --git a/chrome/browser/ui/autofill/mock_address_validator.h b/chrome/browser/ui/autofill/mock_address_validator.h
index f2052d4..e2d55a9 100644
--- a/chrome/browser/ui/autofill/mock_address_validator.h
+++ b/chrome/browser/ui/autofill/mock_address_validator.h
@@ -5,7 +5,9 @@
 #ifndef CHROME_BROWSER_UI_AUTOFILL_MOCK_ADDRESS_VALIDATOR_H_
 #define CHROME_BROWSER_UI_AUTOFILL_MOCK_ADDRESS_VALIDATOR_H_
 
-#include "base/basictypes.h"
+#include <stddef.h>
+
+#include "base/macros.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "third_party/libaddressinput/chromium/chrome_address_validator.h"
 #include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_data.h"
diff --git a/chrome/browser/ui/autofill/mock_autofill_dialog_view_delegate.h b/chrome/browser/ui/autofill/mock_autofill_dialog_view_delegate.h
index 21342c7..d80c486 100644
--- a/chrome/browser/ui/autofill/mock_autofill_dialog_view_delegate.h
+++ b/chrome/browser/ui/autofill/mock_autofill_dialog_view_delegate.h
@@ -5,7 +5,7 @@
 #ifndef CHROME_BROWSER_UI_AUTOFILL_MOCK_AUTOFILL_DIALOG_VIEW_DELEGATE_H_
 #define CHROME_BROWSER_UI_AUTOFILL_MOCK_AUTOFILL_DIALOG_VIEW_DELEGATE_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/autofill/autofill_dialog_view_delegate.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "ui/gfx/range/range.h"
diff --git a/chrome/browser/ui/autofill/mock_new_credit_card_bubble_controller.h b/chrome/browser/ui/autofill/mock_new_credit_card_bubble_controller.h
index c3b7d9e..0c3aef8 100644
--- a/chrome/browser/ui/autofill/mock_new_credit_card_bubble_controller.h
+++ b/chrome/browser/ui/autofill/mock_new_credit_card_bubble_controller.h
@@ -5,7 +5,7 @@
 #ifndef CHROME_BROWSER_UI_AUTOFILL_MOCK_NEW_CREDIT_CARD_BUBBLE_CONTROLLER_H_
 #define CHROME_BROWSER_UI_AUTOFILL_MOCK_NEW_CREDIT_CARD_BUBBLE_CONTROLLER_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 
 namespace autofill {
diff --git a/chrome/browser/ui/autofill/new_credit_card_bubble_controller.h b/chrome/browser/ui/autofill/new_credit_card_bubble_controller.h
index ca5d6e1..a309954 100644
--- a/chrome/browser/ui/autofill/new_credit_card_bubble_controller.h
+++ b/chrome/browser/ui/autofill/new_credit_card_bubble_controller.h
@@ -5,8 +5,8 @@
 #ifndef CHROME_BROWSER_UI_AUTOFILL_NEW_CREDIT_CARD_BUBBLE_CONTROLLER_H_
 #define CHROME_BROWSER_UI_AUTOFILL_NEW_CREDIT_CARD_BUBBLE_CONTROLLER_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/strings/string16.h"
diff --git a/chrome/browser/ui/autofill/new_credit_card_bubble_view.cc b/chrome/browser/ui/autofill/new_credit_card_bubble_view.cc
index cc520648..d9465b2 100644
--- a/chrome/browser/ui/autofill/new_credit_card_bubble_view.cc
+++ b/chrome/browser/ui/autofill/new_credit_card_bubble_view.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 "chrome/browser/ui/autofill/new_credit_card_bubble_view.h"
 
 namespace autofill {
diff --git a/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc b/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc
index bc8b0ea..451d67d 100644
--- a/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc
+++ b/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/autofill/password_generation_popup_controller_impl.h"
 
 #include <math.h>
+#include <stddef.h>
 
 #include "base/i18n/rtl.h"
 #include "base/strings/string_split.h"
diff --git a/chrome/browser/ui/autofill/password_generation_popup_controller_impl.h b/chrome/browser/ui/autofill/password_generation_popup_controller_impl.h
index 81143e2..0f40803 100644
--- a/chrome/browser/ui/autofill/password_generation_popup_controller_impl.h
+++ b/chrome/browser/ui/autofill/password_generation_popup_controller_impl.h
@@ -7,7 +7,7 @@
 
 #include <string>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "chrome/browser/ui/autofill/password_generation_popup_controller.h"
 #include "chrome/browser/ui/autofill/popup_controller_common.h"
diff --git a/chrome/browser/ui/autofill/password_generation_popup_view_browsertest.cc b/chrome/browser/ui/autofill/password_generation_popup_view_browsertest.cc
index 55eab63..7dd9925 100644
--- a/chrome/browser/ui/autofill/password_generation_popup_view_browsertest.cc
+++ b/chrome/browser/ui/autofill/password_generation_popup_view_browsertest.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/autofill/password_generation_popup_view.h"
 
 #include "base/strings/string16.h"
+#include "build/build_config.h"
 #include "chrome/browser/ui/autofill/password_generation_popup_controller_impl.h"
 #include "chrome/browser/ui/autofill/password_generation_popup_view_tester.h"
 #include "chrome/browser/ui/browser.h"
diff --git a/chrome/browser/ui/autofill/popup_controller_common.h b/chrome/browser/ui/autofill/popup_controller_common.h
index 1eebfdb..6350a705 100644
--- a/chrome/browser/ui/autofill/popup_controller_common.h
+++ b/chrome/browser/ui/autofill/popup_controller_common.h
@@ -6,6 +6,7 @@
 #define CHROME_BROWSER_UI_AUTOFILL_POPUP_CONTROLLER_COMMON_H_
 
 #include "base/i18n/rtl.h"
+#include "base/macros.h"
 #include "content/public/browser/render_widget_host.h"
 #include "ui/gfx/geometry/rect.h"
 #include "ui/gfx/geometry/rect_f.h"
diff --git a/chrome/browser/ui/autofill/popup_controller_common_unittest.cc b/chrome/browser/ui/autofill/popup_controller_common_unittest.cc
index 5e755ae..2de743e 100644
--- a/chrome/browser/ui/autofill/popup_controller_common_unittest.cc
+++ b/chrome/browser/ui/autofill/popup_controller_common_unittest.cc
@@ -4,6 +4,9 @@
 
 #include "chrome/browser/ui/autofill/popup_controller_common.h"
 
+#include <stddef.h>
+
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "chrome/browser/ui/autofill/test_popup_controller_common.h"
 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
diff --git a/chrome/browser/ui/autofill/save_card_bubble_controller_impl.cc b/chrome/browser/ui/autofill/save_card_bubble_controller_impl.cc
index 55071f0a..43e99ae 100644
--- a/chrome/browser/ui/autofill/save_card_bubble_controller_impl.cc
+++ b/chrome/browser/ui/autofill/save_card_bubble_controller_impl.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/autofill/save_card_bubble_controller_impl.h"
 
+#include <stddef.h>
+
 #include "base/i18n/message_formatter.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
diff --git a/chrome/browser/ui/autofill/save_card_bubble_controller_impl_unittest.cc b/chrome/browser/ui/autofill/save_card_bubble_controller_impl_unittest.cc
index 571be13d..5a8658e 100644
--- a/chrome/browser/ui/autofill/save_card_bubble_controller_impl_unittest.cc
+++ b/chrome/browser/ui/autofill/save_card_bubble_controller_impl_unittest.cc
@@ -4,7 +4,10 @@
 
 #include "chrome/browser/ui/autofill/save_card_bubble_controller_impl.h"
 
+#include <stddef.h>
+
 #include "base/json/json_reader.h"
+#include "base/macros.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/test/histogram_tester.h"
 #include "base/values.h"
diff --git a/chrome/browser/ui/autofill/test_popup_controller_common.h b/chrome/browser/ui/autofill/test_popup_controller_common.h
index dc4f2665..716e65d3 100644
--- a/chrome/browser/ui/autofill/test_popup_controller_common.h
+++ b/chrome/browser/ui/autofill/test_popup_controller_common.h
@@ -7,6 +7,7 @@
 
 #include "chrome/browser/ui/autofill/popup_controller_common.h"
 
+#include "base/macros.h"
 #include "ui/gfx/display.h"
 
 namespace autofill {
diff --git a/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc b/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc
index d516618..a14af1785 100644
--- a/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc
+++ b/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc
@@ -2,11 +2,15 @@
 // 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/command_line.h"
 #include "base/files/file_path.h"
+#include "base/macros.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
@@ -239,9 +243,9 @@
       observer.Wait();
     }
     EXPECT_EQ(1u, popup_blocker_helper->GetBlockedPopupsCount());
-    std::map<int32, GURL> blocked_requests =
+    std::map<int32_t, GURL> blocked_requests =
         popup_blocker_helper->GetBlockedPopupRequests();
-    std::map<int32, GURL>::const_iterator iter = blocked_requests.begin();
+    std::map<int32_t, GURL>::const_iterator iter = blocked_requests.begin();
     popup_blocker_helper->ShowBlockedPopup(iter->first);
 
     observer.Wait();
diff --git a/chrome/browser/ui/blocked_content/popup_blocker_tab_helper.cc b/chrome/browser/ui/blocked_content/popup_blocker_tab_helper.cc
index 95f2a61..25344ef7 100644
--- a/chrome/browser/ui/blocked_content/popup_blocker_tab_helper.cc
+++ b/chrome/browser/ui/blocked_content/popup_blocker_tab_helper.cc
@@ -115,7 +115,7 @@
   }
 }
 
-void PopupBlockerTabHelper::ShowBlockedPopup(int32 id) {
+void PopupBlockerTabHelper::ShowBlockedPopup(int32_t id) {
   BlockedRequest* popup = blocked_popups_.Lookup(id);
   if (!popup)
     return;
diff --git a/chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h b/chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h
index 1788b424..0512057f 100644
--- a/chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h
+++ b/chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h
@@ -5,9 +5,13 @@
 #ifndef CHROME_BROWSER_UI_BLOCKED_CONTENT_POPUP_BLOCKER_TAB_HELPER_H_
 #define CHROME_BROWSER_UI_BLOCKED_CONTENT_POPUP_BLOCKER_TAB_HELPER_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <map>
 
 #include "base/id_map.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/blocked_content/blocked_window_params.h"
 #include "content/public/browser/web_contents_observer.h"
 #include "content/public/browser/web_contents_user_data.h"
@@ -28,7 +32,7 @@
       public content::WebContentsUserData<PopupBlockerTabHelper> {
  public:
   // Mapping from popup IDs to blocked popup requests.
-  typedef std::map<int32, GURL> PopupIdMap;
+  typedef std::map<int32_t, GURL> PopupIdMap;
 
   ~PopupBlockerTabHelper() override;
 
@@ -41,7 +45,7 @@
   void AddBlockedPopup(const BlockedWindowParams& params);
 
   // Creates the blocked popup with |popup_id|.
-  void ShowBlockedPopup(int32 popup_id);
+  void ShowBlockedPopup(int32_t popup_id);
 
   // Returns the number of blocked popups.
   size_t GetBlockedPopupsCount() const;
diff --git a/chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.h b/chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.h
index 90f096e..e4d2d4a 100644
--- a/chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.h
+++ b/chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.h
@@ -5,6 +5,8 @@
 #ifndef CHROME_BROWSER_UI_BLUETOOTH_BLUETOOTH_CHOOSER_BUBBLE_DELEGATE_H_
 #define CHROME_BROWSER_UI_BLUETOOTH_BLUETOOTH_CHOOSER_BUBBLE_DELEGATE_H_
 
+#include <stddef.h>
+
 #include "base/macros.h"
 #include "chrome/browser/ui/website_settings/chooser_bubble_delegate.h"
 #include "components/bubble/bubble_reference.h"
diff --git a/chrome/browser/ui/bookmarks/bookmark_bar.h b/chrome/browser/ui/bookmarks/bookmark_bar.h
index e5f0ed25c..3dd2899 100644
--- a/chrome/browser/ui/bookmarks/bookmark_bar.h
+++ b/chrome/browser/ui/bookmarks/bookmark_bar.h
@@ -5,7 +5,7 @@
 #ifndef CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_BAR_H_
 #define CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_BAR_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 
 class BookmarkBar {
  public:
diff --git a/chrome/browser/ui/bookmarks/bookmark_browsertest.cc b/chrome/browser/ui/bookmarks/bookmark_browsertest.cc
index ca88e91..ff58ca1 100644
--- a/chrome/browser/ui/bookmarks/bookmark_browsertest.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_browsertest.cc
@@ -3,8 +3,10 @@
 // found in the LICENSE file.
 
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/timer/timer.h"
+#include "build/build_config.h"
 #include "chrome/app/chrome_command_ids.h"
 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
 #include "chrome/browser/browser_process.h"
diff --git a/chrome/browser/ui/bookmarks/bookmark_bubble_sign_in_delegate.h b/chrome/browser/ui/bookmarks/bookmark_bubble_sign_in_delegate.h
index 0ef22e8..3d27884 100644
--- a/chrome/browser/ui/bookmarks/bookmark_bubble_sign_in_delegate.h
+++ b/chrome/browser/ui/bookmarks/bookmark_bubble_sign_in_delegate.h
@@ -5,8 +5,8 @@
 #ifndef CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_BUBBLE_SIGN_IN_DELEGATE_H_
 #define CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_BUBBLE_SIGN_IN_DELEGATE_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/browser_list_observer.h"
 #include "chrome/browser/ui/host_desktop.h"
 #include "chrome/browser/ui/sync/bubble_sync_promo_delegate.h"
diff --git a/chrome/browser/ui/bookmarks/bookmark_context_menu_controller.cc b/chrome/browser/ui/bookmarks/bookmark_context_menu_controller.cc
index 7a2ba5c..7c7dc111 100644
--- a/chrome/browser/ui/bookmarks/bookmark_context_menu_controller.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_context_menu_controller.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/bookmarks/bookmark_context_menu_controller.h"
 
+#include <stddef.h>
+
 #include "base/command_line.h"
 #include "base/compiler_specific.h"
 #include "base/prefs/pref_service.h"
diff --git a/chrome/browser/ui/bookmarks/bookmark_context_menu_controller.h b/chrome/browser/ui/bookmarks/bookmark_context_menu_controller.h
index 874bdb71..f1e02d1 100644
--- a/chrome/browser/ui/bookmarks/bookmark_context_menu_controller.h
+++ b/chrome/browser/ui/bookmarks/bookmark_context_menu_controller.h
@@ -7,7 +7,7 @@
 
 #include <vector>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "components/bookmarks/browser/base_bookmark_model_observer.h"
diff --git a/chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc b/chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc
index 9325f967..4cf9bf1 100644
--- a/chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/bookmarks/bookmark_context_menu_controller.h"
 
+#include <stddef.h>
+
 #include <string>
 
 #include "base/memory/scoped_ptr.h"
diff --git a/chrome/browser/ui/bookmarks/bookmark_drag_drop.cc b/chrome/browser/ui/bookmarks/bookmark_drag_drop.cc
index 1740a3bf..af3e729 100644
--- a/chrome/browser/ui/bookmarks/bookmark_drag_drop.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_drag_drop.cc
@@ -4,6 +4,9 @@
 
 #include "chrome/browser/ui/bookmarks/bookmark_drag_drop.h"
 
+#include <stddef.h>
+
+#include "build/build_config.h"
 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/undo/bookmark_undo_service_factory.h"
diff --git a/chrome/browser/ui/bookmarks/bookmark_editor.cc b/chrome/browser/ui/bookmarks/bookmark_editor.cc
index 5ce450f..fbbf7159 100644
--- a/chrome/browser/ui/bookmarks/bookmark_editor.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_editor.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/bookmarks/bookmark_editor.h"
 
+#include <stddef.h>
+
 #include "base/logging.h"
 #include "chrome/grit/generated_resources.h"
 #include "components/bookmarks/browser/bookmark_model.h"
diff --git a/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc b/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
index b555bf2..73c79b2 100644
--- a/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
 
+#include "build/build_config.h"
 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
 #include "chrome/browser/defaults.h"
 #include "chrome/browser/profiles/profile.h"
diff --git a/chrome/browser/ui/bookmarks/bookmark_tab_helper.h b/chrome/browser/ui/bookmarks/bookmark_tab_helper.h
index 8ade88a0..e8b98bc 100644
--- a/chrome/browser/ui/bookmarks/bookmark_tab_helper.h
+++ b/chrome/browser/ui/bookmarks/bookmark_tab_helper.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_TAB_HELPER_H_
 #define CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_TAB_HELPER_H_
 
+#include "base/macros.h"
 #include "components/bookmarks/browser/base_bookmark_model_observer.h"
 #include "content/public/browser/web_contents_observer.h"
 #include "content/public/browser/web_contents_user_data.h"
diff --git a/chrome/browser/ui/bookmarks/bookmark_tab_helper_delegate.h b/chrome/browser/ui/bookmarks/bookmark_tab_helper_delegate.h
index e2f5ab6f..8a453124 100644
--- a/chrome/browser/ui/bookmarks/bookmark_tab_helper_delegate.h
+++ b/chrome/browser/ui/bookmarks/bookmark_tab_helper_delegate.h
@@ -5,7 +5,6 @@
 #ifndef CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_TAB_HELPER_DELEGATE_H_
 #define CHROME_BROWSER_UI_BOOKMARKS_BOOKMARK_TAB_HELPER_DELEGATE_H_
 
-#include "base/basictypes.h"
 
 namespace content {
 class WebContents;
diff --git a/chrome/browser/ui/bookmarks/bookmark_unittest.cc b/chrome/browser/ui/bookmarks/bookmark_unittest.cc
index db20131..83d5445 100644
--- a/chrome/browser/ui/bookmarks/bookmark_unittest.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_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/memory/scoped_ptr.h"
 #include "chrome/browser/search_engines/template_url_service_factory.h"
 #include "chrome/browser/ui/tabs/tab_strip_model.h"
diff --git a/chrome/browser/ui/bookmarks/bookmark_utils.cc b/chrome/browser/ui/bookmarks/bookmark_utils.cc
index 68355f7..7d721d6 100644
--- a/chrome/browser/ui/bookmarks/bookmark_utils.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_utils.cc
@@ -4,9 +4,11 @@
 
 #include "chrome/browser/ui/bookmarks/bookmark_utils.h"
 
-#include "base/basictypes.h"
+#include <stddef.h>
+
 #include "base/logging.h"
 #include "base/prefs/pref_service.h"
+#include "build/build_config.h"
 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/search/search.h"
diff --git a/chrome/browser/ui/bookmarks/bookmark_utils_desktop.cc b/chrome/browser/ui/bookmarks/bookmark_utils_desktop.cc
index 132aeb53..0f9e02e 100644
--- a/chrome/browser/ui/bookmarks/bookmark_utils_desktop.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_utils_desktop.cc
@@ -4,10 +4,11 @@
 
 #include "chrome/browser/ui/bookmarks/bookmark_utils_desktop.h"
 
-#include "base/basictypes.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/prefs/pref_service.h"
 #include "base/strings/string_number_conversions.h"
+#include "build/build_config.h"
 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/search/search.h"
diff --git a/chrome/browser/ui/bookmarks/enhanced_bookmark_key_service.h b/chrome/browser/ui/bookmarks/enhanced_bookmark_key_service.h
index 6e51431e..a17f1af 100644
--- a/chrome/browser/ui/bookmarks/enhanced_bookmark_key_service.h
+++ b/chrome/browser/ui/bookmarks/enhanced_bookmark_key_service.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_BOOKMARKS_ENHANCED_BOOKMARK_KEY_SERVICE_H_
 #define CHROME_BROWSER_UI_BOOKMARKS_ENHANCED_BOOKMARK_KEY_SERVICE_H_
 
+#include "base/macros.h"
 #include "components/keyed_service/core/keyed_service.h"
 #include "content/public/browser/notification_details.h"
 #include "content/public/browser/notification_observer.h"
diff --git a/chrome/browser/ui/bookmarks/recently_used_folders_combo_model.cc b/chrome/browser/ui/bookmarks/recently_used_folders_combo_model.cc
index 8df3292..1c36148 100644
--- a/chrome/browser/ui/bookmarks/recently_used_folders_combo_model.cc
+++ b/chrome/browser/ui/bookmarks/recently_used_folders_combo_model.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/bookmarks/recently_used_folders_combo_model.h"
 
+#include <stddef.h>
+
 #include "chrome/grit/generated_resources.h"
 #include "components/bookmarks/browser/bookmark_model.h"
 #include "components/bookmarks/browser/bookmark_utils.h"
diff --git a/chrome/browser/ui/bookmarks/recently_used_folders_combo_model.h b/chrome/browser/ui/bookmarks/recently_used_folders_combo_model.h
index c46c548..9de5257b 100644
--- a/chrome/browser/ui/bookmarks/recently_used_folders_combo_model.h
+++ b/chrome/browser/ui/bookmarks/recently_used_folders_combo_model.h
@@ -7,8 +7,8 @@
 
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/observer_list.h"
 #include "components/bookmarks/browser/bookmark_model_observer.h"
 #include "ui/base/models/combobox_model.h"
diff --git a/chrome/browser/ui/bookmarks/recently_used_folders_combo_model_unittest.cc b/chrome/browser/ui/bookmarks/recently_used_folders_combo_model_unittest.cc
index 9e98657..45b66ebb 100644
--- a/chrome/browser/ui/bookmarks/recently_used_folders_combo_model_unittest.cc
+++ b/chrome/browser/ui/bookmarks/recently_used_folders_combo_model_unittest.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/browser/ui/bookmarks/recently_used_folders_combo_model.h"
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/strings/utf_string_conversions.h"
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 2652aaf..1f41d7c9 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -4,10 +4,7 @@
 
 #include "chrome/browser/ui/browser.h"
 
-#if defined(OS_WIN)
-#include <windows.h>
-#include <shellapi.h>
-#endif  // defined(OS_WIN)
+#include <stddef.h>
 
 #include <algorithm>
 #include <string>
@@ -18,6 +15,7 @@
 #include "base/command_line.h"
 #include "base/location.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/metrics/histogram.h"
 #include "base/prefs/pref_service.h"
 #include "base/process/process_info.h"
@@ -31,6 +29,7 @@
 #include "base/threading/thread.h"
 #include "base/threading/thread_restrictions.h"
 #include "base/time/time.h"
+#include "build/build_config.h"
 #include "chrome/app/chrome_command_ids.h"
 #include "chrome/browser/app_mode/app_mode_utils.h"
 #include "chrome/browser/autofill/personal_data_manager_factory.h"
@@ -213,6 +212,8 @@
 #include "ui/shell_dialogs/selected_file_info.h"
 
 #if defined(OS_WIN)
+#include <windows.h>
+#include <shellapi.h>
 #include "base/win/metro.h"
 #include "chrome/browser/task_manager/task_manager.h"
 #include "chrome/browser/ui/view_ids.h"
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index 288d36e..e3f6b8832 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -5,20 +5,23 @@
 #ifndef CHROME_BROWSER_UI_BROWSER_H_
 #define CHROME_BROWSER_UI_BROWSER_H_
 
+#include <stdint.h>
+
 #include <map>
 #include <set>
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
 #include "base/gtest_prod_util.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/prefs/pref_change_registrar.h"
 #include "base/prefs/pref_member.h"
 #include "base/scoped_observer.h"
 #include "base/strings/string16.h"
+#include "build/build_config.h"
 #include "chrome/browser/devtools/devtools_toggle_action.h"
 #include "chrome/browser/ui/bookmarks/bookmark_bar.h"
 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper_delegate.h"
diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc
index 90186dd..b04e6c5 100644
--- a/chrome/browser/ui/browser_browsertest.cc
+++ b/chrome/browser/ui/browser_browsertest.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 <string>
 
 #include "base/bind.h"
@@ -9,12 +12,14 @@
 #include "base/compiler_specific.h"
 #include "base/files/file_path.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/prefs/pref_service.h"
 #include "base/strings/string_split.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/sys_info.h"
+#include "build/build_config.h"
 #include "chrome/app/chrome_command_ids.h"
 #include "chrome/browser/chrome_content_browser_client.h"
 #include "chrome/browser/chrome_notification_types.h"
@@ -3112,7 +3117,7 @@
                                         << net::SSL_CONNECTION_VERSION_SHIFT);
     // TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 from
     // http://www.iana.org/assignments/tls-parameters/tls-parameters.xml#tls-parameters-4
-    const uint16 ciphersuite = 0xc02f;
+    const uint16_t ciphersuite = 0xc02f;
     net::SSLConnectionStatusSetCipherSuite(ciphersuite,
                                            &info->ssl_info.connection_status);
   }
diff --git a/chrome/browser/ui/browser_close_unittest.cc b/chrome/browser/ui/browser_close_unittest.cc
index 7999fa2..634ad9b 100644
--- a/chrome/browser/ui/browser_close_unittest.cc
+++ b/chrome/browser/ui/browser_close_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 <stddef.h>
+
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/strings/stringprintf.h"
 #include "chrome/browser/download/chrome_download_manager_delegate.h"
 #include "chrome/browser/download/download_service.h"
diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc
index 4905607..4cf104e 100644
--- a/chrome/browser/ui/browser_command_controller.cc
+++ b/chrome/browser/ui/browser_command_controller.cc
@@ -4,11 +4,15 @@
 
 #include "chrome/browser/ui/browser_command_controller.h"
 
+#include <stddef.h>
+
 #include <string>
 
 #include "base/command_line.h"
 #include "base/debug/debugging_flags.h"
+#include "base/macros.h"
 #include "base/prefs/pref_service.h"
+#include "build/build_config.h"
 #include "chrome/app/chrome_command_ids.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/chrome_notification_types.h"
diff --git a/chrome/browser/ui/browser_command_controller.h b/chrome/browser/ui/browser_command_controller.h
index 2a8730e9..5cd8652 100644
--- a/chrome/browser/ui/browser_command_controller.h
+++ b/chrome/browser/ui/browser_command_controller.h
@@ -7,6 +7,7 @@
 
 #include <vector>
 
+#include "base/macros.h"
 #include "base/prefs/pref_change_registrar.h"
 #include "base/prefs/pref_member.h"
 #include "chrome/browser/command_updater.h"
diff --git a/chrome/browser/ui/browser_command_controller_browsertest.cc b/chrome/browser/ui/browser_command_controller_browsertest.cc
index 5a03f0a..163f102 100644
--- a/chrome/browser/ui/browser_command_controller_browsertest.cc
+++ b/chrome/browser/ui/browser_command_controller_browsertest.cc
@@ -5,6 +5,8 @@
 #include "chrome/browser/ui/browser_command_controller.h"
 
 #include "base/command_line.h"
+#include "base/macros.h"
+#include "build/build_config.h"
 #include "chrome/app/chrome_command_ids.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/chrome_notification_types.h"
diff --git a/chrome/browser/ui/browser_command_controller_unittest.cc b/chrome/browser/ui/browser_command_controller_unittest.cc
index 0f50dc0..14ffa90 100644
--- a/chrome/browser/ui/browser_command_controller_unittest.cc
+++ b/chrome/browser/ui/browser_command_controller_unittest.cc
@@ -5,6 +5,8 @@
 #include "chrome/browser/ui/browser_command_controller.h"
 
 #include "base/command_line.h"
+#include "base/macros.h"
+#include "build/build_config.h"
 #include "chrome/app/chrome_command_ids.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/command_updater.h"
diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
index d28b666..d169f7c 100644
--- a/chrome/browser/ui/browser_commands.cc
+++ b/chrome/browser/ui/browser_commands.cc
@@ -8,6 +8,7 @@
 #include "base/metrics/histogram.h"
 #include "base/prefs/pref_service.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/app/chrome_command_ids.h"
 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
 #include "chrome/browser/browser_process.h"
diff --git a/chrome/browser/ui/browser_commands.h b/chrome/browser/ui/browser_commands.h
index 2eee21a..262fc922 100644
--- a/chrome/browser/ui/browser_commands.h
+++ b/chrome/browser/ui/browser_commands.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "build/build_config.h"
 #include "chrome/browser/devtools/devtools_toggle_action.h"
 #include "chrome/browser/ssl/security_state_model.h"
 #include "chrome/browser/ui/host_desktop.h"
diff --git a/chrome/browser/ui/browser_content_setting_bubble_model_delegate.h b/chrome/browser/ui/browser_content_setting_bubble_model_delegate.h
index e98badc..b3d451b 100644
--- a/chrome/browser/ui/browser_content_setting_bubble_model_delegate.h
+++ b/chrome/browser/ui/browser_content_setting_bubble_model_delegate.h
@@ -5,8 +5,8 @@
 #ifndef CHROME_BROWSER_UI_BROWSER_CONTENT_SETTING_BUBBLE_MODEL_DELEGATE_H_
 #define CHROME_BROWSER_UI_BROWSER_CONTENT_SETTING_BUBBLE_MODEL_DELEGATE_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/content_settings/content_setting_bubble_model_delegate.h"
 
 class Browser;
diff --git a/chrome/browser/ui/browser_dialogs.h b/chrome/browser/ui/browser_dialogs.h
index a1e587b..8288ff7 100644
--- a/chrome/browser/ui/browser_dialogs.h
+++ b/chrome/browser/ui/browser_dialogs.h
@@ -6,6 +6,7 @@
 #define CHROME_BROWSER_UI_BROWSER_DIALOGS_H_
 
 #include "base/callback.h"
+#include "build/build_config.h"
 #include "chrome/browser/ssl/security_state_model.h"
 #include "chrome/browser/ui/bookmarks/bookmark_editor.h"
 #include "third_party/skia/include/core/SkColor.h"
diff --git a/chrome/browser/ui/browser_finder.cc b/chrome/browser/ui/browser_finder.cc
index cd485ee..9dedf68 100644
--- a/chrome/browser/ui/browser_finder.cc
+++ b/chrome/browser/ui/browser_finder.cc
@@ -4,6 +4,9 @@
 
 #include "chrome/browser/ui/browser_finder.h"
 
+#include <stdint.h>
+
+#include "build/build_config.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/ui/browser_iterator.h"
 #include "chrome/browser/ui/browser_list.h"
@@ -42,7 +45,7 @@
 bool BrowserMatches(Browser* browser,
                     Profile* profile,
                     Browser::WindowFeature window_feature,
-                    uint32 match_types) {
+                    uint32_t match_types) {
   if ((match_types & kMatchCanSupportWindowFeature) &&
       !browser->CanSupportWindowFeature(window_feature)) {
     return false;
@@ -97,7 +100,7 @@
                              const T& end,
                              Profile* profile,
                              Browser::WindowFeature window_feature,
-                             uint32 match_types) {
+                             uint32_t match_types) {
   for (T i = begin; i != end; ++i) {
     if (BrowserMatches(*i, profile, window_feature, match_types))
       return *i;
@@ -112,7 +115,7 @@
   BrowserList* browser_list_impl = BrowserList::GetInstance(desktop_type);
   if (!browser_list_impl)
     return NULL;
-  uint32 match_types = kMatchAny;
+  uint32_t match_types = kMatchAny;
   if (match_tabbed)
     match_types |= kMatchTabbed;
   if (match_original_profiles)
@@ -132,7 +135,7 @@
 
 size_t GetBrowserCountImpl(Profile* profile,
                            chrome::HostDesktopType desktop_type,
-                           uint32 match_types) {
+                           uint32_t match_types) {
   BrowserList* browser_list_impl = BrowserList::GetInstance(desktop_type);
   size_t count = 0;
   if (browser_list_impl) {
diff --git a/chrome/browser/ui/browser_finder.h b/chrome/browser/ui/browser_finder.h
index 8c1c7684..8425c9f0 100644
--- a/chrome/browser/ui/browser_finder.h
+++ b/chrome/browser/ui/browser_finder.h
@@ -5,6 +5,8 @@
 #ifndef CHROME_BROWSER_UI_BROWSER_FINDER_H_
 #define CHROME_BROWSER_UI_BROWSER_FINDER_H_
 
+#include <stddef.h>
+
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/host_desktop.h"
 #include "ui/gfx/native_widget_types.h"
diff --git a/chrome/browser/ui/browser_finder_chromeos_unittest.cc b/chrome/browser/ui/browser_finder_chromeos_unittest.cc
index a05c7ec..df69f5e7 100644
--- a/chrome/browser/ui/browser_finder_chromeos_unittest.cc
+++ b/chrome/browser/ui/browser_finder_chromeos_unittest.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/browser/ui/browser_finder.h"
 
+#include "base/macros.h"
 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h"
 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h"
 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h"
diff --git a/chrome/browser/ui/browser_focus_uitest.cc b/chrome/browser/ui/browser_focus_uitest.cc
index a9f7a94..f034b138 100644
--- a/chrome/browser/ui/browser_focus_uitest.cc
+++ b/chrome/browser/ui/browser_focus_uitest.cc
@@ -2,13 +2,17 @@
 // 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/files/file_util.h"
 #include "base/format_macros.h"
+#include "base/macros.h"
 #include "base/message_loop/message_loop.h"
 #include "base/path_service.h"
 #include "base/strings/stringprintf.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_commands.h"
diff --git a/chrome/browser/ui/browser_instant_controller.h b/chrome/browser/ui/browser_instant_controller.h
index b8bf95e..6cd99cb 100644
--- a/chrome/browser/ui/browser_instant_controller.h
+++ b/chrome/browser/ui/browser_instant_controller.h
@@ -7,8 +7,8 @@
 
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "chrome/browser/search/instant_service_observer.h"
 #include "chrome/browser/ui/search/instant_controller.h"
 #include "chrome/browser/ui/search/search_model_observer.h"
diff --git a/chrome/browser/ui/browser_instant_controller_unittest.cc b/chrome/browser/ui/browser_instant_controller_unittest.cc
index 1682805..f07ddbb 100644
--- a/chrome/browser/ui/browser_instant_controller_unittest.cc
+++ b/chrome/browser/ui/browser_instant_controller_unittest.cc
@@ -2,10 +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 <string>
 
-#include "base/basictypes.h"
 #include "base/gtest_prod_util.h"
+#include "base/macros.h"
 #include "base/memory/scoped_vector.h"
 #include "base/metrics/field_trial.h"
 #include "chrome/browser/chrome_notification_types.h"
diff --git a/chrome/browser/ui/browser_iterator.h b/chrome/browser/ui/browser_iterator.h
index 38d8a19333..9d16bb7c 100644
--- a/chrome/browser/ui/browser_iterator.h
+++ b/chrome/browser/ui/browser_iterator.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_BROWSER_ITERATOR_H_
 #define CHROME_BROWSER_UI_BROWSER_ITERATOR_H_
 
+#include "base/macros.h"
 #include "chrome/browser/ui/browser_list.h"
 #include "chrome/browser/ui/host_desktop.h"
 
diff --git a/chrome/browser/ui/browser_iterator_unittest.cc b/chrome/browser/ui/browser_iterator_unittest.cc
index 61a64174..dc22ab2c 100644
--- a/chrome/browser/ui/browser_iterator_unittest.cc
+++ b/chrome/browser/ui/browser_iterator_unittest.cc
@@ -4,6 +4,9 @@
 
 #include "chrome/browser/ui/browser_iterator.h"
 
+#include <stddef.h>
+
+#include "build/build_config.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_list.h"
 #include "chrome/browser/ui/host_desktop.h"
diff --git a/chrome/browser/ui/browser_list.h b/chrome/browser/ui/browser_list.h
index 75fb6e5..da1330a 100644
--- a/chrome/browser/ui/browser_list.h
+++ b/chrome/browser/ui/browser_list.h
@@ -5,10 +5,12 @@
 #ifndef CHROME_BROWSER_UI_BROWSER_LIST_H_
 #define CHROME_BROWSER_UI_BROWSER_LIST_H_
 
+#include <stddef.h>
+
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/lazy_instance.h"
+#include "base/macros.h"
 #include "base/observer_list.h"
 #include "chrome/browser/ui/host_desktop.h"
 
diff --git a/chrome/browser/ui/browser_live_tab_context.h b/chrome/browser/ui/browser_live_tab_context.h
index 6b347760..bb2f67fb 100644
--- a/chrome/browser/ui/browser_live_tab_context.h
+++ b/chrome/browser/ui/browser_live_tab_context.h
@@ -9,6 +9,7 @@
 #include <vector>
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/host_desktop.h"
 #include "components/sessions/core/live_tab_context.h"
 
diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc
index 0bbf877a..0175f49 100644
--- a/chrome/browser/ui/browser_navigator.cc
+++ b/chrome/browser/ui/browser_navigator.cc
@@ -7,9 +7,11 @@
 #include <algorithm>
 
 #include "base/command_line.h"
+#include "base/macros.h"
 #include "base/prefs/pref_service.h"
 #include "base/strings/stringprintf.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/browser/browser_about_handler.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/prefs/incognito_mode_prefs.h"
diff --git a/chrome/browser/ui/browser_navigator_browsertest.cc b/chrome/browser/ui/browser_navigator_browsertest.cc
index bc2fc35a..8fb18f5 100644
--- a/chrome/browser/ui/browser_navigator_browsertest.cc
+++ b/chrome/browser/ui/browser_navigator_browsertest.cc
@@ -8,6 +8,7 @@
 #include "base/prefs/pref_service.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/app/chrome_command_ids.h"
 #include "chrome/browser/prefs/incognito_mode_prefs.h"
 #include "chrome/browser/profiles/profile.h"
diff --git a/chrome/browser/ui/browser_navigator_browsertest.h b/chrome/browser/ui/browser_navigator_browsertest.h
index 4964ac3..eb089862 100644
--- a/chrome/browser/ui/browser_navigator_browsertest.h
+++ b/chrome/browser/ui/browser_navigator_browsertest.h
@@ -5,6 +5,8 @@
 #ifndef CHROME_BROWSER_UI_BROWSER_NAVIGATOR_BROWSERTEST_H_
 #define CHROME_BROWSER_UI_BROWSER_NAVIGATOR_BROWSERTEST_H_
 
+#include <stddef.h>
+
 #include <string>
 
 #include "chrome/browser/ui/browser.h"
diff --git a/chrome/browser/ui/browser_navigator_params.cc b/chrome/browser/ui/browser_navigator_params.cc
index 43d4b620..d41ed23 100644
--- a/chrome/browser/ui/browser_navigator_params.cc
+++ b/chrome/browser/ui/browser_navigator_params.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/browser/ui/browser_navigator_params.h"
 
+#include "build/build_config.h"
 #include "chrome/browser/ui/tabs/tab_strip_model.h"
 #include "content/public/browser/navigation_controller.h"
 #include "content/public/browser/page_navigator.h"
diff --git a/chrome/browser/ui/browser_navigator_params.h b/chrome/browser/ui/browser_navigator_params.h
index cfc8104b..64d2e4aa 100644
--- a/chrome/browser/ui/browser_navigator_params.h
+++ b/chrome/browser/ui/browser_navigator_params.h
@@ -10,6 +10,7 @@
 
 #include "base/memory/ref_counted.h"
 #include "base/memory/ref_counted_memory.h"
+#include "build/build_config.h"
 #include "chrome/browser/ui/host_desktop.h"
 #include "content/public/browser/global_request_id.h"
 #include "content/public/browser/site_instance.h"
diff --git a/chrome/browser/ui/browser_tab_restorer.cc b/chrome/browser/ui/browser_tab_restorer.cc
index 91abc58..68225f2 100644
--- a/chrome/browser/ui/browser_tab_restorer.cc
+++ b/chrome/browser/ui/browser_tab_restorer.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/metrics/user_metrics_action.h"
 #include "base/supports_user_data.h"
 #include "chrome/browser/profiles/profile.h"
diff --git a/chrome/browser/ui/browser_tab_strip_model_delegate.cc b/chrome/browser/ui/browser_tab_strip_model_delegate.cc
index 653d0d72..1ae7fb9 100644
--- a/chrome/browser/ui/browser_tab_strip_model_delegate.cc
+++ b/chrome/browser/ui/browser_tab_strip_model_delegate.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/browser_tab_strip_model_delegate.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/command_line.h"
 #include "base/message_loop/message_loop.h"
diff --git a/chrome/browser/ui/browser_tab_strip_model_delegate.h b/chrome/browser/ui/browser_tab_strip_model_delegate.h
index 40a2f61..998cc900 100644
--- a/chrome/browser/ui/browser_tab_strip_model_delegate.h
+++ b/chrome/browser/ui/browser_tab_strip_model_delegate.h
@@ -6,6 +6,7 @@
 #define CHROME_BROWSER_UI_BROWSER_TAB_STRIP_MODEL_DELEGATE_H_
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "chrome/browser/ui/tabs/tab_strip_model_delegate.h"
 
diff --git a/chrome/browser/ui/browser_tab_strip_tracker.h b/chrome/browser/ui/browser_tab_strip_tracker.h
index 48e0cc0..b23076446 100644
--- a/chrome/browser/ui/browser_tab_strip_tracker.h
+++ b/chrome/browser/ui/browser_tab_strip_tracker.h
@@ -7,7 +7,7 @@
 
 #include <set>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/browser_list_observer.h"
 
 class BrowserTabStripTrackerDelegate;
diff --git a/chrome/browser/ui/browser_toolbar_model_delegate.h b/chrome/browser/ui/browser_toolbar_model_delegate.h
index a6d3c4c..f984f03 100644
--- a/chrome/browser/ui/browser_toolbar_model_delegate.h
+++ b/chrome/browser/ui/browser_toolbar_model_delegate.h
@@ -5,8 +5,8 @@
 #ifndef CHROME_BROWSER_UI_BROWSER_TOOLBAR_MODEL_DELEGATE_H_
 #define CHROME_BROWSER_UI_BROWSER_TOOLBAR_MODEL_DELEGATE_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/toolbar/toolbar_model_delegate.h"
 
 class Browser;
diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_ui_prefs.cc
index 6fef9f74..0fb1f17 100644
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -7,6 +7,7 @@
 #include "base/prefs/pref_registry_simple.h"
 #include "base/prefs/pref_service.h"
 #include "base/prefs/scoped_user_pref_update.h"
+#include "build/build_config.h"
 #include "chrome/browser/first_run/first_run.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/common/pref_names.h"
diff --git a/chrome/browser/ui/browser_unittest.cc b/chrome/browser/ui/browser_unittest.cc
index 749b982..5d15200 100644
--- a/chrome/browser/ui/browser_unittest.cc
+++ b/chrome/browser/ui/browser_unittest.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/browser/ui/browser.h"
 
+#include "base/macros.h"
 #include "chrome/browser/ui/browser_commands.h"
 #include "chrome/browser/ui/tabs/tab_strip_model.h"
 #include "chrome/test/base/browser_with_test_window_test.h"
diff --git a/chrome/browser/ui/browser_view_prefs.cc b/chrome/browser/ui/browser_view_prefs.cc
index 636cde5..7f14813 100644
--- a/chrome/browser/ui/browser_view_prefs.cc
+++ b/chrome/browser/ui/browser_view_prefs.cc
@@ -6,6 +6,7 @@
 
 #include "base/prefs/pref_registry_simple.h"
 #include "base/prefs/pref_service.h"
+#include "build/build_config.h"
 #include "chrome/common/pref_names.h"
 #include "components/pref_registry/pref_registry_syncable.h"
 
diff --git a/chrome/browser/ui/browser_window.h b/chrome/browser/ui/browser_window.h
index 6d2dae1..23a1dcf 100644
--- a/chrome/browser/ui/browser_window.h
+++ b/chrome/browser/ui/browser_window.h
@@ -6,6 +6,7 @@
 #define CHROME_BROWSER_UI_BROWSER_WINDOW_H_
 
 #include "base/callback_forward.h"
+#include "build/build_config.h"
 #include "chrome/browser/lifetime/browser_close_manager.h"
 #include "chrome/browser/signin/chrome_signin_helper.h"
 #include "chrome/browser/ssl/security_state_model.h"
diff --git a/chrome/browser/ui/browser_window_state.cc b/chrome/browser/ui/browser_window_state.cc
index 3c903bf26..eafa32a 100644
--- a/chrome/browser/ui/browser_window_state.cc
+++ b/chrome/browser/ui/browser_window_state.cc
@@ -4,7 +4,10 @@
 
 #include "chrome/browser/ui/browser_window_state.h"
 
+#include <stddef.h>
+
 #include "base/command_line.h"
+#include "base/macros.h"
 #include "base/prefs/pref_service.h"
 #include "base/prefs/scoped_user_pref_update.h"
 #include "base/strings/string_number_conversions.h"
diff --git a/chrome/browser/ui/certificate_dialogs.cc b/chrome/browser/ui/certificate_dialogs.cc
index d477a2e9..47d40c6 100644
--- a/chrome/browser/ui/certificate_dialogs.cc
+++ b/chrome/browser/ui/certificate_dialogs.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/certificate_dialogs.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 #include <vector>
 
diff --git a/chrome/browser/ui/chrome_bubble_manager.h b/chrome/browser/ui/chrome_bubble_manager.h
index 57c23d8..1a517cd 100644
--- a/chrome/browser/ui/chrome_bubble_manager.h
+++ b/chrome/browser/ui/chrome_bubble_manager.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_CHROME_BUBBLE_MANAGER_H_
 #define CHROME_BROWSER_UI_CHROME_BUBBLE_MANAGER_H_
 
+#include "base/macros.h"
 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
 #include "components/bubble/bubble_manager.h"
 #include "content/public/browser/web_contents_observer.h"
diff --git a/chrome/browser/ui/chrome_bubble_manager_unittest.cc b/chrome/browser/ui/chrome_bubble_manager_unittest.cc
index 4d96c54..07d8c8b 100644
--- a/chrome/browser/ui/chrome_bubble_manager_unittest.cc
+++ b/chrome/browser/ui/chrome_bubble_manager_unittest.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/browser/ui/chrome_bubble_manager.h"
 
+#include "base/macros.h"
 #include "chrome/browser/ui/tabs/tab_strip_model.h"
 #include "chrome/browser/ui/tabs/test_tab_strip_model_delegate.h"
 #include "chrome/test/base/testing_profile.h"
diff --git a/chrome/browser/ui/chrome_pages.cc b/chrome/browser/ui/chrome_pages.cc
index 80a3a9f..71bf3aa 100644
--- a/chrome/browser/ui/chrome_pages.cc
+++ b/chrome/browser/ui/chrome_pages.cc
@@ -4,10 +4,13 @@
 
 #include "chrome/browser/ui/chrome_pages.h"
 
+#include <stddef.h>
+
 #include "base/command_line.h"
 #include "base/logging.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/stringprintf.h"
+#include "build/build_config.h"
 #include "chrome/browser/download/download_shelf.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/profiles/profile_manager.h"
@@ -56,7 +59,7 @@
 
 void OpenBookmarkManagerWithHash(Browser* browser,
                                  const std::string& action,
-                                 int64 node_id) {
+                                 int64_t node_id) {
   content::RecordAction(UserMetricsAction("ShowBookmarkManager"));
   content::RecordAction(UserMetricsAction("ShowBookmarks"));
   NavigateParams params(GetSingletonTabNavigateParams(
@@ -144,7 +147,7 @@
       GetSingletonTabNavigateParams(browser, GURL(kChromeUIBookmarksURL)));
 }
 
-void ShowBookmarkManagerForNode(Browser* browser, int64 node_id) {
+void ShowBookmarkManagerForNode(Browser* browser, int64_t node_id) {
   OpenBookmarkManagerWithHash(browser, std::string(), node_id);
 }
 
diff --git a/chrome/browser/ui/chrome_pages.h b/chrome/browser/ui/chrome_pages.h
index b4d17f4..e08f4cb 100644
--- a/chrome/browser/ui/chrome_pages.h
+++ b/chrome/browser/ui/chrome_pages.h
@@ -5,8 +5,11 @@
 #ifndef CHROME_BROWSER_UI_CHROME_PAGES_H_
 #define CHROME_BROWSER_UI_CHROME_PAGES_H_
 
+#include <stdint.h>
+
 #include <string>
 
+#include "build/build_config.h"
 #include "chrome/browser/ui/host_desktop.h"
 #include "components/content_settings/core/common/content_settings_types.h"
 #include "url/gurl.h"
@@ -37,7 +40,7 @@
 
 
 void ShowBookmarkManager(Browser* browser);
-void ShowBookmarkManagerForNode(Browser* browser, int64 node_id);
+void ShowBookmarkManagerForNode(Browser* browser, int64_t node_id);
 void ShowHistory(Browser* browser);
 void ShowDownloads(Browser* browser);
 void ShowExtensions(Browser* browser,
diff --git a/chrome/browser/ui/chrome_select_file_policy.h b/chrome/browser/ui/chrome_select_file_policy.h
index 4002c78..a72dbb3 100644
--- a/chrome/browser/ui/chrome_select_file_policy.h
+++ b/chrome/browser/ui/chrome_select_file_policy.h
@@ -5,9 +5,9 @@
 #ifndef CHROME_BROWSER_UI_CHROME_SELECT_FILE_POLICY_H_
 #define CHROME_BROWSER_UI_CHROME_SELECT_FILE_POLICY_H_
 
-#include "base/basictypes.h"
 #include "base/callback_forward.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "ui/shell_dialogs/select_file_policy.h"
 
 namespace content {
diff --git a/chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.h b/chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.h
index 1b7c511..ca956c6 100644
--- a/chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.h
+++ b/chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.h
@@ -5,8 +5,8 @@
 #ifndef CHROME_BROWSER_UI_CHROME_WEB_MODAL_DIALOG_MANAGER_DELEGATE_H_
 #define CHROME_BROWSER_UI_CHROME_WEB_MODAL_DIALOG_MANAGER_DELEGATE_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h"
 
 class ChromeWebModalDialogManagerDelegate
diff --git a/chrome/browser/ui/collected_cookies_infobar_delegate.cc b/chrome/browser/ui/collected_cookies_infobar_delegate.cc
index dc61e2c..1f51589 100644
--- a/chrome/browser/ui/collected_cookies_infobar_delegate.cc
+++ b/chrome/browser/ui/collected_cookies_infobar_delegate.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/collected_cookies_infobar_delegate.h"
 
 #include "base/logging.h"
+#include "build/build_config.h"
 #include "chrome/browser/infobars/infobar_service.h"
 #include "chrome/grit/generated_resources.h"
 #include "components/infobars/core/infobar.h"
diff --git a/chrome/browser/ui/collected_cookies_infobar_delegate.h b/chrome/browser/ui/collected_cookies_infobar_delegate.h
index 83571ab..5636df7 100644
--- a/chrome/browser/ui/collected_cookies_infobar_delegate.h
+++ b/chrome/browser/ui/collected_cookies_infobar_delegate.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_COLLECTED_COOKIES_INFOBAR_DELEGATE_H_
 #define CHROME_BROWSER_UI_COLLECTED_COOKIES_INFOBAR_DELEGATE_H_
 
+#include "base/macros.h"
 #include "components/infobars/core/confirm_infobar_delegate.h"
 
 class InfoBarService;
diff --git a/chrome/browser/ui/confirm_bubble_model.h b/chrome/browser/ui/confirm_bubble_model.h
index 33405eb0..91e0f13 100644
--- a/chrome/browser/ui/confirm_bubble_model.h
+++ b/chrome/browser/ui/confirm_bubble_model.h
@@ -5,7 +5,7 @@
 #ifndef CHROME_BROWSER_UI_CONFIRM_BUBBLE_MODEL_H_
 #define CHROME_BROWSER_UI_CONFIRM_BUBBLE_MODEL_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/strings/string16.h"
 #include "url/gurl.h"
 
diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
index 83e947a..a90c73d 100644
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
 
+#include <stddef.h>
+
 #include "base/command_line.h"
 #include "base/macros.h"
 #include "base/prefs/pref_service.h"
@@ -514,7 +516,7 @@
  private:
   void OnListItemClicked(int index) override;
 
-  int32 item_id_from_item_index(int index) const {
+  int32_t item_id_from_item_index(int index) const {
     return bubble_content().list_items[index].item_id;
   }
 };
@@ -529,10 +531,10 @@
                                      CONTENT_SETTINGS_TYPE_POPUPS) {
   if (web_contents) {
     // Build blocked popup list.
-    std::map<int32, GURL> blocked_popups =
+    std::map<int32_t, GURL> blocked_popups =
         PopupBlockerTabHelper::FromWebContents(web_contents)
             ->GetBlockedPopupRequests();
-    for (const std::pair<int32, GURL>& blocked_popup : blocked_popups) {
+    for (const std::pair<int32_t, GURL>& blocked_popup : blocked_popups) {
       std::string title(blocked_popup.second.spec());
       // The pop-up may not have a valid URL.
       if (title.empty())
diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model.h b/chrome/browser/ui/content_settings/content_setting_bubble_model.h
index 496b4f1..07b1aae 100644
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model.h
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.h
@@ -5,6 +5,8 @@
 #ifndef CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_BUBBLE_MODEL_H_
 #define CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_BUBBLE_MODEL_H_
 
+#include <stdint.h>
+
 #include <map>
 #include <set>
 #include <string>
@@ -58,13 +60,13 @@
     ListItem(const gfx::Image& image,
              const std::string& title,
              bool has_link,
-             int32 item_id)
+             int32_t item_id)
         : image(image), title(title), has_link(has_link), item_id(item_id) {}
 
     gfx::Image image;
     std::string title;
     bool has_link;
-    int32 item_id;
+    int32_t item_id;
   };
   typedef std::vector<ListItem> ListItems;
 
diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc b/chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc
index 9fcc3d02..f5864f41 100644
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model_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/auto_reset.h"
 #include "base/command_line.h"
 #include "base/prefs/pref_service.h"
diff --git a/chrome/browser/ui/content_settings/content_setting_image_model.cc b/chrome/browser/ui/content_settings/content_setting_image_model.cc
index d4e1ed3..faea7684 100644
--- a/chrome/browser/ui/content_settings/content_setting_image_model.cc
+++ b/chrome/browser/ui/content_settings/content_setting_image_model.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/content_settings/content_setting_image_model.h"
 
+#include "base/macros.h"
+#include "build/build_config.h"
 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
 #include "chrome/browser/prerender/prerender_manager.h"
diff --git a/chrome/browser/ui/content_settings/content_setting_image_model.h b/chrome/browser/ui/content_settings/content_setting_image_model.h
index 2fe8523..c9ed2578 100644
--- a/chrome/browser/ui/content_settings/content_setting_image_model.h
+++ b/chrome/browser/ui/content_settings/content_setting_image_model.h
@@ -5,8 +5,9 @@
 #ifndef CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_IMAGE_MODEL_H_
 #define CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_IMAGE_MODEL_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/strings/string16.h"
+#include "build/build_config.h"
 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
 #include "chrome/browser/ui/content_settings/content_setting_bubble_model_delegate.h"
 #include "components/content_settings/core/common/content_settings_types.h"
diff --git a/chrome/browser/ui/content_settings/content_setting_image_model_unittest.cc b/chrome/browser/ui/content_settings/content_setting_image_model_unittest.cc
index ac38fec..12b2d347 100644
--- a/chrome/browser/ui/content_settings/content_setting_image_model_unittest.cc
+++ b/chrome/browser/ui/content_settings/content_setting_image_model_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/strings/utf_string_conversions.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
diff --git a/chrome/browser/ui/content_settings/content_setting_media_menu_model.cc b/chrome/browser/ui/content_settings/content_setting_media_menu_model.cc
index 4f2a52f8..1b7cc3f 100644
--- a/chrome/browser/ui/content_settings/content_setting_media_menu_model.cc
+++ b/chrome/browser/ui/content_settings/content_setting_media_menu_model.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/content_settings/content_setting_media_menu_model.h"
 
+#include <stddef.h>
+
 #include "base/strings/utf_string_conversions.h"
 #include "chrome/browser/media/media_capture_devices_dispatcher.h"
 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
diff --git a/chrome/browser/ui/content_settings/content_setting_media_menu_model.h b/chrome/browser/ui/content_settings/content_setting_media_menu_model.h
index 7b4afdc..0c8977e 100644
--- a/chrome/browser/ui/content_settings/content_setting_media_menu_model.h
+++ b/chrome/browser/ui/content_settings/content_setting_media_menu_model.h
@@ -8,6 +8,7 @@
 #include <map>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "content/public/common/media_stream_request.h"
 #include "ui/base/models/simple_menu_model.h"
 
diff --git a/chrome/browser/ui/crypto_module_delegate_nss.cc b/chrome/browser/ui/crypto_module_delegate_nss.cc
index 5812e54..1d7672a1 100644
--- a/chrome/browser/ui/crypto_module_delegate_nss.cc
+++ b/chrome/browser/ui/crypto_module_delegate_nss.cc
@@ -4,7 +4,6 @@
 
 #include "chrome/browser/ui/crypto_module_delegate_nss.h"
 
-#include "base/basictypes.h"
 #include "base/bind.h"
 #include "chrome/browser/net/nss_context.h"
 #include "content/public/browser/browser_thread.h"
diff --git a/chrome/browser/ui/crypto_module_delegate_nss.h b/chrome/browser/ui/crypto_module_delegate_nss.h
index 60c7cb5..139a0b7c 100644
--- a/chrome/browser/ui/crypto_module_delegate_nss.h
+++ b/chrome/browser/ui/crypto_module_delegate_nss.h
@@ -8,6 +8,7 @@
 #include <string>
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/synchronization/waitable_event.h"
 #include "chrome/browser/ui/crypto_module_password_dialog.h"
 #include "crypto/nss_crypto_module_delegate.h"
diff --git a/chrome/browser/ui/crypto_module_password_dialog_nss.cc b/chrome/browser/ui/crypto_module_password_dialog_nss.cc
index 5569fc4..a6270dc 100644
--- a/chrome/browser/ui/crypto_module_password_dialog_nss.cc
+++ b/chrome/browser/ui/crypto_module_password_dialog_nss.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/crypto_module_password_dialog_nss.h"
 
 #include <pk11pub.h>
+#include <stddef.h>
 
 #include "base/bind.h"
 #include "base/logging.h"
diff --git a/chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc b/chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc
index b290950d..f14f3a70 100644
--- a/chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc
+++ b/chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/exclusive_access/exclusive_access_bubble.h"
 
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/app/chrome_command_ids.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/ui/exclusive_access/exclusive_access_context.h"
diff --git a/chrome/browser/ui/exclusive_access/exclusive_access_bubble.h b/chrome/browser/ui/exclusive_access/exclusive_access_bubble.h
index 1d13e46c..5def540 100644
--- a/chrome/browser/ui/exclusive_access/exclusive_access_bubble.h
+++ b/chrome/browser/ui/exclusive_access/exclusive_access_bubble.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_EXCLUSIVE_ACCESS_BUBBLE_H_
 #define CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_EXCLUSIVE_ACCESS_BUBBLE_H_
 
+#include "base/macros.h"
 #include "base/timer/timer.h"
 #include "chrome/browser/ui/exclusive_access/exclusive_access_bubble_type.h"
 #include "ui/gfx/animation/animation_delegate.h"
diff --git a/chrome/browser/ui/exclusive_access/exclusive_access_context.cc b/chrome/browser/ui/exclusive_access/exclusive_access_context.cc
index ba549b0..9a626ed 100644
--- a/chrome/browser/ui/exclusive_access/exclusive_access_context.cc
+++ b/chrome/browser/ui/exclusive_access/exclusive_access_context.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/exclusive_access/exclusive_access_context.h"
 
 #include "base/logging.h"
+#include "build/build_config.h"
 
 bool ExclusiveAccessContext::SupportsFullscreenWithToolbar() const {
   return false;
diff --git a/chrome/browser/ui/exclusive_access/exclusive_access_context.h b/chrome/browser/ui/exclusive_access/exclusive_access_context.h
index c1d582d0..33794c5 100644
--- a/chrome/browser/ui/exclusive_access/exclusive_access_context.h
+++ b/chrome/browser/ui/exclusive_access/exclusive_access_context.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_EXCLUSIVE_ACCESS_CONTEXT_H_
 #define CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_EXCLUSIVE_ACCESS_CONTEXT_H_
 
+#include "build/build_config.h"
 #include "chrome/browser/ui/exclusive_access/exclusive_access_bubble_type.h"
 
 class GURL;
diff --git a/chrome/browser/ui/exclusive_access/exclusive_access_controller_base.h b/chrome/browser/ui/exclusive_access/exclusive_access_controller_base.h
index 1d127c4..11e8e0d 100644
--- a/chrome/browser/ui/exclusive_access/exclusive_access_controller_base.h
+++ b/chrome/browser/ui/exclusive_access/exclusive_access_controller_base.h
@@ -5,7 +5,7 @@
 #ifndef CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_EXCLUSIVE_ACCESS_CONTROLLER_BASE_H_
 #define CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_EXCLUSIVE_ACCESS_CONTROLLER_BASE_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "chrome/browser/ui/exclusive_access/exclusive_access_bubble_type.h"
 #include "content/public/browser/notification_observer.h"
diff --git a/chrome/browser/ui/exclusive_access/exclusive_access_manager.cc b/chrome/browser/ui/exclusive_access/exclusive_access_manager.cc
index 61b16843..f0858195 100644
--- a/chrome/browser/ui/exclusive_access/exclusive_access_manager.cc
+++ b/chrome/browser/ui/exclusive_access/exclusive_access_manager.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h"
 
 #include "base/command_line.h"
+#include "build/build_config.h"
 #include "chrome/browser/app_mode/app_mode_utils.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_window.h"
diff --git a/chrome/browser/ui/exclusive_access/exclusive_access_manager.h b/chrome/browser/ui/exclusive_access/exclusive_access_manager.h
index 9ec219c8..68d7a5a6 100644
--- a/chrome/browser/ui/exclusive_access/exclusive_access_manager.h
+++ b/chrome/browser/ui/exclusive_access/exclusive_access_manager.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_EXCLUSIVE_ACCESS_MANAGER_H_
 #define CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_EXCLUSIVE_ACCESS_MANAGER_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "chrome/browser/ui/exclusive_access/exclusive_access_bubble_type.h"
 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h"
diff --git a/chrome/browser/ui/exclusive_access/flash_fullscreen_interactive_browsertest.cc b/chrome/browser/ui/exclusive_access/flash_fullscreen_interactive_browsertest.cc
index 7c987e1..5a97bf6 100644
--- a/chrome/browser/ui/exclusive_access/flash_fullscreen_interactive_browsertest.cc
+++ b/chrome/browser/ui/exclusive_access/flash_fullscreen_interactive_browsertest.cc
@@ -7,6 +7,7 @@
 #include "base/macros.h"
 #include "base/message_loop/message_loop.h"
 #include "base/time/time.h"
+#include "build/build_config.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h"
 #include "chrome/browser/ui/tabs/tab_strip_model.h"
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
index 3c7018cc..9f18156b 100644
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
@@ -9,6 +9,7 @@
 #include "base/location.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
+#include "build/build_config.h"
 #include "chrome/browser/app_mode/app_mode_utils.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.h b/chrome/browser/ui/exclusive_access/fullscreen_controller.h
index 64202e3f..930e76a 100644
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller.h
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.h
@@ -7,8 +7,9 @@
 
 #include <set>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
+#include "build/build_config.h"
 #include "chrome/browser/ui/exclusive_access/exclusive_access_controller_base.h"
 #include "components/content_settings/core/common/content_settings.h"
 #include "content/public/browser/notification_observer.h"
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller_state_test.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller_state_test.cc
index a8af8b3..c377fdbf 100644
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller_state_test.cc
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller_state_test.cc
@@ -9,6 +9,7 @@
 #include <iomanip>
 #include <iostream>
 
+#include "build/build_config.h"
 #include "chrome/browser/fullscreen.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_window.h"
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller_state_test.h b/chrome/browser/ui/exclusive_access/fullscreen_controller_state_test.h
index 4d45a8cc..14f855c 100644
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller_state_test.h
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller_state_test.h
@@ -7,8 +7,8 @@
 
 #include <sstream>
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "build/build_config.h"
 
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller_state_tests.h b/chrome/browser/ui/exclusive_access/fullscreen_controller_state_tests.h
index 0fe15fa..244b9c6 100644
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller_state_tests.h
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller_state_tests.h
@@ -5,6 +5,8 @@
 #ifndef CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_FULLSCREEN_CONTROLLER_STATE_TESTS_H_
 #define CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_FULLSCREEN_CONTROLLER_STATE_TESTS_H_
 
+#include "build/build_config.h"
+
 // Macros used to create individual tests for all state and event pairs.
 // To be included in the middle of a test .cc file just after a definition for
 // TEST_EVENT in order to instantiate all the necessary actual tests.  See
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller_test.h b/chrome/browser/ui/exclusive_access/fullscreen_controller_test.h
index 039a016..cb31dbc 100644
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller_test.h
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller_test.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_FULLSCREEN_CONTROLLER_TEST_H_
 #define CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_FULLSCREEN_CONTROLLER_TEST_H_
 
+#include "base/macros.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/ui/exclusive_access/exclusive_access_bubble_type.h"
 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h"
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_within_tab_helper.h b/chrome/browser/ui/exclusive_access/fullscreen_within_tab_helper.h
index 694f89e..d051bc67 100644
--- a/chrome/browser/ui/exclusive_access/fullscreen_within_tab_helper.h
+++ b/chrome/browser/ui/exclusive_access/fullscreen_within_tab_helper.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_FULLSCREEN_WITHIN_TAB_HELPER_H_
 #define CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_FULLSCREEN_WITHIN_TAB_HELPER_H_
 
+#include "base/macros.h"
 #include "content/public/browser/web_contents_user_data.h"
 
 // Helper used by FullscreenController to track the state of a WebContents that
diff --git a/chrome/browser/ui/exclusive_access/mouse_lock_controller.h b/chrome/browser/ui/exclusive_access/mouse_lock_controller.h
index 43c89f2..924e8bb 100644
--- a/chrome/browser/ui/exclusive_access/mouse_lock_controller.h
+++ b/chrome/browser/ui/exclusive_access/mouse_lock_controller.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_MOUSE_LOCK_CONTROLLER_H_
 #define CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_MOUSE_LOCK_CONTROLLER_H_
 
+#include "base/macros.h"
 #include "chrome/browser/ui/exclusive_access/exclusive_access_controller_base.h"
 #include "components/content_settings/core/common/content_settings.h"
 
diff --git a/chrome/browser/ui/extensions/application_launch.cc b/chrome/browser/ui/extensions/application_launch.cc
index 544bb07..84a1ab7 100644
--- a/chrome/browser/ui/extensions/application_launch.cc
+++ b/chrome/browser/ui/extensions/application_launch.cc
@@ -7,7 +7,9 @@
 #include <string>
 
 #include "apps/launcher.h"
+#include "base/macros.h"
 #include "base/metrics/histogram.h"
+#include "build/build_config.h"
 #include "chrome/browser/app_mode/app_mode_utils.h"
 #include "chrome/browser/apps/per_app_settings_service.h"
 #include "chrome/browser/apps/per_app_settings_service_factory.h"
diff --git a/chrome/browser/ui/extensions/extension_action_view_controller.h b/chrome/browser/ui/extensions/extension_action_view_controller.h
index 793ce0e3..acbae36 100644
--- a/chrome/browser/ui/extensions/extension_action_view_controller.h
+++ b/chrome/browser/ui/extensions/extension_action_view_controller.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_ACTION_VIEW_CONTROLLER_H_
 #define CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_ACTION_VIEW_CONTROLLER_H_
 
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/scoped_observer.h"
 #include "chrome/browser/extensions/extension_action_icon_factory.h"
diff --git a/chrome/browser/ui/extensions/extension_enable_flow.h b/chrome/browser/ui/extensions/extension_enable_flow.h
index fc6bf62..b84c2c0 100644
--- a/chrome/browser/ui/extensions/extension_enable_flow.h
+++ b/chrome/browser/ui/extensions/extension_enable_flow.h
@@ -7,9 +7,9 @@
 
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/scoped_observer.h"
 #include "chrome/browser/extensions/extension_install_prompt.h"
 #include "content/public/browser/notification_observer.h"
diff --git a/chrome/browser/ui/extensions/extension_install_ui_default.cc b/chrome/browser/ui/extensions/extension_install_ui_default.cc
index 93071d4..704ff3c 100644
--- a/chrome/browser/ui/extensions/extension_install_ui_default.cc
+++ b/chrome/browser/ui/extensions/extension_install_ui_default.cc
@@ -5,7 +5,9 @@
 #include "chrome/browser/ui/extensions/extension_install_ui_default.h"
 
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/extensions/theme_installed_infobar_delegate.h"
 #include "chrome/browser/infobars/infobar_service.h"
diff --git a/chrome/browser/ui/extensions/extension_install_ui_default.h b/chrome/browser/ui/extensions/extension_install_ui_default.h
index 487f25c..32d40e1 100644
--- a/chrome/browser/ui/extensions/extension_install_ui_default.h
+++ b/chrome/browser/ui/extensions/extension_install_ui_default.h
@@ -5,8 +5,8 @@
 #ifndef CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALL_UI_DEFAULT_H_
 #define CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALL_UI_DEFAULT_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "extensions/browser/install/extension_install_ui.h"
 
 namespace content {
diff --git a/chrome/browser/ui/extensions/extension_installed_bubble.cc b/chrome/browser/ui/extensions/extension_installed_bubble.cc
index b914d77..7f23cfe 100644
--- a/chrome/browser/ui/extensions/extension_installed_bubble.cc
+++ b/chrome/browser/ui/extensions/extension_installed_bubble.cc
@@ -7,6 +7,7 @@
 #include <string>
 
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/scoped_observer.h"
 #include "base/strings/utf_string_conversions.h"
diff --git a/chrome/browser/ui/extensions/extension_installed_bubble.h b/chrome/browser/ui/extensions/extension_installed_bubble.h
index ace20b7..780a723 100644
--- a/chrome/browser/ui/extensions/extension_installed_bubble.h
+++ b/chrome/browser/ui/extensions/extension_installed_bubble.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "base/strings/string16.h"
 #include "components/bubble/bubble_delegate.h"
 #include "third_party/skia/include/core/SkBitmap.h"
diff --git a/chrome/browser/ui/extensions/extension_message_bubble_factory.cc b/chrome/browser/ui/extensions/extension_message_bubble_factory.cc
index 192fefc5..178193b5 100644
--- a/chrome/browser/ui/extensions/extension_message_bubble_factory.cc
+++ b/chrome/browser/ui/extensions/extension_message_bubble_factory.cc
@@ -8,6 +8,7 @@
 #include "base/command_line.h"
 #include "base/lazy_instance.h"
 #include "base/metrics/field_trial.h"
+#include "build/build_config.h"
 #include "chrome/browser/extensions/dev_mode_bubble_delegate.h"
 #include "chrome/browser/extensions/extension_message_bubble_controller.h"
 #include "chrome/browser/extensions/install_verifier.h"
diff --git a/chrome/browser/ui/extensions/icon_with_badge_image_source.cc b/chrome/browser/ui/extensions/icon_with_badge_image_source.cc
index 5a055e3..6984b3dc7 100644
--- a/chrome/browser/ui/extensions/icon_with_badge_image_source.cc
+++ b/chrome/browser/ui/extensions/icon_with_badge_image_source.cc
@@ -9,6 +9,7 @@
 
 #include "base/logging.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "third_party/skia/include/core/SkPaint.h"
 #include "third_party/skia/include/core/SkTypeface.h"
 #include "ui/base/resource/material_design/material_design_controller.h"
diff --git a/chrome/browser/ui/external_protocol_dialog_delegate.h b/chrome/browser/ui/external_protocol_dialog_delegate.h
index 5ddb6b1..6d50518 100644
--- a/chrome/browser/ui/external_protocol_dialog_delegate.h
+++ b/chrome/browser/ui/external_protocol_dialog_delegate.h
@@ -5,8 +5,8 @@
 #ifndef CHROME_BROWSER_UI_EXTERNAL_PROTOCOL_DIALOG_DELEGATE_H_
 #define CHROME_BROWSER_UI_EXTERNAL_PROTOCOL_DIALOG_DELEGATE_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/time/time.h"
 #include "chrome/browser/ui/protocol_dialog_delegate.h"
 #include "url/gurl.h"
diff --git a/chrome/browser/ui/fast_unload_controller.cc b/chrome/browser/ui/fast_unload_controller.cc
index d89b21d..cf90eec 100644
--- a/chrome/browser/ui/fast_unload_controller.cc
+++ b/chrome/browser/ui/fast_unload_controller.cc
@@ -6,6 +6,7 @@
 
 #include "base/location.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
 #include "chrome/browser/chrome_notification_types.h"
diff --git a/chrome/browser/ui/fast_unload_controller.h b/chrome/browser/ui/fast_unload_controller.h
index 10aff6b..bfc0d07 100644
--- a/chrome/browser/ui/fast_unload_controller.h
+++ b/chrome/browser/ui/fast_unload_controller.h
@@ -8,6 +8,7 @@
 #include <set>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/strings/string_piece.h"
diff --git a/chrome/browser/ui/find_bar/find_bar_controller.h b/chrome/browser/ui/find_bar/find_bar_controller.h
index bd4bda7..745b7bf 100644
--- a/chrome/browser/ui/find_bar/find_bar_controller.h
+++ b/chrome/browser/ui/find_bar/find_bar_controller.h
@@ -5,7 +5,7 @@
 #ifndef CHROME_BROWSER_UI_FIND_BAR_FIND_BAR_CONTROLLER_H_
 #define CHROME_BROWSER_UI_FIND_BAR_FIND_BAR_CONTROLLER_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "content/public/browser/notification_observer.h"
 #include "content/public/browser/notification_registrar.h"
diff --git a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
index 463cea42..bae5263 100644
--- a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
+++ b/chrome/browser/ui/find_bar/find_bar_host_browsertest.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/command_line.h"
 #include "base/files/file_util.h"
 #include "base/message_loop/message_loop.h"
@@ -9,6 +11,7 @@
 #include "base/strings/string16.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/app/chrome_command_ids.h"
 #include "chrome/browser/history/history_service_factory.h"
 #include "chrome/browser/profiles/profile.h"
diff --git a/chrome/browser/ui/find_bar/find_bar_host_interactive_uitest.cc b/chrome/browser/ui/find_bar/find_bar_host_interactive_uitest.cc
index 1c068d1..1c08e1d 100644
--- a/chrome/browser/ui/find_bar/find_bar_host_interactive_uitest.cc
+++ b/chrome/browser/ui/find_bar/find_bar_host_interactive_uitest.cc
@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/browser/ui/browser_finder.h"
 #include "chrome/browser/ui/find_bar/find_bar.h"
 #include "chrome/browser/ui/find_bar/find_bar_controller.h"
diff --git a/chrome/browser/ui/find_bar/find_bar_state.h b/chrome/browser/ui/find_bar/find_bar_state.h
index 8fcb503..6ac349c 100644
--- a/chrome/browser/ui/find_bar/find_bar_state.h
+++ b/chrome/browser/ui/find_bar/find_bar_state.h
@@ -8,7 +8,7 @@
 #ifndef CHROME_BROWSER_UI_FIND_BAR_FIND_BAR_STATE_H_
 #define CHROME_BROWSER_UI_FIND_BAR_FIND_BAR_STATE_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/strings/string16.h"
 #include "components/keyed_service/core/keyed_service.h"
 
diff --git a/chrome/browser/ui/find_bar/find_bar_state_factory.h b/chrome/browser/ui/find_bar/find_bar_state_factory.h
index f3fa5389..3c4cd62 100644
--- a/chrome/browser/ui/find_bar/find_bar_state_factory.h
+++ b/chrome/browser/ui/find_bar/find_bar_state_factory.h
@@ -5,7 +5,7 @@
 #ifndef CHROME_BROWSER_UI_FIND_BAR_FIND_BAR_STATE_FACTORY_H_
 #define CHROME_BROWSER_UI_FIND_BAR_FIND_BAR_STATE_FACTORY_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/singleton.h"
 #include "base/strings/string16.h"
 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
diff --git a/chrome/browser/ui/find_bar/find_notification_details.h b/chrome/browser/ui/find_bar/find_notification_details.h
index 51ae09d..b2b6fdf44 100644
--- a/chrome/browser/ui/find_bar/find_notification_details.h
+++ b/chrome/browser/ui/find_bar/find_notification_details.h
@@ -5,7 +5,6 @@
 #ifndef CHROME_BROWSER_UI_FIND_BAR_FIND_NOTIFICATION_DETAILS_H_
 #define CHROME_BROWSER_UI_FIND_BAR_FIND_NOTIFICATION_DETAILS_H_
 
-#include "base/basictypes.h"
 #include "ui/gfx/geometry/rect.h"
 
 class FindNotificationDetails {
diff --git a/chrome/browser/ui/find_bar/find_tab_helper.cc b/chrome/browser/ui/find_bar/find_tab_helper.cc
index 4c15d3f5..069e147 100644
--- a/chrome/browser/ui/find_bar/find_tab_helper.cc
+++ b/chrome/browser/ui/find_bar/find_tab_helper.cc
@@ -7,6 +7,7 @@
 #include <vector>
 
 #include "base/strings/string_util.h"
+#include "build/build_config.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/ui/find_bar/find_bar_state.h"
diff --git a/chrome/browser/ui/find_bar/find_tab_helper.h b/chrome/browser/ui/find_bar/find_tab_helper.h
index dfe1866..8a3a830c 100644
--- a/chrome/browser/ui/find_bar/find_tab_helper.h
+++ b/chrome/browser/ui/find_bar/find_tab_helper.h
@@ -5,6 +5,8 @@
 #ifndef CHROME_BROWSER_UI_FIND_BAR_FIND_TAB_HELPER_H_
 #define CHROME_BROWSER_UI_FIND_BAR_FIND_TAB_HELPER_H_
 
+#include "base/macros.h"
+#include "build/build_config.h"
 #include "chrome/browser/ui/find_bar/find_bar_controller.h"
 #include "chrome/browser/ui/find_bar/find_notification_details.h"
 #include "content/public/browser/web_contents_observer.h"
diff --git a/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc b/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc
index b971726..eb14ac79 100644
--- a/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc
+++ b/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc
@@ -4,11 +4,14 @@
 
 #include "chrome/browser/ui/gesture_prefs_observer_factory_aura.h"
 
+#include <stddef.h>
+
 #include <vector>
 
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/prefs/pref_change_registrar.h"
 #include "base/prefs/pref_service.h"
 #include "chrome/browser/chrome_notification_types.h"
diff --git a/chrome/browser/ui/gesture_prefs_observer_factory_aura.h b/chrome/browser/ui/gesture_prefs_observer_factory_aura.h
index 97832537..8500560 100644
--- a/chrome/browser/ui/gesture_prefs_observer_factory_aura.h
+++ b/chrome/browser/ui/gesture_prefs_observer_factory_aura.h
@@ -5,7 +5,7 @@
 #ifndef CHROME_BROWSER_UI_GESTURE_PREFS_OBSERVER_FACTORY_AURA_H_
 #define CHROME_BROWSER_UI_GESTURE_PREFS_OBSERVER_FACTORY_AURA_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/singleton.h"
 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
 
diff --git a/chrome/browser/ui/global_error/global_error.cc b/chrome/browser/ui/global_error/global_error.cc
index bcf3c9d..87645c41 100644
--- a/chrome/browser/ui/global_error/global_error.cc
+++ b/chrome/browser/ui/global_error/global_error.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/global_error/global_error.h"
 
 #include "base/logging.h"
+#include "build/build_config.h"
 #include "chrome/browser/ui/global_error/global_error_bubble_view_base.h"
 #include "grit/theme_resources.h"
 #include "ui/base/resource/resource_bundle.h"
diff --git a/chrome/browser/ui/global_error/global_error.h b/chrome/browser/ui/global_error/global_error.h
index df8957ae..fbfee28 100644
--- a/chrome/browser/ui/global_error/global_error.h
+++ b/chrome/browser/ui/global_error/global_error.h
@@ -7,7 +7,7 @@
 
 #include <vector>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/strings/string16.h"
 
diff --git a/chrome/browser/ui/global_error/global_error_bubble_view_base.h b/chrome/browser/ui/global_error/global_error_bubble_view_base.h
index 224364d8..c94b396e 100644
--- a/chrome/browser/ui/global_error/global_error_bubble_view_base.h
+++ b/chrome/browser/ui/global_error/global_error_bubble_view_base.h
@@ -5,7 +5,6 @@
 #ifndef CHROME_BROWSER_UI_GLOBAL_ERROR_GLOBAL_ERROR_BUBBLE_VIEW_BASE_H_
 #define CHROME_BROWSER_UI_GLOBAL_ERROR_GLOBAL_ERROR_BUBBLE_VIEW_BASE_H_
 
-#include "base/basictypes.h"
 #include "base/memory/weak_ptr.h"
 
 class Browser;
diff --git a/chrome/browser/ui/global_error/global_error_service.cc b/chrome/browser/ui/global_error/global_error_service.cc
index 0c095ab..342815e 100644
--- a/chrome/browser/ui/global_error/global_error_service.cc
+++ b/chrome/browser/ui/global_error/global_error_service.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/global_error/global_error_service.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 
 #include "base/stl_util.h"
diff --git a/chrome/browser/ui/global_error/global_error_service.h b/chrome/browser/ui/global_error/global_error_service.h
index 7054bba..f81f7ed 100644
--- a/chrome/browser/ui/global_error/global_error_service.h
+++ b/chrome/browser/ui/global_error/global_error_service.h
@@ -7,7 +7,7 @@
 
 #include <vector>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "components/keyed_service/core/keyed_service.h"
 
 class GlobalError;
diff --git a/chrome/browser/ui/global_error/global_error_service_browsertest.cc b/chrome/browser/ui/global_error/global_error_service_browsertest.cc
index ee09eea..e06bd3e 100644
--- a/chrome/browser/ui/global_error/global_error_service_browsertest.cc
+++ b/chrome/browser/ui/global_error/global_error_service_browsertest.cc
@@ -4,7 +4,9 @@
 
 #include "chrome/browser/ui/global_error/global_error_service.h"
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
+#include "build/build_config.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/global_error/global_error.h"
 #include "chrome/browser/ui/global_error/global_error_bubble_view_base.h"
diff --git a/chrome/browser/ui/global_error/global_error_service_factory.h b/chrome/browser/ui/global_error/global_error_service_factory.h
index f4f2f41c..377f76f 100644
--- a/chrome/browser/ui/global_error/global_error_service_factory.h
+++ b/chrome/browser/ui/global_error/global_error_service_factory.h
@@ -5,8 +5,8 @@
 #ifndef CHROME_BROWSER_UI_GLOBAL_ERROR_GLOBAL_ERROR_SERVICE_FACTORY_H_
 #define CHROME_BROWSER_UI_GLOBAL_ERROR_GLOBAL_ERROR_SERVICE_FACTORY_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/singleton.h"
 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
 
diff --git a/chrome/browser/ui/global_error/global_error_service_unittest.cc b/chrome/browser/ui/global_error/global_error_service_unittest.cc
index c8d6bfce..398498dd0 100644
--- a/chrome/browser/ui/global_error/global_error_service_unittest.cc
+++ b/chrome/browser/ui/global_error/global_error_service_unittest.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/global_error/global_error_service.h"
 
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "chrome/browser/ui/global_error/global_error.h"
 #include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/ui/host_desktop.cc b/chrome/browser/ui/host_desktop.cc
index bf90814..5a24850 100644
--- a/chrome/browser/ui/host_desktop.cc
+++ b/chrome/browser/ui/host_desktop.cc
@@ -4,15 +4,16 @@
 
 #include "chrome/browser/ui/host_desktop.h"
 
-#if defined(OS_WIN)
-#include <windows.h>
-#endif
-
+#include "build/build_config.h"
 #include "chrome/browser/ui/ash/ash_util.h"
 #include "chrome/browser/ui/aura/active_desktop_monitor.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_list.h"
 
+#if defined(OS_WIN)
+#include <windows.h>
+#endif
+
 #if defined(USE_ASH)
 #include "ash/shell.h"
 #endif
diff --git a/chrome/browser/ui/host_desktop.h b/chrome/browser/ui/host_desktop.h
index 9728454..eb15876 100644
--- a/chrome/browser/ui/host_desktop.h
+++ b/chrome/browser/ui/host_desktop.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_HOST_DESKTOP_H_
 #define CHROME_BROWSER_UI_HOST_DESKTOP_H_
 
+#include "build/build_config.h"
 #include "ui/gfx/native_widget_types.h"
 
 class Browser;
diff --git a/chrome/browser/ui/hung_plugin_tab_helper.cc b/chrome/browser/ui/hung_plugin_tab_helper.cc
index 7fe0eb5..3da82e5 100644
--- a/chrome/browser/ui/hung_plugin_tab_helper.cc
+++ b/chrome/browser/ui/hung_plugin_tab_helper.cc
@@ -6,6 +6,7 @@
 
 #include "base/bind.h"
 #include "base/files/file_path.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/process/process.h"
 #include "base/rand_util.h"
diff --git a/chrome/browser/ui/hung_plugin_tab_helper.h b/chrome/browser/ui/hung_plugin_tab_helper.h
index 14649fd..e737ec1 100644
--- a/chrome/browser/ui/hung_plugin_tab_helper.h
+++ b/chrome/browser/ui/hung_plugin_tab_helper.h
@@ -7,6 +7,7 @@
 
 #include <map>
 
+#include "base/macros.h"
 #include "base/memory/linked_ptr.h"
 #include "base/strings/string16.h"
 #include "base/time/time.h"
diff --git a/chrome/browser/ui/infobar_container_delegate.cc b/chrome/browser/ui/infobar_container_delegate.cc
index 28244d5..fc00a87 100644
--- a/chrome/browser/ui/infobar_container_delegate.cc
+++ b/chrome/browser/ui/infobar_container_delegate.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/browser/ui/infobar_container_delegate.h"
 
+#include "build/build_config.h"
 #include "ui/base/resource/material_design/material_design_controller.h"
 #include "ui/gfx/animation/slide_animation.h"
 
diff --git a/chrome/browser/ui/infobar_container_delegate.h b/chrome/browser/ui/infobar_container_delegate.h
index cd2335d..8c788c72 100644
--- a/chrome/browser/ui/infobar_container_delegate.h
+++ b/chrome/browser/ui/infobar_container_delegate.h
@@ -5,6 +5,9 @@
 #ifndef CHROME_BROWSER_UI_INFOBAR_CONTAINER_DELEGATE_H_
 #define CHROME_BROWSER_UI_INFOBAR_CONTAINER_DELEGATE_H_
 
+#include <stddef.h>
+
+#include "base/macros.h"
 #include "components/infobars/core/infobar_container.h"
 
 class InfoBarContainerDelegate : public infobars::InfoBarContainer::Delegate {
diff --git a/chrome/browser/ui/layout_constants.cc b/chrome/browser/ui/layout_constants.cc
index 3a4a34a..3c797f4 100644
--- a/chrome/browser/ui/layout_constants.cc
+++ b/chrome/browser/ui/layout_constants.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/layout_constants.h"
 
 #include "base/logging.h"
+#include "build/build_config.h"
 #include "ui/base/resource/material_design/material_design_controller.h"
 
 int GetLayoutConstant(LayoutConstant constant) {
diff --git a/chrome/browser/ui/libgtk2ui/app_indicator_icon.h b/chrome/browser/ui/libgtk2ui/app_indicator_icon.h
index b4e80c735..c0c470c 100644
--- a/chrome/browser/ui/libgtk2ui/app_indicator_icon.h
+++ b/chrome/browser/ui/libgtk2ui/app_indicator_icon.h
@@ -6,6 +6,7 @@
 #define CHROME_BROWSER_UI_LIBGTK2UI_APP_INDICATOR_ICON_H_
 
 #include "base/files/file_path.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/nix/xdg_util.h"
diff --git a/chrome/browser/ui/libgtk2ui/app_indicator_icon_menu.h b/chrome/browser/ui/libgtk2ui/app_indicator_icon_menu.h
index a204710f..40f02ad 100644
--- a/chrome/browser/ui/libgtk2ui/app_indicator_icon_menu.h
+++ b/chrome/browser/ui/libgtk2ui/app_indicator_icon_menu.h
@@ -6,6 +6,7 @@
 #define CHROME_BROWSER_UI_LIBGTK2UI_APP_INDICATOR_ICON_MENU_H_
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/libgtk2ui/gtk2_signal.h"
 
 typedef struct _GtkMenu GtkMenu;
diff --git a/chrome/browser/ui/libgtk2ui/gconf_listener.h b/chrome/browser/ui/libgtk2ui/gconf_listener.h
index 63ec69a8..98bd694 100644
--- a/chrome/browser/ui/libgtk2ui/gconf_listener.h
+++ b/chrome/browser/ui/libgtk2ui/gconf_listener.h
@@ -11,8 +11,8 @@
 #include <set>
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/callback_forward.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/libgtk2ui/gtk2_signal.h"
 
 namespace libgtk2ui {
diff --git a/chrome/browser/ui/libgtk2ui/gtk2_key_bindings_handler.cc b/chrome/browser/ui/libgtk2ui/gtk2_key_bindings_handler.cc
index be88310..c1e1a835 100644
--- a/chrome/browser/ui/libgtk2ui/gtk2_key_bindings_handler.cc
+++ b/chrome/browser/ui/libgtk2ui/gtk2_key_bindings_handler.cc
@@ -6,11 +6,13 @@
 
 #include <gdk/gdkkeysyms.h>
 #include <X11/Xlib.h>
+#include <stddef.h>
 #include <X11/XKBlib.h>
 
 #include <string>
 
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/strings/string_util.h"
 #include "chrome/browser/ui/libgtk2ui/gtk2_util.h"
 #include "content/public/browser/native_web_keyboard_event.h"
diff --git a/chrome/browser/ui/libgtk2ui/gtk2_status_icon.h b/chrome/browser/ui/libgtk2ui/gtk2_status_icon.h
index 89934a7..01b2ea9 100644
--- a/chrome/browser/ui/libgtk2ui/gtk2_status_icon.h
+++ b/chrome/browser/ui/libgtk2ui/gtk2_status_icon.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_LIBGTK2UI_GTK2_STATUS_ICON_H_
 #define CHROME_BROWSER_UI_LIBGTK2UI_GTK2_STATUS_ICON_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/strings/string16.h"
 #include "chrome/browser/ui/libgtk2ui/gtk2_signal.h"
diff --git a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
index 5b52870..2a7cdec 100644
--- a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
+++ b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
@@ -14,6 +14,7 @@
 #include "base/environment.h"
 #include "base/i18n/rtl.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/nix/mime_util_xdg.h"
 #include "base/nix/xdg_util.h"
 #include "base/stl_util.h"
diff --git a/chrome/browser/ui/libgtk2ui/gtk2_ui.h b/chrome/browser/ui/libgtk2ui/gtk2_ui.h
index ba38079..2e6210a0 100644
--- a/chrome/browser/ui/libgtk2ui/gtk2_ui.h
+++ b/chrome/browser/ui/libgtk2ui/gtk2_ui.h
@@ -8,8 +8,8 @@
 #include <map>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/observer_list.h"
 #include "chrome/browser/ui/libgtk2ui/gtk2_signal.h"
diff --git a/chrome/browser/ui/libgtk2ui/gtk2_util.cc b/chrome/browser/ui/libgtk2ui/gtk2_util.cc
index 17bc54f..c3cdc0e02 100644
--- a/chrome/browser/ui/libgtk2ui/gtk2_util.cc
+++ b/chrome/browser/ui/libgtk2ui/gtk2_util.cc
@@ -7,6 +7,7 @@
 #include <gdk/gdk.h>
 #include <gdk/gdkx.h>
 #include <gtk/gtk.h>
+#include <stddef.h>
 
 #include "base/command_line.h"
 #include "base/debug/leak_annotations.h"
diff --git a/chrome/browser/ui/libgtk2ui/native_theme_gtk2.h b/chrome/browser/ui/libgtk2ui/native_theme_gtk2.h
index a97c43b..ddb83eb 100644
--- a/chrome/browser/ui/libgtk2ui/native_theme_gtk2.h
+++ b/chrome/browser/ui/libgtk2ui/native_theme_gtk2.h
@@ -7,6 +7,7 @@
 
 #include <gtk/gtk.h>
 
+#include "base/macros.h"
 #include "ui/native_theme/native_theme_base.h"
 
 
diff --git a/chrome/browser/ui/libgtk2ui/print_dialog_gtk2.cc b/chrome/browser/ui/libgtk2ui/print_dialog_gtk2.cc
index 180de273..fe68492 100644
--- a/chrome/browser/ui/libgtk2ui/print_dialog_gtk2.cc
+++ b/chrome/browser/ui/libgtk2ui/print_dialog_gtk2.cc
@@ -16,6 +16,7 @@
 #include "base/files/file_util_proxy.h"
 #include "base/lazy_instance.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/values.h"
 #include "chrome/browser/ui/libgtk2ui/gtk2_util.h"
diff --git a/chrome/browser/ui/libgtk2ui/print_dialog_gtk2.h b/chrome/browser/ui/libgtk2ui/print_dialog_gtk2.h
index 162e2f6..bfed477 100644
--- a/chrome/browser/ui/libgtk2ui/print_dialog_gtk2.h
+++ b/chrome/browser/ui/libgtk2ui/print_dialog_gtk2.h
@@ -10,6 +10,7 @@
 
 #include "base/compiler_specific.h"
 #include "base/files/file_path.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/sequenced_task_runner_helpers.h"
 #include "chrome/browser/ui/libgtk2ui/gtk2_signal.h"
diff --git a/chrome/browser/ui/libgtk2ui/select_file_dialog_impl.h b/chrome/browser/ui/libgtk2ui/select_file_dialog_impl.h
index d7e7b6a..c31e9ddef 100644
--- a/chrome/browser/ui/libgtk2ui/select_file_dialog_impl.h
+++ b/chrome/browser/ui/libgtk2ui/select_file_dialog_impl.h
@@ -7,9 +7,12 @@
 #ifndef CHROME_BROWSER_UI_LIBGTK2UI_SELECT_FILE_DIALOG_IMPL_H_
 #define CHROME_BROWSER_UI_LIBGTK2UI_SELECT_FILE_DIALOG_IMPL_H_
 
+#include <stddef.h>
+
 #include <set>
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/nix/xdg_util.h"
 #include "ui/aura/window.h"
 #include "ui/shell_dialogs/select_file_dialog.h"
diff --git a/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc b/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc
index a089873..058c0b7 100644
--- a/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc
+++ b/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc
@@ -6,6 +6,7 @@
 
 #include <gdk/gdkx.h>
 #include <gtk/gtk.h>
+#include <stddef.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <unistd.h>
diff --git a/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_kde.cc b/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_kde.cc
index 3a9dbda..21721498 100644
--- a/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_kde.cc
+++ b/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_kde.cc
@@ -2,20 +2,22 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include <set>
-
+#include <stddef.h>
 #include <X11/Xlib.h>
 
+#include <set>
+
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/command_line.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/nix/mime_util_xdg.h"
 #include "base/nix/xdg_util.h"
 #include "base/process/launch.h"
 #include "base/strings/string_number_conversions.h"
-#include "base/strings/string_util.h"
 #include "base/strings/string_split.h"
+#include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/threading/thread_restrictions.h"
 #include "chrome/browser/ui/libgtk2ui/select_file_dialog_impl.h"
diff --git a/chrome/browser/ui/libgtk2ui/select_file_dialog_interactive_uitest.cc b/chrome/browser/ui/libgtk2ui/select_file_dialog_interactive_uitest.cc
index 8078d4f..c730d33 100644
--- a/chrome/browser/ui/libgtk2ui/select_file_dialog_interactive_uitest.cc
+++ b/chrome/browser/ui/libgtk2ui/select_file_dialog_interactive_uitest.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.h"
 
+#include "base/macros.h"
 #include "base/run_loop.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_window.h"
diff --git a/chrome/browser/ui/libgtk2ui/skia_utils_gtk2.cc b/chrome/browser/ui/libgtk2ui/skia_utils_gtk2.cc
index 191d8d0..f8969795 100644
--- a/chrome/browser/ui/libgtk2ui/skia_utils_gtk2.cc
+++ b/chrome/browser/ui/libgtk2ui/skia_utils_gtk2.cc
@@ -6,7 +6,6 @@
 
 #include <gdk/gdk.h>
 
-#include "base/basictypes.h"
 #include "base/logging.h"
 #include "third_party/skia/include/core/SkBitmap.h"
 #include "third_party/skia/include/core/SkUnPreMultiply.h"
@@ -105,11 +104,11 @@
 
   // SkBitmaps are premultiplied, we need to unpremultiply them.
   const int kBytesPerPixel = 4;
-  uint8* divided = gdk_pixbuf_get_pixels(pixbuf);
+  uint8_t* divided = gdk_pixbuf_get_pixels(pixbuf);
 
   for (int y = 0, i = 0; y < height; y++) {
     for (int x = 0; x < width; x++) {
-      uint32 pixel = bitmap.getAddr32(0, y)[x];
+      uint32_t pixel = bitmap.getAddr32(0, y)[x];
 
       int alpha = SkColorGetA(pixel);
       if (alpha != 0 && alpha != 255) {
diff --git a/chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h b/chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h
index 4a39514..ccb6563 100644
--- a/chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h
+++ b/chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h
@@ -5,6 +5,8 @@
 #ifndef CHROME_BROWSER_UI_LIBGTK2UI_SKIA_UTILS_GTK2_H_
 #define CHROME_BROWSER_UI_LIBGTK2UI_SKIA_UTILS_GTK2_H_
 
+#include <stdint.h>
+
 #include "third_party/skia/include/core/SkColor.h"
 
 typedef struct _GdkColor GdkColor;
@@ -21,7 +23,7 @@
 
 namespace libgtk2ui {
 
-// Multiply uint8 color components by this.
+// Multiply uint8_t color components by this.
 const int kSkiaToGDKMultiplier = 257;
 
 // Converts GdkColors to the ARGB layout Skia expects.
diff --git a/chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.cc b/chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.cc
index 9ea4aba..617f7c5 100644
--- a/chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.cc
+++ b/chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.cc
@@ -7,6 +7,7 @@
 #include <gdk/gdk.h>
 #include <gdk/gdkkeysyms.h>
 #include <gdk/gdkx.h>
+#include <stddef.h>
 
 #include <gtk/gtk.h>
 
diff --git a/chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.h b/chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.h
index e942d10..fe8b19f 100644
--- a/chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.h
+++ b/chrome/browser/ui/libgtk2ui/x11_input_method_context_impl_gtk2.h
@@ -9,6 +9,7 @@
 
 #include "base/containers/hash_tables.h"
 #include "base/event_types.h"
+#include "base/macros.h"
 #include "base/strings/string16.h"
 #include "ui/base/glib/glib_integers.h"
 #include "ui/base/glib/glib_signal.h"
diff --git a/chrome/browser/ui/location_bar/location_bar.h b/chrome/browser/ui/location_bar/location_bar.h
index f62e730..b0fd818e 100644
--- a/chrome/browser/ui/location_bar/location_bar.h
+++ b/chrome/browser/ui/location_bar/location_bar.h
@@ -5,6 +5,9 @@
 #ifndef CHROME_BROWSER_UI_LOCATION_BAR_LOCATION_BAR_H_
 #define CHROME_BROWSER_UI_LOCATION_BAR_LOCATION_BAR_H_
 
+#include <stddef.h>
+
+#include "base/macros.h"
 #include "ui/base/page_transition_types.h"
 #include "ui/base/window_open_disposition.h"
 #include "url/gurl.h"
diff --git a/chrome/browser/ui/location_bar/location_bar_browsertest.cc b/chrome/browser/ui/location_bar/location_bar_browsertest.cc
index abb981d..2520d72 100644
--- a/chrome/browser/ui/location_bar/location_bar_browsertest.cc
+++ b/chrome/browser/ui/location_bar/location_bar_browsertest.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/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/strings/stringprintf.h"
diff --git a/chrome/browser/ui/location_bar/location_bar_util.cc b/chrome/browser/ui/location_bar/location_bar_util.cc
index 7f738b7f..38188593 100644
--- a/chrome/browser/ui/location_bar/location_bar_util.cc
+++ b/chrome/browser/ui/location_bar/location_bar_util.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/location_bar/location_bar_util.h"
 
+#include <stddef.h>
+
 #include "base/i18n/rtl.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
diff --git a/chrome/browser/ui/login/login_interstitial_delegate.h b/chrome/browser/ui/login/login_interstitial_delegate.h
index 0b375df..c8ec4ff 100644
--- a/chrome/browser/ui/login/login_interstitial_delegate.h
+++ b/chrome/browser/ui/login/login_interstitial_delegate.h
@@ -8,6 +8,7 @@
 #include <string>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "content/public/browser/interstitial_page.h"
 #include "content/public/browser/interstitial_page_delegate.h"
diff --git a/chrome/browser/ui/login/login_prompt.h b/chrome/browser/ui/login/login_prompt.h
index c0d5b28..7b9b526 100644
--- a/chrome/browser/ui/login/login_prompt.h
+++ b/chrome/browser/ui/login/login_prompt.h
@@ -7,7 +7,7 @@
 
 #include <string>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/synchronization/lock.h"
 #include "components/password_manager/core/browser/password_manager.h"
diff --git a/chrome/browser/ui/login/login_prompt_test_utils.h b/chrome/browser/ui/login/login_prompt_test_utils.h
index 224ea6e..592b8db3 100644
--- a/chrome/browser/ui/login/login_prompt_test_utils.h
+++ b/chrome/browser/ui/login/login_prompt_test_utils.h
@@ -7,6 +7,7 @@
 
 #include <list>
 
+#include "base/macros.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "content/public/browser/navigation_controller.h"
 #include "content/public/browser/notification_observer.h"
diff --git a/chrome/browser/ui/login/login_prompt_unittest.cc b/chrome/browser/ui/login/login_prompt_unittest.cc
index b2bb2c4e..2debb0f0 100644
--- a/chrome/browser/ui/login/login_prompt_unittest.cc
+++ b/chrome/browser/ui/login/login_prompt_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 "base/macros.h"
 #include "chrome/browser/ui/login/login_prompt.h"
 #include "net/base/auth.h"
 #include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/ui/metro_pin_tab_helper_win.cc b/chrome/browser/ui/metro_pin_tab_helper_win.cc
index 6564571..2506a004 100644
--- a/chrome/browser/ui/metro_pin_tab_helper_win.cc
+++ b/chrome/browser/ui/metro_pin_tab_helper_win.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/metro_pin_tab_helper_win.h"
 
+#include <stdint.h>
+
 #include <set>
 
 #include "base/base_paths.h"
@@ -11,6 +13,7 @@
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/ref_counted_memory.h"
 #include "base/metrics/histogram.h"
@@ -43,7 +46,7 @@
 // Generate an ID for the tile based on |url_str|. The ID is simply a hash of
 // the URL.
 base::string16 GenerateTileId(const base::string16& url_str) {
-  uint8 hash[crypto::kSHA256Length];
+  uint8_t hash[crypto::kSHA256Length];
   crypto::SHA256HashString(base::UTF16ToUTF8(url_str), hash, sizeof(hash));
   std::string hash_str = base::HexEncode(hash, sizeof(hash));
   return base::UTF8ToUTF16(hash_str);
diff --git a/chrome/browser/ui/metro_pin_tab_helper_win.h b/chrome/browser/ui/metro_pin_tab_helper_win.h
index 2233f46..6018f597 100644
--- a/chrome/browser/ui/metro_pin_tab_helper_win.h
+++ b/chrome/browser/ui/metro_pin_tab_helper_win.h
@@ -7,6 +7,7 @@
 
 #include <vector>
 
+#include "base/macros.h"
 #include "content/public/browser/web_contents_observer.h"
 #include "content/public/browser/web_contents_user_data.h"
 #include "content/public/common/favicon_url.h"
diff --git a/chrome/browser/ui/navigation_correction_tab_observer.h b/chrome/browser/ui/navigation_correction_tab_observer.h
index cc562f9..d7dee26f 100644
--- a/chrome/browser/ui/navigation_correction_tab_observer.h
+++ b/chrome/browser/ui/navigation_correction_tab_observer.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_NAVIGATION_CORRECTION_TAB_OBSERVER_H_
 #define CHROME_BROWSER_UI_NAVIGATION_CORRECTION_TAB_OBSERVER_H_
 
+#include "base/macros.h"
 #include "base/prefs/pref_change_registrar.h"
 #include "components/google/core/browser/google_url_tracker.h"
 #include "content/public/browser/web_contents_observer.h"
diff --git a/chrome/browser/ui/network_profile_bubble.cc b/chrome/browser/ui/network_profile_bubble.cc
index 29aaa76..5011444 100644
--- a/chrome/browser/ui/network_profile_bubble.cc
+++ b/chrome/browser/ui/network_profile_bubble.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/network_profile_bubble.h"
 
 #include <windows.h>
+#include <stdint.h>
 
 #include <wtsapi32.h>
 // Make sure we link the wtsapi lib file in.
@@ -78,7 +79,7 @@
   PrefService* prefs = profile->GetPrefs();
   if (prefs->GetInteger(prefs::kNetworkProfileWarningsLeft))
     return !notification_shown_;
-  int64 last_check = prefs->GetInt64(prefs::kNetworkProfileLastWarningTime);
+  int64_t last_check = prefs->GetInt64(prefs::kNetworkProfileLastWarningTime);
   base::TimeDelta time_since_last_check =
       base::Time::Now() - base::Time::FromTimeT(last_check);
   if (time_since_last_check.InDays() > kSilenceDurationDays) {
diff --git a/chrome/browser/ui/network_profile_bubble.h b/chrome/browser/ui/network_profile_bubble.h
index fb43906..d88e813 100644
--- a/chrome/browser/ui/network_profile_bubble.h
+++ b/chrome/browser/ui/network_profile_bubble.h
@@ -5,7 +5,7 @@
 #ifndef CHROME_BROWSER_UI_NETWORK_PROFILE_BUBBLE_H_
 #define CHROME_BROWSER_UI_NETWORK_PROFILE_BUBBLE_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 
 class Browser;
 class Profile;
diff --git a/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc b/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc
index f0f3d35d..65e81148 100644
--- a/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc
+++ b/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h"
 
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h"
 #include "chrome/browser/history/history_service_factory.h"
 #include "chrome/browser/infobars/infobar_service.h"
diff --git a/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h b/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h
index 3be6638b..202faf0 100644
--- a/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h
+++ b/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h
@@ -5,6 +5,9 @@
 #ifndef CHROME_BROWSER_UI_OMNIBOX_ALTERNATE_NAV_INFOBAR_DELEGATE_H_
 #define CHROME_BROWSER_UI_OMNIBOX_ALTERNATE_NAV_INFOBAR_DELEGATE_H_
 
+#include <stddef.h>
+
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "components/infobars/core/infobar_delegate.h"
 #include "components/omnibox/browser/autocomplete_match.h"
diff --git a/chrome/browser/ui/omnibox/chrome_omnibox_client.cc b/chrome/browser/ui/omnibox/chrome_omnibox_client.cc
index 504e28f..1b46d33 100644
--- a/chrome/browser/ui/omnibox/chrome_omnibox_client.cc
+++ b/chrome/browser/ui/omnibox/chrome_omnibox_client.cc
@@ -4,8 +4,11 @@
 
 #include "chrome/browser/ui/omnibox/chrome_omnibox_client.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/metrics/histogram.h"
 #include "base/prefs/pref_service.h"
 #include "base/strings/utf_string_conversions.h"
diff --git a/chrome/browser/ui/omnibox/chrome_omnibox_client.h b/chrome/browser/ui/omnibox/chrome_omnibox_client.h
index 17d8398..92cc4f4 100644
--- a/chrome/browser/ui/omnibox/chrome_omnibox_client.h
+++ b/chrome/browser/ui/omnibox/chrome_omnibox_client.h
@@ -6,6 +6,7 @@
 #define CHROME_BROWSER_UI_OMNIBOX_CHROME_OMNIBOX_CLIENT_H_
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h"
 #include "chrome/browser/bitmap_fetcher/bitmap_fetcher_service.h"
 #include "chrome/common/instant_types.h"
diff --git a/chrome/browser/ui/omnibox/chrome_omnibox_edit_controller.h b/chrome/browser/ui/omnibox/chrome_omnibox_edit_controller.h
index f6f5ab9..b238cc8 100644
--- a/chrome/browser/ui/omnibox/chrome_omnibox_edit_controller.h
+++ b/chrome/browser/ui/omnibox/chrome_omnibox_edit_controller.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_OMNIBOX_CHROME_OMNIBOX_EDIT_CONTROLLER_H_
 #define CHROME_BROWSER_UI_OMNIBOX_CHROME_OMNIBOX_EDIT_CONTROLLER_H_
 
+#include "base/macros.h"
 #include "components/omnibox/browser/omnibox_edit_controller.h"
 
 class CommandUpdater;
diff --git a/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.h b/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.h
index a8e670e..d8b2b8a 100644
--- a/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.h
+++ b/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "components/omnibox/browser/autocomplete_match.h"
diff --git a/chrome/browser/ui/omnibox/clipboard_utils_unittest.cc b/chrome/browser/ui/omnibox/clipboard_utils_unittest.cc
index fd78f7b..825f96e0 100644
--- a/chrome/browser/ui/omnibox/clipboard_utils_unittest.cc
+++ b/chrome/browser/ui/omnibox/clipboard_utils_unittest.cc
@@ -6,6 +6,7 @@
 #include "base/strings/string16.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/browser/ui/omnibox/clipboard_utils.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "testing/platform_test.h"
diff --git a/chrome/browser/ui/omnibox/omnibox_controller_unittest.cc b/chrome/browser/ui/omnibox/omnibox_controller_unittest.cc
index 03e978e..0c61420 100644
--- a/chrome/browser/ui/omnibox/omnibox_controller_unittest.cc
+++ b/chrome/browser/ui/omnibox/omnibox_controller_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 "base/macros.h"
 #include "base/strings/string_util.h"
 #include "chrome/browser/autocomplete/chrome_autocomplete_provider_client.h"
 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h"
diff --git a/chrome/browser/ui/omnibox/omnibox_edit_unittest.cc b/chrome/browser/ui/omnibox/omnibox_edit_unittest.cc
index cce7664..579559b 100644
--- a/chrome/browser/ui/omnibox/omnibox_edit_unittest.cc
+++ b/chrome/browser/ui/omnibox/omnibox_edit_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 "base/macros.h"
 #include "base/strings/utf_string_conversions.h"
 #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h"
 #include "chrome/browser/search_engines/template_url_service_factory.h"
diff --git a/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc b/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
index b9e5e62e..1bf4cf2 100644
--- a/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
+++ b/chrome/browser/ui/omnibox/omnibox_view_browsertest.cc
@@ -2,14 +2,17 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
 #include <stdio.h>
 
 #include "base/command_line.h"
+#include "base/macros.h"
 #include "base/scoped_observer.h"
 #include "base/strings/string16.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/time/time.h"
+#include "build/build_config.h"
 #include "chrome/app/chrome_command_ids.h"
 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
 #include "chrome/browser/chrome_notification_types.h"
diff --git a/chrome/browser/ui/panels/base_panel_browser_test.cc b/chrome/browser/ui/panels/base_panel_browser_test.cc
index a7739eff..752498d4 100644
--- a/chrome/browser/ui/panels/base_panel_browser_test.cc
+++ b/chrome/browser/ui/panels/base_panel_browser_test.cc
@@ -6,9 +6,11 @@
 
 #include "base/bind.h"
 #include "base/command_line.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/strings/string_number_conversions.h"
+#include "build/build_config.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/extensions/extension_service.h"
 #include "chrome/browser/profiles/profile.h"
diff --git a/chrome/browser/ui/panels/detached_panel_collection.h b/chrome/browser/ui/panels/detached_panel_collection.h
index 6480006..8d9c4692 100644
--- a/chrome/browser/ui/panels/detached_panel_collection.h
+++ b/chrome/browser/ui/panels/detached_panel_collection.h
@@ -6,7 +6,8 @@
 #define CHROME_BROWSER_UI_PANELS_DETACHED_PANEL_COLLECTION_H_
 
 #include <list>
-#include "base/basictypes.h"
+
+#include "base/macros.h"
 #include "chrome/browser/ui/panels/panel.h"
 #include "chrome/browser/ui/panels/panel_collection.h"
 #include "ui/gfx/geometry/point.h"
diff --git a/chrome/browser/ui/panels/detached_panel_drag_handler.h b/chrome/browser/ui/panels/detached_panel_drag_handler.h
index 74a539a..ea370155 100644
--- a/chrome/browser/ui/panels/detached_panel_drag_handler.h
+++ b/chrome/browser/ui/panels/detached_panel_drag_handler.h
@@ -5,7 +5,7 @@
 #ifndef CHROME_BROWSER_UI_PANELS_DETACHED_PANEL_DRAG_HANDLER_H_
 #define CHROME_BROWSER_UI_PANELS_DETACHED_PANEL_DRAG_HANDLER_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 
 class Panel;
 namespace gfx {
diff --git a/chrome/browser/ui/panels/display_settings_provider.cc b/chrome/browser/ui/panels/display_settings_provider.cc
index 42d76cc0..d3700a3 100644
--- a/chrome/browser/ui/panels/display_settings_provider.cc
+++ b/chrome/browser/ui/panels/display_settings_provider.cc
@@ -6,6 +6,7 @@
 
 #include "base/bind.h"
 #include "base/logging.h"
+#include "build/build_config.h"
 #include "chrome/browser/fullscreen.h"
 #include "ui/gfx/screen.h"
 
diff --git a/chrome/browser/ui/panels/display_settings_provider.h b/chrome/browser/ui/panels/display_settings_provider.h
index 8923d13..e95e796 100644
--- a/chrome/browser/ui/panels/display_settings_provider.h
+++ b/chrome/browser/ui/panels/display_settings_provider.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_PANELS_DISPLAY_SETTINGS_PROVIDER_H_
 #define CHROME_BROWSER_UI_PANELS_DISPLAY_SETTINGS_PROVIDER_H_
 
+#include "base/macros.h"
 #include "base/observer_list.h"
 #include "base/timer/timer.h"
 #include "ui/gfx/geometry/rect.h"
diff --git a/chrome/browser/ui/panels/docked_panel_browsertest.cc b/chrome/browser/ui/panels/docked_panel_browsertest.cc
index c98c0936..44cd091 100644
--- a/chrome/browser/ui/panels/docked_panel_browsertest.cc
+++ b/chrome/browser/ui/panels/docked_panel_browsertest.cc
@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 
 #include "base/message_loop/message_loop.h"
+#include "build/build_config.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/ui/panels/base_panel_browser_test.h"
 #include "chrome/browser/ui/panels/docked_panel_collection.h"
diff --git a/chrome/browser/ui/panels/docked_panel_collection.h b/chrome/browser/ui/panels/docked_panel_collection.h
index 8398728..19c219b 100644
--- a/chrome/browser/ui/panels/docked_panel_collection.h
+++ b/chrome/browser/ui/panels/docked_panel_collection.h
@@ -7,7 +7,8 @@
 
 #include <list>
 #include <set>
-#include "base/basictypes.h"
+
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "chrome/browser/ui/panels/display_settings_provider.h"
 #include "chrome/browser/ui/panels/panel.h"
diff --git a/chrome/browser/ui/panels/docked_panel_drag_handler.h b/chrome/browser/ui/panels/docked_panel_drag_handler.h
index a90ad9fe..3380e91e 100644
--- a/chrome/browser/ui/panels/docked_panel_drag_handler.h
+++ b/chrome/browser/ui/panels/docked_panel_drag_handler.h
@@ -5,7 +5,7 @@
 #ifndef CHROME_BROWSER_UI_PANELS_DOCKED_PANEL_DRAG_HANDLER_H_
 #define CHROME_BROWSER_UI_PANELS_DOCKED_PANEL_DRAG_HANDLER_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 
 class Panel;
 namespace gfx {
diff --git a/chrome/browser/ui/panels/panel.cc b/chrome/browser/ui/panels/panel.cc
index 699e705..2094659 100644
--- a/chrome/browser/ui/panels/panel.cc
+++ b/chrome/browser/ui/panels/panel.cc
@@ -4,7 +4,10 @@
 
 #include "chrome/browser/ui/panels/panel.h"
 
+#include <stddef.h>
+
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/message_loop/message_loop.h"
 #include "base/strings/utf_string_conversions.h"
 #include "chrome/app/chrome_command_ids.h"
diff --git a/chrome/browser/ui/panels/panel.h b/chrome/browser/ui/panels/panel.h
index 9153e04e..c441902 100644
--- a/chrome/browser/ui/panels/panel.h
+++ b/chrome/browser/ui/panels/panel.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/strings/string16.h"
diff --git a/chrome/browser/ui/panels/panel_bounds_animation.h b/chrome/browser/ui/panels/panel_bounds_animation.h
index a4da9d1..4caf270 100644
--- a/chrome/browser/ui/panels/panel_bounds_animation.h
+++ b/chrome/browser/ui/panels/panel_bounds_animation.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_BOUNDS_ANIMATION_H_
 #define CHROME_BROWSER_UI_PANELS_PANEL_BOUNDS_ANIMATION_H_
 
+#include "base/macros.h"
 #include "ui/gfx/animation/linear_animation.h"
 
 namespace gfx {
diff --git a/chrome/browser/ui/panels/panel_browsertest.cc b/chrome/browser/ui/panels/panel_browsertest.cc
index 639e101..298e33b 100644
--- a/chrome/browser/ui/panels/panel_browsertest.cc
+++ b/chrome/browser/ui/panels/panel_browsertest.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 <stddef.h>
+
 #include "base/bind.h"
 #include "base/prefs/pref_service.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/app/chrome_command_ids.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/devtools/devtools_window.h"
diff --git a/chrome/browser/ui/panels/panel_constants.h b/chrome/browser/ui/panels/panel_constants.h
index 07360851..ce5983bc 100644
--- a/chrome/browser/ui/panels/panel_constants.h
+++ b/chrome/browser/ui/panels/panel_constants.h
@@ -5,6 +5,8 @@
 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_CONSTANTS_H_
 #define CHROME_BROWSER_UI_PANELS_PANEL_CONSTANTS_H_
 
+#include "build/build_config.h"
+
 namespace panel {
 
 // The height in pixels of the titlebar.
diff --git a/chrome/browser/ui/panels/panel_drag_browsertest.cc b/chrome/browser/ui/panels/panel_drag_browsertest.cc
index 7ba8272..20bbf641 100644
--- a/chrome/browser/ui/panels/panel_drag_browsertest.cc
+++ b/chrome/browser/ui/panels/panel_drag_browsertest.cc
@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 
 #include "base/message_loop/message_loop.h"
+#include "build/build_config.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/ui/panels/base_panel_browser_test.h"
 #include "chrome/browser/ui/panels/detached_panel_collection.h"
diff --git a/chrome/browser/ui/panels/panel_drag_controller.h b/chrome/browser/ui/panels/panel_drag_controller.h
index d6960a3d..f8981632 100644
--- a/chrome/browser/ui/panels/panel_drag_controller.h
+++ b/chrome/browser/ui/panels/panel_drag_controller.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_DRAG_CONTROLLER_H_
 #define CHROME_BROWSER_UI_PANELS_PANEL_DRAG_CONTROLLER_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "chrome/browser/ui/panels/panel_collection.h"
 #include "ui/gfx/geometry/vector2d.h"
diff --git a/chrome/browser/ui/panels/panel_extension_browsertest.cc b/chrome/browser/ui/panels/panel_extension_browsertest.cc
index 7e17d3e..7bde25e5 100644
--- a/chrome/browser/ui/panels/panel_extension_browsertest.cc
+++ b/chrome/browser/ui/panels/panel_extension_browsertest.cc
@@ -5,6 +5,7 @@
 #include "base/command_line.h"
 #include "base/path_service.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/app/chrome_command_ids.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/extensions/extension_browsertest.h"
diff --git a/chrome/browser/ui/panels/panel_host.h b/chrome/browser/ui/panels/panel_host.h
index d63307b..9784dcb 100644
--- a/chrome/browser/ui/panels/panel_host.h
+++ b/chrome/browser/ui/panels/panel_host.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_HOST_H_
 #define CHROME_BROWSER_UI_PANELS_PANEL_HOST_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "content/public/browser/web_contents_delegate.h"
diff --git a/chrome/browser/ui/panels/panel_manager.cc b/chrome/browser/ui/panels/panel_manager.cc
index 06edbb9d..459b5de 100644
--- a/chrome/browser/ui/panels/panel_manager.cc
+++ b/chrome/browser/ui/panels/panel_manager.cc
@@ -9,6 +9,7 @@
 #include "base/logging.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
+#include "build/build_config.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/ui/panels/detached_panel_collection.h"
 #include "chrome/browser/ui/panels/docked_panel_collection.h"
diff --git a/chrome/browser/ui/panels/panel_manager.h b/chrome/browser/ui/panels/panel_manager.h
index 43d4b76..ca7c743 100644
--- a/chrome/browser/ui/panels/panel_manager.h
+++ b/chrome/browser/ui/panels/panel_manager.h
@@ -7,8 +7,9 @@
 
 #include <list>
 #include <vector>
-#include "base/basictypes.h"
+
 #include "base/lazy_instance.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "chrome/browser/ui/panels/display_settings_provider.h"
 #include "chrome/browser/ui/panels/panel.h"
diff --git a/chrome/browser/ui/panels/panel_mouse_watcher_timer.cc b/chrome/browser/ui/panels/panel_mouse_watcher_timer.cc
index 6d786fc9f..7480f21 100644
--- a/chrome/browser/ui/panels/panel_mouse_watcher_timer.cc
+++ b/chrome/browser/ui/panels/panel_mouse_watcher_timer.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/time/time.h"
 #include "base/timer/timer.h"
 #include "chrome/browser/ui/panels/panel_mouse_watcher.h"
diff --git a/chrome/browser/ui/panels/panel_resize_browsertest.cc b/chrome/browser/ui/panels/panel_resize_browsertest.cc
index 391ff5c..2744db0 100644
--- a/chrome/browser/ui/panels/panel_resize_browsertest.cc
+++ b/chrome/browser/ui/panels/panel_resize_browsertest.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 "chrome/browser/ui/panels/base_panel_browser_test.h"
 #include "chrome/browser/ui/panels/detached_panel_collection.h"
 #include "chrome/browser/ui/panels/panel.h"
diff --git a/chrome/browser/ui/panels/panel_resize_controller.h b/chrome/browser/ui/panels/panel_resize_controller.h
index d679952..12c3b18 100644
--- a/chrome/browser/ui/panels/panel_resize_controller.h
+++ b/chrome/browser/ui/panels/panel_resize_controller.h
@@ -6,7 +6,8 @@
 #define CHROME_BROWSER_UI_PANELS_PANEL_RESIZE_CONTROLLER_H_
 
 #include <set>
-#include "base/basictypes.h"
+
+#include "base/macros.h"
 #include "chrome/browser/ui/panels/panel_constants.h"
 #include "ui/gfx/geometry/point.h"
 #include "ui/gfx/geometry/rect.h"
diff --git a/chrome/browser/ui/panels/stacked_panel_browsertest.cc b/chrome/browser/ui/panels/stacked_panel_browsertest.cc
index fa60e70..6d601140 100644
--- a/chrome/browser/ui/panels/stacked_panel_browsertest.cc
+++ b/chrome/browser/ui/panels/stacked_panel_browsertest.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 "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/panels/base_panel_browser_test.h"
 #include "chrome/browser/ui/panels/detached_panel_collection.h"
diff --git a/chrome/browser/ui/panels/stacked_panel_collection.h b/chrome/browser/ui/panels/stacked_panel_collection.h
index a6f9df6..adb314f 100644
--- a/chrome/browser/ui/panels/stacked_panel_collection.h
+++ b/chrome/browser/ui/panels/stacked_panel_collection.h
@@ -7,7 +7,8 @@
 
 #include <list>
 #include <vector>
-#include "base/basictypes.h"
+
+#include "base/macros.h"
 #include "chrome/browser/ui/panels/native_panel_stack_window.h"
 #include "chrome/browser/ui/panels/panel_collection.h"
 #include "chrome/browser/ui/panels/panel_constants.h"
diff --git a/chrome/browser/ui/panels/stacked_panel_drag_handler.h b/chrome/browser/ui/panels/stacked_panel_drag_handler.h
index 34cf693..594bf47 100644
--- a/chrome/browser/ui/panels/stacked_panel_drag_handler.h
+++ b/chrome/browser/ui/panels/stacked_panel_drag_handler.h
@@ -5,7 +5,7 @@
 #ifndef CHROME_BROWSER_UI_PANELS_STACKED_PANEL_DRAG_HANDLER_H_
 #define CHROME_BROWSER_UI_PANELS_STACKED_PANEL_DRAG_HANDLER_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 
 class Panel;
 namespace gfx {
diff --git a/chrome/browser/ui/panels/test_panel_active_state_observer.h b/chrome/browser/ui/panels/test_panel_active_state_observer.h
index 4059b42..de73bd7 100644
--- a/chrome/browser/ui/panels/test_panel_active_state_observer.h
+++ b/chrome/browser/ui/panels/test_panel_active_state_observer.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_PANELS_TEST_PANEL_ACTIVE_STATE_OBSERVER_H_
 #define CHROME_BROWSER_UI_PANELS_TEST_PANEL_ACTIVE_STATE_OBSERVER_H_
 
+#include "base/macros.h"
 #include "chrome/browser/ui/panels/test_panel_notification_observer.h"
 
 class Panel;
diff --git a/chrome/browser/ui/panels/test_panel_collection_squeeze_observer.h b/chrome/browser/ui/panels/test_panel_collection_squeeze_observer.h
index bcb1ebae7..af22ee2 100644
--- a/chrome/browser/ui/panels/test_panel_collection_squeeze_observer.h
+++ b/chrome/browser/ui/panels/test_panel_collection_squeeze_observer.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_PANELS_TEST_PANEL_COLLECTION_SQUEEZE_OBSERVER_H_
 #define CHROME_BROWSER_UI_PANELS_TEST_PANEL_COLLECTION_SQUEEZE_OBSERVER_H_
 
+#include "base/macros.h"
 #include "chrome/browser/ui/panels/test_panel_notification_observer.h"
 
 class DockedPanelCollection;
diff --git a/chrome/browser/ui/panels/test_panel_mouse_watcher.h b/chrome/browser/ui/panels/test_panel_mouse_watcher.h
index 868109df..64d40300 100644
--- a/chrome/browser/ui/panels/test_panel_mouse_watcher.h
+++ b/chrome/browser/ui/panels/test_panel_mouse_watcher.h
@@ -5,7 +5,7 @@
 #ifndef CHROME_BROWSER_UI_PANELS_TEST_PANEL_MOUSE_WATCHER_H_
 #define CHROME_BROWSER_UI_PANELS_TEST_PANEL_MOUSE_WATCHER_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/panels/panel_mouse_watcher.h"
 #include "ui/gfx/geometry/point.h"
 
diff --git a/chrome/browser/ui/panels/test_panel_notification_observer.h b/chrome/browser/ui/panels/test_panel_notification_observer.h
index cc07080..3db7f94 100644
--- a/chrome/browser/ui/panels/test_panel_notification_observer.h
+++ b/chrome/browser/ui/panels/test_panel_notification_observer.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_PANELS_TEST_PANEL_NOTIFICATION_OBSERVER_H_
 #define CHROME_BROWSER_UI_PANELS_TEST_PANEL_NOTIFICATION_OBSERVER_H_
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "content/public/browser/notification_observer.h"
 #include "content/public/browser/notification_registrar.h"
diff --git a/chrome/browser/ui/passwords/account_avatar_fetcher.h b/chrome/browser/ui/passwords/account_avatar_fetcher.h
index ea7121d..09b7f40 100644
--- a/chrome/browser/ui/passwords/account_avatar_fetcher.h
+++ b/chrome/browser/ui/passwords/account_avatar_fetcher.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_PASSWORDS_ACCOUNT_AVATAR_FETCHER_H_
 #define CHROME_BROWSER_UI_PASSWORDS_ACCOUNT_AVATAR_FETCHER_H_
 
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "chrome/browser/bitmap_fetcher/bitmap_fetcher.h"
 #include "url/gurl.h"
diff --git a/chrome/browser/ui/passwords/account_chooser_more_combobox_model.h b/chrome/browser/ui/passwords/account_chooser_more_combobox_model.h
index bfc8e608..3c0d168c 100644
--- a/chrome/browser/ui/passwords/account_chooser_more_combobox_model.h
+++ b/chrome/browser/ui/passwords/account_chooser_more_combobox_model.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_PASSWORDS_ACCOUNT_CHOOSER_MORE_COMBOBOX_MODEL_H_
 #define CHROME_BROWSER_UI_PASSWORDS_ACCOUNT_CHOOSER_MORE_COMBOBOX_MODEL_H_
 
+#include "base/macros.h"
 #include "ui/base/models/combobox_model.h"
 
 // Model for the account chooser's "More" combobox.
diff --git a/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc b/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc
index 4b08c7fa..aa8541ae 100644
--- a/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc
+++ b/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 #include <string>
 #include <vector>
diff --git a/chrome/browser/ui/passwords/manage_passwords_bubble_model.h b/chrome/browser/ui/passwords/manage_passwords_bubble_model.h
index ad74c570..e6af1dfe 100644
--- a/chrome/browser/ui/passwords/manage_passwords_bubble_model.h
+++ b/chrome/browser/ui/passwords/manage_passwords_bubble_model.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_
 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_vector.h"
 #include "base/time/clock.h"
 #include "components/autofill/core/common/password_form.h"
diff --git a/chrome/browser/ui/passwords/manage_passwords_icon.h b/chrome/browser/ui/passwords/manage_passwords_icon.h
index 64ec3c89..e1e87417 100644
--- a/chrome/browser/ui/passwords/manage_passwords_icon.h
+++ b/chrome/browser/ui/passwords/manage_passwords_icon.h
@@ -5,7 +5,7 @@
 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_ICON_H_
 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_ICON_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/passwords/manage_passwords_icon_view.h"
 #include "components/password_manager/core/common/password_manager_ui.h"
 
diff --git a/chrome/browser/ui/passwords/manage_passwords_icon_view.h b/chrome/browser/ui/passwords/manage_passwords_icon_view.h
index c0b2df0..36bc484 100644
--- a/chrome/browser/ui/passwords/manage_passwords_icon_view.h
+++ b/chrome/browser/ui/passwords/manage_passwords_icon_view.h
@@ -5,7 +5,7 @@
 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_ICON_VIEW_H_
 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_ICON_VIEW_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "components/password_manager/core/common/password_manager_ui.h"
 
 // An interface for updating the passwords icon in the location bar.
diff --git a/chrome/browser/ui/passwords/manage_passwords_test.h b/chrome/browser/ui/passwords/manage_passwords_test.h
index 49112b1e..60c3cd9 100644
--- a/chrome/browser/ui/passwords/manage_passwords_test.h
+++ b/chrome/browser/ui/passwords/manage_passwords_test.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_TEST_H_
 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_TEST_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
 #include "base/metrics/histogram_samples.h"
diff --git a/chrome/browser/ui/passwords/manage_passwords_ui_controller.h b/chrome/browser/ui/passwords/manage_passwords_ui_controller.h
index 3fd4dc6..c285ca6 100644
--- a/chrome/browser/ui/passwords/manage_passwords_ui_controller.h
+++ b/chrome/browser/ui/passwords/manage_passwords_ui_controller.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_
 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_
 
+#include "base/macros.h"
 #include "chrome/browser/ui/passwords/manage_passwords_state.h"
 #include "chrome/browser/ui/passwords/passwords_client_ui_delegate.h"
 #include "chrome/browser/ui/passwords/passwords_model_delegate.h"
diff --git a/chrome/browser/ui/passwords/manage_passwords_ui_controller_mock.h b/chrome/browser/ui/passwords/manage_passwords_ui_controller_mock.h
index 3838ab2f..9ccb683 100644
--- a/chrome/browser/ui/passwords/manage_passwords_ui_controller_mock.h
+++ b/chrome/browser/ui/passwords/manage_passwords_ui_controller_mock.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_MOCK_H_
 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_MOCK_H_
 
+#include "base/macros.h"
 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h"
 #include "testing/gmock/include/gmock/gmock.h"
 
diff --git a/chrome/browser/ui/passwords/manage_passwords_ui_controller_unittest.cc b/chrome/browser/ui/passwords/manage_passwords_ui_controller_unittest.cc
index 98cd30b5..d908ddb 100644
--- a/chrome/browser/ui/passwords/manage_passwords_ui_controller_unittest.cc
+++ b/chrome/browser/ui/passwords/manage_passwords_ui_controller_unittest.cc
@@ -6,10 +6,12 @@
 #include <vector>
 
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/prefs/pref_service.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h"
 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller_mock.h"
 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
diff --git a/chrome/browser/ui/passwords/manage_passwords_view_utils.cc b/chrome/browser/ui/passwords/manage_passwords_view_utils.cc
index dffc0057..064f37b6 100644
--- a/chrome/browser/ui/passwords/manage_passwords_view_utils.cc
+++ b/chrome/browser/ui/passwords/manage_passwords_view_utils.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/passwords/manage_passwords_view_utils.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 
 #include "base/strings/utf_string_conversions.h"
diff --git a/chrome/browser/ui/passwords/manage_passwords_view_utils_unittest.cc b/chrome/browser/ui/passwords/manage_passwords_view_utils_unittest.cc
index 0b0660c5..15f0828 100644
--- a/chrome/browser/ui/passwords/manage_passwords_view_utils_unittest.cc
+++ b/chrome/browser/ui/passwords/manage_passwords_view_utils_unittest.cc
@@ -4,6 +4,9 @@
 
 #include "chrome/browser/ui/passwords/manage_passwords_view_utils.h"
 
+#include <stddef.h>
+
+#include "base/macros.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
 #include "chrome/grit/generated_resources.h"
diff --git a/chrome/browser/ui/passwords/password_manager_presenter.cc b/chrome/browser/ui/passwords/password_manager_presenter.cc
index 914a7a7..30bcbe61 100644
--- a/chrome/browser/ui/passwords/password_manager_presenter.cc
+++ b/chrome/browser/ui/passwords/password_manager_presenter.cc
@@ -11,6 +11,7 @@
 #include "base/strings/utf_string_conversions.h"
 #include "base/time/time.h"
 #include "base/values.h"
+#include "build/build_config.h"
 #include "chrome/browser/password_manager/password_store_factory.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
diff --git a/chrome/browser/ui/passwords/password_manager_presenter.h b/chrome/browser/ui/passwords/password_manager_presenter.h
index fce6210..7ce26abf 100644
--- a/chrome/browser/ui/passwords/password_manager_presenter.h
+++ b/chrome/browser/ui/passwords/password_manager_presenter.h
@@ -5,9 +5,12 @@
 #ifndef CHROME_BROWSER_UI_PASSWORDS_PASSWORD_MANAGER_PRESENTER_H_
 #define CHROME_BROWSER_UI_PASSWORDS_PASSWORD_MANAGER_PRESENTER_H_
 
+#include <stddef.h>
+
 #include <string>
 #include <vector>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
 #include "base/prefs/pref_member.h"
diff --git a/chrome/browser/ui/passwords/password_manager_presenter_unittest.cc b/chrome/browser/ui/passwords/password_manager_presenter_unittest.cc
index ccb7e01..430de7cc4 100644
--- a/chrome/browser/ui/passwords/password_manager_presenter_unittest.cc
+++ b/chrome/browser/ui/passwords/password_manager_presenter_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 "base/macros.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/browser/password_manager/password_store_factory.h"
 #include "chrome/browser/ui/passwords/password_manager_presenter.h"
 #include "chrome/browser/ui/passwords/password_ui_view.h"
diff --git a/chrome/browser/ui/passwords/password_ui_view.h b/chrome/browser/ui/passwords/password_ui_view.h
index 4299cfa..62e4c2d 100644
--- a/chrome/browser/ui/passwords/password_ui_view.h
+++ b/chrome/browser/ui/passwords/password_ui_view.h
@@ -5,10 +5,13 @@
 #ifndef CHROME_BROWSER_UI_PASSWORDS_PASSWORD_UI_VIEW_H_
 #define CHROME_BROWSER_UI_PASSWORDS_PASSWORD_UI_VIEW_H_
 
+#include <stddef.h>
+
 #include <string>
 #include <vector>
 
 #include "base/memory/scoped_ptr.h"
+#include "build/build_config.h"
 #include "ui/gfx/native_widget_types.h"
 
 namespace autofill {
diff --git a/chrome/browser/ui/pdf/adobe_reader_info_win.cc b/chrome/browser/ui/pdf/adobe_reader_info_win.cc
index 4bdf62f0..7f63daa 100644
--- a/chrome/browser/ui/pdf/adobe_reader_info_win.cc
+++ b/chrome/browser/ui/pdf/adobe_reader_info_win.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/pdf/adobe_reader_info_win.h"
 
 #include <shlwapi.h>
+#include <stddef.h>
 
 #include <algorithm>
 #include <vector>
diff --git a/chrome/browser/ui/pdf/adobe_reader_info_win.h b/chrome/browser/ui/pdf/adobe_reader_info_win.h
index 9666d8bf..2d24113 100644
--- a/chrome/browser/ui/pdf/adobe_reader_info_win.h
+++ b/chrome/browser/ui/pdf/adobe_reader_info_win.h
@@ -5,7 +5,6 @@
 #ifndef CHROME_BROWSER_UI_PDF_ADOBE_READER_INFO_WIN_H_
 #define CHROME_BROWSER_UI_PDF_ADOBE_READER_INFO_WIN_H_
 
-#include "base/basictypes.h"
 #include "base/callback_forward.h"
 #include "content/public/common/webplugininfo.h"
 
diff --git a/chrome/browser/ui/pdf/pdf_unsupported_feature.cc b/chrome/browser/ui/pdf/pdf_unsupported_feature.cc
index dbdd9d3..d217d99c 100644
--- a/chrome/browser/ui/pdf/pdf_unsupported_feature.cc
+++ b/chrome/browser/ui/pdf/pdf_unsupported_feature.cc
@@ -5,8 +5,10 @@
 #include "chrome/browser/ui/pdf/pdf_unsupported_feature.h"
 
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/browser/lifetime/application_lifetime.h"
 #include "chrome/browser/plugins/chrome_plugin_service_filter.h"
 #include "chrome/browser/plugins/plugin_metadata.h"
diff --git a/chrome/browser/ui/pdf/pdf_unsupported_feature.h b/chrome/browser/ui/pdf/pdf_unsupported_feature.h
index 74722d0..399387fc 100644
--- a/chrome/browser/ui/pdf/pdf_unsupported_feature.h
+++ b/chrome/browser/ui/pdf/pdf_unsupported_feature.h
@@ -5,7 +5,6 @@
 #ifndef CHROME_BROWSER_UI_PDF_PDF_UNSUPPORTED_FEATURE_H_
 #define CHROME_BROWSER_UI_PDF_PDF_UNSUPPORTED_FEATURE_H_
 
-#include "base/basictypes.h"
 
 namespace content {
 class WebContents;
diff --git a/chrome/browser/ui/prefs/prefs_tab_helper.cc b/chrome/browser/ui/prefs/prefs_tab_helper.cc
index 293ffb0..ee406db 100644
--- a/chrome/browser/ui/prefs/prefs_tab_helper.cc
+++ b/chrome/browser/ui/prefs/prefs_tab_helper.cc
@@ -4,10 +4,14 @@
 
 #include "chrome/browser/ui/prefs/prefs_tab_helper.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <set>
 #include <string>
 
 #include "base/command_line.h"
+#include "base/macros.h"
 #include "base/memory/singleton.h"
 #include "base/metrics/field_trial.h"
 #include "base/prefs/overlay_user_pref_store.h"
@@ -17,6 +21,7 @@
 #include "base/strings/string_util.h"
 #include "base/strings/stringprintf.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/profiles/incognito_helpers.h"
@@ -250,7 +255,7 @@
   size_t len = strlen(pref_name);
   DCHECK_GT(len, kScriptNameLength);
   const char* scriptName = &pref_name[len - kScriptNameLength];
-  int32 code = u_getPropertyValueEnum(UCHAR_SCRIPT, scriptName);
+  int32_t code = u_getPropertyValueEnum(UCHAR_SCRIPT, scriptName);
   DCHECK(code >= 0 && code < USCRIPT_CODE_LIMIT);
   return static_cast<UScriptCode>(code);
 }
diff --git a/chrome/browser/ui/prefs/prefs_tab_helper.h b/chrome/browser/ui/prefs/prefs_tab_helper.h
index 07e64cd..f814ce1 100644
--- a/chrome/browser/ui/prefs/prefs_tab_helper.h
+++ b/chrome/browser/ui/prefs/prefs_tab_helper.h
@@ -7,6 +7,7 @@
 
 #include "base/callback_list.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h"
 #include "content/public/browser/notification_observer.h"
diff --git a/chrome/browser/ui/prefs/prefs_tab_helper_browsertest.cc b/chrome/browser/ui/prefs/prefs_tab_helper_browsertest.cc
index c17e83b..588962a 100644
--- a/chrome/browser/ui/prefs/prefs_tab_helper_browsertest.cc
+++ b/chrome/browser/ui/prefs/prefs_tab_helper_browsertest.cc
@@ -5,6 +5,7 @@
 #include "base/files/file_util.h"
 #include "base/path_service.h"
 #include "base/prefs/pref_service.h"
+#include "build/build_config.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/common/chrome_constants.h"
diff --git a/chrome/browser/ui/profile_error_browsertest.cc b/chrome/browser/ui/profile_error_browsertest.cc
index ca17c65..4f8a8b0 100644
--- a/chrome/browser/ui/profile_error_browsertest.cc
+++ b/chrome/browser/ui/profile_error_browsertest.cc
@@ -9,6 +9,7 @@
 #include "base/path_service.h"
 #include "base/strings/string_util.h"
 #include "base/test/histogram_tester.h"
+#include "build/build_config.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/simple_message_box_internal.h"
 #include "chrome/browser/ui/tabs/tab_strip_model.h"
diff --git a/chrome/browser/ui/profile_error_dialog.cc b/chrome/browser/ui/profile_error_dialog.cc
index 40423cb..064d98fc 100644
--- a/chrome/browser/ui/profile_error_dialog.cc
+++ b/chrome/browser/ui/profile_error_dialog.cc
@@ -8,6 +8,7 @@
 #include "base/base_switches.h"
 #include "base/command_line.h"
 #include "base/metrics/histogram.h"
+#include "build/build_config.h"
 #include "chrome/browser/ui/simple_message_box.h"
 #include "chrome/grit/chromium_strings.h"
 #include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ui/protocol_dialog_delegate.h b/chrome/browser/ui/protocol_dialog_delegate.h
index 48ff0b2..dacf36fd 100644
--- a/chrome/browser/ui/protocol_dialog_delegate.h
+++ b/chrome/browser/ui/protocol_dialog_delegate.h
@@ -5,7 +5,6 @@
 #ifndef CHROME_BROWSER_UI_PROTOCOL_DIALOG_DELEGATE_H_
 #define CHROME_BROWSER_UI_PROTOCOL_DIALOG_DELEGATE_H_
 
-#include "base/basictypes.h"
 #include "url/gurl.h"
 
 // Interface implemented by objects that wish to show a dialog box Window for
diff --git a/chrome/browser/ui/sad_tab.cc b/chrome/browser/ui/sad_tab.cc
index 5f17784..4689ab9 100644
--- a/chrome/browser/ui/sad_tab.cc
+++ b/chrome/browser/ui/sad_tab.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 "chrome/browser/ui/sad_tab.h"
 
 namespace chrome {
diff --git a/chrome/browser/ui/sad_tab_helper.cc b/chrome/browser/ui/sad_tab_helper.cc
index d3554c57..4044af7 100644
--- a/chrome/browser/ui/sad_tab_helper.cc
+++ b/chrome/browser/ui/sad_tab_helper.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/sad_tab_helper.h"
 
 #include "base/logging.h"
+#include "build/build_config.h"
 #include "chrome/browser/browser_shutdown.h"
 #include "chrome/browser/ui/sad_tab.h"
 #include "content/public/browser/web_contents.h"
diff --git a/chrome/browser/ui/sad_tab_helper.h b/chrome/browser/ui/sad_tab_helper.h
index 6e175b60..298018d6 100644
--- a/chrome/browser/ui/sad_tab_helper.h
+++ b/chrome/browser/ui/sad_tab_helper.h
@@ -5,8 +5,8 @@
 #ifndef CHROME_BROWSER_UI_SAD_TAB_HELPER_H_
 #define CHROME_BROWSER_UI_SAD_TAB_HELPER_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "content/public/browser/web_contents_observer.h"
 #include "content/public/browser/web_contents_user_data.h"
diff --git a/chrome/browser/ui/sad_tab_types.h b/chrome/browser/ui/sad_tab_types.h
index 2e5f1289..4323295 100644
--- a/chrome/browser/ui/sad_tab_types.h
+++ b/chrome/browser/ui/sad_tab_types.h
@@ -5,6 +5,8 @@
 #ifndef CHROME_BROWSER_UI_SAD_TAB_TYPES_H_
 #define CHROME_BROWSER_UI_SAD_TAB_TYPES_H_
 
+#include "build/build_config.h"
+
 namespace chrome {
 
 enum SadTabKind {
diff --git a/chrome/browser/ui/scoped_tabbed_browser_displayer.h b/chrome/browser/ui/scoped_tabbed_browser_displayer.h
index 996b843..7f00e6e3 100644
--- a/chrome/browser/ui/scoped_tabbed_browser_displayer.h
+++ b/chrome/browser/ui/scoped_tabbed_browser_displayer.h
@@ -5,7 +5,7 @@
 #ifndef CHROME_BROWSER_UI_SCOPED_TABBED_BROWSER_DISPLAYER_H_
 #define CHROME_BROWSER_UI_SCOPED_TABBED_BROWSER_DISPLAYER_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/host_desktop.h"
 
 class Browser;
diff --git a/chrome/browser/ui/search/instant_controller.cc b/chrome/browser/ui/search/instant_controller.cc
index 87bbc1d..35ca39e8 100644
--- a/chrome/browser/ui/search/instant_controller.cc
+++ b/chrome/browser/ui/search/instant_controller.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/search/instant_controller.h"
 
+#include <stddef.h>
+
 #include "base/prefs/pref_service.h"
 #include "base/strings/stringprintf.h"
 #include "chrome/browser/chrome_notification_types.h"
diff --git a/chrome/browser/ui/search/instant_controller.h b/chrome/browser/ui/search/instant_controller.h
index f67bbf3..eb04483 100644
--- a/chrome/browser/ui/search/instant_controller.h
+++ b/chrome/browser/ui/search/instant_controller.h
@@ -5,13 +5,15 @@
 #ifndef CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_
 #define CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_
 
+#include <stdint.h>
+
 #include <list>
 #include <string>
 #include <utility>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/gtest_prod_util.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/strings/string16.h"
 #include "chrome/browser/ui/search/instant_page.h"
@@ -73,7 +75,7 @@
   void ClearDebugEvents();
 
   // See comments for |debug_events_| below.
-  const std::list<std::pair<int64, std::string> >& debug_events() {
+  const std::list<std::pair<int64_t, std::string>>& debug_events() {
     return debug_events_;
   }
 
@@ -145,7 +147,7 @@
   SearchMode search_mode_;
 
   // List of events and their timestamps, useful in debugging Instant behaviour.
-  mutable std::list<std::pair<int64, std::string> > debug_events_;
+  mutable std::list<std::pair<int64_t, std::string>> debug_events_;
 
   DISALLOW_COPY_AND_ASSIGN(InstantController);
 };
diff --git a/chrome/browser/ui/search/instant_extended_interactive_uitest.cc b/chrome/browser/ui/search/instant_extended_interactive_uitest.cc
index 0ed5b736..d5241327 100644
--- a/chrome/browser/ui/search/instant_extended_interactive_uitest.cc
+++ b/chrome/browser/ui/search/instant_extended_interactive_uitest.cc
@@ -2,10 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stdint.h>
+
 #include <sstream>
 
 #include "base/base_switches.h"
 #include "base/command_line.h"
+#include "base/macros.h"
 #include "base/metrics/histogram_base.h"
 #include "base/metrics/histogram_samples.h"
 #include "base/metrics/statistics_recorder.h"
@@ -16,6 +19,7 @@
 #include "base/strings/stringprintf.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/time/time.h"
+#include "build/build_config.h"
 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/extensions/extension_browsertest.h"
@@ -153,7 +157,7 @@
     InstantTestBase::Init(instant_url, ntp_url, false);
   }
 
-  int64 GetHistogramCount(const char* name) {
+  int64_t GetHistogramCount(const char* name) {
     base::HistogramBase* histogram =
         base::StatisticsRecorder::FindHistogram(name);
     if (!histogram) {
diff --git a/chrome/browser/ui/search/instant_extended_manual_interactive_uitest.cc b/chrome/browser/ui/search/instant_extended_manual_interactive_uitest.cc
index 87f15085..2c3c943 100644
--- a/chrome/browser/ui/search/instant_extended_manual_interactive_uitest.cc
+++ b/chrome/browser/ui/search/instant_extended_manual_interactive_uitest.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/strings/string_util.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/search/instant_service.h"
diff --git a/chrome/browser/ui/search/instant_page.h b/chrome/browser/ui/search/instant_page.h
index 1ff7bc3..23fef3f5 100644
--- a/chrome/browser/ui/search/instant_page.h
+++ b/chrome/browser/ui/search/instant_page.h
@@ -7,9 +7,9 @@
 
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
 #include "base/gtest_prod_util.h"
+#include "base/macros.h"
 #include "base/strings/string16.h"
 #include "chrome/browser/ui/search/search_model_observer.h"
 #include "content/public/browser/web_contents_observer.h"
diff --git a/chrome/browser/ui/search/instant_page_unittest.cc b/chrome/browser/ui/search/instant_page_unittest.cc
index 0064d021..75c1363 100644
--- a/chrome/browser/ui/search/instant_page_unittest.cc
+++ b/chrome/browser/ui/search/instant_page_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/search/instant_page.h"
 
+#include <stdint.h>
+
 #include "base/command_line.h"
 #include "base/memory/scoped_ptr.h"
 #include "chrome/browser/ui/search/search_tab_helper.h"
@@ -51,7 +53,7 @@
  public:
   void SetUp() override;
 
-  bool MessageWasSent(uint32 id) {
+  bool MessageWasSent(uint32_t id) {
     return process()->sink().GetFirstMessageMatching(id) != NULL;
   }
 
diff --git a/chrome/browser/ui/search/instant_search_prerenderer.h b/chrome/browser/ui/search/instant_search_prerenderer.h
index 4ab8320e..b48d8f4 100644
--- a/chrome/browser/ui/search/instant_search_prerenderer.h
+++ b/chrome/browser/ui/search/instant_search_prerenderer.h
@@ -5,7 +5,7 @@
 #ifndef CHROME_BROWSER_UI_SEARCH_INSTANT_SEARCH_PRERENDERER_H_
 #define CHROME_BROWSER_UI_SEARCH_INSTANT_SEARCH_PRERENDERER_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/strings/string16.h"
 #include "chrome/common/instant_types.h"
diff --git a/chrome/browser/ui/search/instant_search_prerenderer_unittest.cc b/chrome/browser/ui/search/instant_search_prerenderer_unittest.cc
index 0f9aafc..4d857ac 100644
--- a/chrome/browser/ui/search/instant_search_prerenderer_unittest.cc
+++ b/chrome/browser/ui/search/instant_search_prerenderer_unittest.cc
@@ -4,12 +4,15 @@
 
 #include "chrome/browser/ui/search/instant_search_prerenderer.h"
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/metrics/field_trial.h"
 #include "base/strings/string16.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/browser/prerender/prerender_contents.h"
 #include "chrome/browser/prerender/prerender_handle.h"
 #include "chrome/browser/prerender/prerender_manager.h"
@@ -193,7 +196,7 @@
     return GetInstantSearchPrerenderer()->prerender_contents();
   }
 
-  bool MessageWasSent(uint32 id) {
+  bool MessageWasSent(uint32_t id) {
     content::MockRenderProcessHost* process =
         static_cast<content::MockRenderProcessHost*>(
             prerender_contents()->GetRenderViewHost()->GetProcess());
diff --git a/chrome/browser/ui/search/instant_tab.h b/chrome/browser/ui/search/instant_tab.h
index af0c26e1..981b1ea7 100644
--- a/chrome/browser/ui/search/instant_tab.h
+++ b/chrome/browser/ui/search/instant_tab.h
@@ -5,8 +5,8 @@
 #ifndef CHROME_BROWSER_UI_SEARCH_INSTANT_TAB_H_
 #define CHROME_BROWSER_UI_SEARCH_INSTANT_TAB_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/search/instant_page.h"
 
 class Profile;
diff --git a/chrome/browser/ui/search/instant_test_utils.cc b/chrome/browser/ui/search/instant_test_utils.cc
index a6c5d5a3..d0f652c 100644
--- a/chrome/browser/ui/search/instant_test_utils.cc
+++ b/chrome/browser/ui/search/instant_test_utils.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/search/instant_test_utils.h"
 
+#include <stddef.h>
+
 #include "base/command_line.h"
 #include "base/prefs/pref_service.h"
 #include "base/strings/utf_string_conversions.h"
diff --git a/chrome/browser/ui/search/instant_test_utils.h b/chrome/browser/ui/search/instant_test_utils.h
index 83c3327..0f53356 100644
--- a/chrome/browser/ui/search/instant_test_utils.h
+++ b/chrome/browser/ui/search/instant_test_utils.h
@@ -7,8 +7,8 @@
 
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/metrics/field_trial.h"
 #include "base/run_loop.h"
 #include "base/strings/string16.h"
diff --git a/chrome/browser/ui/search/new_tab_page_interceptor_service.cc b/chrome/browser/ui/search/new_tab_page_interceptor_service.cc
index 1c37519..de5964ed 100644
--- a/chrome/browser/ui/search/new_tab_page_interceptor_service.cc
+++ b/chrome/browser/ui/search/new_tab_page_interceptor_service.cc
@@ -6,6 +6,7 @@
 
 #include "base/location.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/metrics/histogram.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/search/search.h"
diff --git a/chrome/browser/ui/search/new_tab_page_interceptor_service_factory.h b/chrome/browser/ui/search/new_tab_page_interceptor_service_factory.h
index 66de3f29..36f7cfe 100644
--- a/chrome/browser/ui/search/new_tab_page_interceptor_service_factory.h
+++ b/chrome/browser/ui/search/new_tab_page_interceptor_service_factory.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_SEARCH_NEW_TAB_PAGE_INTERCEPTOR_SERVICE_FACTORY_H_
 #define CHROME_BROWSER_UI_SEARCH_NEW_TAB_PAGE_INTERCEPTOR_SERVICE_FACTORY_H_
 
+#include "base/macros.h"
 #include "base/memory/singleton.h"
 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
 #include "components/keyed_service/core/keyed_service.h"
diff --git a/chrome/browser/ui/search/search_delegate.h b/chrome/browser/ui/search/search_delegate.h
index 45de926..095bda7b 100644
--- a/chrome/browser/ui/search/search_delegate.h
+++ b/chrome/browser/ui/search/search_delegate.h
@@ -5,8 +5,8 @@
 #ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_DELEGATE_H_
 #define CHROME_BROWSER_UI_SEARCH_SEARCH_DELEGATE_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/search/search_model_observer.h"
 
 namespace content {
diff --git a/chrome/browser/ui/search/search_ipc_router.h b/chrome/browser/ui/search/search_ipc_router.h
index e0f3749..bc7636a9 100644
--- a/chrome/browser/ui/search/search_ipc_router.h
+++ b/chrome/browser/ui/search/search_ipc_router.h
@@ -8,6 +8,7 @@
 #include <vector>
 
 #include "base/gtest_prod_util.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "chrome/common/instant_types.h"
diff --git a/chrome/browser/ui/search/search_ipc_router_policy_impl.h b/chrome/browser/ui/search/search_ipc_router_policy_impl.h
index 7cd10fe..4c260594 100644
--- a/chrome/browser/ui/search/search_ipc_router_policy_impl.h
+++ b/chrome/browser/ui/search/search_ipc_router_policy_impl.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_POLICY_IMPL_H_
 #define CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_POLICY_IMPL_H_
 
+#include "base/macros.h"
 #include "chrome/browser/ui/search/search_ipc_router.h"
 
 namespace content {
diff --git a/chrome/browser/ui/search/search_ipc_router_unittest.cc b/chrome/browser/ui/search/search_ipc_router_unittest.cc
index defeaa23..05f7ffd 100644
--- a/chrome/browser/ui/search/search_ipc_router_unittest.cc
+++ b/chrome/browser/ui/search/search_ipc_router_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/search/search_ipc_router.h"
 
+#include <stdint.h>
+
 #include <vector>
 
 #include "base/command_line.h"
@@ -145,7 +147,7 @@
         make_scoped_ptr(new MockSearchIPCRouterPolicy));
   }
 
-  bool MessageWasSent(uint32 id) {
+  bool MessageWasSent(uint32_t id) {
     return process()->sink().GetFirstMessageMatching(id) != NULL;
   }
 
diff --git a/chrome/browser/ui/search/search_model.h b/chrome/browser/ui/search/search_model.h
index e7e701e..d1a96990 100644
--- a/chrome/browser/ui/search/search_model.h
+++ b/chrome/browser/ui/search/search_model.h
@@ -5,7 +5,7 @@
 #ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_MODEL_H_
 #define CHROME_BROWSER_UI_SEARCH_SEARCH_MODEL_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/observer_list.h"
 #include "chrome/common/search_types.h"
 
diff --git a/chrome/browser/ui/search/search_model_unittest.cc b/chrome/browser/ui/search/search_model_unittest.cc
index 565b1cd4..5d7d1d3a 100644
--- a/chrome/browser/ui/search/search_model_unittest.cc
+++ b/chrome/browser/ui/search/search_model_unittest.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/search/search_model.h"
 
 #include "base/command_line.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/search/search_model_observer.h"
 #include "chrome/browser/ui/search/search_tab_helper.h"
 #include "chrome/common/chrome_switches.h"
diff --git a/chrome/browser/ui/search/search_tab_helper.cc b/chrome/browser/ui/search/search_tab_helper.cc
index e20bcfe..1226775 100644
--- a/chrome/browser/ui/search/search_tab_helper.cc
+++ b/chrome/browser/ui/search/search_tab_helper.cc
@@ -6,10 +6,12 @@
 
 #include <set>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/metrics/histogram.h"
 #include "base/strings/string16.h"
 #include "base/strings/string_util.h"
+#include "build/build_config.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/search/instant_service.h"
diff --git a/chrome/browser/ui/search/search_tab_helper.h b/chrome/browser/ui/search/search_tab_helper.h
index 1471c7b2..a58b2c69 100644
--- a/chrome/browser/ui/search/search_tab_helper.h
+++ b/chrome/browser/ui/search/search_tab_helper.h
@@ -7,9 +7,9 @@
 
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
 #include "base/gtest_prod_util.h"
+#include "base/macros.h"
 #include "base/time/time.h"
 #include "chrome/browser/search/instant_service_observer.h"
 #include "chrome/browser/ui/search/search_ipc_router.h"
diff --git a/chrome/browser/ui/search/search_tab_helper_unittest.cc b/chrome/browser/ui/search/search_tab_helper_unittest.cc
index 83a613e9..a16c3ac 100644
--- a/chrome/browser/ui/search/search_tab_helper_unittest.cc
+++ b/chrome/browser/ui/search/search_tab_helper_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/search/search_tab_helper.h"
 
+#include <stdint.h>
+
 #include <string>
 
 #include "base/command_line.h"
@@ -116,7 +118,7 @@
         .WillRepeatedly(Return(result));
   }
 
-  bool MessageWasSent(uint32 id) {
+  bool MessageWasSent(uint32_t id) {
     return process()->sink().GetFirstMessageMatching(id) != NULL;
   }
 
diff --git a/chrome/browser/ui/search_engines/edit_search_engine_controller.h b/chrome/browser/ui/search_engines/edit_search_engine_controller.h
index 92fc3d5..f5249c5 100644
--- a/chrome/browser/ui/search_engines/edit_search_engine_controller.h
+++ b/chrome/browser/ui/search_engines/edit_search_engine_controller.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "base/strings/string16.h"
 #include "ui/gfx/native_widget_types.h"
 
diff --git a/chrome/browser/ui/search_engines/keyword_editor_controller.h b/chrome/browser/ui/search_engines/keyword_editor_controller.h
index 97038ffc..15f8d14 100644
--- a/chrome/browser/ui/search_engines/keyword_editor_controller.h
+++ b/chrome/browser/ui/search_engines/keyword_editor_controller.h
@@ -7,7 +7,7 @@
 
 #include <string>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/strings/string16.h"
 
diff --git a/chrome/browser/ui/search_engines/search_engine_tab_helper.h b/chrome/browser/ui/search_engines/search_engine_tab_helper.h
index bedd64bc..fea1c3ea 100644
--- a/chrome/browser/ui/search_engines/search_engine_tab_helper.h
+++ b/chrome/browser/ui/search_engines/search_engine_tab_helper.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_SEARCH_ENGINES_SEARCH_ENGINE_TAB_HELPER_H_
 #define CHROME_BROWSER_UI_SEARCH_ENGINES_SEARCH_ENGINE_TAB_HELPER_H_
 
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "chrome/browser/ui/find_bar/find_bar_controller.h"
 #include "chrome/browser/ui/find_bar/find_notification_details.h"
diff --git a/chrome/browser/ui/search_engines/search_engine_tab_helper_browsertest.cc b/chrome/browser/ui/search_engines/search_engine_tab_helper_browsertest.cc
index 4ab32fc..090e766 100644
--- a/chrome/browser/ui/search_engines/search_engine_tab_helper_browsertest.cc
+++ b/chrome/browser/ui/search_engines/search_engine_tab_helper_browsertest.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/strings/stringprintf.h"
 #include "chrome/browser/search_engines/template_url_service_factory.h"
 #include "chrome/browser/ui/browser.h"
diff --git a/chrome/browser/ui/search_engines/template_url_table_model.cc b/chrome/browser/ui/search_engines/template_url_table_model.cc
index 24a73e962..83023af8 100644
--- a/chrome/browser/ui/search_engines/template_url_table_model.cc
+++ b/chrome/browser/ui/search_engines/template_url_table_model.cc
@@ -6,6 +6,7 @@
 
 #include "base/bind.h"
 #include "base/i18n/rtl.h"
+#include "base/macros.h"
 #include "base/task/cancelable_task_tracker.h"
 #include "chrome/grit/generated_resources.h"
 #include "components/favicon/core/favicon_service.h"
diff --git a/chrome/browser/ui/search_engines/template_url_table_model.h b/chrome/browser/ui/search_engines/template_url_table_model.h
index 03a2bde..e6cd932 100644
--- a/chrome/browser/ui/search_engines/template_url_table_model.h
+++ b/chrome/browser/ui/search_engines/template_url_table_model.h
@@ -9,6 +9,7 @@
 #include <vector>
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/strings/string16.h"
 #include "components/search_engines/template_url_service_observer.h"
diff --git a/chrome/browser/ui/settings_window_manager.h b/chrome/browser/ui/settings_window_manager.h
index 6622b48e..fc64c72 100644
--- a/chrome/browser/ui/settings_window_manager.h
+++ b/chrome/browser/ui/settings_window_manager.h
@@ -8,6 +8,7 @@
 #include <map>
 #include <string>
 
+#include "base/macros.h"
 #include "base/memory/singleton.h"
 #include "base/observer_list.h"
 #include "components/sessions/core/session_id.h"
diff --git a/chrome/browser/ui/settings_window_manager_browsertest.cc b/chrome/browser/ui/settings_window_manager_browsertest.cc
index 6c84e35..0aa10809 100644
--- a/chrome/browser/ui/settings_window_manager_browsertest.cc
+++ b/chrome/browser/ui/settings_window_manager_browsertest.cc
@@ -4,9 +4,13 @@
 
 #include "chrome/browser/ui/settings_window_manager.h"
 
+#include <stddef.h>
+
 #include "base/command_line.h"
 #include "base/files/file_util.h"
 #include "base/files/scoped_temp_dir.h"
+#include "base/macros.h"
+#include "build/build_config.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/profiles/profile_manager.h"
 #include "chrome/browser/ui/browser.h"
diff --git a/chrome/browser/ui/startup/bad_flags_prompt.cc b/chrome/browser/ui/startup/bad_flags_prompt.cc
index 5374bf4..d1f4c53 100644
--- a/chrome/browser/ui/startup/bad_flags_prompt.cc
+++ b/chrome/browser/ui/startup/bad_flags_prompt.cc
@@ -7,6 +7,7 @@
 #include "base/command_line.h"
 #include "base/files/file_path.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/browser/infobars/infobar_service.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/simple_message_box.h"
diff --git a/chrome/browser/ui/startup/default_browser_prompt.cc b/chrome/browser/ui/startup/default_browser_prompt.cc
index 9f15d94d..3a17518 100644
--- a/chrome/browser/ui/startup/default_browser_prompt.cc
+++ b/chrome/browser/ui/startup/default_browser_prompt.cc
@@ -7,6 +7,7 @@
 #include <string>
 
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/metrics/user_metrics_action.h"
@@ -15,6 +16,7 @@
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
 #include "base/version.h"
+#include "build/build_config.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/infobars/infobar_service.h"
 #include "chrome/browser/profiles/profile.h"
diff --git a/chrome/browser/ui/startup/default_browser_prompt_win.cc b/chrome/browser/ui/startup/default_browser_prompt_win.cc
index 8ba18a2..8d6965d 100644
--- a/chrome/browser/ui/startup/default_browser_prompt_win.cc
+++ b/chrome/browser/ui/startup/default_browser_prompt_win.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/browser/ui/startup/default_browser_prompt.h"
 
+#include "base/macros.h"
 #include "base/prefs/pref_service.h"
 #include "base/win/windows_version.h"
 #include "chrome/browser/profiles/profile.h"
diff --git a/chrome/browser/ui/startup/google_api_keys_infobar_delegate.h b/chrome/browser/ui/startup/google_api_keys_infobar_delegate.h
index ee348d95..789aba1 100644
--- a/chrome/browser/ui/startup/google_api_keys_infobar_delegate.h
+++ b/chrome/browser/ui/startup/google_api_keys_infobar_delegate.h
@@ -6,6 +6,7 @@
 #define CHROME_BROWSER_UI_STARTUP_GOOGLE_API_KEYS_INFOBAR_DELEGATE_H_
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/strings/string16.h"
 #include "components/infobars/core/confirm_infobar_delegate.h"
 #include "url/gurl.h"
diff --git a/chrome/browser/ui/startup/obsolete_system_infobar_delegate.h b/chrome/browser/ui/startup/obsolete_system_infobar_delegate.h
index b08584b..3b409b8 100644
--- a/chrome/browser/ui/startup/obsolete_system_infobar_delegate.h
+++ b/chrome/browser/ui/startup/obsolete_system_infobar_delegate.h
@@ -6,6 +6,7 @@
 #define CHROME_BROWSER_UI_STARTUP_OBSOLETE_SYSTEM_INFOBAR_DELEGATE_H_
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/strings/string16.h"
 #include "components/infobars/core/confirm_infobar_delegate.h"
 #include "url/gurl.h"
diff --git a/chrome/browser/ui/startup/session_crashed_infobar_delegate.cc b/chrome/browser/ui/startup/session_crashed_infobar_delegate.cc
index dadad03..cf63b383 100644
--- a/chrome/browser/ui/startup/session_crashed_infobar_delegate.cc
+++ b/chrome/browser/ui/startup/session_crashed_infobar_delegate.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/browser/ui/startup/session_crashed_infobar_delegate.h"
 
+#include "build/build_config.h"
 #include "chrome/browser/infobars/infobar_service.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/search/search.h"
diff --git a/chrome/browser/ui/startup/session_crashed_infobar_delegate.h b/chrome/browser/ui/startup/session_crashed_infobar_delegate.h
index 584012f..82f45af 100644
--- a/chrome/browser/ui/startup/session_crashed_infobar_delegate.h
+++ b/chrome/browser/ui/startup/session_crashed_infobar_delegate.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_STARTUP_SESSION_CRASHED_INFOBAR_DELEGATE_H_
 #define CHROME_BROWSER_UI_STARTUP_SESSION_CRASHED_INFOBAR_DELEGATE_H_
 
+#include "base/macros.h"
 #include "components/infobars/core/confirm_infobar_delegate.h"
 
 class Browser;
diff --git a/chrome/browser/ui/startup/startup_browser_creator.cc b/chrome/browser/ui/startup/startup_browser_creator.cc
index 51b9dd33..72487b01 100644
--- a/chrome/browser/ui/startup/startup_browser_creator.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/startup/startup_browser_creator.h"
 
+#include <stddef.h>
+
 #include <algorithm>   // For max().
 #include <set>
 
@@ -18,6 +20,7 @@
 #include "base/files/file_util.h"
 #include "base/lazy_instance.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/metrics/statistics_recorder.h"
@@ -30,6 +33,7 @@
 #include "base/strings/utf_string_conversions.h"
 #include "base/threading/thread_restrictions.h"
 #include "base/trace_event/trace_event.h"
+#include "build/build_config.h"
 #include "chrome/browser/app_mode/app_mode_utils.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/chrome_notification_types.h"
diff --git a/chrome/browser/ui/startup/startup_browser_creator.h b/chrome/browser/ui/startup/startup_browser_creator.h
index 663285a..c879683 100644
--- a/chrome/browser/ui/startup/startup_browser_creator.h
+++ b/chrome/browser/ui/startup/startup_browser_creator.h
@@ -8,9 +8,10 @@
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/files/file_path.h"
 #include "base/gtest_prod_util.h"
+#include "base/macros.h"
+#include "build/build_config.h"
 #include "chrome/browser/prefs/session_startup_pref.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/ui/startup/startup_tab.h"
diff --git a/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc b/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
index afc324f..758f5751 100644
--- a/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
@@ -2,14 +2,18 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
+
 #include <algorithm>
 #include <string>
 
 #include "base/command_line.h"
 #include "base/files/file_path.h"
+#include "base/macros.h"
 #include "base/prefs/pref_service.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/test/histogram_tester.h"
+#include "build/build_config.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/extensions/extension_browsertest.h"
 #include "chrome/browser/extensions/extension_service.h"
diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.cc b/chrome/browser/ui/startup/startup_browser_creator_impl.cc
index f5ab94c..587bdfa 100644
--- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc
@@ -4,6 +4,9 @@
 
 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <algorithm>
 #include <vector>
 
@@ -25,6 +28,7 @@
 #include "base/strings/stringprintf.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/threading/thread_restrictions.h"
+#include "build/build_config.h"
 #include "chrome/browser/apps/install_chrome_app.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/chrome_notification_types.h"
@@ -597,7 +601,7 @@
       return false;
     }
 
-    uint32 restore_behavior = SessionRestore::SYNCHRONOUS;
+    uint32_t restore_behavior = SessionRestore::SYNCHRONOUS;
     if (browser_defaults::kAlwaysCreateTabbedBrowserOnSessionRestore ||
         base::CommandLine::ForCurrentProcess()->HasSwitch(
             switches::kCreateBrowserOnStartupForTests)) {
diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.h b/chrome/browser/ui/startup/startup_browser_creator_impl.h
index 5d9f0e70..997c1b4d 100644
--- a/chrome/browser/ui/startup/startup_browser_creator_impl.h
+++ b/chrome/browser/ui/startup/startup_browser_creator_impl.h
@@ -10,6 +10,7 @@
 
 #include "base/files/file_path.h"
 #include "base/gtest_prod_util.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/host_desktop.h"
 #include "chrome/browser/ui/startup/startup_tab.h"
 #include "chrome/browser/ui/startup/startup_types.h"
diff --git a/chrome/browser/ui/startup/startup_browser_creator_interactive_uitest.cc b/chrome/browser/ui/startup/startup_browser_creator_interactive_uitest.cc
index d5b2821..f7088ae 100644
--- a/chrome/browser/ui/startup/startup_browser_creator_interactive_uitest.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator_interactive_uitest.cc
@@ -7,6 +7,7 @@
 #include "base/command_line.h"
 #include "base/files/file_path.h"
 #include "base/message_loop/message_loop.h"
+#include "build/build_config.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/prefs/session_startup_pref.h"
 #include "chrome/browser/profiles/profile_manager.h"
diff --git a/chrome/browser/ui/startup/startup_browser_creator_triggered_reset_browsertest_win.cc b/chrome/browser/ui/startup/startup_browser_creator_triggered_reset_browsertest_win.cc
index 36a72654..5e96d5d 100644
--- a/chrome/browser/ui/startup/startup_browser_creator_triggered_reset_browsertest_win.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator_triggered_reset_browsertest_win.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/callback_list.h"
 #include "base/command_line.h"
 #include "base/macros.h"
diff --git a/chrome/browser/ui/sync/browser_synced_window_delegate.h b/chrome/browser/ui/sync/browser_synced_window_delegate.h
index 69a7b09..d731923f 100644
--- a/chrome/browser/ui/sync/browser_synced_window_delegate.h
+++ b/chrome/browser/ui/sync/browser_synced_window_delegate.h
@@ -6,6 +6,7 @@
 #define CHROME_BROWSER_UI_SYNC_BROWSER_SYNCED_WINDOW_DELEGATE_H_
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "components/sessions/core/session_id.h"
 #include "components/sync_sessions/synced_window_delegate.h"
 
diff --git a/chrome/browser/ui/sync/one_click_signin_bubble_links_delegate.h b/chrome/browser/ui/sync/one_click_signin_bubble_links_delegate.h
index e64e196..f0a7146 100644
--- a/chrome/browser/ui/sync/one_click_signin_bubble_links_delegate.h
+++ b/chrome/browser/ui/sync/one_click_signin_bubble_links_delegate.h
@@ -5,8 +5,8 @@
 #ifndef CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_BUBBLE_LINKS_DELEGATE_H_
 #define CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_BUBBLE_LINKS_DELEGATE_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/sync/one_click_signin_bubble_delegate.h"
 
 class Browser;
diff --git a/chrome/browser/ui/sync/one_click_signin_sync_observer.h b/chrome/browser/ui/sync/one_click_signin_sync_observer.h
index 08ed09f..6bf3c02 100644
--- a/chrome/browser/ui/sync/one_click_signin_sync_observer.h
+++ b/chrome/browser/ui/sync/one_click_signin_sync_observer.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_OBSERVER_H_
 #define CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_OBSERVER_H_
 
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "components/sync_driver/sync_service_observer.h"
 #include "content/public/browser/web_contents_observer.h"
diff --git a/chrome/browser/ui/sync/one_click_signin_sync_observer_unittest.cc b/chrome/browser/ui/sync/one_click_signin_sync_observer_unittest.cc
index ced33b0..b5edd31 100644
--- a/chrome/browser/ui/sync/one_click_signin_sync_observer_unittest.cc
+++ b/chrome/browser/ui/sync/one_click_signin_sync_observer_unittest.cc
@@ -6,6 +6,7 @@
 
 #include "base/bind.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
diff --git a/chrome/browser/ui/sync/one_click_signin_sync_starter.cc b/chrome/browser/ui/sync/one_click_signin_sync_starter.cc
index 648172be..9524961 100644
--- a/chrome/browser/ui/sync/one_click_signin_sync_starter.cc
+++ b/chrome/browser/ui/sync/one_click_signin_sync_starter.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/sync/one_click_signin_sync_starter.h"
 
+#include <stddef.h>
+
 #include "base/metrics/histogram.h"
 #include "base/prefs/pref_service.h"
 #include "base/strings/utf_string_conversions.h"
diff --git a/chrome/browser/ui/sync/one_click_signin_sync_starter.h b/chrome/browser/ui/sync/one_click_signin_sync_starter.h
index 5309daa..e562242 100644
--- a/chrome/browser/ui/sync/one_click_signin_sync_starter.h
+++ b/chrome/browser/ui/sync/one_click_signin_sync_starter.h
@@ -9,6 +9,7 @@
 
 #include "base/callback_forward.h"
 #include "base/gtest_prod_util.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "chrome/browser/profiles/profile.h"
diff --git a/chrome/browser/ui/sync/one_click_signin_sync_starter_unittest.cc b/chrome/browser/ui/sync/one_click_signin_sync_starter_unittest.cc
index 9cbb628..cb29403 100644
--- a/chrome/browser/ui/sync/one_click_signin_sync_starter_unittest.cc
+++ b/chrome/browser/ui/sync/one_click_signin_sync_starter_unittest.cc
@@ -4,9 +4,9 @@
 
 #include "chrome/browser/ui/sync/one_click_signin_sync_starter.h"
 
-#include "base/basictypes.h"
 #include "base/command_line.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "chrome/browser/signin/account_tracker_service_factory.h"
 #include "chrome/browser/signin/chrome_signin_client_factory.h"
diff --git a/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc b/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc
index f27aa0ed..5b728a8 100644
--- a/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc
+++ b/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc
@@ -6,6 +6,7 @@
 
 #include "base/bind.h"
 #include "base/memory/ref_counted.h"
+#include "build/build_config.h"
 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
 #include "chrome/browser/history/history_service_factory.h"
 #include "chrome/browser/profiles/profile.h"
diff --git a/chrome/browser/ui/sync/profile_signin_confirmation_helper_browsertest.cc b/chrome/browser/ui/sync/profile_signin_confirmation_helper_browsertest.cc
index 69e9dabd..e517f94 100644
--- a/chrome/browser/ui/sync/profile_signin_confirmation_helper_browsertest.cc
+++ b/chrome/browser/ui/sync/profile_signin_confirmation_helper_browsertest.cc
@@ -6,7 +6,9 @@
 
 #include "base/bind.h"
 #include "base/command_line.h"
+#include "base/macros.h"
 #include "base/run_loop.h"
+#include "build/build_config.h"
 #include "chrome/browser/first_run/first_run.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/common/chrome_switches.h"
diff --git a/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc b/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc
index 3c9bea0..71dfb19 100644
--- a/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc
+++ b/chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc
@@ -4,12 +4,12 @@
 
 #include "chrome/browser/ui/sync/profile_signin_confirmation_helper.h"
 
-#include "base/basictypes.h"
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/callback.h"
 #include "base/command_line.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/prefs/pref_notifier_impl.h"
@@ -19,6 +19,7 @@
 #include "base/strings/string16.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
 #include "chrome/browser/history/history_service_factory.h"
 #include "chrome/browser/prefs/browser_prefs.h"
diff --git a/chrome/browser/ui/sync/sync_promo_ui_unittest.cc b/chrome/browser/ui/sync/sync_promo_ui_unittest.cc
index 868f2c4..35e889d 100644
--- a/chrome/browser/ui/sync/sync_promo_ui_unittest.cc
+++ b/chrome/browser/ui/sync/sync_promo_ui_unittest.cc
@@ -4,10 +4,11 @@
 
 #include "chrome/browser/ui/sync/sync_promo_ui.h"
 
-#include "base/basictypes.h"
 #include "base/command_line.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
+#include "build/build_config.h"
 #include "chrome/browser/signin/fake_signin_manager_builder.h"
 #include "chrome/browser/signin/signin_manager_factory.h"
 #include "chrome/common/chrome_switches.h"
diff --git a/chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h b/chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h
index 3f23b2cb..0fff9e7 100644
--- a/chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h
+++ b/chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h
@@ -6,6 +6,7 @@
 #define CHROME_BROWSER_UI_SYNC_TAB_CONTENTS_SYNCED_TAB_DELEGATE_H_
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "components/sessions/core/session_id.h"
 #include "components/sync_sessions/synced_tab_delegate.h"
 #include "content/public/browser/web_contents_user_data.h"
diff --git a/chrome/browser/ui/tab_contents/core_tab_helper.cc b/chrome/browser/ui/tab_contents/core_tab_helper.cc
index 845a5f7..67febf5 100644
--- a/chrome/browser/ui/tab_contents/core_tab_helper.cc
+++ b/chrome/browser/ui/tab_contents/core_tab_helper.cc
@@ -12,6 +12,7 @@
 #include "base/metrics/histogram.h"
 #include "base/profiler/scoped_tracker.h"
 #include "base/strings/stringprintf.h"
+#include "build/build_config.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/search_engines/template_url_service_factory.h"
 #include "chrome/browser/ui/browser.h"
diff --git a/chrome/browser/ui/tab_contents/core_tab_helper.h b/chrome/browser/ui/tab_contents/core_tab_helper.h
index 15d2bf9..fab2b6f 100644
--- a/chrome/browser/ui/tab_contents/core_tab_helper.h
+++ b/chrome/browser/ui/tab_contents/core_tab_helper.h
@@ -9,6 +9,7 @@
 
 #include "base/callback.h"
 #include "base/id_map.h"
+#include "base/macros.h"
 #include "base/time/time.h"
 #include "content/public/browser/web_contents_observer.h"
 #include "content/public/browser/web_contents_user_data.h"
diff --git a/chrome/browser/ui/tab_contents/core_tab_helper_delegate.h b/chrome/browser/ui/tab_contents/core_tab_helper_delegate.h
index 3f9907d5c..76f5f625 100644
--- a/chrome/browser/ui/tab_contents/core_tab_helper_delegate.h
+++ b/chrome/browser/ui/tab_contents/core_tab_helper_delegate.h
@@ -5,7 +5,6 @@
 #ifndef CHROME_BROWSER_UI_TAB_CONTENTS_CORE_TAB_HELPER_DELEGATE_H_
 #define CHROME_BROWSER_UI_TAB_CONTENTS_CORE_TAB_HELPER_DELEGATE_H_
 
-#include "base/basictypes.h"
 
 namespace content {
 class WebContents;
diff --git a/chrome/browser/ui/tab_contents/tab_contents_iterator.h b/chrome/browser/ui/tab_contents/tab_contents_iterator.h
index 818658f6..13bfba05 100644
--- a/chrome/browser/ui/tab_contents/tab_contents_iterator.h
+++ b/chrome/browser/ui/tab_contents/tab_contents_iterator.h
@@ -7,7 +7,7 @@
 
 #include <set>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/browser_iterator.h"
 
 namespace content {
diff --git a/chrome/browser/ui/tab_contents/tab_contents_iterator_unittest.cc b/chrome/browser/ui/tab_contents/tab_contents_iterator_unittest.cc
index 9d36fdd..e6a39b5 100644
--- a/chrome/browser/ui/tab_contents/tab_contents_iterator_unittest.cc
+++ b/chrome/browser/ui/tab_contents/tab_contents_iterator_unittest.cc
@@ -4,8 +4,11 @@
 
 #include "chrome/browser/ui/tab_contents/tab_contents_iterator.h"
 
+#include <stddef.h>
+
 #include "base/prefs/pref_registry_simple.h"
 #include "base/prefs/testing_pref_service.h"
+#include "build/build_config.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/browser_shutdown.h"
 #include "chrome/browser/lifetime/application_lifetime.h"
diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc
index 84a6e9f1..b326820 100644
--- a/chrome/browser/ui/tab_helpers.cc
+++ b/chrome/browser/ui/tab_helpers.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/tab_helpers.h"
 
 #include "base/command_line.h"
+#include "build/build_config.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/content_settings/chrome_content_settings_client.h"
 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
diff --git a/chrome/browser/ui/tab_modal_confirm_dialog_browsertest.h b/chrome/browser/ui/tab_modal_confirm_dialog_browsertest.h
index d024bfa..3c111623 100644
--- a/chrome/browser/ui/tab_modal_confirm_dialog_browsertest.h
+++ b/chrome/browser/ui/tab_modal_confirm_dialog_browsertest.h
@@ -5,8 +5,8 @@
 #ifndef CHROME_BROWSER_UI_TAB_MODAL_CONFIRM_DIALOG_BROWSERTEST_H_
 #define CHROME_BROWSER_UI_TAB_MODAL_CONFIRM_DIALOG_BROWSERTEST_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/tab_modal_confirm_dialog.h"
 #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h"
 #include "chrome/test/base/in_process_browser_test.h"
diff --git a/chrome/browser/ui/tab_modal_confirm_dialog_delegate.h b/chrome/browser/ui/tab_modal_confirm_dialog_delegate.h
index f8f7125..6e924e2 100644
--- a/chrome/browser/ui/tab_modal_confirm_dialog_delegate.h
+++ b/chrome/browser/ui/tab_modal_confirm_dialog_delegate.h
@@ -7,6 +7,7 @@
 
 #include "base/callback.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/strings/string16.h"
 #include "content/public/browser/notification_observer.h"
 #include "content/public/browser/notification_registrar.h"
diff --git a/chrome/browser/ui/tabs/hover_tab_selector.h b/chrome/browser/ui/tabs/hover_tab_selector.h
index 283859a..550ba94 100644
--- a/chrome/browser/ui/tabs/hover_tab_selector.h
+++ b/chrome/browser/ui/tabs/hover_tab_selector.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_TABS_HOVER_TAB_SELECTOR_H_
 #define CHROME_BROWSER_UI_TABS_HOVER_TAB_SELECTOR_H_
 
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 
 class TabStripModel;
diff --git a/chrome/browser/ui/tabs/pinned_tab_codec.cc b/chrome/browser/ui/tabs/pinned_tab_codec.cc
index 805b4cc..68d0362 100644
--- a/chrome/browser/ui/tabs/pinned_tab_codec.cc
+++ b/chrome/browser/ui/tabs/pinned_tab_codec.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/tabs/pinned_tab_codec.h"
 
+#include <stddef.h>
+
 #include "base/prefs/pref_service.h"
 #include "base/prefs/scoped_user_pref_update.h"
 #include "base/values.h"
diff --git a/chrome/browser/ui/tabs/pinned_tab_codec.h b/chrome/browser/ui/tabs/pinned_tab_codec.h
index 690aa90..d9b20b5 100644
--- a/chrome/browser/ui/tabs/pinned_tab_codec.h
+++ b/chrome/browser/ui/tabs/pinned_tab_codec.h
@@ -7,6 +7,7 @@
 
 #include <vector>
 
+#include "base/macros.h"
 #include "chrome/browser/ui/startup/startup_tab.h"
 #include "url/gurl.h"
 
diff --git a/chrome/browser/ui/tabs/pinned_tab_service.h b/chrome/browser/ui/tabs/pinned_tab_service.h
index 776092e9..f1dc573 100644
--- a/chrome/browser/ui/tabs/pinned_tab_service.h
+++ b/chrome/browser/ui/tabs/pinned_tab_service.h
@@ -6,6 +6,7 @@
 #define CHROME_BROWSER_UI_TABS_PINNED_TAB_SERVICE_H_
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "components/keyed_service/core/keyed_service.h"
 #include "content/public/browser/notification_observer.h"
 #include "content/public/browser/notification_registrar.h"
diff --git a/chrome/browser/ui/tabs/pinned_tab_service_unittest.cc b/chrome/browser/ui/tabs/pinned_tab_service_unittest.cc
index f5bdf11..6d1ed33 100644
--- a/chrome/browser/ui/tabs/pinned_tab_service_unittest.cc
+++ b/chrome/browser/ui/tabs/pinned_tab_service_unittest.cc
@@ -5,6 +5,7 @@
 #include <string>
 #include <vector>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_tabstrip.h"
diff --git a/chrome/browser/ui/tabs/pinned_tab_test_utils.cc b/chrome/browser/ui/tabs/pinned_tab_test_utils.cc
index 7d407f5..3e5727c6 100644
--- a/chrome/browser/ui/tabs/pinned_tab_test_utils.cc
+++ b/chrome/browser/ui/tabs/pinned_tab_test_utils.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 "chrome/browser/ui/tabs/pinned_tab_test_utils.h"
 
 namespace {
diff --git a/chrome/browser/ui/tabs/pinned_tab_test_utils.h b/chrome/browser/ui/tabs/pinned_tab_test_utils.h
index 640e03ce..1274fc3 100644
--- a/chrome/browser/ui/tabs/pinned_tab_test_utils.h
+++ b/chrome/browser/ui/tabs/pinned_tab_test_utils.h
@@ -8,7 +8,7 @@
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/startup/startup_tab.h"
 
 class PinnedTabTestUtils {
diff --git a/chrome/browser/ui/tabs/tab_menu_model.h b/chrome/browser/ui/tabs/tab_menu_model.h
index 1853572d..48b9ec9 100644
--- a/chrome/browser/ui/tabs/tab_menu_model.h
+++ b/chrome/browser/ui/tabs/tab_menu_model.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_TABS_TAB_MENU_MODEL_H_
 #define CHROME_BROWSER_UI_TABS_TAB_MENU_MODEL_H_
 
+#include "base/macros.h"
 #include "ui/base/models/simple_menu_model.h"
 
 class TabStripModel;
diff --git a/chrome/browser/ui/tabs/tab_strip_model.cc b/chrome/browser/ui/tabs/tab_strip_model.cc
index 5f3d5b1..1b9ff3b3 100644
--- a/chrome/browser/ui/tabs/tab_strip_model.cc
+++ b/chrome/browser/ui/tabs/tab_strip_model.cc
@@ -9,6 +9,7 @@
 #include <set>
 #include <string>
 
+#include "base/macros.h"
 #include "base/metrics/histogram.h"
 #include "base/stl_util.h"
 #include "chrome/app/chrome_command_ids.h"
@@ -511,7 +512,7 @@
   InternalCloseTabs(closing_tabs, CLOSE_CREATE_HISTORICAL_TAB);
 }
 
-bool TabStripModel::CloseWebContentsAt(int index, uint32 close_types) {
+bool TabStripModel::CloseWebContentsAt(int index, uint32_t close_types) {
   DCHECK(ContainsIndex(index));
   std::vector<int> closing_tabs;
   closing_tabs.push_back(index);
@@ -1140,7 +1141,7 @@
 }
 
 bool TabStripModel::InternalCloseTabs(const std::vector<int>& indices,
-                                      uint32 close_types) {
+                                      uint32_t close_types) {
   if (indices.empty())
     return true;
 
diff --git a/chrome/browser/ui/tabs/tab_strip_model.h b/chrome/browser/ui/tabs/tab_strip_model.h
index e200afd..3a285bd 100644
--- a/chrome/browser/ui/tabs/tab_strip_model.h
+++ b/chrome/browser/ui/tabs/tab_strip_model.h
@@ -5,8 +5,12 @@
 #ifndef CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_
 #define CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <vector>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/observer_list.h"
 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
@@ -174,7 +178,7 @@
   // WebContents was closed immediately, false if it was not closed (we
   // may be waiting for a response from an onunload handler, or waiting for the
   // user to confirm closure).
-  bool CloseWebContentsAt(int index, uint32 close_types);
+  bool CloseWebContentsAt(int index, uint32_t close_types);
 
   // Replaces the WebContents at |index| with |new_contents|. The
   // WebContents that was at |index| is returned and its ownership returns
@@ -458,8 +462,7 @@
   //
   // Returns true if the WebContentses were closed immediately, false if we
   // are waiting for the result of an onunload handler.
-  bool InternalCloseTabs(const std::vector<int>& indices,
-                         uint32 close_types);
+  bool InternalCloseTabs(const std::vector<int>& indices, uint32_t close_types);
 
   // Invoked from InternalCloseTabs and when an extension is removed for an app
   // tab. Notifies observers of TabClosingAt and deletes |contents|. If
diff --git a/chrome/browser/ui/tabs/tab_strip_model_order_controller.h b/chrome/browser/ui/tabs/tab_strip_model_order_controller.h
index 5bb15b6..211a109 100644
--- a/chrome/browser/ui/tabs/tab_strip_model_order_controller.h
+++ b/chrome/browser/ui/tabs/tab_strip_model_order_controller.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_ORDER_CONTROLLER_H_
 #define CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_ORDER_CONTROLLER_H_
 
+#include "base/macros.h"
 #include "chrome/browser/ui/tabs/tab_strip_model.h"
 #include "ui/base/page_transition_types.h"
 
diff --git a/chrome/browser/ui/tabs/tab_strip_model_stats_recorder_unittest.cc b/chrome/browser/ui/tabs/tab_strip_model_stats_recorder_unittest.cc
index 6f71da3..082b5668 100644
--- a/chrome/browser/ui/tabs/tab_strip_model_stats_recorder_unittest.cc
+++ b/chrome/browser/ui/tabs/tab_strip_model_stats_recorder_unittest.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/browser/ui/tabs/tab_strip_model_stats_recorder.h"
 
+#include "base/macros.h"
 #include "base/test/histogram_tester.h"
 #include "chrome/browser/ui/tabs/tab_strip_model.h"
 #include "chrome/browser/ui/tabs/test_tab_strip_model_delegate.h"
diff --git a/chrome/browser/ui/tabs/tab_strip_model_unittest.cc b/chrome/browser/ui/tabs/tab_strip_model_unittest.cc
index 939457c..f77f608c 100644
--- a/chrome/browser/ui/tabs/tab_strip_model_unittest.cc
+++ b/chrome/browser/ui/tabs/tab_strip_model_unittest.cc
@@ -4,16 +4,20 @@
 
 #include "chrome/browser/ui/tabs/tab_strip_model.h"
 
+#include <stddef.h>
+
 #include <map>
 #include <string>
 
 #include "base/files/file_path.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/stl_util.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_split.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/browser/defaults.h"
 #include "chrome/browser/extensions/tab_helper.h"
 #include "chrome/browser/profiles/profile.h"
diff --git a/chrome/browser/ui/tabs/tab_utils.cc b/chrome/browser/ui/tabs/tab_utils.cc
index cd088c4..b93a0d4 100644
--- a/chrome/browser/ui/tabs/tab_utils.cc
+++ b/chrome/browser/ui/tabs/tab_utils.cc
@@ -6,6 +6,7 @@
 
 #include "base/command_line.h"
 #include "base/strings/string16.h"
+#include "build/build_config.h"
 #include "chrome/browser/media/media_capture_devices_dispatcher.h"
 #include "chrome/browser/media/media_stream_capture_indicator.h"
 #include "chrome/browser/themes/theme_properties.h"
diff --git a/chrome/browser/ui/tabs/test_tab_strip_model_delegate.h b/chrome/browser/ui/tabs/test_tab_strip_model_delegate.h
index 8340ac4..2ca1e07f 100644
--- a/chrome/browser/ui/tabs/test_tab_strip_model_delegate.h
+++ b/chrome/browser/ui/tabs/test_tab_strip_model_delegate.h
@@ -5,8 +5,8 @@
 #ifndef CHROME_BROWSER_UI_TABS_TEST_TAB_STRIP_MODEL_DELEGATE_H_
 #define CHROME_BROWSER_UI_TABS_TEST_TAB_STRIP_MODEL_DELEGATE_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/tabs/tab_strip_model_delegate.h"
 
 // Mock TabStripModelDelegate.
diff --git a/chrome/browser/ui/task_manager/task_manager_columns.cc b/chrome/browser/ui/task_manager/task_manager_columns.cc
index 35b4b6d..866fbfe 100644
--- a/chrome/browser/ui/task_manager/task_manager_columns.cc
+++ b/chrome/browser/ui/task_manager/task_manager_columns.cc
@@ -5,6 +5,8 @@
 #include "chrome/browser/ui/task_manager/task_manager_columns.h"
 
 #include "base/logging.h"
+#include "base/macros.h"
+#include "build/build_config.h"
 #include "chrome/grit/generated_resources.h"
 
 namespace task_management {
diff --git a/chrome/browser/ui/task_manager/task_manager_columns.h b/chrome/browser/ui/task_manager/task_manager_columns.h
index db2495f7..c17de85 100644
--- a/chrome/browser/ui/task_manager/task_manager_columns.h
+++ b/chrome/browser/ui/task_manager/task_manager_columns.h
@@ -5,6 +5,8 @@
 #ifndef CHROME_BROWSER_UI_TASK_MANAGER_TASK_MANAGER_COLUMNS_H_
 #define CHROME_BROWSER_UI_TASK_MANAGER_TASK_MANAGER_COLUMNS_H_
 
+#include <stddef.h>
+
 #include "ui/base/models/table_model.h"
 
 namespace task_management {
diff --git a/chrome/browser/ui/task_manager/task_manager_table_model.cc b/chrome/browser/ui/task_manager/task_manager_table_model.cc
index c030f71..739a646 100644
--- a/chrome/browser/ui/task_manager/task_manager_table_model.cc
+++ b/chrome/browser/ui/task_manager/task_manager_table_model.cc
@@ -4,14 +4,18 @@
 
 #include "chrome/browser/ui/task_manager/task_manager_table_model.h"
 
+#include <stddef.h>
+
 #include "base/command_line.h"
 #include "base/i18n/number_formatting.h"
 #include "base/i18n/rtl.h"
+#include "base/macros.h"
 #include "base/prefs/scoped_user_pref_update.h"
 #include "base/process/process_handle.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/stringprintf.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/task_management/task_manager_interface.h"
 #include "chrome/browser/ui/task_manager/task_manager_columns.h"
@@ -31,13 +35,13 @@
 
 #if defined(OS_MACOSX)
 // Match Activity Monitor's default refresh rate.
-const int64 kRefreshTimeMS = 2000;
+const int64_t kRefreshTimeMS = 2000;
 
 // Activity Monitor shows %cpu with one decimal digit -- be consistent with
 // that.
 const char kCpuTextFormatString[] = "%.1f";
 #else
-const int64 kRefreshTimeMS = 1000;
+const int64_t kRefreshTimeMS = 1000;
 const char kCpuTextFormatString[] = "%.0f";
 #endif  // defined(OS_MACOSX)
 
@@ -118,7 +122,7 @@
                                                 cpu_usage));
   }
 
-  base::string16 GetMemoryUsageText(int64 memory_usage, bool has_duplicates) {
+  base::string16 GetMemoryUsageText(int64_t memory_usage, bool has_duplicates) {
     if (memory_usage == -1)
       return n_a_string_;
 
@@ -158,13 +162,13 @@
     return base::IntToString16(nacl_port);
   }
 
-  base::string16 GetWindowsHandlesText(int64 current, int64 peak) {
+  base::string16 GetWindowsHandlesText(int64_t current, int64_t peak) {
     return l10n_util::GetStringFUTF16(IDS_TASK_MANAGER_HANDLES_CELL_TEXT,
                                       base::Int64ToString16(current),
                                       base::Int64ToString16(peak));
   }
 
-  base::string16 GetNetworkUsageText(int64 network_usage) {
+  base::string16 GetNetworkUsageText(int64_t network_usage) {
     if (network_usage == -1)
       return n_a_string_;
 
@@ -180,7 +184,7 @@
     return base::IntToString16(proc_id);
   }
 
-  base::string16 FormatAllocatedAndUsedMemory(int64 allocated, int64 used) {
+  base::string16 FormatAllocatedAndUsedMemory(int64_t allocated, int64_t used) {
     return l10n_util::GetStringFUTF16(
         IDS_TASK_MANAGER_CACHE_SIZE_CELL_TEXT,
         ui::FormatBytesWithUnits(allocated, ui::DATA_UNITS_KIBIBYTE, false),
@@ -311,13 +315,13 @@
           observed_task_manager()->GetProcessId(tasks_[row]));
 
     case IDS_TASK_MANAGER_GDI_HANDLES_COLUMN: {
-      int64 current, peak;
+      int64_t current, peak;
       observed_task_manager()->GetGDIHandles(tasks_[row], &current, &peak);
       return stringifier_->GetWindowsHandlesText(current, peak);
     }
 
     case IDS_TASK_MANAGER_USER_HANDLES_COLUMN: {
-      int64 current, peak;
+      int64_t current, peak;
       observed_task_manager()->GetUSERHandles(tasks_[row], &current, &peak);
       return stringifier_->GetWindowsHandlesText(current, peak);
     }
@@ -360,7 +364,7 @@
           observed_task_manager()->GetSqliteMemoryUsed(tasks_[row]), false);
 
     case IDS_TASK_MANAGER_JAVASCRIPT_MEMORY_ALLOCATED_COLUMN: {
-      int64 v8_allocated, v8_used;
+      int64_t v8_allocated, v8_used;
       if (observed_task_manager()->GetV8Memory(tasks_[row],
                                                &v8_allocated,
                                                &v8_used)) {
@@ -447,14 +451,14 @@
                           observed_task_manager()->GetProcessId(tasks_[row2]));
 
     case IDS_TASK_MANAGER_GDI_HANDLES_COLUMN: {
-      int64 current1, peak1, current2, peak2;
+      int64_t current1, peak1, current2, peak2;
       observed_task_manager()->GetGDIHandles(tasks_[row1], &current1, &peak1);
       observed_task_manager()->GetGDIHandles(tasks_[row2], &current2, &peak2);
       return ValueCompare(current1, current2);
     }
 
     case IDS_TASK_MANAGER_USER_HANDLES_COLUMN: {
-      int64 current1, peak1, current2, peak2;
+      int64_t current1, peak1, current2, peak2;
       observed_task_manager()->GetUSERHandles(tasks_[row1], &current1, &peak1);
       observed_task_manager()->GetUSERHandles(tasks_[row2], &current2, &peak2);
       return ValueCompare(current1, current2);
@@ -501,7 +505,7 @@
     }
 
     case IDS_TASK_MANAGER_JAVASCRIPT_MEMORY_ALLOCATED_COLUMN: {
-      int64 allocated1, allocated2, used1, used2;
+      int64_t allocated1, allocated2, used1, used2;
       observed_task_manager()->GetV8Memory(tasks_[row1], &allocated1, &used1);
       observed_task_manager()->GetV8Memory(tasks_[row2], &allocated2, &used2);
       return ValueCompare(allocated1, allocated2);
diff --git a/chrome/browser/ui/test/test_confirm_bubble_model.h b/chrome/browser/ui/test/test_confirm_bubble_model.h
index 0983440..208cbfd79 100644
--- a/chrome/browser/ui/test/test_confirm_bubble_model.h
+++ b/chrome/browser/ui/test/test_confirm_bubble_model.h
@@ -6,6 +6,7 @@
 #define CHROME_BROWSER_UI_TEST_TEST_CONFIRM_BUBBLE_MODEL_H_
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/confirm_bubble_model.h"
 
 // A test version of the model for confirmation bubbles.
diff --git a/chrome/browser/ui/toolbar/app_menu_badge_controller.cc b/chrome/browser/ui/toolbar/app_menu_badge_controller.cc
index a96a874..9acced1 100644
--- a/chrome/browser/ui/toolbar/app_menu_badge_controller.cc
+++ b/chrome/browser/ui/toolbar/app_menu_badge_controller.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/toolbar/app_menu_badge_controller.h"
 
 #include "base/logging.h"
+#include "build/build_config.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/ui/global_error/global_error_service.h"
 #include "chrome/browser/ui/global_error/global_error_service_factory.h"
diff --git a/chrome/browser/ui/toolbar/app_menu_icon_painter_unittest.cc b/chrome/browser/ui/toolbar/app_menu_icon_painter_unittest.cc
index 9a47f0cfa..a0c30b3 100644
--- a/chrome/browser/ui/toolbar/app_menu_icon_painter_unittest.cc
+++ b/chrome/browser/ui/toolbar/app_menu_icon_painter_unittest.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/browser/ui/toolbar/app_menu_icon_painter.h"
 
+#include "base/macros.h"
 #include "chrome/browser/themes/theme_service.h"
 #include "chrome/browser/themes/theme_service_factory.h"
 #include "chrome/test/base/testing_profile.h"
diff --git a/chrome/browser/ui/toolbar/app_menu_model.cc b/chrome/browser/ui/toolbar/app_menu_model.cc
index d552ade..7d3806b 100644
--- a/chrome/browser/ui/toolbar/app_menu_model.cc
+++ b/chrome/browser/ui/toolbar/app_menu_model.cc
@@ -9,11 +9,13 @@
 
 #include "base/command_line.h"
 #include "base/debug/debugging_flags.h"
+#include "base/macros.h"
 #include "base/metrics/histogram.h"
 #include "base/prefs/pref_service.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/app/chrome_command_ids.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/defaults.h"
diff --git a/chrome/browser/ui/toolbar/app_menu_model_unittest.cc b/chrome/browser/ui/toolbar/app_menu_model_unittest.cc
index 80692db2..5b7f6f4 100644
--- a/chrome/browser/ui/toolbar/app_menu_model_unittest.cc
+++ b/chrome/browser/ui/toolbar/app_menu_model_unittest.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/browser/ui/toolbar/app_menu_model.h"
 
+#include "base/macros.h"
 #include "chrome/app/chrome_command_ids.h"
 #include "chrome/browser/defaults.h"
 #include "chrome/browser/prefs/browser_prefs.h"
diff --git a/chrome/browser/ui/toolbar/back_forward_menu_model.cc b/chrome/browser/ui/toolbar/back_forward_menu_model.cc
index 2fff7c07..df623f8 100644
--- a/chrome/browser/ui/toolbar/back_forward_menu_model.cc
+++ b/chrome/browser/ui/toolbar/back_forward_menu_model.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/toolbar/back_forward_menu_model.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/prefs/pref_service.h"
diff --git a/chrome/browser/ui/toolbar/back_forward_menu_model.h b/chrome/browser/ui/toolbar/back_forward_menu_model.h
index 5036ac8..fec1ff5 100644
--- a/chrome/browser/ui/toolbar/back_forward_menu_model.h
+++ b/chrome/browser/ui/toolbar/back_forward_menu_model.h
@@ -8,8 +8,8 @@
 #include <set>
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/gtest_prod_util.h"
+#include "base/macros.h"
 #include "base/strings/string16.h"
 #include "base/task/cancelable_task_tracker.h"
 #include "components/favicon/core/favicon_service.h"
diff --git a/chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc b/chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc
index 73c76e3..93169f6 100644
--- a/chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc
+++ b/chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc
@@ -4,10 +4,12 @@
 
 #include "chrome/browser/ui/toolbar/back_forward_menu_model.h"
 
+#include "base/macros.h"
 #include "base/strings/string16.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/time/time.h"
+#include "build/build_config.h"
 #include "chrome/browser/favicon/favicon_service_factory.h"
 #include "chrome/browser/history/history_service_factory.h"
 #include "chrome/browser/profiles/profile_manager.h"
diff --git a/chrome/browser/ui/toolbar/bookmark_sub_menu_model.cc b/chrome/browser/ui/toolbar/bookmark_sub_menu_model.cc
index ae94d2c..f935979 100644
--- a/chrome/browser/ui/toolbar/bookmark_sub_menu_model.cc
+++ b/chrome/browser/ui/toolbar/bookmark_sub_menu_model.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/browser/ui/toolbar/bookmark_sub_menu_model.h"
 
+#include "build/build_config.h"
 #include "chrome/app/chrome_command_ids.h"
 #include "chrome/grit/generated_resources.h"
 
diff --git a/chrome/browser/ui/toolbar/bookmark_sub_menu_model.h b/chrome/browser/ui/toolbar/bookmark_sub_menu_model.h
index 3f6b410..7bf7885 100644
--- a/chrome/browser/ui/toolbar/bookmark_sub_menu_model.h
+++ b/chrome/browser/ui/toolbar/bookmark_sub_menu_model.h
@@ -9,6 +9,7 @@
 // injecting the bookmarks to the bookmark submenu. This is done to support
 // advanced interactions with the menu contents, like right click context menus.
 
+#include "base/macros.h"
 #include "ui/base/models/simple_menu_model.h"
 
 class Browser;
diff --git a/chrome/browser/ui/toolbar/browser_actions_bar_browsertest.cc b/chrome/browser/ui/toolbar/browser_actions_bar_browsertest.cc
index d731e92..e2d042c 100644
--- a/chrome/browser/ui/toolbar/browser_actions_bar_browsertest.cc
+++ b/chrome/browser/ui/toolbar/browser_actions_bar_browsertest.cc
@@ -4,6 +4,9 @@
 
 #include "chrome/browser/ui/toolbar/browser_actions_bar_browsertest.h"
 
+#include <stddef.h>
+
+#include "base/macros.h"
 #include "base/run_loop.h"
 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h"
 #include "chrome/browser/extensions/browser_action_test_util.h"
diff --git a/chrome/browser/ui/toolbar/chrome_toolbar_model.h b/chrome/browser/ui/toolbar/chrome_toolbar_model.h
index e6320aa1..5b5f12d 100644
--- a/chrome/browser/ui/toolbar/chrome_toolbar_model.h
+++ b/chrome/browser/ui/toolbar/chrome_toolbar_model.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_TOOLBAR_CHROME_TOOLBAR_MODEL_H_
 #define CHROME_BROWSER_UI_TOOLBAR_CHROME_TOOLBAR_MODEL_H_
 
+#include "base/macros.h"
 #include "chrome/browser/ssl/security_state_model.h"
 #include "components/toolbar/toolbar_model.h"
 
diff --git a/chrome/browser/ui/toolbar/encoding_menu_controller.cc b/chrome/browser/ui/toolbar/encoding_menu_controller.cc
index 0f4a821..ce14740 100644
--- a/chrome/browser/ui/toolbar/encoding_menu_controller.cc
+++ b/chrome/browser/ui/toolbar/encoding_menu_controller.cc
@@ -4,7 +4,10 @@
 
 #include "chrome/browser/ui/toolbar/encoding_menu_controller.h"
 
+#include <stddef.h>
+
 #include "base/i18n/rtl.h"
+#include "base/macros.h"
 #include "base/prefs/pref_service.h"
 #include "base/strings/utf_string_conversions.h"
 #include "chrome/app/chrome_command_ids.h"
diff --git a/chrome/browser/ui/toolbar/encoding_menu_controller.h b/chrome/browser/ui/toolbar/encoding_menu_controller.h
index ea4563ac..96d62fa 100644
--- a/chrome/browser/ui/toolbar/encoding_menu_controller.h
+++ b/chrome/browser/ui/toolbar/encoding_menu_controller.h
@@ -5,12 +5,12 @@
 #ifndef CHROME_BROWSER_UI_TOOLBAR_ENCODING_MENU_CONTROLLER_H_
 #define CHROME_BROWSER_UI_TOOLBAR_ENCODING_MENU_CONTROLLER_H_
 
-#include <utility>
 #include <string>
+#include <utility>
 #include <vector>
 
-#include "base/basictypes.h"  // For DISALLOW_COPY_AND_ASSIGN
 #include "base/gtest_prod_util.h"
+#include "base/macros.h"
 #include "base/strings/string16.h"
 
 class Profile;
diff --git a/chrome/browser/ui/toolbar/encoding_menu_controller_unittest.cc b/chrome/browser/ui/toolbar/encoding_menu_controller_unittest.cc
index f8a0d859..2c58d0e 100644
--- a/chrome/browser/ui/toolbar/encoding_menu_controller_unittest.cc
+++ b/chrome/browser/ui/toolbar/encoding_menu_controller_unittest.cc
@@ -4,9 +4,11 @@
 
 #include "chrome/browser/ui/toolbar/encoding_menu_controller.h"
 
+#include <stddef.h>
+
 #include <string>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/message_loop/message_loop.h"
 #include "base/prefs/pref_service.h"
 #include "chrome/app/chrome_command_ids.h"
diff --git a/chrome/browser/ui/toolbar/media_router_action.h b/chrome/browser/ui/toolbar/media_router_action.h
index ce6ea27..17a7fc04 100644
--- a/chrome/browser/ui/toolbar/media_router_action.h
+++ b/chrome/browser/ui/toolbar/media_router_action.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_TOOLBAR_MEDIA_ROUTER_ACTION_H_
 #define CHROME_BROWSER_UI_TOOLBAR_MEDIA_ROUTER_ACTION_H_
 
+#include "base/macros.h"
 #include "base/scoped_observer.h"
 #include "chrome/browser/media/router/issues_observer.h"
 #include "chrome/browser/media/router/local_media_routes_observer.h"
diff --git a/chrome/browser/ui/toolbar/media_router_action_unittest.cc b/chrome/browser/ui/toolbar/media_router_action_unittest.cc
index e114c64..8625371b 100644
--- a/chrome/browser/ui/toolbar/media_router_action_unittest.cc
+++ b/chrome/browser/ui/toolbar/media_router_action_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 "chrome/browser/extensions/browser_action_test_util.h"
 #include "chrome/browser/extensions/extension_action_test_util.h"
 #include "chrome/browser/ui/browser_commands.h"
diff --git a/chrome/browser/ui/toolbar/media_router_contextual_menu.h b/chrome/browser/ui/toolbar/media_router_contextual_menu.h
index a7b4a8a..87ec9181 100644
--- a/chrome/browser/ui/toolbar/media_router_contextual_menu.h
+++ b/chrome/browser/ui/toolbar/media_router_contextual_menu.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_TOOLBAR_MEDIA_ROUTER_CONTEXTUAL_MENU_H_
 #define CHROME_BROWSER_UI_TOOLBAR_MEDIA_ROUTER_CONTEXTUAL_MENU_H_
 
+#include "base/macros.h"
 #include "base/strings/utf_string_conversions.h"
 #include "ui/base/models/simple_menu_model.h"
 
diff --git a/chrome/browser/ui/toolbar/mock_component_toolbar_actions_factory.h b/chrome/browser/ui/toolbar/mock_component_toolbar_actions_factory.h
index a979d1b8..0ea3696 100644
--- a/chrome/browser/ui/toolbar/mock_component_toolbar_actions_factory.h
+++ b/chrome/browser/ui/toolbar/mock_component_toolbar_actions_factory.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_TOOLBAR_MOCK_COMPONENT_TOOLBAR_ACTIONS_FACTORY_H_
 #define CHROME_BROWSER_UI_TOOLBAR_MOCK_COMPONENT_TOOLBAR_ACTIONS_FACTORY_H_
 
+#include "base/macros.h"
 #include "chrome/browser/ui/toolbar/component_toolbar_actions_factory.h"
 #include "chrome/browser/ui/toolbar/toolbar_actions_model.h"
 
diff --git a/chrome/browser/ui/toolbar/recent_tabs_builder_test_helper.cc b/chrome/browser/ui/toolbar/recent_tabs_builder_test_helper.cc
index f91d815..c9ae68c 100644
--- a/chrome/browser/ui/toolbar/recent_tabs_builder_test_helper.cc
+++ b/chrome/browser/ui/toolbar/recent_tabs_builder_test_helper.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/toolbar/recent_tabs_builder_test_helper.h"
 
+#include <stddef.h>
+
 #include "base/rand_util.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/stringprintf.h"
diff --git a/chrome/browser/ui/toolbar/recent_tabs_builder_test_helper.h b/chrome/browser/ui/toolbar/recent_tabs_builder_test_helper.h
index c7532c9..8256a1b 100644
--- a/chrome/browser/ui/toolbar/recent_tabs_builder_test_helper.h
+++ b/chrome/browser/ui/toolbar/recent_tabs_builder_test_helper.h
@@ -7,6 +7,7 @@
 
 #include <vector>
 
+#include "base/macros.h"
 #include "base/strings/string16.h"
 #include "base/time/time.h"
 #include "components/sessions/core/session_id.h"
diff --git a/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc b/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc
index 46dbe1e..dcd09ddd 100644
--- a/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc
+++ b/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc
@@ -4,11 +4,14 @@
 
 #include "chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/metrics/histogram.h"
 #include "base/prefs/scoped_user_pref_update.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/app/chrome_command_ids.h"
 #include "chrome/browser/favicon/favicon_service_factory.h"
 #include "chrome/browser/profiles/profile.h"
diff --git a/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.h b/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.h
index 364844d..895a2a8 100644
--- a/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.h
+++ b/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.h
@@ -7,6 +7,7 @@
 
 #include <set>
 
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/task/cancelable_task_tracker.h"
 #include "base/timer/elapsed_timer.h"
diff --git a/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc b/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc
index 72e0203..db30e32 100644
--- a/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc
+++ b/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc
@@ -8,8 +8,10 @@
 #include <vector>
 
 #include "base/command_line.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
+#include "build/build_config.h"
 #include "chrome/app/chrome_command_ids.h"
 #include "chrome/browser/sessions/chrome_tab_restore_service_client.h"
 #include "chrome/browser/sessions/session_service.h"
diff --git a/chrome/browser/ui/toolbar/test_toolbar_action_view_controller.h b/chrome/browser/ui/toolbar/test_toolbar_action_view_controller.h
index 72a0f829..abb6d1c 100644
--- a/chrome/browser/ui/toolbar/test_toolbar_action_view_controller.h
+++ b/chrome/browser/ui/toolbar/test_toolbar_action_view_controller.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_TOOLBAR_TEST_TOOLBAR_ACTION_VIEW_CONTROLLER_H_
 #define CHROME_BROWSER_UI_TOOLBAR_TEST_TOOLBAR_ACTION_VIEW_CONTROLLER_H_
 
+#include "base/macros.h"
 #include "chrome/browser/ui/toolbar/toolbar_action_view_controller.h"
 
 // A minimalistic and configurable ToolbarActionViewController for use in
diff --git a/chrome/browser/ui/toolbar/test_toolbar_actions_bar_bubble_delegate.cc b/chrome/browser/ui/toolbar/test_toolbar_actions_bar_bubble_delegate.cc
index 79465e5..957ad6f1 100644
--- a/chrome/browser/ui/toolbar/test_toolbar_actions_bar_bubble_delegate.cc
+++ b/chrome/browser/ui/toolbar/test_toolbar_actions_bar_bubble_delegate.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/toolbar/test_toolbar_actions_bar_bubble_delegate.h"
 
 #include "base/logging.h"
+#include "base/macros.h"
 
 class TestToolbarActionsBarBubbleDelegate::DelegateImpl
     : public ToolbarActionsBarBubbleDelegate {
diff --git a/chrome/browser/ui/toolbar/test_toolbar_model.h b/chrome/browser/ui/toolbar/test_toolbar_model.h
index 08b3f15..e563403b 100644
--- a/chrome/browser/ui/toolbar/test_toolbar_model.h
+++ b/chrome/browser/ui/toolbar/test_toolbar_model.h
@@ -5,7 +5,10 @@
 #ifndef CHROME_BROWSER_UI_TOOLBAR_TEST_TOOLBAR_MODEL_H_
 #define CHROME_BROWSER_UI_TOOLBAR_TEST_TOOLBAR_MODEL_H_
 
+#include <stddef.h>
+
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/strings/string16.h"
 #include "chrome/browser/ui/toolbar/chrome_toolbar_model.h"
 
diff --git a/chrome/browser/ui/toolbar/toolbar_actions_bar.h b/chrome/browser/ui/toolbar/toolbar_actions_bar.h
index 7fed96a..db1c72c 100644
--- a/chrome/browser/ui/toolbar/toolbar_actions_bar.h
+++ b/chrome/browser/ui/toolbar/toolbar_actions_bar.h
@@ -5,6 +5,8 @@
 #ifndef CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_
 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_H_
 
+#include <stddef.h>
+
 #include "base/callback.h"
 #include "base/macros.h"
 #include "base/memory/scoped_vector.h"
diff --git a/chrome/browser/ui/toolbar/toolbar_actions_bar_delegate.h b/chrome/browser/ui/toolbar/toolbar_actions_bar_delegate.h
index 79a18a5..584a4b3 100644
--- a/chrome/browser/ui/toolbar/toolbar_actions_bar_delegate.h
+++ b/chrome/browser/ui/toolbar/toolbar_actions_bar_delegate.h
@@ -5,6 +5,8 @@
 #ifndef CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_DELEGATE_H_
 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_DELEGATE_H_
 
+#include <stddef.h>
+
 #include "base/memory/scoped_ptr.h"
 #include "ui/gfx/animation/tween.h"
 #include "ui/gfx/geometry/size.h"
diff --git a/chrome/browser/ui/toolbar/toolbar_actions_bar_unittest.h b/chrome/browser/ui/toolbar/toolbar_actions_bar_unittest.h
index 268245a..396bbd3 100644
--- a/chrome/browser/ui/toolbar/toolbar_actions_bar_unittest.h
+++ b/chrome/browser/ui/toolbar/toolbar_actions_bar_unittest.h
@@ -5,6 +5,8 @@
 #ifndef CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_UNITTEST_H_
 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_BAR_UNITTEST_H_
 
+#include <stddef.h>
+
 #include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "chrome/browser/extensions/browser_action_test_util.h"
diff --git a/chrome/browser/ui/toolbar/toolbar_actions_model.h b/chrome/browser/ui/toolbar/toolbar_actions_model.h
index cfde0a68..2bb38621 100644
--- a/chrome/browser/ui/toolbar/toolbar_actions_model.h
+++ b/chrome/browser/ui/toolbar/toolbar_actions_model.h
@@ -5,7 +5,10 @@
 #ifndef CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_MODEL_H_
 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTIONS_MODEL_H_
 
+#include <stddef.h>
+
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_vector.h"
 #include "base/observer_list.h"
 #include "base/prefs/pref_change_registrar.h"
diff --git a/chrome/browser/ui/toolbar/toolbar_actions_model_unittest.cc b/chrome/browser/ui/toolbar/toolbar_actions_model_unittest.cc
index f7fa5827..79d1f26 100644
--- a/chrome/browser/ui/toolbar/toolbar_actions_model_unittest.cc
+++ b/chrome/browser/ui/toolbar/toolbar_actions_model_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/files/file_util.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
diff --git a/chrome/browser/ui/toolbar/toolbar_model_impl.cc b/chrome/browser/ui/toolbar/toolbar_model_impl.cc
index dfa612a..c62ca685 100644
--- a/chrome/browser/ui/toolbar/toolbar_model_impl.cc
+++ b/chrome/browser/ui/toolbar/toolbar_model_impl.cc
@@ -7,6 +7,7 @@
 #include "base/prefs/pref_service.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/time/time.h"
+#include "build/build_config.h"
 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/search/search.h"
diff --git a/chrome/browser/ui/toolbar/toolbar_model_impl.h b/chrome/browser/ui/toolbar/toolbar_model_impl.h
index 2a6a416..32cf5f3 100644
--- a/chrome/browser/ui/toolbar/toolbar_model_impl.h
+++ b/chrome/browser/ui/toolbar/toolbar_model_impl.h
@@ -5,10 +5,12 @@
 #ifndef CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_IMPL_H_
 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_IMPL_H_
 
+#include <stddef.h>
+
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/strings/string16.h"
 #include "chrome/browser/ui/toolbar/chrome_toolbar_model.h"
 #include "url/gurl.h"
diff --git a/chrome/browser/ui/toolbar/toolbar_model_unittest.cc b/chrome/browser/ui/toolbar/toolbar_model_unittest.cc
index 44eeb9e3..4effd69 100644
--- a/chrome/browser/ui/toolbar/toolbar_model_unittest.cc
+++ b/chrome/browser/ui/toolbar/toolbar_model_unittest.cc
@@ -4,7 +4,10 @@
 
 #include "components/toolbar/toolbar_model.h"
 
+#include <stddef.h>
+
 #include "base/command_line.h"
+#include "base/macros.h"
 #include "base/metrics/field_trial.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
diff --git a/chrome/browser/ui/translate/language_combobox_model.h b/chrome/browser/ui/translate/language_combobox_model.h
index 1f95750f..72419f2 100644
--- a/chrome/browser/ui/translate/language_combobox_model.h
+++ b/chrome/browser/ui/translate/language_combobox_model.h
@@ -5,8 +5,8 @@
 #ifndef CHROME_BROWSER_UI_TRANSLATE_LANGUAGE_COMBOBOX_MODEL_H_
 #define CHROME_BROWSER_UI_TRANSLATE_LANGUAGE_COMBOBOX_MODEL_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/strings/string16.h"
 #include "ui/base/models/combobox_model.h"
diff --git a/chrome/browser/ui/translate/translate_bubble_model_impl.h b/chrome/browser/ui/translate/translate_bubble_model_impl.h
index 8899a90..40db4d8 100644
--- a/chrome/browser/ui/translate/translate_bubble_model_impl.h
+++ b/chrome/browser/ui/translate/translate_bubble_model_impl.h
@@ -5,7 +5,7 @@
 #ifndef CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_BUBBLE_MODEL_IMPL_H_
 #define CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_BUBBLE_MODEL_IMPL_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "chrome/browser/translate/chrome_translate_client.h"
 #include "chrome/browser/ui/translate/translate_bubble_model.h"
diff --git a/chrome/browser/ui/translate/translate_bubble_view_state_transition.h b/chrome/browser/ui/translate/translate_bubble_view_state_transition.h
index ad6c7683..383bc24 100644
--- a/chrome/browser/ui/translate/translate_bubble_view_state_transition.h
+++ b/chrome/browser/ui/translate/translate_bubble_view_state_transition.h
@@ -5,7 +5,7 @@
 #ifndef CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_BUBBLE_VIEW_STATE_TRANSITION_H_
 #define CHROME_BROWSER_UI_TRANSLATE_TRANSLATE_BUBBLE_VIEW_STATE_TRANSITION_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/translate/translate_bubble_model.h"
 
 // The class which manages the transition of the view state of the Translate
diff --git a/chrome/browser/ui/uma_browsing_activity_observer.h b/chrome/browser/ui/uma_browsing_activity_observer.h
index e8c4b01..95ec981 100644
--- a/chrome/browser/ui/uma_browsing_activity_observer.h
+++ b/chrome/browser/ui/uma_browsing_activity_observer.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_UMA_BROWSING_ACTIVITY_OBSERVER_H_
 #define CHROME_BROWSER_UI_UMA_BROWSING_ACTIVITY_OBSERVER_H_
 
+#include "base/macros.h"
 #include "chrome/browser/ui/tabs/tab_strip_model_stats_recorder.h"
 #include "content/public/browser/notification_observer.h"
 #include "content/public/browser/notification_registrar.h"
diff --git a/chrome/browser/ui/unload_controller.h b/chrome/browser/ui/unload_controller.h
index 53fa365..a989b26 100644
--- a/chrome/browser/ui/unload_controller.h
+++ b/chrome/browser/ui/unload_controller.h
@@ -8,6 +8,7 @@
 #include <set>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
 #include "content/public/browser/notification_observer.h"
diff --git a/chrome/browser/ui/user_manager.h b/chrome/browser/ui/user_manager.h
index 81021ca..68c9d5f 100644
--- a/chrome/browser/ui/user_manager.h
+++ b/chrome/browser/ui/user_manager.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_USER_MANAGER_H_
 #define CHROME_BROWSER_UI_USER_MANAGER_H_
 
+#include "base/macros.h"
 #include "chrome/browser/profiles/profile_window.h"
 
 namespace base {
diff --git a/chrome/browser/ui/web_contents_sizer.cc b/chrome/browser/ui/web_contents_sizer.cc
index ba7fff22..da9590d9 100644
--- a/chrome/browser/ui/web_contents_sizer.cc
+++ b/chrome/browser/ui/web_contents_sizer.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/browser/ui/web_contents_sizer.h"
 
+#include "build/build_config.h"
 #include "content/public/browser/web_contents.h"
 
 #if defined(USE_AURA)
diff --git a/chrome/browser/ui/website_settings/permission_bubble_browser_test_util.h b/chrome/browser/ui/website_settings/permission_bubble_browser_test_util.h
index aed83ef..d3156a9a 100644
--- a/chrome/browser/ui/website_settings/permission_bubble_browser_test_util.h
+++ b/chrome/browser/ui/website_settings/permission_bubble_browser_test_util.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_BROWSER_TEST_UTIL_H_
 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_BROWSER_TEST_UTIL_H_
 
+#include "base/macros.h"
 #include "chrome/browser/extensions/extension_browsertest.h"
 #include "chrome/browser/ui/website_settings/permission_bubble_view.h"
 
diff --git a/chrome/browser/ui/website_settings/permission_bubble_manager.cc b/chrome/browser/ui/website_settings/permission_bubble_manager.cc
index 41e3416..9f21c8a 100644
--- a/chrome/browser/ui/website_settings/permission_bubble_manager.cc
+++ b/chrome/browser/ui/website_settings/permission_bubble_manager.cc
@@ -6,6 +6,7 @@
 
 #include "base/command_line.h"
 #include "base/metrics/user_metrics_action.h"
+#include "build/build_config.h"
 #include "chrome/browser/ui/website_settings/permission_bubble_request.h"
 #include "chrome/common/chrome_switches.h"
 #include "content/public/browser/browser_thread.h"
diff --git a/chrome/browser/ui/website_settings/permission_bubble_manager_browsertest.cc b/chrome/browser/ui/website_settings/permission_bubble_manager_browsertest.cc
index 1339d58..334266dd 100644
--- a/chrome/browser/ui/website_settings/permission_bubble_manager_browsertest.cc
+++ b/chrome/browser/ui/website_settings/permission_bubble_manager_browsertest.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h"
 
 #include "base/command_line.h"
+#include "build/build_config.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/tabs/tab_strip_model.h"
 #include "chrome/browser/ui/website_settings/mock_permission_bubble_view.h"
diff --git a/chrome/browser/ui/website_settings/permission_bubble_manager_unittest.cc b/chrome/browser/ui/website_settings/permission_bubble_manager_unittest.cc
index 3e711c1..a5dd1c1 100644
--- a/chrome/browser/ui/website_settings/permission_bubble_manager_unittest.cc
+++ b/chrome/browser/ui/website_settings/permission_bubble_manager_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/command_line.h"
 #include "base/message_loop/message_loop.h"
diff --git a/chrome/browser/ui/website_settings/permission_menu_model.h b/chrome/browser/ui/website_settings/permission_menu_model.h
index 5270707..7ec2ad2 100644
--- a/chrome/browser/ui/website_settings/permission_menu_model.h
+++ b/chrome/browser/ui/website_settings/permission_menu_model.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_MENU_MODEL_H_
 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_MENU_MODEL_H_
 
+#include "base/macros.h"
 #include "chrome/browser/ui/website_settings/website_settings_ui.h"
 #include "components/content_settings/core/common/content_settings.h"
 #include "components/content_settings/core/common/content_settings_types.h"
diff --git a/chrome/browser/ui/website_settings/website_settings.cc b/chrome/browser/ui/website_settings/website_settings.cc
index c717aac..3f76e091 100644
--- a/chrome/browser/ui/website_settings/website_settings.cc
+++ b/chrome/browser/ui/website_settings/website_settings.cc
@@ -4,17 +4,22 @@
 
 #include "chrome/browser/ui/website_settings/website_settings.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
 #include "base/command_line.h"
 #include "base/i18n/time_formatting.h"
+#include "base/macros.h"
 #include "base/metrics/field_trial.h"
 #include "base/metrics/histogram.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/stringprintf.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/values.h"
+#include "build/build_config.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/browsing_data/browsing_data_channel_id_helper.h"
 #include "chrome/browser/browsing_data/browsing_data_cookie_helper.h"
@@ -533,7 +538,7 @@
     }
   }
 
-  uint16 cipher_suite =
+  uint16_t cipher_suite =
       net::SSLConnectionStatusToCipherSuite(security_info.connection_status);
   if (security_info.security_bits > 0 && cipher_suite) {
     int ssl_version =
diff --git a/chrome/browser/ui/website_settings/website_settings.h b/chrome/browser/ui/website_settings/website_settings.h
index 2b5524c..19406b47 100644
--- a/chrome/browser/ui/website_settings/website_settings.h
+++ b/chrome/browser/ui/website_settings/website_settings.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_H_
 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_H_
 
+#include "base/macros.h"
 #include "base/strings/string16.h"
 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
 #include "chrome/browser/ssl/security_state_model.h"
diff --git a/chrome/browser/ui/website_settings/website_settings_infobar_delegate.cc b/chrome/browser/ui/website_settings/website_settings_infobar_delegate.cc
index 4f257ee2..aa37049 100644
--- a/chrome/browser/ui/website_settings/website_settings_infobar_delegate.cc
+++ b/chrome/browser/ui/website_settings/website_settings_infobar_delegate.cc
@@ -6,6 +6,7 @@
 
 #include "base/logging.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/browser/infobars/infobar_service.h"
 #include "chrome/grit/generated_resources.h"
 #include "components/infobars/core/infobar.h"
diff --git a/chrome/browser/ui/website_settings/website_settings_infobar_delegate.h b/chrome/browser/ui/website_settings/website_settings_infobar_delegate.h
index 020ab1c..f40b114 100644
--- a/chrome/browser/ui/website_settings/website_settings_infobar_delegate.h
+++ b/chrome/browser/ui/website_settings/website_settings_infobar_delegate.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_INFOBAR_DELEGATE_H_
 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_WEBSITE_SETTINGS_INFOBAR_DELEGATE_H_
 
+#include "base/macros.h"
 #include "components/infobars/core/confirm_infobar_delegate.h"
 
 class InfoBarService;
diff --git a/chrome/browser/ui/website_settings/website_settings_ui.cc b/chrome/browser/ui/website_settings/website_settings_ui.cc
index 8dbe872..ff8fe919 100644
--- a/chrome/browser/ui/website_settings/website_settings_ui.cc
+++ b/chrome/browser/ui/website_settings/website_settings_ui.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/browser/ui/website_settings/website_settings_ui.h"
 
+#include "base/macros.h"
 #include "chrome/grit/chromium_strings.h"
 #include "chrome/grit/generated_resources.h"
 #include "components/content_settings/core/browser/plugins_field_trial.h"
diff --git a/chrome/browser/ui/website_settings/website_settings_unittest.cc b/chrome/browser/ui/website_settings/website_settings_unittest.cc
index 1bdb921..731451252 100644
--- a/chrome/browser/ui/website_settings/website_settings_unittest.cc
+++ b/chrome/browser/ui/website_settings/website_settings_unittest.cc
@@ -8,6 +8,7 @@
 #include "base/message_loop/message_loop.h"
 #include "base/strings/string16.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
 #include "chrome/browser/infobars/infobar_service.h"
 #include "chrome/browser/ui/website_settings/website_settings_ui.h"
diff --git a/chrome/browser/ui/window_sizer/window_sizer.cc b/chrome/browser/ui/window_sizer/window_sizer.cc
index 0bee4fbb..ebc9e9ab 100644
--- a/chrome/browser/ui/window_sizer/window_sizer.cc
+++ b/chrome/browser/ui/window_sizer/window_sizer.cc
@@ -6,7 +6,9 @@
 
 #include "base/command_line.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/prefs/pref_service.h"
+#include "build/build_config.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/ui/browser.h"
diff --git a/chrome/browser/ui/window_sizer/window_sizer.h b/chrome/browser/ui/window_sizer/window_sizer.h
index f90a704..5d74b00 100644
--- a/chrome/browser/ui/window_sizer/window_sizer.h
+++ b/chrome/browser/ui/window_sizer/window_sizer.h
@@ -5,7 +5,7 @@
 #ifndef CHROME_BROWSER_UI_WINDOW_SIZER_WINDOW_SIZER_H_
 #define CHROME_BROWSER_UI_WINDOW_SIZER_WINDOW_SIZER_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "chrome/browser/ui/host_desktop.h"
 #include "ui/base/ui_base_types.h"
diff --git a/chrome/browser/ui/window_sizer/window_sizer_ash_uitest.cc b/chrome/browser/ui/window_sizer/window_sizer_ash_uitest.cc
index 51a71ab..75c0b40 100644
--- a/chrome/browser/ui/window_sizer/window_sizer_ash_uitest.cc
+++ b/chrome/browser/ui/window_sizer/window_sizer_ash_uitest.cc
@@ -8,7 +8,9 @@
 #include "ash/test/shelf_test_api.h"
 #include "base/command_line.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/message_loop/message_loop.h"
+#include "build/build_config.h"
 #include "chrome/browser/lifetime/application_lifetime.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_list.h"
diff --git a/chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc b/chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc
index a05b2bf..95d19b2 100644
--- a/chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc
+++ b/chrome/browser/ui/window_sizer/window_sizer_ash_unittest.cc
@@ -11,6 +11,7 @@
 #include "ash/wm/window_resizer.h"
 #include "ash/wm/window_state.h"
 #include "base/compiler_specific.h"
+#include "build/build_config.h"
 #include "chrome/browser/ui/ash/ash_util.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/window_sizer/window_sizer_common_unittest.h"
diff --git a/chrome/browser/ui/window_sizer/window_sizer_common_unittest.cc b/chrome/browser/ui/window_sizer/window_sizer_common_unittest.cc
index 2c4c273..290ec592 100644
--- a/chrome/browser/ui/window_sizer/window_sizer_common_unittest.cc
+++ b/chrome/browser/ui/window_sizer/window_sizer_common_unittest.cc
@@ -4,8 +4,12 @@
 
 #include "chrome/browser/ui/window_sizer/window_sizer_common_unittest.h"
 
+#include <stddef.h>
+
 #include "ash/wm/window_resizer.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
+#include "build/build_config.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/common/chrome_switches.h"
 #include "chrome/test/base/testing_profile.h"
diff --git a/chrome/browser/ui/window_sizer/window_sizer_common_unittest.h b/chrome/browser/ui/window_sizer/window_sizer_common_unittest.h
index 4ab6d25..7c73ac00 100644
--- a/chrome/browser/ui/window_sizer/window_sizer_common_unittest.h
+++ b/chrome/browser/ui/window_sizer/window_sizer_common_unittest.h
@@ -8,6 +8,7 @@
 #include <vector>
 
 #include "base/logging.h"
+#include "base/macros.h"
 #include "chrome/browser/ui/window_sizer/window_sizer.h"
 #include "chrome/test/base/test_browser_window.h"
 #include "ui/gfx/geometry/rect.h"
diff --git a/chrome/browser/ui/window_sizer/window_sizer_unittest.cc b/chrome/browser/ui/window_sizer/window_sizer_unittest.cc
index 1a00dfb..bdb3e452 100644
--- a/chrome/browser/ui/window_sizer/window_sizer_unittest.cc
+++ b/chrome/browser/ui/window_sizer/window_sizer_unittest.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/window_sizer/window_sizer_common_unittest.h"
 
 #include "base/compiler_specific.h"
+#include "build/build_config.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 // Test that the window is sized appropriately for the first run experience
diff --git a/chrome/browser/ui/zoom/chrome_zoom_level_prefs.cc b/chrome/browser/ui/zoom/chrome_zoom_level_prefs.cc
index a8604db75..4e22c973 100644
--- a/chrome/browser/ui/zoom/chrome_zoom_level_prefs.cc
+++ b/chrome/browser/ui/zoom/chrome_zoom_level_prefs.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/prefs/json_pref_store.h"
 #include "base/prefs/pref_filter.h"
diff --git a/chrome/browser/ui/zoom/zoom_controller_browsertest.cc b/chrome/browser/ui/zoom/zoom_controller_browsertest.cc
index 580d11b..3df9f364 100644
--- a/chrome/browser/ui/zoom/zoom_controller_browsertest.cc
+++ b/chrome/browser/ui/zoom/zoom_controller_browsertest.cc
@@ -4,8 +4,10 @@
 
 #include "components/ui/zoom/zoom_controller.h"
 
+#include "base/macros.h"
 #include "base/prefs/pref_service.h"
 #include "base/process/kill.h"
+#include "build/build_config.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_commands.h"
diff --git a/chrome/installer/util/registry_entry.cc b/chrome/installer/util/registry_entry.cc
index 6d51b064..5f4dd31d 100644
--- a/chrome/installer/util/registry_entry.cc
+++ b/chrome/installer/util/registry_entry.cc
@@ -58,7 +58,7 @@
   }
 }
 
-bool RegistryEntry::ExistsInRegistry(uint32 look_for_in) const {
+bool RegistryEntry::ExistsInRegistry(uint32_t look_for_in) const {
   DCHECK(look_for_in);
 
   RegistryStatus status = DOES_NOT_EXIST;
@@ -69,7 +69,7 @@
   return status == SAME_VALUE;
 }
 
-bool RegistryEntry::KeyExistsInRegistry(uint32 look_for_in) const {
+bool RegistryEntry::KeyExistsInRegistry(uint32_t look_for_in) const {
   DCHECK(look_for_in);
 
   RegistryStatus status = DOES_NOT_EXIST;
diff --git a/chrome/installer/util/registry_entry.h b/chrome/installer/util/registry_entry.h
index 50ad9bd..bf54f007 100644
--- a/chrome/installer/util/registry_entry.h
+++ b/chrome/installer/util/registry_entry.h
@@ -6,6 +6,7 @@
 #define CHROME_INSTALLER_UTIL_REGISTRY_ENTRY_H_
 
 #include <windows.h>
+#include <stdint.h>
 
 #include "base/macros.h"
 #include "base/strings/string16.h"
@@ -84,13 +85,13 @@
   // registrations outside of HKCR on versions of Windows prior to Win8,
   // Chrome's values go in HKLM. This function will make unnecessary (but
   // harmless) queries into HKCU in that case.
-  bool ExistsInRegistry(uint32 look_for_in) const;
+  bool ExistsInRegistry(uint32_t look_for_in) const;
 
   // Checks if the current registry entry exists in \|key_path_|\|name_|,
   // regardless of value. Same lookup rules as ExistsInRegistry.
   // Unlike ExistsInRegistry, this returns true if some other value is present
   // with the same key.
-  bool KeyExistsInRegistry(uint32 look_for_in) const;
+  bool KeyExistsInRegistry(uint32_t look_for_in) const;
 
   const base::string16& key_path() const { return key_path_; }
 
diff --git a/chrome/third_party/mozilla_security_manager/nsUsageArrayHelper.cpp b/chrome/third_party/mozilla_security_manager/nsUsageArrayHelper.cpp
index 0cc00486..531182c 100644
--- a/chrome/third_party/mozilla_security_manager/nsUsageArrayHelper.cpp
+++ b/chrome/third_party/mozilla_security_manager/nsUsageArrayHelper.cpp
@@ -37,6 +37,7 @@
 
 #include "chrome/third_party/mozilla_security_manager/nsUsageArrayHelper.h"
 
+#include "base/macros.h"
 #include "chrome/grit/generated_resources.h"
 #include "ui/base/l10n/l10n_util.h"
 
diff --git a/chromeos/CHROMEOS_LKGM b/chromeos/CHROMEOS_LKGM
index efe51938..a898c41 100644
--- a/chromeos/CHROMEOS_LKGM
+++ b/chromeos/CHROMEOS_LKGM
@@ -1 +1 @@
-7762.0.0
\ No newline at end of file
+7766.0.0
\ No newline at end of file
diff --git a/components/bookmarks/managed/managed_bookmarks_tracker.h b/components/bookmarks/managed/managed_bookmarks_tracker.h
index 041100cd..0ff1f38 100644
--- a/components/bookmarks/managed/managed_bookmarks_tracker.h
+++ b/components/bookmarks/managed/managed_bookmarks_tracker.h
@@ -5,6 +5,7 @@
 #ifndef COMPONENTS_BOOKMARKS_MANAGED_MANAGED_BOOKMARKS_TRACKER_H_
 #define COMPONENTS_BOOKMARKS_MANAGED_MANAGED_BOOKMARKS_TRACKER_H_
 
+#include "base/basictypes.h"
 #include "base/callback_forward.h"
 #include "base/macros.h"
 #include "base/prefs/pref_change_registrar.h"
diff --git a/components/dom_distiller/webui/dom_distiller_ui.h b/components/dom_distiller/webui/dom_distiller_ui.h
index 24939ab..1462482 100644
--- a/components/dom_distiller/webui/dom_distiller_ui.h
+++ b/components/dom_distiller/webui/dom_distiller_ui.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "content/public/browser/web_ui_controller.h"
 
 namespace dom_distiller {
diff --git a/components/html_viewer/ime_controller.h b/components/html_viewer/ime_controller.h
index 740b5c5..2c3e055 100644
--- a/components/html_viewer/ime_controller.h
+++ b/components/html_viewer/ime_controller.h
@@ -5,6 +5,7 @@
 #ifndef COMPONENTS_HTML_VIEWER_IME_CONTROLLER_H_
 #define COMPONENTS_HTML_VIEWER_IME_CONTROLLER_H_
 
+#include "base/macros.h"
 #include "third_party/WebKit/public/web/WebTextInputInfo.h"
 
 namespace blink {
diff --git a/components/os_crypt/os_crypt.h b/components/os_crypt/os_crypt.h
index a75ccf9..33e5b71 100644
--- a/components/os_crypt/os_crypt.h
+++ b/components/os_crypt/os_crypt.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "base/strings/string16.h"
 
 // The OSCrypt class gives access to simple encryption and decryption of
diff --git a/components/proximity_auth/webui/proximity_auth_ui.h b/components/proximity_auth/webui/proximity_auth_ui.h
index a19ec4cca..09c9dcbc 100644
--- a/components/proximity_auth/webui/proximity_auth_ui.h
+++ b/components/proximity_auth/webui/proximity_auth_ui.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "content/public/browser/web_ui_controller.h"
 
 namespace proximity_auth {
diff --git a/content/browser/gpu/gpu_internals_ui.h b/content/browser/gpu/gpu_internals_ui.h
index 41fd7ea..b465c8e 100644
--- a/content/browser/gpu/gpu_internals_ui.h
+++ b/content/browser/gpu/gpu_internals_ui.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_BROWSER_GPU_GPU_INTERNALS_UI_H_
 #define CONTENT_BROWSER_GPU_GPU_INTERNALS_UI_H_
 
+#include "base/macros.h"
 #include "content/public/browser/web_ui_controller.h"
 
 namespace content {
diff --git a/content/browser/renderer_host/begin_frame_observer_proxy.h b/content/browser/renderer_host/begin_frame_observer_proxy.h
index 291d8bb8..a5fa2e6 100644
--- a/content/browser/renderer_host/begin_frame_observer_proxy.h
+++ b/content/browser/renderer_host/begin_frame_observer_proxy.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_BEGIN_FRAME_OBSERVER_PROXY_H_
 #define CONTENT_BROWSER_RENDERER_HOST_BEGIN_FRAME_OBSERVER_PROXY_H_
 
+#include "base/macros.h"
 #include "content/common/content_export.h"
 #include "ui/compositor/compositor.h"
 #include "ui/compositor/compositor_observer.h"
diff --git a/content/browser/renderer_host/begin_frame_observer_proxy_unittest.cc b/content/browser/renderer_host/begin_frame_observer_proxy_unittest.cc
index 77b00e9..9ba78c4 100644
--- a/content/browser/renderer_host/begin_frame_observer_proxy_unittest.cc
+++ b/content/browser/renderer_host/begin_frame_observer_proxy_unittest.cc
@@ -5,7 +5,6 @@
 #include <algorithm>
 #include <list>
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/test/test_simple_task_runner.h"
diff --git a/content/browser/renderer_host/clipboard_message_filter.cc b/content/browser/renderer_host/clipboard_message_filter.cc
index 35e7428..dea3d127 100644
--- a/content/browser/renderer_host/clipboard_message_filter.cc
+++ b/content/browser/renderer_host/clipboard_message_filter.cc
@@ -11,6 +11,7 @@
 #include "base/memory/scoped_ptr.h"
 #include "base/pickle.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "content/common/clipboard_messages.h"
 #include "content/public/browser/browser_context.h"
 #include "ipc/ipc_message_macros.h"
@@ -94,7 +95,7 @@
 }
 
 void ClipboardMessageFilter::OnGetSequenceNumber(ui::ClipboardType type,
-                                                 uint64* sequence_number) {
+                                                 uint64_t* sequence_number) {
   *sequence_number = GetClipboard()->GetSequenceNumber(type);
 }
 
@@ -156,8 +157,8 @@
 void ClipboardMessageFilter::OnReadHTML(ui::ClipboardType type,
                                         base::string16* markup,
                                         GURL* url,
-                                        uint32* fragment_start,
-                                        uint32* fragment_end) {
+                                        uint32_t* fragment_start,
+                                        uint32_t* fragment_end) {
   std::string src_url_str;
   GetClipboard()->ReadHTML(type, markup, &src_url_str, fragment_start,
                            fragment_end);
@@ -186,7 +187,7 @@
 void ClipboardMessageFilter::OnReadImageReply(
     const SkBitmap& bitmap, IPC::Message* reply_msg) {
   base::SharedMemoryHandle image_handle = base::SharedMemory::NULLHandle();
-  uint32 image_size = 0;
+  uint32_t image_size = 0;
   if (!bitmap.isNull()) {
     std::vector<unsigned char> png_data;
     if (gfx::PNGCodec::FastEncodeBGRASkBitmap(bitmap, false, &png_data)) {
diff --git a/content/browser/renderer_host/clipboard_message_filter.h b/content/browser/renderer_host/clipboard_message_filter.h
index f563ed5..9e9aabe6 100644
--- a/content/browser/renderer_host/clipboard_message_filter.h
+++ b/content/browser/renderer_host/clipboard_message_filter.h
@@ -5,11 +5,14 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_CLIPBOARD_MESSAGE_FILTER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_CLIPBOARD_MESSAGE_FILTER_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/shared_memory.h"
+#include "build/build_config.h"
 #include "content/common/clipboard_format.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/browser_message_filter.h"
@@ -39,7 +42,7 @@
   ~ClipboardMessageFilter() override;
 
   void OnGetSequenceNumber(const ui::ClipboardType type,
-                           uint64* sequence_number);
+                           uint64_t* sequence_number);
   void OnIsFormatAvailable(ClipboardFormat format,
                            ui::ClipboardType type,
                            bool* result);
@@ -51,8 +54,8 @@
   void OnReadHTML(ui::ClipboardType type,
                   base::string16* markup,
                   GURL* url,
-                  uint32* fragment_start,
-                  uint32* fragment_end);
+                  uint32_t* fragment_start,
+                  uint32_t* fragment_end);
   void OnReadRTF(ui::ClipboardType type, std::string* result);
   void OnReadImage(ui::ClipboardType type, IPC::Message* reply_msg);
   void OnReadImageReply(const SkBitmap& bitmap, IPC::Message* reply_msg);
diff --git a/content/browser/renderer_host/clipboard_message_filter_mac.mm b/content/browser/renderer_host/clipboard_message_filter_mac.mm
index 3c59d31f..18a908a 100644
--- a/content/browser/renderer_host/clipboard_message_filter_mac.mm
+++ b/content/browser/renderer_host/clipboard_message_filter_mac.mm
@@ -5,11 +5,12 @@
 #include "content/browser/renderer_host/clipboard_message_filter.h"
 
 #import <Cocoa/Cocoa.h>
+#include <stddef.h>
 
-#include "base/basictypes.h"
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/mac/scoped_nsobject.h"
+#include "base/macros.h"
 #include "base/strings/sys_string_conversions.h"
 #include "content/public/browser/browser_thread.h"
 #import "ui/base/cocoa/find_pasteboard.h"
diff --git a/content/browser/renderer_host/clipboard_message_filter_unittest.cc b/content/browser/renderer_host/clipboard_message_filter_unittest.cc
index ecaaf69..2f0c8ab 100644
--- a/content/browser/renderer_host/clipboard_message_filter_unittest.cc
+++ b/content/browser/renderer_host/clipboard_message_filter_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "content/browser/renderer_host/clipboard_message_filter.h"
 
+#include <stddef.h>
+#include <stdint.h>
 #include <string.h>
 
 #include "base/memory/ref_counted.h"
diff --git a/content/browser/renderer_host/compositor_impl_android.cc b/content/browser/renderer_host/compositor_impl_android.cc
index 74a079b..c5cabc0 100644
--- a/content/browser/renderer_host/compositor_impl_android.cc
+++ b/content/browser/renderer_host/compositor_impl_android.cc
@@ -6,6 +6,7 @@
 
 #include <android/bitmap.h>
 #include <android/native_window_jni.h>
+#include <stdint.h>
 
 #include "base/android/jni_android.h"
 #include "base/android/scoped_java_ref.h"
@@ -593,9 +594,9 @@
 
 #if defined(ADDRESS_SANITIZER) || defined(THREAD_SANITIZER) || \
   defined(SYZYASAN) || defined(CYGPROFILE_INSTRUMENTATION)
-  const int64 kGpuChannelTimeoutInSeconds = 40;
+  const int64_t kGpuChannelTimeoutInSeconds = 40;
 #else
-  const int64 kGpuChannelTimeoutInSeconds = 10;
+  const int64_t kGpuChannelTimeoutInSeconds = 10;
 #endif
 
   BrowserGpuChannelHostFactory* factory =
diff --git a/content/browser/renderer_host/compositor_impl_android.h b/content/browser/renderer_host/compositor_impl_android.h
index 7dc3837..0072979eb 100644
--- a/content/browser/renderer_host/compositor_impl_android.h
+++ b/content/browser/renderer_host/compositor_impl_android.h
@@ -5,9 +5,11 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_
 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_
 
-#include "base/basictypes.h"
+#include <stddef.h>
+
 #include "base/cancelable_callback.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/timer/timer.h"
diff --git a/content/browser/renderer_host/compositor_resize_lock_aura.h b/content/browser/renderer_host/compositor_resize_lock_aura.h
index ad706904..981694f 100644
--- a/content/browser/renderer_host/compositor_resize_lock_aura.h
+++ b/content/browser/renderer_host/compositor_resize_lock_aura.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_RESIZE_LOCK_AURA_H_
 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_RESIZE_LOCK_AURA_H_
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
 #include "base/time/time.h"
diff --git a/content/browser/renderer_host/database_message_filter.cc b/content/browser/renderer_host/database_message_filter.cc
index 5796de5..15d1a2a 100644
--- a/content/browser/renderer_host/database_message_filter.cc
+++ b/content/browser/renderer_host/database_message_filter.cc
@@ -12,6 +12,7 @@
 #include "base/strings/utf_string_conversions.h"
 #include "base/threading/thread.h"
 #include "base/trace_event/trace_event.h"
+#include "build/build_config.h"
 #include "content/browser/bad_message.h"
 #include "content/common/database_messages.h"
 #include "content/public/browser/user_metrics.h"
@@ -227,7 +228,7 @@
 
 void DatabaseMessageFilter::OnDatabaseGetFileAttributes(
     const base::string16& vfs_file_name,
-    int32* attributes) {
+    int32_t* attributes) {
   DCHECK_CURRENTLY_ON(BrowserThread::FILE);
   *attributes = -1;
   base::FilePath db_file =
@@ -238,7 +239,7 @@
 
 void DatabaseMessageFilter::OnDatabaseGetFileSize(
     const base::string16& vfs_file_name,
-    int64* size) {
+    int64_t* size) {
   DCHECK_CURRENTLY_ON(BrowserThread::FILE);
   *size = 0;
   base::FilePath db_file =
@@ -257,7 +258,7 @@
   if (!quota_manager) {
     NOTREACHED();  // The system is shutting down, messages are unexpected.
     DatabaseHostMsg_GetSpaceAvailable::WriteReplyParams(
-        reply_msg, static_cast<int64>(0));
+        reply_msg, static_cast<int64_t>(0));
     Send(reply_msg);
     return;
   }
@@ -275,9 +276,9 @@
 void DatabaseMessageFilter::OnDatabaseGetUsageAndQuota(
     IPC::Message* reply_msg,
     storage::QuotaStatusCode status,
-    int64 usage,
-    int64 quota) {
-  int64 available = 0;
+    int64_t usage,
+    int64_t quota) {
+  int64_t available = 0;
   if ((status == storage::kQuotaStatusOk) && (usage < quota))
     available = quota - usage;
   DatabaseHostMsg_GetSpaceAvailable::WriteReplyParams(reply_msg, available);
@@ -285,7 +286,9 @@
 }
 
 void DatabaseMessageFilter::OnDatabaseSetFileSize(
-    const base::string16& vfs_file_name, int64 size, bool* success) {
+    const base::string16& vfs_file_name,
+    int64_t size,
+    bool* success) {
   DCHECK_CURRENTLY_ON(BrowserThread::FILE);
   *success = false;
   base::FilePath db_file =
@@ -298,7 +301,7 @@
     const std::string& origin_identifier,
     const base::string16& database_name,
     const base::string16& description,
-    int64 estimated_size) {
+    int64_t estimated_size) {
   DCHECK_CURRENTLY_ON(BrowserThread::FILE);
 
   if (!DatabaseUtil::IsValidOriginIdentifier(origin_identifier)) {
@@ -311,7 +314,7 @@
       "websql.OpenDatabase",
       IsOriginSecure(storage::GetOriginFromIdentifier(origin_identifier)));
 
-  int64 database_size = 0;
+  int64_t database_size = 0;
   db_tracker_->DatabaseOpened(origin_identifier, database_name, description,
                               estimated_size, &database_size);
   database_connections_.AddConnection(origin_identifier, database_name);
@@ -365,7 +368,7 @@
 void DatabaseMessageFilter::OnDatabaseSizeChanged(
     const std::string& origin_identifier,
     const base::string16& database_name,
-    int64 database_size) {
+    int64_t database_size) {
   DCHECK_CURRENTLY_ON(BrowserThread::FILE);
   if (database_connections_.IsOriginUsed(origin_identifier)) {
     Send(new DatabaseMsg_UpdateSize(origin_identifier, database_name,
diff --git a/content/browser/renderer_host/database_message_filter.h b/content/browser/renderer_host/database_message_filter.h
index 13f27bc..4cf4e92 100644
--- a/content/browser/renderer_host/database_message_filter.h
+++ b/content/browser/renderer_host/database_message_filter.h
@@ -5,6 +5,8 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_DATABASE_MESSAGE_FILTER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_DATABASE_MESSAGE_FILTER_H_
 
+#include <stdint.h>
+
 #include "base/containers/hash_tables.h"
 #include "base/strings/string16.h"
 #include "content/public/browser/browser_message_filter.h"
@@ -46,11 +48,11 @@
                             const bool& sync_dir,
                             IPC::Message* reply_msg);
   void OnDatabaseGetFileAttributes(const base::string16& vfs_file_name,
-                                   int32* attributes);
+                                   int32_t* attributes);
   void OnDatabaseGetFileSize(const base::string16& vfs_file_name,
-                             int64* size);
+                             int64_t* size);
   void OnDatabaseSetFileSize(const base::string16& vfs_file_name,
-                             int64 size,
+                             int64_t size,
                              bool* success);
 
   // Quota message handler (io thread)
@@ -58,14 +60,14 @@
                                    IPC::Message* reply_msg);
   void OnDatabaseGetUsageAndQuota(IPC::Message* reply_msg,
                                   storage::QuotaStatusCode status,
-                                  int64 usage,
-                                  int64 quota);
+                                  int64_t usage,
+                                  int64_t quota);
 
   // Database tracker message handlers (file thread)
   void OnDatabaseOpened(const std::string& origin_identifier,
                         const base::string16& database_name,
                         const base::string16& description,
-                        int64 estimated_size);
+                        int64_t estimated_size);
   void OnDatabaseModified(const std::string& origin_identifier,
                           const base::string16& database_name);
   void OnDatabaseClosed(const std::string& origin_identifier,
@@ -77,7 +79,7 @@
   // DatabaseTracker::Observer callbacks (file thread)
   void OnDatabaseSizeChanged(const std::string& origin_identifier,
                              const base::string16& database_name,
-                             int64 database_size) override;
+                             int64_t database_size) override;
   void OnDatabaseScheduledForDeletion(
       const std::string& origin_identifier,
       const base::string16& database_name) override;
diff --git a/content/browser/renderer_host/delegated_frame_evictor.h b/content/browser/renderer_host/delegated_frame_evictor.h
index 9e9f68a61..c1bd50e 100644
--- a/content/browser/renderer_host/delegated_frame_evictor.h
+++ b/content/browser/renderer_host/delegated_frame_evictor.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_EVICTOR_H_
 #define CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_EVICTOR_H_
 
+#include "base/macros.h"
 #include "content/browser/renderer_host/renderer_frame_manager.h"
 #include "content/common/content_export.h"
 
diff --git a/content/browser/renderer_host/dwrite_font_proxy_message_filter_win.cc b/content/browser/renderer_host/dwrite_font_proxy_message_filter_win.cc
index fedda0fe..5d18642 100644
--- a/content/browser/renderer_host/dwrite_font_proxy_message_filter_win.cc
+++ b/content/browser/renderer_host/dwrite_font_proxy_message_filter_win.cc
@@ -6,6 +6,8 @@
 
 #include <dwrite.h>
 #include <shlobj.h>
+#include <stddef.h>
+#include <stdint.h>
 
 #include <set>
 #include <utility>
diff --git a/content/browser/renderer_host/file_utilities_message_filter.h b/content/browser/renderer_host/file_utilities_message_filter.h
index 54a5830..ccbc739 100644
--- a/content/browser/renderer_host/file_utilities_message_filter.h
+++ b/content/browser/renderer_host/file_utilities_message_filter.h
@@ -5,9 +5,9 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_FILE_UTILITIES_MESSAGE_FILTER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_FILE_UTILITIES_MESSAGE_FILTER_H_
 
-#include "base/basictypes.h"
 #include "base/files/file.h"
 #include "base/files/file_path.h"
+#include "base/macros.h"
 #include "content/public/browser/browser_message_filter.h"
 
 namespace IPC {
diff --git a/content/browser/renderer_host/font_utils_linux.cc b/content/browser/renderer_host/font_utils_linux.cc
index 2ee84e1..7f67a24 100644
--- a/content/browser/renderer_host/font_utils_linux.cc
+++ b/content/browser/renderer_host/font_utils_linux.cc
@@ -4,6 +4,7 @@
 
 #include <fcntl.h>
 #include <fontconfig/fontconfig.h>
+#include <stddef.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 
@@ -119,8 +120,8 @@
 int MatchFontFaceWithFallback(const std::string& face,
                               bool is_bold,
                               bool is_italic,
-                              uint32 charset,
-                              uint32 fallback_family) {
+                              uint32_t charset,
+                              uint32_t fallback_family) {
   FcLangSet* langset = FcLangSetCreate();
   bool is_lgc = MSCharSetToFontconfig(langset, charset);
   FcPattern* pattern = FcPatternCreate();
diff --git a/content/browser/renderer_host/font_utils_linux.h b/content/browser/renderer_host/font_utils_linux.h
index 669f8169..33b31af6 100644
--- a/content/browser/renderer_host/font_utils_linux.h
+++ b/content/browser/renderer_host/font_utils_linux.h
@@ -5,6 +5,8 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_FONT_UTILS_LINUX_H_
 #define CONTENT_BROWSER_RENDERER_HOST_FONT_UTILS_LINUX_H_
 
+#include <stdint.h>
+
 #include <string>
 
 namespace content {
@@ -12,8 +14,8 @@
 int MatchFontFaceWithFallback(const std::string& face,
                               bool is_bold,
                               bool is_italic,
-                              uint32 charset,
-                              uint32 fallback_family);
+                              uint32_t charset,
+                              uint32_t fallback_family);
 
 }  // namespace content
 
diff --git a/content/browser/renderer_host/gamepad_browser_message_filter.h b/content/browser/renderer_host/gamepad_browser_message_filter.h
index e5dc8aef..343c2ac 100644
--- a/content/browser/renderer_host/gamepad_browser_message_filter.h
+++ b/content/browser/renderer_host/gamepad_browser_message_filter.h
@@ -6,6 +6,7 @@
 #define CONTENT_BROWSER_RENDERER_HOST_GAMEPAD_BROWSER_MESSAGE_FILTER_H_
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/shared_memory.h"
 #include "content/browser/gamepad/gamepad_consumer.h"
 #include "content/public/browser/browser_message_filter.h"
diff --git a/content/browser/renderer_host/gpu_message_filter.cc b/content/browser/renderer_host/gpu_message_filter.cc
index b0211926d..c381a15 100644
--- a/content/browser/renderer_host/gpu_message_filter.cc
+++ b/content/browser/renderer_host/gpu_message_filter.cc
@@ -9,6 +9,7 @@
 #include "content/browser/renderer_host/gpu_message_filter.h"
 
 #include "base/bind.h"
+#include "build/build_config.h"
 #include "content/browser/gpu/gpu_data_manager_impl.h"
 #include "content/browser/gpu/gpu_process_host.h"
 #include "content/common/child_process_host_impl.h"
diff --git a/content/browser/renderer_host/gpu_message_filter.h b/content/browser/renderer_host/gpu_message_filter.h
index e1dd856..393d0ba 100644
--- a/content/browser/renderer_host/gpu_message_filter.h
+++ b/content/browser/renderer_host/gpu_message_filter.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_GPU_MESSAGE_FILTER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_GPU_MESSAGE_FILTER_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "content/common/gpu/gpu_process_launch_causes.h"
diff --git a/content/browser/renderer_host/input/composited_scrolling_browsertest.cc b/content/browser/renderer_host/input/composited_scrolling_browsertest.cc
index e776a8e..a23e509 100644
--- a/content/browser/renderer_host/input/composited_scrolling_browsertest.cc
+++ b/content/browser/renderer_host/input/composited_scrolling_browsertest.cc
@@ -4,8 +4,10 @@
 
 #include "base/bind.h"
 #include "base/command_line.h"
+#include "base/macros.h"
 #include "base/run_loop.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "cc/base/math_util.h"
 #include "content/browser/renderer_host/input/synthetic_gesture.h"
 #include "content/browser/renderer_host/input/synthetic_smooth_scroll_gesture.h"
diff --git a/content/browser/renderer_host/input/gesture_event_queue.h b/content/browser/renderer_host/input/gesture_event_queue.h
index 2a4b452..457a9ec 100644
--- a/content/browser/renderer_host/input/gesture_event_queue.h
+++ b/content/browser/renderer_host/input/gesture_event_queue.h
@@ -5,9 +5,11 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_GESTURE_EVENT_QUEUE_H_
 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_GESTURE_EVENT_QUEUE_H_
 
+#include <stddef.h>
+
 #include <deque>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/timer/timer.h"
 #include "content/browser/renderer_host/event_with_latency_info.h"
diff --git a/content/browser/renderer_host/input/gesture_event_queue_unittest.cc b/content/browser/renderer_host/input/gesture_event_queue_unittest.cc
index 22c57e1..7e7c6e7 100644
--- a/content/browser/renderer_host/input/gesture_event_queue_unittest.cc
+++ b/content/browser/renderer_host/input/gesture_event_queue_unittest.cc
@@ -2,9 +2,10 @@
 // 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/basictypes.h"
 #include "base/location.h"
 #include "base/logging.h"
 #include "base/memory/scoped_ptr.h"
diff --git a/content/browser/renderer_host/input/input_ack_handler.h b/content/browser/renderer_host/input/input_ack_handler.h
index 14daa35..2268681 100644
--- a/content/browser/renderer_host/input/input_ack_handler.h
+++ b/content/browser/renderer_host/input/input_ack_handler.h
@@ -5,7 +5,6 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ACK_HANDLER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ACK_HANDLER_H_
 
-#include "base/basictypes.h"
 #include "content/browser/renderer_host/event_with_latency_info.h"
 #include "content/common/input/input_event_ack_state.h"
 #include "content/public/browser/native_web_keyboard_event.h"
diff --git a/content/browser/renderer_host/input/input_router.h b/content/browser/renderer_host/input/input_router.h
index b0b7ff7..5d645689 100644
--- a/content/browser/renderer_host/input/input_router.h
+++ b/content/browser/renderer_host/input/input_router.h
@@ -5,7 +5,6 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_H_
 
-#include "base/basictypes.h"
 #include "content/browser/renderer_host/event_with_latency_info.h"
 #include "content/common/input/input_event_ack_state.h"
 #include "content/public/browser/native_web_keyboard_event.h"
diff --git a/content/browser/renderer_host/input/input_router_config_helper.cc b/content/browser/renderer_host/input/input_router_config_helper.cc
index 24a4354a..53aaee3 100644
--- a/content/browser/renderer_host/input/input_router_config_helper.cc
+++ b/content/browser/renderer_host/input/input_router_config_helper.cc
@@ -5,6 +5,7 @@
 #include "content/browser/renderer_host/input/input_router_config_helper.h"
 
 #include "base/command_line.h"
+#include "build/build_config.h"
 #include "content/public/common/content_switches.h"
 #include "ui/events/gesture_detection/gesture_configuration.h"
 #include "ui/events/gesture_detection/gesture_detector.h"
diff --git a/content/browser/renderer_host/input/input_router_impl.cc b/content/browser/renderer_host/input/input_router_impl.cc
index 32261f3..d88634d 100644
--- a/content/browser/renderer_host/input/input_router_impl.cc
+++ b/content/browser/renderer_host/input/input_router_impl.cc
@@ -515,7 +515,7 @@
 void InputRouterImpl::ProcessInputEventAck(WebInputEvent::Type event_type,
                                            InputEventAckState ack_result,
                                            const ui::LatencyInfo& latency_info,
-                                           uint32 unique_touch_event_id,
+                                           uint32_t unique_touch_event_id,
                                            AckSource ack_source) {
   TRACE_EVENT2("input", "InputRouterImpl::ProcessInputEventAck",
                "type", WebInputEventTraits::GetName(event_type),
@@ -630,7 +630,7 @@
 
 void InputRouterImpl::ProcessTouchAck(InputEventAckState ack_result,
                                       const ui::LatencyInfo& latency,
-                                      uint32 unique_touch_event_id) {
+                                      uint32_t unique_touch_event_id) {
   // |touch_event_queue_| will forward to OnTouchEventAck when appropriate.
   touch_event_queue_.ProcessTouchAck(ack_result, latency,
                                      unique_touch_event_id);
diff --git a/content/browser/renderer_host/input/input_router_impl.h b/content/browser/renderer_host/input/input_router_impl.h
index d613289..36f62b2 100644
--- a/content/browser/renderer_host/input/input_router_impl.h
+++ b/content/browser/renderer_host/input/input_router_impl.h
@@ -5,9 +5,11 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_IMPL_H_
 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_IMPL_H_
 
+#include <stdint.h>
+
 #include <queue>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "content/browser/renderer_host/input/gesture_event_queue.h"
@@ -137,7 +139,7 @@
   void ProcessInputEventAck(blink::WebInputEvent::Type event_type,
                             InputEventAckState ack_result,
                             const ui::LatencyInfo& latency_info,
-                            uint32 unique_touch_event_id,
+                            uint32_t unique_touch_event_id,
                             AckSource ack_source);
 
   // Dispatches the ack'ed event to |ack_handler_|.
@@ -165,7 +167,7 @@
   // dispatch of queued touch events, or the creation of gesture events.
   void ProcessTouchAck(InputEventAckState ack_result,
                        const ui::LatencyInfo& latency,
-                       uint32 unique_touch_event_id);
+                       uint32_t unique_touch_event_id);
 
   // Called when a touch timeout-affecting bit has changed, in turn toggling the
   // touch ack timeout feature of the |touch_event_queue_| as appropriate. Input
diff --git a/content/browser/renderer_host/input/input_router_impl_perftest.cc b/content/browser/renderer_host/input/input_router_impl_perftest.cc
index be99261f..edf67f10 100644
--- a/content/browser/renderer_host/input/input_router_impl_perftest.cc
+++ b/content/browser/renderer_host/input/input_router_impl_perftest.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 "base/basictypes.h"
+#include <stddef.h>
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "content/browser/renderer_host/input/input_ack_handler.h"
 #include "content/browser/renderer_host/input/input_router_client.h"
@@ -172,7 +175,7 @@
 
 class InputEventTimer {
  public:
-  InputEventTimer(const char* test_name, int64 event_count)
+  InputEventTimer(const char* test_name, int64_t event_count)
       : test_name_(test_name),
         event_count_(event_count),
         start_(base::TimeTicks::Now()) {}
@@ -190,7 +193,7 @@
 
  private:
   const char* test_name_;
-  int64 event_count_;
+  int64_t event_count_;
   base::TimeTicks start_;
   DISALLOW_COPY_AND_ASSIGN(InputEventTimer);
 };
@@ -256,7 +259,7 @@
 
   size_t AckCount() const { return ack_handler_->ack_count(); }
 
-  int64 NextLatencyID() { return ++last_input_id_; }
+  int64_t NextLatencyID() { return ++last_input_id_; }
 
   ui::LatencyInfo CreateLatencyInfo() {
     ui::LatencyInfo latency;
@@ -329,7 +332,7 @@
   }
 
  private:
-  int64 last_input_id_;
+  int64_t last_input_id_;
   scoped_ptr<NullIPCSender> sender_;
   scoped_ptr<NullInputRouterClient> client_;
   scoped_ptr<NullInputAckHandler> ack_handler_;
diff --git a/content/browser/renderer_host/input/input_router_impl_unittest.cc b/content/browser/renderer_host/input/input_router_impl_unittest.cc
index b8f4cfb1..365900e4 100644
--- a/content/browser/renderer_host/input/input_router_impl_unittest.cc
+++ b/content/browser/renderer_host/input/input_router_impl_unittest.cc
@@ -3,14 +3,17 @@
 // found in the LICENSE file.
 
 #include <math.h>
+#include <stddef.h>
+#include <stdint.h>
 
-#include "base/basictypes.h"
 #include "base/command_line.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/thread_task_runner_handle.h"
+#include "build/build_config.h"
 #include "content/browser/renderer_host/input/gesture_event_queue.h"
 #include "content/browser/renderer_host/input/input_router_client.h"
 #include "content/browser/renderer_host/input/input_router_impl.h"
@@ -246,8 +249,8 @@
     touch_event_.SetTimestamp(timestamp);
   }
 
-  uint32 SendTouchEvent() {
-    uint32 touch_event_id = touch_event_.uniqueTouchEventId;
+  uint32_t SendTouchEvent() {
+    uint32_t touch_event_id = touch_event_.uniqueTouchEventId;
     input_router_->SendTouchEvent(TouchEventWithLatencyInfo(touch_event_));
     touch_event_.ResetPoints();
     return touch_event_id;
@@ -278,7 +281,7 @@
 
   void SendTouchEventACK(blink::WebInputEvent::Type type,
                          InputEventAckState ack_result,
-                         uint32 touch_event_id) {
+                         uint32_t touch_event_id) {
     DCHECK(WebInputEvent::isTouchEventType(type));
     InputEventAck ack(type, ack_result, touch_event_id);
     input_router_->OnMessageReceived(InputHostMsg_HandleInputEvent_ACK(0, ack));
@@ -776,14 +779,14 @@
   OnHasTouchEventHandlers(true);
 
   PressTouchPoint(1, 1);
-  uint32 touch_press_event_id = SendTouchEvent();
+  uint32_t touch_press_event_id = SendTouchEvent();
   EXPECT_TRUE(client_->GetAndResetFilterEventCalled());
   EXPECT_EQ(1U, GetSentMessageCountAndResetSink());
   EXPECT_FALSE(TouchEventQueueEmpty());
 
   // The second touch should not be sent since one is already in queue.
   MoveTouchPoint(0, 5, 5);
-  uint32 touch_move_event_id = SendTouchEvent();
+  uint32_t touch_move_event_id = SendTouchEvent();
   EXPECT_FALSE(client_->GetAndResetFilterEventCalled());
   EXPECT_EQ(0U, GetSentMessageCountAndResetSink());
   EXPECT_FALSE(TouchEventQueueEmpty());
@@ -816,7 +819,7 @@
 
   // Send a touch-press event.
   PressTouchPoint(1, 1);
-  uint32 touch_press_event_id = SendTouchEvent();
+  uint32_t touch_press_event_id = SendTouchEvent();
   MoveTouchPoint(0, 2, 2);
   MoveTouchPoint(0, 3, 3);
   EXPECT_FALSE(TouchEventQueueEmpty());
@@ -856,7 +859,7 @@
   // Press the first finger.
   PressTouchPoint(1, 1);
   SetTouchTimestamp(timestamp);
-  uint32 touch_press_event_id1 = SendTouchEvent();
+  uint32_t touch_press_event_id1 = SendTouchEvent();
   EXPECT_EQ(1U, GetSentMessageCountAndResetSink());
   expected_events.push_back(
       new ui::TouchEvent(ui::ET_TOUCH_PRESSED, gfx::Point(1, 1), 0, timestamp));
@@ -865,7 +868,7 @@
   timestamp += base::TimeDelta::FromSeconds(10);
   MoveTouchPoint(0, 500, 500);
   SetTouchTimestamp(timestamp);
-  uint32 touch_move_event_id1 = SendTouchEvent();
+  uint32_t touch_move_event_id1 = SendTouchEvent();
   EXPECT_FALSE(TouchEventQueueEmpty());
   expected_events.push_back(new ui::TouchEvent(
       ui::ET_TOUCH_MOVED, gfx::Point(500, 500), 0, timestamp));
@@ -874,7 +877,7 @@
   timestamp += base::TimeDelta::FromSeconds(10);
   PressTouchPoint(2, 2);
   SetTouchTimestamp(timestamp);
-  uint32 touch_press_event_id2 = SendTouchEvent();
+  uint32_t touch_press_event_id2 = SendTouchEvent();
   EXPECT_FALSE(TouchEventQueueEmpty());
   expected_events.push_back(
       new ui::TouchEvent(ui::ET_TOUCH_PRESSED, gfx::Point(2, 2), 1, timestamp));
@@ -884,7 +887,7 @@
   MoveTouchPoint(0, 10, 10);
   MoveTouchPoint(1, 20, 20);
   SetTouchTimestamp(timestamp);
-  uint32 touch_move_event_id2 = SendTouchEvent();
+  uint32_t touch_move_event_id2 = SendTouchEvent();
   EXPECT_FALSE(TouchEventQueueEmpty());
   expected_events.push_back(
       new ui::TouchEvent(ui::ET_TOUCH_MOVED, gfx::Point(10, 10), 0, timestamp));
@@ -898,10 +901,8 @@
                                  WebInputEvent::TouchStart,
                                  WebInputEvent::TouchMove };
 
-  uint32 touch_event_ids[] = {touch_press_event_id1,
-                              touch_move_event_id1,
-                              touch_press_event_id2,
-                              touch_move_event_id2};
+  uint32_t touch_event_ids[] = {touch_press_event_id1, touch_move_event_id1,
+                                touch_press_event_id2, touch_move_event_id2};
 
   TouchEventCoordinateSystem coordinate_system = LOCAL_COORDINATES;
 #if !defined(OS_WIN)
@@ -968,7 +969,7 @@
 
   // Precede the TouchCancel with an appropriate TouchStart;
   PressTouchPoint(1, 1);
-  uint32 touch_press_event_id = SendTouchEvent();
+  uint32_t touch_press_event_id = SendTouchEvent();
   SendTouchEventACK(WebInputEvent::TouchStart, INPUT_EVENT_ACK_STATE_CONSUMED,
                     touch_press_event_id);
   ASSERT_EQ(1U, GetSentMessageCountAndResetSink());
@@ -977,7 +978,7 @@
 
   // The TouchCancel ack is always ignored.
   CancelTouchPoint(0);
-  uint32 touch_cancel_event_id = SendTouchEvent();
+  uint32_t touch_cancel_event_id = SendTouchEvent();
   EXPECT_EQ(1U, GetSentMessageCountAndResetSink());
   EXPECT_EQ(1U, ack_handler_->GetAndResetAckCount());
   EXPECT_EQ(0, client_->in_flight_event_count());
@@ -1065,7 +1066,7 @@
     if (expected_in_flight_event_count) {
       SendInputEventACK(type, INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
       EXPECT_EQ(0U, GetSentMessageCountAndResetSink());
-      uint32 expected_ack_count = type == WebInputEvent::MouseMove ? 1 : 0;
+      uint32_t expected_ack_count = type == WebInputEvent::MouseMove ? 1 : 0;
       EXPECT_EQ(expected_ack_count, ack_handler_->GetAndResetAckCount());
       EXPECT_EQ(0, client_->in_flight_event_count());
     }
@@ -1218,7 +1219,7 @@
 
   // Verify that the touch ack timeout fires upon the delayed ack.
   PressTouchPoint(1, 1);
-  uint32 touch_press_event_id1 = SendTouchEvent();
+  uint32_t touch_press_event_id1 = SendTouchEvent();
   EXPECT_EQ(0U, ack_handler_->GetAndResetAckCount());
   EXPECT_EQ(1U, GetSentMessageCountAndResetSink());
   RunTasksAndWait(base::TimeDelta::FromMilliseconds(kDesktopTimeoutMs + 1));
@@ -1251,22 +1252,22 @@
   // TOUCH_ACTION_NONE (and no other touch-action) should disable the timeout.
   OnHasTouchEventHandlers(true);
   PressTouchPoint(1, 1);
-  uint32 touch_press_event_id2 = SendTouchEvent();
+  uint32_t touch_press_event_id2 = SendTouchEvent();
   OnSetTouchAction(TOUCH_ACTION_PAN_Y);
   EXPECT_TRUE(TouchEventTimeoutEnabled());
   ReleaseTouchPoint(0);
-  uint32 touch_release_event_id2 = SendTouchEvent();
+  uint32_t touch_release_event_id2 = SendTouchEvent();
   SendTouchEventACK(WebInputEvent::TouchStart, INPUT_EVENT_ACK_STATE_CONSUMED,
                     touch_press_event_id2);
   SendTouchEventACK(WebInputEvent::TouchEnd, INPUT_EVENT_ACK_STATE_CONSUMED,
                     touch_release_event_id2);
 
   PressTouchPoint(1, 1);
-  uint32 touch_press_event_id3 = SendTouchEvent();
+  uint32_t touch_press_event_id3 = SendTouchEvent();
   OnSetTouchAction(TOUCH_ACTION_NONE);
   EXPECT_FALSE(TouchEventTimeoutEnabled());
   ReleaseTouchPoint(0);
-  uint32 touch_release_event_id3 = SendTouchEvent();
+  uint32_t touch_release_event_id3 = SendTouchEvent();
   SendTouchEventACK(WebInputEvent::TouchStart, INPUT_EVENT_ACK_STATE_CONSUMED,
                     touch_press_event_id3);
   SendTouchEventACK(WebInputEvent::TouchEnd, INPUT_EVENT_ACK_STATE_CONSUMED,
@@ -1291,7 +1292,7 @@
 
   // Start a touch sequence.
   PressTouchPoint(1, 1);
-  uint32 touch_press_event_id = SendTouchEvent();
+  uint32_t touch_press_event_id = SendTouchEvent();
   EXPECT_EQ(1U, GetSentMessageCountAndResetSink());
 
   // TOUCH_ACTION_NONE should disable the timeout.
@@ -1302,7 +1303,7 @@
   EXPECT_FALSE(TouchEventTimeoutEnabled());
 
   MoveTouchPoint(0, 1, 2);
-  uint32 touch_move_event_id = SendTouchEvent();
+  uint32_t touch_move_event_id = SendTouchEvent();
   EXPECT_FALSE(TouchEventTimeoutEnabled());
   EXPECT_EQ(1U, GetSentMessageCountAndResetSink());
 
@@ -1316,7 +1317,7 @@
 
   // End the touch sequence.
   ReleaseTouchPoint(0);
-  uint32 touch_release_event_id = SendTouchEvent();
+  uint32_t touch_release_event_id = SendTouchEvent();
   SendTouchEventACK(WebInputEvent::TouchEnd, INPUT_EVENT_ACK_STATE_CONSUMED,
                     touch_release_event_id);
   EXPECT_FALSE(TouchEventTimeoutEnabled());
@@ -1342,20 +1343,20 @@
 
   // Sequence 1.
   PressTouchPoint(1, 1);
-  uint32 touch_press_event_id1 = SendTouchEvent();
+  uint32_t touch_press_event_id1 = SendTouchEvent();
   OnSetTouchAction(TOUCH_ACTION_NONE);
   MoveTouchPoint(0, 50, 50);
-  uint32 touch_move_event_id1 = SendTouchEvent();
+  uint32_t touch_move_event_id1 = SendTouchEvent();
   ReleaseTouchPoint(0);
-  uint32 touch_release_event_id1 = SendTouchEvent();
+  uint32_t touch_release_event_id1 = SendTouchEvent();
 
   // Sequence 2.
   PressTouchPoint(1, 1);
-  uint32 touch_press_event_id2 = SendTouchEvent();
+  uint32_t touch_press_event_id2 = SendTouchEvent();
   MoveTouchPoint(0, 50, 50);
-  uint32 touch_move_event_id2 = SendTouchEvent();
+  uint32_t touch_move_event_id2 = SendTouchEvent();
   ReleaseTouchPoint(0);
-  uint32 touch_release_event_id2 = SendTouchEvent();
+  uint32_t touch_release_event_id2 = SendTouchEvent();
 
   SendTouchEventACK(WebInputEvent::TouchStart, INPUT_EVENT_ACK_STATE_CONSUMED,
                     touch_press_event_id1);
@@ -1400,9 +1401,9 @@
 
   // Sequence 1.
   PressTouchPoint(1, 1);
-  uint32 touch_press_event_id1 = SendTouchEvent();
+  uint32_t touch_press_event_id1 = SendTouchEvent();
   MoveTouchPoint(0, 50, 50);
-  uint32 touch_move_event_id1 = SendTouchEvent();
+  uint32_t touch_move_event_id1 = SendTouchEvent();
   OnSetTouchAction(TOUCH_ACTION_NONE);
   SendTouchEventACK(WebInputEvent::TouchStart, INPUT_EVENT_ACK_STATE_CONSUMED,
                     touch_press_event_id1);
@@ -1410,11 +1411,11 @@
                     touch_move_event_id1);
 
   ReleaseTouchPoint(0);
-  uint32 touch_release_event_id1 = SendTouchEvent();
+  uint32_t touch_release_event_id1 = SendTouchEvent();
 
   // Sequence 2
   PressTouchPoint(1, 1);
-  uint32 touch_press_event_id2 = SendTouchEvent();
+  uint32_t touch_press_event_id2 = SendTouchEvent();
   MoveTouchPoint(0, 50, 50);
   SendTouchEvent();
   ReleaseTouchPoint(0);
@@ -1452,12 +1453,12 @@
   // Touch sequence with touch handler.
   OnHasTouchEventHandlers(true);
   PressTouchPoint(1, 1);
-  uint32 touch_press_event_id = SendTouchEvent();
+  uint32_t touch_press_event_id = SendTouchEvent();
   MoveTouchPoint(0, 50, 50);
-  uint32 touch_move_event_id = SendTouchEvent();
+  uint32_t touch_move_event_id = SendTouchEvent();
   OnSetTouchAction(TOUCH_ACTION_NONE);
   ReleaseTouchPoint(0);
-  uint32 touch_release_event_id = SendTouchEvent();
+  uint32_t touch_release_event_id = SendTouchEvent();
   EXPECT_EQ(1U, GetSentMessageCountAndResetSink());
 
   // Ensure we have touch-action:none, suppressing scroll events.
@@ -1498,17 +1499,17 @@
 
   // Sequence 1.
   PressTouchPoint(1, 1);
-  uint32 touch_press_event_id1 = SendTouchEvent();
+  uint32_t touch_press_event_id1 = SendTouchEvent();
   OnSetTouchAction(TOUCH_ACTION_NONE);
   SendTouchEventACK(WebInputEvent::TouchStart, INPUT_EVENT_ACK_STATE_CONSUMED,
                     touch_press_event_id1);
 
   ReleaseTouchPoint(0);
-  uint32 touch_release_event_id = SendTouchEvent();
+  uint32_t touch_release_event_id = SendTouchEvent();
 
   // Sequence 2
   PressTouchPoint(1, 1);
-  uint32 touch_press_event_id2 = SendTouchEvent();
+  uint32_t touch_press_event_id2 = SendTouchEvent();
 
   // First tap.
   EXPECT_EQ(2U, GetSentMessageCountAndResetSink());
@@ -1572,7 +1573,7 @@
   // Queue a TouchStart.
   OnHasTouchEventHandlers(true);
   PressTouchPoint(1, 1);
-  uint32 touch_press_event_id = SendTouchEvent();
+  uint32_t touch_press_event_id = SendTouchEvent();
   EXPECT_TRUE(HasPendingEvents());
 
   // DidFlush should be called only after the event is ack'ed.
@@ -1585,7 +1586,7 @@
   // Ensure different types of enqueued events will prevent the DidFlush call
   // until all such events have been fully dispatched.
   MoveTouchPoint(0, 50, 50);
-  uint32 touch_move_event_id = SendTouchEvent();
+  uint32_t touch_move_event_id = SendTouchEvent();
   ASSERT_TRUE(HasPendingEvents());
   SimulateGestureEvent(WebInputEvent::GestureScrollBegin,
                        blink::WebGestureDeviceTouchscreen);
@@ -1949,7 +1950,7 @@
   }
 
   void FlushTouchEvent(WebInputEvent::Type type) {
-    uint32 touch_event_id = SendTouchEvent();
+    uint32_t touch_event_id = SendTouchEvent();
     SendTouchEventACK(type, INPUT_EVENT_ACK_STATE_CONSUMED, touch_event_id);
     ASSERT_TRUE(TouchEventQueueEmpty());
     ASSERT_NE(0u, process_->sink().message_count());
diff --git a/content/browser/renderer_host/input/mock_input_ack_handler.h b/content/browser/renderer_host/input/mock_input_ack_handler.h
index a4aaf7f..a0e1aa92 100644
--- a/content/browser/renderer_host/input/mock_input_ack_handler.h
+++ b/content/browser/renderer_host/input/mock_input_ack_handler.h
@@ -5,6 +5,8 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ACK_HANDLER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ACK_HANDLER_H_
 
+#include <stddef.h>
+
 #include "base/memory/scoped_ptr.h"
 #include "content/browser/renderer_host/input/input_ack_handler.h"
 
diff --git a/content/browser/renderer_host/input/mock_input_router_client.h b/content/browser/renderer_host/input/mock_input_router_client.h
index 9ed300cc..3ae8835 100644
--- a/content/browser/renderer_host/input/mock_input_router_client.h
+++ b/content/browser/renderer_host/input/mock_input_router_client.h
@@ -5,6 +5,8 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ROUTER_CLIENT_H_
 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ROUTER_CLIENT_H_
 
+#include <stddef.h>
+
 #include "base/memory/scoped_ptr.h"
 #include "content/browser/renderer_host/input/input_router_client.h"
 #include "content/common/input/did_overscroll_params.h"
diff --git a/content/browser/renderer_host/input/motion_event_web.cc b/content/browser/renderer_host/input/motion_event_web.cc
index 30f141b..13dd027 100644
--- a/content/browser/renderer_host/input/motion_event_web.cc
+++ b/content/browser/renderer_host/input/motion_event_web.cc
@@ -71,7 +71,7 @@
 
 MotionEventWeb::~MotionEventWeb() {}
 
-uint32 MotionEventWeb::GetUniqueEventId() const {
+uint32_t MotionEventWeb::GetUniqueEventId() const {
   return unique_event_id_;
 }
 
diff --git a/content/browser/renderer_host/input/motion_event_web.h b/content/browser/renderer_host/input/motion_event_web.h
index 1aac855..320e31b 100644
--- a/content/browser/renderer_host/input/motion_event_web.h
+++ b/content/browser/renderer_host/input/motion_event_web.h
@@ -5,6 +5,10 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_MOTION_EVENT_WEB_H_
 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_MOTION_EVENT_WEB_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "content/common/content_export.h"
 #include "third_party/WebKit/public/web/WebInputEvent.h"
 #include "ui/events/gesture_detection/motion_event.h"
@@ -18,7 +22,7 @@
   ~MotionEventWeb() override;
 
   // ui::MotionEvent
-  uint32 GetUniqueEventId() const override;
+  uint32_t GetUniqueEventId() const override;
   Action GetAction() const override;
   int GetActionIndex() const override;
   size_t GetPointerCount() const override;
@@ -41,7 +45,7 @@
   blink::WebTouchEvent event_;
   Action cached_action_;
   int cached_action_index_;
-  const uint32 unique_event_id_;
+  const uint32_t unique_event_id_;
 
   DISALLOW_COPY_AND_ASSIGN(MotionEventWeb);
 };
diff --git a/content/browser/renderer_host/input/motion_event_web_unittest.cc b/content/browser/renderer_host/input/motion_event_web_unittest.cc
index d126ea716..df2f2305 100644
--- a/content/browser/renderer_host/input/motion_event_web_unittest.cc
+++ b/content/browser/renderer_host/input/motion_event_web_unittest.cc
@@ -5,6 +5,8 @@
 // MSVC++ requires this to be set before any other includes to get M_PI.
 #define _USE_MATH_DEFINES
 
+#include <stddef.h>
+
 #include <cmath>
 
 #include "content/browser/renderer_host/input/motion_event_web.h"
diff --git a/content/browser/renderer_host/input/render_widget_host_latency_tracker.cc b/content/browser/renderer_host/input/render_widget_host_latency_tracker.cc
index 8ce73ea8..3e57259 100644
--- a/content/browser/renderer_host/input/render_widget_host_latency_tracker.cc
+++ b/content/browser/renderer_host/input/render_widget_host_latency_tracker.cc
@@ -4,8 +4,11 @@
 
 #include "content/browser/renderer_host/input/render_widget_host_latency_tracker.h"
 
+#include <stddef.h>
+
 #include "base/logging.h"
 #include "base/metrics/histogram.h"
+#include "build/build_config.h"
 #include "content/browser/renderer_host/render_widget_host_impl.h"
 
 using blink::WebGestureEvent;
@@ -21,7 +24,7 @@
 void UpdateLatencyCoordinatesImpl(const blink::WebTouchEvent& touch,
                                   LatencyInfo* latency,
                                   float device_scale_factor) {
-  for (uint32 i = 0; i < touch.touchesLength; ++i) {
+  for (uint32_t i = 0; i < touch.touchesLength; ++i) {
     LatencyInfo::InputCoordinate coordinate(
         touch.touches[i].position.x * device_scale_factor,
         touch.touches[i].position.y * device_scale_factor);
@@ -73,7 +76,7 @@
 }
 
 void ComputeInputLatencyHistograms(WebInputEvent::Type type,
-                                   int64 latency_component_id,
+                                   int64_t latency_component_id,
                                    const LatencyInfo& latency) {
   LatencyInfo::LatencyComponent rwh_component;
   if (!latency.FindLatency(ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT,
@@ -152,7 +155,7 @@
 void ComputeScrollLatencyHistograms(
     const LatencyInfo::LatencyComponent& gpu_swap_begin_component,
     const LatencyInfo::LatencyComponent& gpu_swap_end_component,
-    int64 latency_component_id,
+    int64_t latency_component_id,
     const LatencyInfo& latency) {
   DCHECK(!gpu_swap_begin_component.event_time.is_null());
   DCHECK(!gpu_swap_end_component.event_time.is_null());
@@ -256,8 +259,8 @@
 // provided to them by the browser process. This function adds the correct
 // component ID where necessary.
 void AddLatencyInfoComponentIds(LatencyInfo* latency,
-                                int64 latency_component_id) {
-  std::vector<std::pair<ui::LatencyComponentType, int64>> new_components_key;
+                                int64_t latency_component_id) {
+  std::vector<std::pair<ui::LatencyComponentType, int64_t>> new_components_key;
   std::vector<LatencyInfo::LatencyComponent> new_components_value;
   for (const auto& lc : latency->latency_components()) {
     ui::LatencyComponentType component_type = lc.first.first;
@@ -299,7 +302,7 @@
                                                 int process_id) {
   DCHECK_EQ(0, last_event_id_);
   DCHECK_EQ(0, latency_component_id_);
-  last_event_id_ = static_cast<int64>(process_id) << 32;
+  last_event_id_ = static_cast<int64_t>(process_id) << 32;
   latency_component_id_ = routing_id | last_event_id_;
 }
 
diff --git a/content/browser/renderer_host/input/render_widget_host_latency_tracker.h b/content/browser/renderer_host/input/render_widget_host_latency_tracker.h
index 32537d1..6df155fe 100644
--- a/content/browser/renderer_host/input/render_widget_host_latency_tracker.h
+++ b/content/browser/renderer_host/input/render_widget_host_latency_tracker.h
@@ -5,9 +5,11 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_RENDER_WIDGET_HOST_LATENCY_TRACKER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_RENDER_WIDGET_HOST_LATENCY_TRACKER_H_
 
+#include <stdint.h>
+
 #include <vector>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "content/browser/renderer_host/event_with_latency_info.h"
 #include "content/common/content_export.h"
 #include "ui/events/latency_info.h"
@@ -56,11 +58,11 @@
 
   // Returns the ID that uniquely describes this component to the latency
   // subsystem.
-  int64 latency_component_id() const { return latency_component_id_; }
+  int64_t latency_component_id() const { return latency_component_id_; }
 
  private:
-  int64 last_event_id_;
-  int64 latency_component_id_;
+  int64_t last_event_id_;
+  int64_t latency_component_id_;
   float device_scale_factor_;
   bool has_seent_first_gesture_scroll_update_;
 
diff --git a/content/browser/renderer_host/input/synthetic_gesture.h b/content/browser/renderer_host/input/synthetic_gesture.h
index f90b72c4..626bd15 100644
--- a/content/browser/renderer_host/input/synthetic_gesture.h
+++ b/content/browser/renderer_host/input/synthetic_gesture.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_H_
 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "content/common/content_export.h"
diff --git a/content/browser/renderer_host/input/synthetic_gesture_controller.h b/content/browser/renderer_host/input/synthetic_gesture_controller.h
index 0a42f31..aeef18f 100644
--- a/content/browser/renderer_host/input/synthetic_gesture_controller.h
+++ b/content/browser/renderer_host/input/synthetic_gesture_controller.h
@@ -9,6 +9,7 @@
 #include <utility>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
 #include "base/time/time.h"
diff --git a/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc b/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc
index d0c41af8..dccbbc3 100644
--- a/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc
+++ b/content/browser/renderer_host/input/synthetic_gesture_controller_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/bind.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
@@ -415,14 +418,14 @@
         EXPECT_EQ(touch_event.type, WebInputEvent::TouchStart);
         position_ = gfx::PointF(touch_event.touches[0].position);
         start_time_ = base::TimeDelta::FromMilliseconds(
-            static_cast<int64>(touch_event.timeStampSeconds * 1000));
+            static_cast<int64_t>(touch_event.timeStampSeconds * 1000));
         state_ = STARTED;
         break;
       case STARTED:
         EXPECT_EQ(touch_event.type, WebInputEvent::TouchEnd);
         EXPECT_EQ(position_, gfx::PointF(touch_event.touches[0].position));
         stop_time_ = base::TimeDelta::FromMilliseconds(
-            static_cast<int64>(touch_event.timeStampSeconds * 1000));
+            static_cast<int64_t>(touch_event.timeStampSeconds * 1000));
         state_ = FINISHED;
         break;
       case FINISHED:
@@ -448,7 +451,7 @@
         EXPECT_EQ(mouse_event.clickCount, 1);
         position_ = gfx::PointF(mouse_event.x, mouse_event.y);
         start_time_ = base::TimeDelta::FromMilliseconds(
-            static_cast<int64>(mouse_event.timeStampSeconds * 1000));
+            static_cast<int64_t>(mouse_event.timeStampSeconds * 1000));
         state_ = STARTED;
         break;
       case STARTED:
@@ -457,7 +460,7 @@
         EXPECT_EQ(mouse_event.clickCount, 1);
         EXPECT_EQ(position_, gfx::PointF(mouse_event.x, mouse_event.y));
         stop_time_ = base::TimeDelta::FromMilliseconds(
-            static_cast<int64>(mouse_event.timeStampSeconds * 1000));
+            static_cast<int64_t>(mouse_event.timeStampSeconds * 1000));
         state_ = FINISHED;
         break;
       case FINISHED:
diff --git a/content/browser/renderer_host/input/synthetic_gesture_target_android.cc b/content/browser/renderer_host/input/synthetic_gesture_target_android.cc
index aca0ab67..475f6c11 100644
--- a/content/browser/renderer_host/input/synthetic_gesture_target_android.cc
+++ b/content/browser/renderer_host/input/synthetic_gesture_target_android.cc
@@ -44,8 +44,10 @@
       env, touch_event_synthesizer_.obj(), x, y, dx, dy);
 }
 
-void SyntheticGestureTargetAndroid::TouchInject(
-    JNIEnv* env, Action action, int pointer_count, int64 time_in_ms) {
+void SyntheticGestureTargetAndroid::TouchInject(JNIEnv* env,
+                                                Action action,
+                                                int pointer_count,
+                                                int64_t time_in_ms) {
   TRACE_EVENT0("input", "SyntheticGestureTargetAndroid::TouchInject");
   Java_MotionEventSynthesizer_inject(env, touch_event_synthesizer_.obj(),
                                     static_cast<int>(action), pointer_count,
@@ -81,7 +83,7 @@
   }
 
   TouchInject(env, action, num_touches,
-              static_cast<int64>(web_touch.timeStampSeconds * 1000.0));
+              static_cast<int64_t>(web_touch.timeStampSeconds * 1000.0));
 }
 
 void SyntheticGestureTargetAndroid::DispatchWebMouseWheelEventToPlatform(
@@ -91,8 +93,8 @@
                        web_wheel.deltaY);
   Java_MotionEventSynthesizer_inject(
       env, touch_event_synthesizer_.obj(),
-      static_cast<int>(SyntheticGestureTargetAndroid::ActionScroll),
-      1, static_cast<int64>(web_wheel.timeStampSeconds * 1000.0));
+      static_cast<int>(SyntheticGestureTargetAndroid::ActionScroll), 1,
+      static_cast<int64_t>(web_wheel.timeStampSeconds * 1000.0));
 }
 
 void SyntheticGestureTargetAndroid::DispatchWebMouseEventToPlatform(
diff --git a/content/browser/renderer_host/input/synthetic_gesture_target_android.h b/content/browser/renderer_host/input/synthetic_gesture_target_android.h
index aa1236d..1e00539 100644
--- a/content/browser/renderer_host/input/synthetic_gesture_target_android.h
+++ b/content/browser/renderer_host/input/synthetic_gesture_target_android.h
@@ -5,7 +5,10 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_ANDROID_H_
 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_ANDROID_H_
 
+#include <stdint.h>
+
 #include "base/android/jni_android.h"
+#include "base/macros.h"
 #include "base/time/time.h"
 #include "content/browser/renderer_host/input/synthetic_gesture_target_base.h"
 
@@ -57,7 +60,7 @@
   void TouchInject(JNIEnv* env,
                    Action action,
                    int pointer_count,
-                   int64 time_in_ms);
+                   int64_t time_in_ms);
 
   base::android::ScopedJavaGlobalRef<jobject> touch_event_synthesizer_;
 
diff --git a/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc b/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc
index 334a3d1..d7b47ba 100644
--- a/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc
+++ b/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc
@@ -4,6 +4,8 @@
 
 #include "content/browser/renderer_host/input/synthetic_gesture_target_aura.h"
 
+#include <stddef.h>
+
 #include "content/browser/renderer_host/render_widget_host_impl.h"
 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
 #include "content/browser/renderer_host/ui_events_helper.h"
diff --git a/content/browser/renderer_host/input/synthetic_gesture_target_aura.h b/content/browser/renderer_host/input/synthetic_gesture_target_aura.h
index 42303f2..a4964bab 100644
--- a/content/browser/renderer_host/input/synthetic_gesture_target_aura.h
+++ b/content/browser/renderer_host/input/synthetic_gesture_target_aura.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_AURA_H_
 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_AURA_H_
 
+#include "base/macros.h"
 #include "base/time/time.h"
 #include "content/browser/renderer_host/input/synthetic_gesture_target_base.h"
 #include "content/common/input/synthetic_gesture_params.h"
diff --git a/content/browser/renderer_host/input/synthetic_gesture_target_base.h b/content/browser/renderer_host/input/synthetic_gesture_target_base.h
index 8063ae0..3d01549c 100644
--- a/content/browser/renderer_host/input/synthetic_gesture_target_base.h
+++ b/content/browser/renderer_host/input/synthetic_gesture_target_base.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_BASE_H_
 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_BASE_H_
 
+#include "base/macros.h"
 #include "base/time/time.h"
 #include "content/browser/renderer_host/input/synthetic_gesture_target.h"
 
diff --git a/content/browser/renderer_host/input/synthetic_gesture_target_mac.h b/content/browser/renderer_host/input/synthetic_gesture_target_mac.h
index 87b2939..4ecf50f 100644
--- a/content/browser/renderer_host/input/synthetic_gesture_target_mac.h
+++ b/content/browser/renderer_host/input/synthetic_gesture_target_mac.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_MAC_H_
 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_MAC_H_
 
+#include "base/macros.h"
 #include "content/browser/renderer_host/input/synthetic_gesture_target_base.h"
 #include "content/browser/renderer_host/render_widget_host_view_mac.h"
 #include "content/common/input/synthetic_gesture_params.h"
diff --git a/content/browser/renderer_host/input/synthetic_pinch_gesture.h b/content/browser/renderer_host/input/synthetic_pinch_gesture.h
index e044443..970bd87 100644
--- a/content/browser/renderer_host/input/synthetic_pinch_gesture.h
+++ b/content/browser/renderer_host/input/synthetic_pinch_gesture.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_PINCH_GESTURE_H_
 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_PINCH_GESTURE_H_
 
+#include "base/macros.h"
 #include "base/time/time.h"
 #include "content/browser/renderer_host/input/synthetic_gesture.h"
 #include "content/browser/renderer_host/input/synthetic_gesture_target.h"
diff --git a/content/browser/renderer_host/input/synthetic_smooth_move_gesture.cc b/content/browser/renderer_host/input/synthetic_smooth_move_gesture.cc
index ec7f3bc5..f396ea6 100644
--- a/content/browser/renderer_host/input/synthetic_smooth_move_gesture.cc
+++ b/content/browser/renderer_host/input/synthetic_smooth_move_gesture.cc
@@ -4,6 +4,8 @@
 
 #include "content/browser/renderer_host/input/synthetic_smooth_move_gesture.h"
 
+#include <stdint.h>
+
 #include "base/logging.h"
 #include "ui/gfx/geometry/point_f.h"
 
@@ -308,7 +310,7 @@
 void SyntheticSmoothMoveGesture::ComputeNextMoveSegment() {
   current_move_segment_++;
   DCHECK_LT(current_move_segment_, static_cast<int>(params_.distances.size()));
-  int64 total_duration_in_us = static_cast<int64>(
+  int64_t total_duration_in_us = static_cast<int64_t>(
       1e6 * (params_.distances[current_move_segment_].Length() /
              params_.speed_in_pixels_s));
   DCHECK_GT(total_duration_in_us, 0);
diff --git a/content/browser/renderer_host/input/synthetic_smooth_move_gesture.h b/content/browser/renderer_host/input/synthetic_smooth_move_gesture.h
index 931d2f4f..577a8c0 100644
--- a/content/browser/renderer_host/input/synthetic_smooth_move_gesture.h
+++ b/content/browser/renderer_host/input/synthetic_smooth_move_gesture.h
@@ -7,6 +7,7 @@
 
 #include <vector>
 
+#include "base/macros.h"
 #include "base/time/time.h"
 #include "content/browser/renderer_host/input/synthetic_gesture.h"
 #include "content/browser/renderer_host/input/synthetic_gesture_target.h"
diff --git a/content/browser/renderer_host/input/synthetic_tap_gesture.h b/content/browser/renderer_host/input/synthetic_tap_gesture.h
index b20c1ec..4f74630 100644
--- a/content/browser/renderer_host/input/synthetic_tap_gesture.h
+++ b/content/browser/renderer_host/input/synthetic_tap_gesture.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_TAP_GESTURE_H_
 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_TAP_GESTURE_H_
 
+#include "base/macros.h"
 #include "content/browser/renderer_host/input/synthetic_gesture.h"
 #include "content/browser/renderer_host/input/synthetic_gesture_target.h"
 #include "content/browser/renderer_host/input/synthetic_pointer.h"
diff --git a/content/browser/renderer_host/input/synthetic_touchpad_pinch_gesture.cc b/content/browser/renderer_host/input/synthetic_touchpad_pinch_gesture.cc
index 0bf75ac..c47694a 100644
--- a/content/browser/renderer_host/input/synthetic_touchpad_pinch_gesture.cc
+++ b/content/browser/renderer_host/input/synthetic_touchpad_pinch_gesture.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 "content/browser/renderer_host/input/synthetic_touchpad_pinch_gesture.h"
 
 namespace content {
@@ -129,9 +131,9 @@
   float scale_factor_delta =
       (scale_factor - 1.0f) * kPixelsNeededToDoubleOrHalve;
 
-  int64 total_duration_in_us =
-      static_cast<int64>(1e6 * (static_cast<double>(scale_factor_delta) /
-                                params_.relative_pointer_speed_in_pixels_s));
+  int64_t total_duration_in_us =
+      static_cast<int64_t>(1e6 * (static_cast<double>(scale_factor_delta) /
+                                  params_.relative_pointer_speed_in_pixels_s));
   DCHECK_GT(total_duration_in_us, 0);
   stop_time_ =
       start_time_ + base::TimeDelta::FromMicroseconds(total_duration_in_us);
diff --git a/content/browser/renderer_host/input/synthetic_touchpad_pinch_gesture.h b/content/browser/renderer_host/input/synthetic_touchpad_pinch_gesture.h
index b5a88c2..d2097634 100644
--- a/content/browser/renderer_host/input/synthetic_touchpad_pinch_gesture.h
+++ b/content/browser/renderer_host/input/synthetic_touchpad_pinch_gesture.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_TOUCHPAD_PINCH_GESTURE_H_
 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_TOUCHPAD_PINCH_GESTURE_H_
 
+#include "base/macros.h"
 #include "base/time/time.h"
 #include "content/browser/renderer_host/input/synthetic_gesture.h"
 #include "content/browser/renderer_host/input/synthetic_gesture_target.h"
diff --git a/content/browser/renderer_host/input/synthetic_touchscreen_pinch_gesture.cc b/content/browser/renderer_host/input/synthetic_touchscreen_pinch_gesture.cc
index 9d0ff71..3a317822b 100644
--- a/content/browser/renderer_host/input/synthetic_touchscreen_pinch_gesture.cc
+++ b/content/browser/renderer_host/input/synthetic_touchscreen_pinch_gesture.cc
@@ -4,6 +4,8 @@
 
 #include "content/browser/renderer_host/input/synthetic_touchscreen_pinch_gesture.h"
 
+#include <stdint.h>
+
 #include <cmath>
 
 #include "base/logging.h"
@@ -136,7 +138,7 @@
 
   max_pointer_delta_0_ = initial_distance_to_anchor - final_distance_to_anchor;
 
-  int64 total_duration_in_us = static_cast<int64>(
+  int64_t total_duration_in_us = static_cast<int64_t>(
       1e6 * (static_cast<double>(std::abs(2 * max_pointer_delta_0_)) /
              params_.relative_pointer_speed_in_pixels_s));
   DCHECK_GT(total_duration_in_us, 0);
diff --git a/content/browser/renderer_host/input/synthetic_touchscreen_pinch_gesture.h b/content/browser/renderer_host/input/synthetic_touchscreen_pinch_gesture.h
index 73d2c41..c42e608 100644
--- a/content/browser/renderer_host/input/synthetic_touchscreen_pinch_gesture.h
+++ b/content/browser/renderer_host/input/synthetic_touchscreen_pinch_gesture.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_TOUCHSCREEN_PINCH_GESTURE_H_
 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_TOUCHSCREEN_PINCH_GESTURE_H_
 
+#include "base/macros.h"
 #include "base/time/time.h"
 #include "content/browser/renderer_host/input/synthetic_gesture.h"
 #include "content/browser/renderer_host/input/synthetic_gesture_target.h"
diff --git a/content/browser/renderer_host/input/tap_suppression_controller.h b/content/browser/renderer_host/input/tap_suppression_controller.h
index bec962a0..dc0def5 100644
--- a/content/browser/renderer_host/input/tap_suppression_controller.h
+++ b/content/browser/renderer_host/input/tap_suppression_controller.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_TAP_SUPPRESSION_CONTROLLER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TAP_SUPPRESSION_CONTROLLER_H_
 
+#include "base/macros.h"
 #include "base/time/time.h"
 #include "base/timer/timer.h"
 #include "content/common/content_export.h"
diff --git a/content/browser/renderer_host/input/tap_suppression_controller_client.h b/content/browser/renderer_host/input/tap_suppression_controller_client.h
index 075fa08d..d55613c9 100644
--- a/content/browser/renderer_host/input/tap_suppression_controller_client.h
+++ b/content/browser/renderer_host/input/tap_suppression_controller_client.h
@@ -5,6 +5,8 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_TAP_SUPPRESSION_CONTROLLER_CLIENT_H_
 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TAP_SUPPRESSION_CONTROLLER_CLIENT_H_
 
+#include "base/macros.h"
+
 namespace content {
 
 // This class provides an interface for callbacks made by
diff --git a/content/browser/renderer_host/input/tap_suppression_controller_unittest.cc b/content/browser/renderer_host/input/tap_suppression_controller_unittest.cc
index 0c2e94f0..c8e30c9 100644
--- a/content/browser/renderer_host/input/tap_suppression_controller_unittest.cc
+++ b/content/browser/renderer_host/input/tap_suppression_controller_unittest.cc
@@ -2,7 +2,7 @@
 // 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/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "content/browser/renderer_host/input/tap_suppression_controller.h"
 #include "content/browser/renderer_host/input/tap_suppression_controller_client.h"
diff --git a/content/browser/renderer_host/input/timeout_monitor.h b/content/browser/renderer_host/input/timeout_monitor.h
index 4cccbec..f2d96f2 100644
--- a/content/browser/renderer_host/input/timeout_monitor.h
+++ b/content/browser/renderer_host/input/timeout_monitor.h
@@ -5,8 +5,8 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_TIMEOUT_MONITOR_H_
 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TIMEOUT_MONITOR_H_
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/time/time.h"
 #include "base/timer/timer.h"
 #include "content/common/content_export.h"
diff --git a/content/browser/renderer_host/input/touch_action_browsertest.cc b/content/browser/renderer_host/input/touch_action_browsertest.cc
index 0fdb4f2..f8fc11a 100644
--- a/content/browser/renderer_host/input/touch_action_browsertest.cc
+++ b/content/browser/renderer_host/input/touch_action_browsertest.cc
@@ -5,8 +5,10 @@
 #include "base/auto_reset.h"
 #include "base/bind.h"
 #include "base/command_line.h"
+#include "base/macros.h"
 #include "base/run_loop.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "content/browser/renderer_host/input/synthetic_gesture.h"
 #include "content/browser/renderer_host/input/synthetic_gesture_controller.h"
 #include "content/browser/renderer_host/input/synthetic_gesture_target.h"
diff --git a/content/browser/renderer_host/input/touch_action_filter.h b/content/browser/renderer_host/input/touch_action_filter.h
index 4e27eaa..34e32d5 100644
--- a/content/browser/renderer_host/input/touch_action_filter.h
+++ b/content/browser/renderer_host/input/touch_action_filter.h
@@ -5,7 +5,7 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_ACTION_FILTER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_ACTION_FILTER_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "content/common/content_export.h"
 #include "content/common/input/touch_action.h"
 
diff --git a/content/browser/renderer_host/input/touch_emulator.cc b/content/browser/renderer_host/input/touch_emulator.cc
index e095b9d..f966c14 100644
--- a/content/browser/renderer_host/input/touch_emulator.cc
+++ b/content/browser/renderer_host/input/touch_emulator.cc
@@ -4,6 +4,7 @@
 
 #include "content/browser/renderer_host/input/touch_emulator.h"
 
+#include "build/build_config.h"
 #include "content/browser/renderer_host/input/motion_event_web.h"
 #include "content/browser/renderer_host/input/web_input_event_util.h"
 #include "content/common/input/web_touch_event_traits.h"
diff --git a/content/browser/renderer_host/input/touch_emulator.h b/content/browser/renderer_host/input/touch_emulator.h
index e21287f..d024945 100644
--- a/content/browser/renderer_host/input/touch_emulator.h
+++ b/content/browser/renderer_host/input/touch_emulator.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EMULATOR_H_
 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EMULATOR_H_
 
+#include "base/macros.h"
 #include "content/browser/renderer_host/input/touch_emulator_client.h"
 #include "content/common/cursors/webcursor.h"
 #include "content/common/input/input_event_ack_state.h"
diff --git a/content/browser/renderer_host/input/touch_emulator_unittest.cc b/content/browser/renderer_host/input/touch_emulator_unittest.cc
index f46703c..bc52448d 100644
--- a/content/browser/renderer_host/input/touch_emulator_unittest.cc
+++ b/content/browser/renderer_host/input/touch_emulator_unittest.cc
@@ -2,9 +2,10 @@
 // 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/basictypes.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/time/time.h"
diff --git a/content/browser/renderer_host/input/touch_event_queue.cc b/content/browser/renderer_host/input/touch_event_queue.cc
index 8f3a6a9..9397cf7 100644
--- a/content/browser/renderer_host/input/touch_event_queue.cc
+++ b/content/browser/renderer_host/input/touch_event_queue.cc
@@ -5,6 +5,7 @@
 #include "content/browser/renderer_host/input/touch_event_queue.h"
 
 #include "base/auto_reset.h"
+#include "base/macros.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/stl_util.h"
 #include "base/trace_event/trace_event.h"
@@ -490,7 +491,7 @@
 
 void TouchEventQueue::ProcessTouchAck(InputEventAckState ack_result,
                                       const LatencyInfo& latency_info,
-                                      const uint32 unique_touch_event_id) {
+                                      const uint32_t unique_touch_event_id) {
   TRACE_EVENT0("input", "TouchEventQueue::ProcessTouchAck");
 
   // We receive an ack for async touchmove from render.
diff --git a/content/browser/renderer_host/input/touch_event_queue.h b/content/browser/renderer_host/input/touch_event_queue.h
index 3a4bbdf..4b69d98b 100644
--- a/content/browser/renderer_host/input/touch_event_queue.h
+++ b/content/browser/renderer_host/input/touch_event_queue.h
@@ -5,10 +5,13 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_
 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <deque>
 #include <map>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/time/time.h"
 #include "content/browser/renderer_host/event_with_latency_info.h"
 #include "content/common/content_export.h"
@@ -71,7 +74,7 @@
   // more gesture events and/or additional queued touch-events to the renderer.
   void ProcessTouchAck(InputEventAckState ack_result,
                        const ui::LatencyInfo& latency_info,
-                       const uint32 unique_touch_event_id);
+                       const uint32_t unique_touch_event_id);
 
   // When GestureScrollBegin is received, we send a touch cancel to renderer,
   // route all the following touch events directly to client, and ignore the
@@ -230,7 +233,7 @@
   // uncancelable touchmoves which are still waiting for their acks back from
   // render. We do not put them back to the front the touch_event_queue any
   // more.
-  std::deque<uint32> ack_pending_async_touchmove_ids_;
+  std::deque<uint32_t> ack_pending_async_touchmove_ids_;
 
   double last_sent_touch_timestamp_sec_;
 
diff --git a/content/browser/renderer_host/input/touch_event_queue_unittest.cc b/content/browser/renderer_host/input/touch_event_queue_unittest.cc
index 6bb2a2a6..392d8229 100644
--- a/content/browser/renderer_host/input/touch_event_queue_unittest.cc
+++ b/content/browser/renderer_host/input/touch_event_queue_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 <stddef.h>
+
 #include "base/location.h"
 #include "base/logging.h"
 #include "base/memory/scoped_ptr.h"
diff --git a/content/browser/renderer_host/input/touch_input_browsertest.cc b/content/browser/renderer_host/input/touch_input_browsertest.cc
index 7cb9d54..2c68ac7 100644
--- a/content/browser/renderer_host/input/touch_input_browsertest.cc
+++ b/content/browser/renderer_host/input/touch_input_browsertest.cc
@@ -5,9 +5,11 @@
 #include "base/auto_reset.h"
 #include "base/command_line.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
+#include "build/build_config.h"
 #include "content/browser/gpu/compositor_util.h"
 #include "content/browser/renderer_host/render_widget_host_impl.h"
 #include "content/browser/web_contents/web_contents_impl.h"
diff --git a/content/browser/renderer_host/input/touch_selection_controller_client_aura.cc b/content/browser/renderer_host/input/touch_selection_controller_client_aura.cc
index 2cbc8a1..88e9663 100644
--- a/content/browser/renderer_host/input/touch_selection_controller_client_aura.cc
+++ b/content/browser/renderer_host/input/touch_selection_controller_client_aura.cc
@@ -4,6 +4,7 @@
 
 #include "content/browser/renderer_host/input/touch_selection_controller_client_aura.h"
 
+#include "base/macros.h"
 #include "content/browser/renderer_host/render_widget_host_delegate.h"
 #include "content/browser/renderer_host/render_widget_host_impl.h"
 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
diff --git a/content/browser/renderer_host/input/touch_selection_controller_client_aura.h b/content/browser/renderer_host/input/touch_selection_controller_client_aura.h
index ec9ffd5..feeefec 100644
--- a/content/browser/renderer_host/input/touch_selection_controller_client_aura.h
+++ b/content/browser/renderer_host/input/touch_selection_controller_client_aura.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_SELECTION_CONTROLLER_CLIENT_AURA_H_
 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_SELECTION_CONTROLLER_CLIENT_AURA_H_
 
+#include "base/macros.h"
 #include "base/timer/timer.h"
 #include "content/common/content_export.h"
 #include "ui/touch_selection/touch_selection_controller.h"
diff --git a/content/browser/renderer_host/input/touch_selection_controller_client_aura_browsertest.cc b/content/browser/renderer_host/input/touch_selection_controller_client_aura_browsertest.cc
index ac432e9..b59cc2bd 100644
--- a/content/browser/renderer_host/input/touch_selection_controller_client_aura_browsertest.cc
+++ b/content/browser/renderer_host/input/touch_selection_controller_client_aura_browsertest.cc
@@ -5,6 +5,7 @@
 #include "content/browser/renderer_host/input/touch_selection_controller_client_aura.h"
 
 #include "base/json/json_reader.h"
+#include "base/macros.h"
 #include "base/run_loop.h"
 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
 #include "content/browser/web_contents/web_contents_impl.h"
diff --git a/content/browser/renderer_host/input/touchpad_tap_suppression_controller.h b/content/browser/renderer_host/input/touchpad_tap_suppression_controller.h
index 64e5d47..4971963 100644
--- a/content/browser/renderer_host/input/touchpad_tap_suppression_controller.h
+++ b/content/browser/renderer_host/input/touchpad_tap_suppression_controller.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCHPAD_TAP_SUPPRESSION_CONTROLLER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCHPAD_TAP_SUPPRESSION_CONTROLLER_H_
 
+#include "base/macros.h"
 #include "content/browser/renderer_host/event_with_latency_info.h"
 #include "content/browser/renderer_host/input/tap_suppression_controller.h"
 #include "content/browser/renderer_host/input/tap_suppression_controller_client.h"
diff --git a/content/browser/renderer_host/input/touchscreen_tap_suppression_controller.h b/content/browser/renderer_host/input/touchscreen_tap_suppression_controller.h
index 35ff2743..0f07f729 100644
--- a/content/browser/renderer_host/input/touchscreen_tap_suppression_controller.h
+++ b/content/browser/renderer_host/input/touchscreen_tap_suppression_controller.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCHSCREEN_TAP_SUPPRESSION_CONTROLLER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCHSCREEN_TAP_SUPPRESSION_CONTROLLER_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "content/browser/renderer_host/event_with_latency_info.h"
 #include "content/browser/renderer_host/input/tap_suppression_controller.h"
diff --git a/content/browser/renderer_host/input/web_input_event_builders_mac.mm b/content/browser/renderer_host/input/web_input_event_builders_mac.mm
index 723b623..82386ed 100644
--- a/content/browser/renderer_host/input/web_input_event_builders_mac.mm
+++ b/content/browser/renderer_host/input/web_input_event_builders_mac.mm
@@ -33,6 +33,8 @@
 #import <ApplicationServices/ApplicationServices.h>
 #import <Cocoa/Cocoa.h>
 
+#include <stdint.h>
+
 #include "base/mac/sdk_forward_declarations.h"
 #include "base/strings/string_util.h"
 #include "content/browser/renderer_host/input/web_input_event_util.h"
diff --git a/content/browser/renderer_host/input/web_input_event_builders_mac_unittest.mm b/content/browser/renderer_host/input/web_input_event_builders_mac_unittest.mm
index 2c550651..3c8c5a28 100644
--- a/content/browser/renderer_host/input/web_input_event_builders_mac_unittest.mm
+++ b/content/browser/renderer_host/input/web_input_event_builders_mac_unittest.mm
@@ -4,9 +4,11 @@
 
 #include "content/browser/renderer_host/input/web_input_event_builders_mac.h"
 
-#import <Cocoa/Cocoa.h>
 #include <Carbon/Carbon.h>
+#import <Cocoa/Cocoa.h>
+#include <stddef.h>
 
+#include "base/macros.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "ui/events/keycodes/dom/dom_code.h"
 #include "ui/events/keycodes/dom/dom_key.h"
diff --git a/content/browser/renderer_host/input/web_input_event_unittest.cc b/content/browser/renderer_host/input/web_input_event_unittest.cc
index ac000e84..677c54c 100644
--- a/content/browser/renderer_host/input/web_input_event_unittest.cc
+++ b/content/browser/renderer_host/input/web_input_event_unittest.cc
@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 
 #include "base/command_line.h"
+#include "build/build_config.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/WebKit/public/web/WebInputEvent.h"
 #include "ui/events/event_constants.h"
diff --git a/content/browser/renderer_host/input/web_input_event_util_unittest.cc b/content/browser/renderer_host/input/web_input_event_util_unittest.cc
index d3dfb3cc1..77810308 100644
--- a/content/browser/renderer_host/input/web_input_event_util_unittest.cc
+++ b/content/browser/renderer_host/input/web_input_event_util_unittest.cc
@@ -7,6 +7,8 @@
 #define _USE_MATH_DEFINES
 #endif
 
+#include <stddef.h>
+
 #include <cmath>
 
 #include "content/browser/renderer_host/input/web_input_event_util.h"
diff --git a/content/browser/renderer_host/legacy_render_widget_host_win.h b/content/browser/renderer_host/legacy_render_widget_host_win.h
index 7733facd..09b1d82 100644
--- a/content/browser/renderer_host/legacy_render_widget_host_win.h
+++ b/content/browser/renderer_host/legacy_render_widget_host_win.h
@@ -10,7 +10,7 @@
 #include <atlcrack.h>
 #include <oleacc.h>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/win/scoped_comptr.h"
 #include "content/common/content_export.h"
diff --git a/content/browser/renderer_host/media/audio_input_debug_writer.cc b/content/browser/renderer_host/media/audio_input_debug_writer.cc
index 9bbbefe..39ba40d 100644
--- a/content/browser/renderer_host/media/audio_input_debug_writer.cc
+++ b/content/browser/renderer_host/media/audio_input_debug_writer.cc
@@ -34,7 +34,7 @@
   // Convert to 16 bit audio and write to file.
   int data_size = data->frames() * data->channels();
   if (!interleaved_data_ || interleaved_data_size_ < data_size) {
-    interleaved_data_.reset(new int16[data_size]);
+    interleaved_data_.reset(new int16_t[data_size]);
     interleaved_data_size_ = data_size;
   }
   data->ToInterleaved(data->frames(), sizeof(interleaved_data_[0]),
diff --git a/content/browser/renderer_host/media/audio_input_debug_writer.h b/content/browser/renderer_host/media/audio_input_debug_writer.h
index 68332110..1397775 100644
--- a/content/browser/renderer_host/media/audio_input_debug_writer.h
+++ b/content/browser/renderer_host/media/audio_input_debug_writer.h
@@ -5,6 +5,8 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_DEBUG_WRITER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_DEBUG_WRITER_H_
 
+#include <stdint.h>
+
 #include "base/files/file.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
@@ -43,7 +45,7 @@
   base::File file_;
 
   // Intermediate buffer to be written to file. Interleaved 16 bit audio data.
-  scoped_ptr<int16[]> interleaved_data_;
+  scoped_ptr<int16_t[]> interleaved_data_;
   int interleaved_data_size_;
 
   base::WeakPtrFactory<AudioInputDebugWriter> weak_factory_;
diff --git a/content/browser/renderer_host/media/audio_input_device_manager.cc b/content/browser/renderer_host/media/audio_input_device_manager.cc
index 5b231b0..65148e0 100644
--- a/content/browser/renderer_host/media/audio_input_device_manager.cc
+++ b/content/browser/renderer_host/media/audio_input_device_manager.cc
@@ -7,6 +7,7 @@
 #include "base/bind.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/metrics/histogram_macros.h"
+#include "build/build_config.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/common/media_stream_request.h"
 #include "media/audio/audio_input_ipc.h"
diff --git a/content/browser/renderer_host/media/audio_input_device_manager.h b/content/browser/renderer_host/media/audio_input_device_manager.h
index b123ce48..d3f01b3 100644
--- a/content/browser/renderer_host/media/audio_input_device_manager.h
+++ b/content/browser/renderer_host/media/audio_input_device_manager.h
@@ -15,9 +15,10 @@
 
 #include <map>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/threading/thread.h"
+#include "build/build_config.h"
 #include "content/browser/renderer_host/media/media_stream_provider.h"
 #include "content/common/content_export.h"
 #include "content/common/media/media_stream_options.h"
diff --git a/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc b/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc
index 498806b..4fac69d 100644
--- a/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc
+++ b/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc
@@ -2,14 +2,18 @@
 // 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 "base/bind.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "base/synchronization/waitable_event.h"
+#include "build/build_config.h"
 #include "content/browser/browser_thread_impl.h"
 #include "content/browser/renderer_host/media/audio_input_device_manager.h"
 #include "content/public/common/media_stream_request.h"
diff --git a/content/browser/renderer_host/media/audio_input_renderer_host.cc b/content/browser/renderer_host/media/audio_input_renderer_host.cc
index d6011ff..bfbb182c 100644
--- a/content/browser/renderer_host/media/audio_input_renderer_host.cc
+++ b/content/browser/renderer_host/media/audio_input_renderer_host.cc
@@ -13,6 +13,7 @@
 #include "base/process/process.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/stringprintf.h"
+#include "build/build_config.h"
 #include "content/browser/media/capture/web_contents_audio_input_stream.h"
 #include "content/browser/media/capture/web_contents_capture_util.h"
 #include "content/browser/media/media_internals.h"
@@ -113,7 +114,7 @@
 
 AudioInputRendererHost::AudioInputRendererHost(
     int render_process_id,
-    int32 renderer_pid,
+    int32_t renderer_pid,
     media::AudioManager* audio_manager,
     MediaStreamManager* media_stream_manager,
     AudioMirroringManager* audio_mirroring_manager,
@@ -211,7 +212,7 @@
                                      message));
 }
 
-void AudioInputRendererHost::set_renderer_pid(int32 renderer_pid) {
+void AudioInputRendererHost::set_renderer_pid(int32_t renderer_pid) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   renderer_pid_ = renderer_pid;
 }
@@ -409,14 +410,14 @@
   // Create a new AudioEntry structure.
   scoped_ptr<AudioEntry> entry(new AudioEntry());
 
-  const uint32 segment_size =
+  const uint32_t segment_size =
       (sizeof(media::AudioInputBufferParameters) +
        media::AudioBus::CalculateMemorySize(audio_params));
   entry->shared_memory_segment_count = config.shared_memory_count;
 
   // Create the shared memory and share it with the renderer process
   // using a new SyncWriter object.
-  base::CheckedNumeric<uint32> size = segment_size;
+  base::CheckedNumeric<uint32_t> size = segment_size;
   size *= entry->shared_memory_segment_count;
   if (!size.IsValid() ||
       !entry->shared_memory.CreateAndMapAnonymous(size.ValueOrDie())) {
diff --git a/content/browser/renderer_host/media/audio_input_renderer_host.h b/content/browser/renderer_host/media/audio_input_renderer_host.h
index 586e4d97..dd54996 100644
--- a/content/browser/renderer_host/media/audio_input_renderer_host.h
+++ b/content/browser/renderer_host/media/audio_input_renderer_host.h
@@ -27,7 +27,10 @@
 #include <map>
 #include <string>
 
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
@@ -101,7 +104,7 @@
   // Called from UI thread from the owner of this object.
   // |user_input_monitor| is used for typing detection and can be NULL.
   AudioInputRendererHost(int render_process_id,
-                         int32 renderer_pid,
+                         int32_t renderer_pid,
                          media::AudioManager* audio_manager,
                          MediaStreamManager* media_stream_manager,
                          AudioMirroringManager* audio_mirroring_manager,
@@ -130,7 +133,7 @@
 
   // Sets the PID renderer. This is used for constructing the debug recording
   // filename.
-  void set_renderer_pid(int32 renderer_pid);
+  void set_renderer_pid(int32_t renderer_pid);
 
  private:
   // TODO(henrika): extend test suite (compare AudioRenderHost)
@@ -240,7 +243,7 @@
 
   // PID of the render process connected to the RenderProcessHost that owns this
   // instance.
-  int32 renderer_pid_;
+  int32_t renderer_pid_;
 
   // Used to create an AudioInputController.
   media::AudioManager* audio_manager_;
diff --git a/content/browser/renderer_host/media/audio_input_sync_writer.cc b/content/browser/renderer_host/media/audio_input_sync_writer.cc
index 22165b9..1ddc66c 100644
--- a/content/browser/renderer_host/media/audio_input_sync_writer.cc
+++ b/content/browser/renderer_host/media/audio_input_sync_writer.cc
@@ -8,6 +8,7 @@
 
 #include "base/metrics/histogram.h"
 #include "base/strings/stringprintf.h"
+#include "build/build_config.h"
 #include "content/browser/renderer_host/media/media_stream_manager.h"
 #include "content/public/browser/browser_thread.h"
 
@@ -33,7 +34,7 @@
                                            size_t shared_memory_size,
                                            int shared_memory_segment_count,
                                            const media::AudioParameters& params)
-    : shared_memory_(static_cast<uint8*>(shared_memory)),
+    : shared_memory_(static_cast<uint8_t*>(shared_memory)),
       shared_memory_segment_count_(shared_memory_segment_count),
       current_segment_id_(0),
       creation_time_(base::Time::Now()),
@@ -55,7 +56,7 @@
   DVLOG(1) << "audio_bus_memory_size: " << audio_bus_memory_size_;
 
   // Create vector of audio buses by wrapping existing blocks of memory.
-  uint8* ptr = shared_memory_;
+  uint8_t* ptr = shared_memory_;
   for (int i = 0; i < shared_memory_segment_count; ++i) {
     CHECK_EQ(0U, reinterpret_cast<uintptr_t>(ptr) &
         (AudioBus::kChannelAlignment - 1));
@@ -121,7 +122,7 @@
 void AudioInputSyncWriter::Write(const AudioBus* data,
                                  double volume,
                                  bool key_pressed,
-                                 uint32 hardware_delay_bytes) {
+                                 uint32_t hardware_delay_bytes) {
   ++write_count_;
   CheckTimeSinceLastWrite();
 
@@ -226,11 +227,10 @@
   MediaStreamManager::SendMessageToNativeLog(message);
 }
 
-bool AudioInputSyncWriter::PushDataToFifo(
-    const AudioBus* data,
-    double volume,
-    bool key_pressed,
-    uint32 hardware_delay_bytes) {
+bool AudioInputSyncWriter::PushDataToFifo(const AudioBus* data,
+                                          double volume,
+                                          bool key_pressed,
+                                          uint32_t hardware_delay_bytes) {
   if (overflow_buses_.size() == kMaxOverflowBusesSize) {
     const std::string error_message = "AISW: No room in fifo.";
     LOG(ERROR) << error_message;
@@ -305,8 +305,8 @@
 void AudioInputSyncWriter::WriteParametersToCurrentSegment(
     double volume,
     bool key_pressed,
-    uint32 hardware_delay_bytes) {
-  uint8* ptr = shared_memory_;
+    uint32_t hardware_delay_bytes) {
+  uint8_t* ptr = shared_memory_;
   ptr += current_segment_id_ * shared_memory_segment_size_;
   AudioInputBuffer* buffer = reinterpret_cast<AudioInputBuffer*>(ptr);
   buffer->params.volume = volume;
diff --git a/content/browser/renderer_host/media/audio_input_sync_writer.h b/content/browser/renderer_host/media/audio_input_sync_writer.h
index d504959..8429e44e 100644
--- a/content/browser/renderer_host/media/audio_input_sync_writer.h
+++ b/content/browser/renderer_host/media/audio_input_sync_writer.h
@@ -5,13 +5,18 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_SYNC_WRITER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_SYNC_WRITER_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <deque>
 
 #include "base/gtest_prod_util.h"
+#include "base/macros.h"
 #include "base/memory/scoped_vector.h"
 #include "base/process/process.h"
 #include "base/sync_socket.h"
 #include "base/time/time.h"
+#include "build/build_config.h"
 #include "content/common/content_export.h"
 #include "media/audio/audio_input_controller.h"
 #include "media/audio/audio_parameters.h"
@@ -45,7 +50,7 @@
   void Write(const media::AudioBus* data,
              double volume,
              bool key_pressed,
-             uint32 hardware_delay_bytes) override;
+             uint32_t hardware_delay_bytes) override;
   void Close() override;
 
   bool Init();
@@ -78,7 +83,7 @@
   bool PushDataToFifo(const media::AudioBus* data,
                       double volume,
                       bool key_pressed,
-                      uint32 hardware_delay_bytes);
+                      uint32_t hardware_delay_bytes);
 
   // Writes as much data as possible from the fifo (|overflow_buses_|) to the
   // shared memory ring buffer. Returns true if all operations were successful,
@@ -88,17 +93,17 @@
   // Write audio parameters to current segment in shared memory.
   void WriteParametersToCurrentSegment(double volume,
                                        bool key_pressed,
-                                       uint32 hardware_delay_bytes);
+                                       uint32_t hardware_delay_bytes);
 
   // Signals over the socket that data has been written to the current segment.
   // Updates counters and returns true if successful. Logs error and returns
   // false if failure.
   bool SignalDataWrittenAndUpdateCounters();
 
-  uint8* shared_memory_;
-  uint32 shared_memory_segment_size_;
-  uint32 shared_memory_segment_count_;
-  uint32 current_segment_id_;
+  uint8_t* shared_memory_;
+  uint32_t shared_memory_segment_size_;
+  uint32_t shared_memory_segment_count_;
+  uint32_t current_segment_id_;
 
   // Socket to be used by the renderer. The reference is released after
   // PrepareForeignSocketHandle() is called and ran successfully.
diff --git a/content/browser/renderer_host/media/audio_input_sync_writer_unittest.cc b/content/browser/renderer_host/media/audio_input_sync_writer_unittest.cc
index d958c2b5..d691b22 100644
--- a/content/browser/renderer_host/media/audio_input_sync_writer_unittest.cc
+++ b/content/browser/renderer_host/media/audio_input_sync_writer_unittest.cc
@@ -2,10 +2,15 @@
 // 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/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/sync_socket.h"
 #include "base/time/time.h"
+#include "build/build_config.h"
 #include "content/browser/renderer_host/media/audio_input_sync_writer.h"
 #include "content/public/test/test_browser_thread_bundle.h"
 #include "media/audio/audio_parameters.h"
@@ -36,9 +41,9 @@
 #define DATA_ALIGNMENT 16
 static_assert(AudioBus::kChannelAlignment == DATA_ALIGNMENT,
               "Data alignment not same as AudioBus");
-ALIGNAS(DATA_ALIGNMENT) uint8 data[kSegments *
-    (sizeof(media::AudioInputBufferParameters) + frames * channels *
-        sizeof(float))];
+ALIGNAS(DATA_ALIGNMENT)
+uint8_t data[kSegments * (sizeof(media::AudioInputBufferParameters) +
+                          frames * channels * sizeof(float))];
 
 }  // namespace
 
@@ -137,9 +142,8 @@
           AudioParameters::AUDIO_FAKE, layout, sampling_frequency_hz,
           bits_per_sample, frames);
 
-    const uint32 segment_size =
-        sizeof(media::AudioInputBufferParameters) +
-        AudioBus::CalculateMemorySize(audio_params);
+    const uint32_t segment_size = sizeof(media::AudioInputBufferParameters) +
+                                  AudioBus::CalculateMemorySize(audio_params);
     size_t data_size = kSegments * segment_size;
     EXPECT_LE(data_size, sizeof(data));
 
diff --git a/content/browser/renderer_host/media/audio_output_device_enumerator_unittest.cc b/content/browser/renderer_host/media/audio_output_device_enumerator_unittest.cc
index d5091534..de1aa34bc 100644
--- a/content/browser/renderer_host/media/audio_output_device_enumerator_unittest.cc
+++ b/content/browser/renderer_host/media/audio_output_device_enumerator_unittest.cc
@@ -6,6 +6,7 @@
 
 #include "base/bind.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
diff --git a/content/browser/renderer_host/media/audio_renderer_host.cc b/content/browser/renderer_host/media/audio_renderer_host.cc
index 29c9d7f..3acc345 100644
--- a/content/browser/renderer_host/media/audio_renderer_host.cc
+++ b/content/browser/renderer_host/media/audio_renderer_host.cc
@@ -4,6 +4,8 @@
 
 #include "content/browser/renderer_host/media/audio_renderer_host.h"
 
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/lazy_instance.h"
@@ -569,8 +571,8 @@
   }
 
   // Create the shared memory and share with the renderer process.
-  uint32 shared_memory_size = sizeof(media::AudioOutputBufferParameters) +
-                              AudioBus::CalculateMemorySize(params);
+  uint32_t shared_memory_size = sizeof(media::AudioOutputBufferParameters) +
+                                AudioBus::CalculateMemorySize(params);
   scoped_ptr<base::SharedMemory> shared_memory(new base::SharedMemory());
   if (!shared_memory->CreateAndMapAnonymous(shared_memory_size)) {
     SendErrorMessage(stream_id);
diff --git a/content/browser/renderer_host/media/audio_renderer_host.h b/content/browser/renderer_host/media/audio_renderer_host.h
index daea0b1..ce32fb16 100644
--- a/content/browser/renderer_host/media/audio_renderer_host.h
+++ b/content/browser/renderer_host/media/audio_renderer_host.h
@@ -44,8 +44,11 @@
 #include <string>
 #include <utility>
 
+#include <stddef.h>
+
 #include "base/atomic_ref_count.h"
 #include "base/gtest_prod_util.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/process/process.h"
diff --git a/content/browser/renderer_host/media/audio_renderer_host_unittest.cc b/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
index cedd48d..396d9239 100644
--- a/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
+++ b/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
@@ -2,8 +2,11 @@
 // 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/command_line.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/sync_socket.h"
@@ -117,8 +120,10 @@
   }
 
   void OnNotifyStreamCreated(
-      int stream_id, base::SharedMemoryHandle handle,
-      base::SyncSocket::TransitDescriptor socket_descriptor, uint32 length) {
+      int stream_id,
+      base::SharedMemoryHandle handle,
+      base::SyncSocket::TransitDescriptor socket_descriptor,
+      uint32_t length) {
     // Maps the shared memory.
     shared_memory_.reset(new base::SharedMemory(handle, false));
     CHECK(shared_memory_->Map(length));
@@ -154,7 +159,7 @@
 
   scoped_ptr<base::SharedMemory> shared_memory_;
   scoped_ptr<base::SyncSocket> sync_socket_;
-  uint32 shared_memory_length_;
+  uint32_t shared_memory_length_;
 
   DISALLOW_COPY_AND_ASSIGN(MockAudioRendererHost);
 };
diff --git a/content/browser/renderer_host/media/audio_sync_reader.cc b/content/browser/renderer_host/media/audio_sync_reader.cc
index ea794a2..85b13f845 100644
--- a/content/browser/renderer_host/media/audio_sync_reader.cc
+++ b/content/browser/renderer_host/media/audio_sync_reader.cc
@@ -10,6 +10,7 @@
 #include "base/memory/shared_memory.h"
 #include "base/metrics/histogram.h"
 #include "base/strings/stringprintf.h"
+#include "build/build_config.h"
 #include "content/browser/renderer_host/media/media_stream_manager.h"
 #include "content/public/common/content_switches.h"
 #include "media/audio/audio_parameters.h"
@@ -159,7 +160,7 @@
   // catch up at some point, which means discarding counter values read from the
   // SyncSocket which don't match our current buffer index.
   size_t bytes_received = 0;
-  uint32 renderer_buffer_index = 0;
+  uint32_t renderer_buffer_index = 0;
   while (timeout.InMicroseconds() > 0) {
     bytes_received = socket_->ReceiveWithTimeout(
         &renderer_buffer_index, sizeof(renderer_buffer_index), timeout);
diff --git a/content/browser/renderer_host/media/audio_sync_reader.h b/content/browser/renderer_host/media/audio_sync_reader.h
index bb6c327..6e07e51 100644
--- a/content/browser/renderer_host/media/audio_sync_reader.h
+++ b/content/browser/renderer_host/media/audio_sync_reader.h
@@ -5,10 +5,15 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_SYNC_READER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_SYNC_READER_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/process/process.h"
 #include "base/sync_socket.h"
 #include "base/synchronization/lock.h"
 #include "base/time/time.h"
+#include "build/build_config.h"
 #include "media/audio/audio_output_controller.h"
 #include "media/base/audio_bus.h"
 
@@ -77,7 +82,7 @@
 
   // The index of the audio buffer we're expecting to be sent from the renderer;
   // used to block with timeout for audio data.
-  uint32 buffer_index_;
+  uint32_t buffer_index_;
 
   DISALLOW_COPY_AND_ASSIGN(AudioSyncReader);
 };
diff --git a/content/browser/renderer_host/media/media_capture_devices_impl.h b/content/browser/renderer_host/media/media_capture_devices_impl.h
index d40a34cc..28d155c 100644
--- a/content/browser/renderer_host/media/media_capture_devices_impl.h
+++ b/content/browser/renderer_host/media/media_capture_devices_impl.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_CAPTURE_DEVICES_IMPL_H_
 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_CAPTURE_DEVICES_IMPL_H_
 
+#include "base/macros.h"
 #include "base/memory/singleton.h"
 #include "content/public/browser/media_capture_devices.h"
 
diff --git a/content/browser/renderer_host/media/media_stream_dispatcher_host.h b/content/browser/renderer_host/media/media_stream_dispatcher_host.h
index 697fbaee..a101067c6 100644
--- a/content/browser/renderer_host/media/media_stream_dispatcher_host.h
+++ b/content/browser/renderer_host/media/media_stream_dispatcher_host.h
@@ -9,6 +9,7 @@
 #include <string>
 #include <utility>
 
+#include "base/macros.h"
 #include "content/browser/renderer_host/media/media_stream_manager.h"
 #include "content/browser/renderer_host/media/media_stream_requester.h"
 #include "content/common/content_export.h"
diff --git a/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc b/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
index db4edad..c262606 100644
--- a/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
+++ b/content/browser/renderer_host/media/media_stream_dispatcher_host_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 <queue>
 #include <string>
 
@@ -12,6 +14,7 @@
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
+#include "build/build_config.h"
 #include "content/browser/browser_thread_impl.h"
 #include "content/browser/renderer_host/media/audio_input_device_manager.h"
 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h"
diff --git a/content/browser/renderer_host/media/media_stream_manager.cc b/content/browser/renderer_host/media/media_stream_manager.cc
index 0f71c8b..331142b 100644
--- a/content/browser/renderer_host/media/media_stream_manager.cc
+++ b/content/browser/renderer_host/media/media_stream_manager.cc
@@ -4,6 +4,9 @@
 
 #include "content/browser/renderer_host/media/media_stream_manager.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <cctype>
 #include <list>
 #include <vector>
@@ -12,6 +15,7 @@
 #include "base/command_line.h"
 #include "base/compiler_specific.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/power_monitor/power_monitor.h"
 #include "base/profiler/scoped_tracker.h"
 #include "base/rand_util.h"
@@ -21,6 +25,7 @@
 #include "base/strings/stringprintf.h"
 #include "base/threading/thread.h"
 #include "base/threading/thread_local.h"
+#include "build/build_config.h"
 #include "content/browser/browser_main_loop.h"
 #include "content/browser/media/capture/web_contents_capture_util.h"
 #include "content/browser/renderer_host/media/audio_input_device_manager.h"
@@ -2052,7 +2057,7 @@
 
   crypto::HMAC hmac(crypto::HMAC::SHA256);
   const size_t digest_length = hmac.DigestLength();
-  std::vector<uint8> digest(digest_length);
+  std::vector<uint8_t> digest(digest_length);
   std::string salt = sc.Run();
   bool result = hmac.Init(security_origin.spec()) &&
                 hmac.Sign(raw_unique_id + salt, &digest[0], digest.size());
diff --git a/content/browser/renderer_host/media/media_stream_manager.h b/content/browser/renderer_host/media/media_stream_manager.h
index 2da984c9..21d4f2f 100644
--- a/content/browser/renderer_host/media/media_stream_manager.h
+++ b/content/browser/renderer_host/media/media_stream_manager.h
@@ -31,13 +31,14 @@
 #include <string>
 #include <utility>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/power_monitor/power_observer.h"
 #include "base/system_monitor/system_monitor.h"
 #include "base/threading/thread.h"
+#include "build/build_config.h"
 #include "content/browser/renderer_host/media/audio_output_device_enumerator.h"
 #include "content/browser/renderer_host/media/media_stream_provider.h"
 #include "content/common/content_export.h"
diff --git a/content/browser/renderer_host/media/media_stream_manager_unittest.cc b/content/browser/renderer_host/media/media_stream_manager_unittest.cc
index 0be6883..9f7fadb0 100644
--- a/content/browser/renderer_host/media/media_stream_manager_unittest.cc
+++ b/content/browser/renderer_host/media/media_stream_manager_unittest.cc
@@ -2,15 +2,19 @@
 // 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 "base/bind.h"
 #include "base/command_line.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/thread_task_runner_handle.h"
+#include "build/build_config.h"
 #include "content/browser/browser_thread_impl.h"
 #include "content/browser/renderer_host/media/media_stream_manager.h"
 #include "content/browser/renderer_host/media/media_stream_requester.h"
diff --git a/content/browser/renderer_host/media/media_stream_track_metrics_host.cc b/content/browser/renderer_host/media/media_stream_track_metrics_host.cc
index 328d60e..3b74b40f 100644
--- a/content/browser/renderer_host/media/media_stream_track_metrics_host.cc
+++ b/content/browser/renderer_host/media/media_stream_track_metrics_host.cc
@@ -46,7 +46,7 @@
   return handled;
 }
 
-void MediaStreamTrackMetricsHost::OnAddTrack(uint64 id,
+void MediaStreamTrackMetricsHost::OnAddTrack(uint64_t id,
                                              bool is_audio,
                                              bool is_remote) {
   if (tracks_.find(id) != tracks_.end())
@@ -56,7 +56,7 @@
   tracks_[id] = info;
 }
 
-void MediaStreamTrackMetricsHost::OnRemoveTrack(uint64 id) {
+void MediaStreamTrackMetricsHost::OnRemoveTrack(uint64_t id) {
   if (tracks_.find(id) == tracks_.end())
     return;
 
diff --git a/content/browser/renderer_host/media/media_stream_track_metrics_host.h b/content/browser/renderer_host/media/media_stream_track_metrics_host.h
index 35235db..c800f3a5 100644
--- a/content/browser/renderer_host/media/media_stream_track_metrics_host.h
+++ b/content/browser/renderer_host/media/media_stream_track_metrics_host.h
@@ -5,6 +5,8 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_TRACK_METRICS_HOST_H_
 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_TRACK_METRICS_HOST_H_
 
+#include <stdint.h>
+
 #include <map>
 #include <string>
 
@@ -37,8 +39,8 @@
   bool OnMessageReceived(const IPC::Message& message) override;
 
  private:
-  void OnAddTrack(uint64 id, bool is_audio, bool is_remote);
-  void OnRemoveTrack(uint64 id);
+  void OnAddTrack(uint64_t id, bool is_audio, bool is_remote);
+  void OnRemoveTrack(uint64_t id);
 
   // Information for a track we're keeping in |tracks_|. |is_audio|
   // specifies whether it's an audio or video track, |is_remote|
@@ -54,7 +56,7 @@
   void ReportDuration(const TrackInfo& info);
 
   // Values are unique (per renderer) track IDs.
-  typedef std::map<uint64, TrackInfo> TrackMap;
+  typedef std::map<uint64_t, TrackInfo> TrackMap;
   TrackMap tracks_;
 };
 
diff --git a/content/browser/renderer_host/media/media_stream_ui_controller_unittest.cc b/content/browser/renderer_host/media/media_stream_ui_controller_unittest.cc
index 990471f..f21618f4 100644
--- a/content/browser/renderer_host/media/media_stream_ui_controller_unittest.cc
+++ b/content/browser/renderer_host/media/media_stream_ui_controller_unittest.cc
@@ -5,6 +5,7 @@
 #include <string>
 
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/message_loop/message_loop.h"
 #include "content/browser/browser_thread_impl.h"
 #include "content/browser/renderer_host/media/media_stream_settings_requester.h"
diff --git a/content/browser/renderer_host/media/media_stream_ui_proxy.cc b/content/browser/renderer_host/media/media_stream_ui_proxy.cc
index 6d79ab4..4e4f442 100644
--- a/content/browser/renderer_host/media/media_stream_ui_proxy.cc
+++ b/content/browser/renderer_host/media/media_stream_ui_proxy.cc
@@ -5,6 +5,7 @@
 #include "content/browser/renderer_host/media/media_stream_ui_proxy.h"
 
 #include "base/command_line.h"
+#include "base/macros.h"
 #include "content/browser/frame_host/frame_tree_node.h"
 #include "content/browser/frame_host/render_frame_host_delegate.h"
 #include "content/browser/frame_host/render_frame_host_impl.h"
diff --git a/content/browser/renderer_host/media/media_stream_ui_proxy.h b/content/browser/renderer_host/media/media_stream_ui_proxy.h
index 117f7c4..0c2eaea 100644
--- a/content/browser/renderer_host/media/media_stream_ui_proxy.h
+++ b/content/browser/renderer_host/media/media_stream_ui_proxy.h
@@ -5,8 +5,8 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_UI_PROXY_H_
 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_UI_PROXY_H_
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "content/public/browser/browser_thread.h"
diff --git a/content/browser/renderer_host/media/peer_connection_tracker_host.cc b/content/browser/renderer_host/media/peer_connection_tracker_host.cc
index e3accebb..41580ebe 100644
--- a/content/browser/renderer_host/media/peer_connection_tracker_host.cc
+++ b/content/browser/renderer_host/media/peer_connection_tracker_host.cc
@@ -41,7 +41,7 @@
 PeerConnectionTrackerHost::~PeerConnectionTrackerHost() {
 }
 
-void PeerConnectionTrackerHost::OnChannelConnected(int32 peer_pid) {
+void PeerConnectionTrackerHost::OnChannelConnected(int32_t peer_pid) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   // Add PowerMonitor when connected to channel rather than in constructor due
   // to thread safety concerns. Observers of PowerMonitor must be added and
diff --git a/content/browser/renderer_host/media/peer_connection_tracker_host.h b/content/browser/renderer_host/media/peer_connection_tracker_host.h
index 788af93c..53a9630 100644
--- a/content/browser/renderer_host/media/peer_connection_tracker_host.h
+++ b/content/browser/renderer_host/media/peer_connection_tracker_host.h
@@ -5,6 +5,9 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_PEER_CONNECTION_TRACKER_HOST_H_
 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_PEER_CONNECTION_TRACKER_HOST_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/power_monitor/power_observer.h"
 #include "content/public/browser/browser_message_filter.h"
 
@@ -29,7 +32,7 @@
   bool OnMessageReceived(const IPC::Message& message) override;
   void OverrideThreadForMessage(const IPC::Message& message,
                                 BrowserThread::ID* thread) override;
-  void OnChannelConnected(int32 peer_pid) override;
+  void OnChannelConnected(int32_t peer_pid) override;
   void OnChannelClosing() override;
 
   // base::PowerObserver override.
diff --git a/content/browser/renderer_host/media/video_capture_buffer_pool.cc b/content/browser/renderer_host/media/video_capture_buffer_pool.cc
index 0d664285..a934a40c 100644
--- a/content/browser/renderer_host/media/video_capture_buffer_pool.cc
+++ b/content/browser/renderer_host/media/video_capture_buffer_pool.cc
@@ -7,6 +7,7 @@
 #include "base/logging.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/stl_util.h"
+#include "build/build_config.h"
 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
 #include "content/public/browser/browser_thread.h"
 #include "ui/gfx/buffer_format_util.h"
diff --git a/content/browser/renderer_host/media/video_capture_buffer_pool.h b/content/browser/renderer_host/media/video_capture_buffer_pool.h
index 9a468085..c69a842a 100644
--- a/content/browser/renderer_host/media/video_capture_buffer_pool.h
+++ b/content/browser/renderer_host/media/video_capture_buffer_pool.h
@@ -5,14 +5,17 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_BUFFER_POOL_H_
 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_BUFFER_POOL_H_
 
+#include <stddef.h>
+
 #include <map>
 
-#include "base/basictypes.h"
 #include "base/files/file.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/shared_memory.h"
 #include "base/process/process.h"
 #include "base/synchronization/lock.h"
+#include "build/build_config.h"
 #include "content/common/content_export.h"
 #include "media/base/video_capture_types.h"
 #include "media/base/video_frame.h"
diff --git a/content/browser/renderer_host/media/video_capture_buffer_pool_unittest.cc b/content/browser/renderer_host/media/video_capture_buffer_pool_unittest.cc
index 5ebb610..3aafd9f 100644
--- a/content/browser/renderer_host/media/video_capture_buffer_pool_unittest.cc
+++ b/content/browser/renderer_host/media/video_capture_buffer_pool_unittest.cc
@@ -6,10 +6,15 @@
 
 #include "content/browser/renderer_host/media/video_capture_buffer_pool.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
+#include "build/build_config.h"
 #include "cc/test/test_context_provider.h"
 #include "cc/test/test_web_graphics_context_3d.h"
 #include "content/browser/compositor/buffer_queue.h"
@@ -46,7 +51,9 @@
   class MockGpuMemoryBuffer : public gfx::GpuMemoryBuffer {
    public:
     explicit MockGpuMemoryBuffer(const gfx::Size& size)
-        : size_(size), data_(new uint8[size_.GetArea() * 4]), mapped_(false) {}
+        : size_(size),
+          data_(new uint8_t[size_.GetArea() * 4]),
+          mapped_(false) {}
     ~MockGpuMemoryBuffer() override { delete[] data_; }
 
     bool Map() override {
@@ -81,7 +88,7 @@
 
    private:
     const gfx::Size size_;
-    uint8* const data_;
+    uint8_t* const data_;
     bool mapped_;
   };
 
diff --git a/content/browser/renderer_host/media/video_capture_controller.cc b/content/browser/renderer_host/media/video_capture_controller.cc
index 72a7a62..6cde5f0d 100644
--- a/content/browser/renderer_host/media/video_capture_controller.cc
+++ b/content/browser/renderer_host/media/video_capture_controller.cc
@@ -4,6 +4,9 @@
 
 #include "content/browser/renderer_host/media/video_capture_controller.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <map>
 #include <set>
 
@@ -12,6 +15,7 @@
 #include "base/metrics/histogram.h"
 #include "base/metrics/sparse_histogram.h"
 #include "base/stl_util.h"
+#include "build/build_config.h"
 #include "content/browser/renderer_host/media/media_stream_manager.h"
 #include "content/browser/renderer_host/media/video_capture_buffer_pool.h"
 #include "content/browser/renderer_host/media/video_capture_device_client.h"
@@ -367,8 +371,8 @@
                 media::VideoFrame::STORAGE_GPU_MEMORY_BUFFERS));
     DCHECK(frame->data(media::VideoFrame::kYPlane) >= buffer->data(0) &&
            (frame->data(media::VideoFrame::kYPlane) <
-                (reinterpret_cast<const uint8*>(buffer->data(0)) +
-                     buffer->mapped_size())))
+            (reinterpret_cast<const uint8_t*>(buffer->data(0)) +
+             buffer->mapped_size())))
         << "VideoFrame does not appear to be backed by Buffer";
 
     for (const auto& client : controller_clients_) {
diff --git a/content/browser/renderer_host/media/video_capture_controller.h b/content/browser/renderer_host/media/video_capture_controller.h
index 9f97ad3..6661144 100644
--- a/content/browser/renderer_host/media/video_capture_controller.h
+++ b/content/browser/renderer_host/media/video_capture_controller.h
@@ -43,6 +43,7 @@
 #include <list>
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
diff --git a/content/browser/renderer_host/media/video_capture_controller_unittest.cc b/content/browser/renderer_host/media/video_capture_controller_unittest.cc
index 9af6feea..626b376 100644
--- a/content/browser/renderer_host/media/video_capture_controller_unittest.cc
+++ b/content/browser/renderer_host/media/video_capture_controller_unittest.cc
@@ -4,11 +4,14 @@
 
 // Unit test for VideoCaptureController.
 
+#include <stdint.h>
+
 #include <string>
 
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
@@ -116,7 +119,7 @@
   void TearDown() override { base::RunLoop().RunUntilIdle(); }
 
   scoped_refptr<media::VideoFrame> WrapI420Buffer(gfx::Size dimensions,
-                                                  uint8* data) {
+                                                  uint8_t* data) {
     return media::VideoFrame::WrapExternalSharedMemory(
         media::PIXEL_FORMAT_I420, dimensions, gfx::Rect(dimensions), dimensions,
         data,
@@ -280,7 +283,7 @@
 
   // Now, simulate an incoming captured buffer from the capture device. As a
   // side effect this will cause the first buffer to be shared with clients.
-  uint8 buffer_no = 1;
+  uint8_t buffer_no = 1;
   ASSERT_EQ(0.0, device_->GetBufferPoolUtilization());
   scoped_ptr<media::VideoCaptureDevice::Client::Buffer> buffer(
       device_->ReserveOutputBuffer(capture_resolution,
@@ -311,7 +314,7 @@
         .Times(1);
   }
   scoped_refptr<media::VideoFrame> video_frame =
-      WrapI420Buffer(capture_resolution, static_cast<uint8*>(buffer->data()));
+      WrapI420Buffer(capture_resolution, static_cast<uint8_t*>(buffer->data()));
   ASSERT_FALSE(video_frame->metadata()->HasKey(
       media::VideoFrameMetadata::RESOURCE_UTILIZATION));
   client_a_->resource_utilization_ = 0.5;
@@ -339,8 +342,8 @@
                                    media::PIXEL_STORAGE_CPU);
   ASSERT_TRUE(buffer2.get());
   memset(buffer2->data(), buffer_no++, buffer2->mapped_size());
-  video_frame =
-      WrapI420Buffer(capture_resolution, static_cast<uint8*>(buffer2->data()));
+  video_frame = WrapI420Buffer(capture_resolution,
+                               static_cast<uint8_t*>(buffer2->data()));
   ASSERT_FALSE(video_frame->metadata()->HasKey(
       media::VideoFrameMetadata::RESOURCE_UTILIZATION));
   client_a_->resource_utilization_ = 0.5;
@@ -385,8 +388,8 @@
                                      media::PIXEL_STORAGE_CPU);
     ASSERT_TRUE(buffer.get());
     memset(buffer->data(), buffer_no++, buffer->mapped_size());
-    video_frame =
-        WrapI420Buffer(capture_resolution, static_cast<uint8*>(buffer->data()));
+    video_frame = WrapI420Buffer(capture_resolution,
+                                 static_cast<uint8_t*>(buffer->data()));
     device_->OnIncomingCapturedVideoFrame(buffer.Pass(), video_frame,
                                           base::TimeTicks());
   }
@@ -433,8 +436,8 @@
                                    media::PIXEL_STORAGE_CPU);
   ASSERT_TRUE(buffer3.get());
   memset(buffer3->data(), buffer_no++, buffer3->mapped_size());
-  video_frame =
-      WrapI420Buffer(capture_resolution, static_cast<uint8*>(buffer3->data()));
+  video_frame = WrapI420Buffer(capture_resolution,
+                               static_cast<uint8_t*>(buffer3->data()));
   device_->OnIncomingCapturedVideoFrame(buffer3.Pass(), video_frame,
                                         base::TimeTicks());
 
@@ -450,8 +453,8 @@
   }
   ASSERT_TRUE(buffer4.get());
   memset(buffer4->data(), buffer_no++, buffer4->mapped_size());
-  video_frame =
-      WrapI420Buffer(capture_resolution, static_cast<uint8*>(buffer4->data()));
+  video_frame = WrapI420Buffer(capture_resolution,
+                               static_cast<uint8_t*>(buffer4->data()));
   device_->OnIncomingCapturedVideoFrame(buffer4.Pass(), video_frame,
                                         base::TimeTicks());
   // B2 is the only client left, and is the only one that should
@@ -499,7 +502,7 @@
                                    media::PIXEL_STORAGE_CPU));
   ASSERT_TRUE(buffer.get());
   scoped_refptr<media::VideoFrame> video_frame =
-      WrapI420Buffer(capture_resolution, static_cast<uint8*>(buffer->data()));
+      WrapI420Buffer(capture_resolution, static_cast<uint8_t*>(buffer->data()));
   device_->OnIncomingCapturedVideoFrame(buffer.Pass(), video_frame,
                                         base::TimeTicks());
 
@@ -536,7 +539,7 @@
   ASSERT_TRUE(buffer.get());
 
   scoped_refptr<media::VideoFrame> video_frame =
-      WrapI420Buffer(dims, static_cast<uint8*>(buffer->data()));
+      WrapI420Buffer(dims, static_cast<uint8_t*>(buffer->data()));
   device_->OnError(FROM_HERE, "Test Error");
   device_->OnIncomingCapturedVideoFrame(buffer.Pass(), video_frame,
                                         base::TimeTicks());
diff --git a/content/browser/renderer_host/media/video_capture_device_client.cc b/content/browser/renderer_host/media/video_capture_device_client.cc
index 4b6c4b39..2bb27e8 100644
--- a/content/browser/renderer_host/media/video_capture_device_client.cc
+++ b/content/browser/renderer_host/media/video_capture_device_client.cc
@@ -11,6 +11,7 @@
 #include "base/location.h"
 #include "base/strings/stringprintf.h"
 #include "base/trace_event/trace_event.h"
+#include "build/build_config.h"
 #include "content/browser/renderer_host/media/video_capture_buffer_pool.h"
 #include "content/browser/renderer_host/media/video_capture_controller.h"
 #include "content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.h"
@@ -78,7 +79,7 @@
 }
 
 void VideoCaptureDeviceClient::OnIncomingCapturedData(
-    const uint8* data,
+    const uint8_t* data,
     int length,
     const VideoCaptureFormat& frame_format,
     int rotation,
@@ -130,7 +131,7 @@
   const media::VideoPixelStorage output_pixel_storage =
       use_gpu_memory_buffers_ ? media::PIXEL_STORAGE_GPUMEMORYBUFFER
                               : media::PIXEL_STORAGE_CPU;
-  uint8 *y_plane_data, *u_plane_data, *v_plane_data;
+  uint8_t *y_plane_data, *u_plane_data, *v_plane_data;
   scoped_ptr<Buffer> buffer(
       ReserveI420OutputBuffer(dimensions, output_pixel_storage, &y_plane_data,
                               &u_plane_data, &v_plane_data));
@@ -254,11 +255,10 @@
   OnIncomingCapturedBuffer(buffer.Pass(), output_format, timestamp);
 }
 
-void
-VideoCaptureDeviceClient::OnIncomingCapturedYuvData(
-    const uint8* y_data,
-    const uint8* u_data,
-    const uint8* v_data,
+void VideoCaptureDeviceClient::OnIncomingCapturedYuvData(
+    const uint8_t* y_data,
+    const uint8_t* u_data,
+    const uint8_t* v_data,
     size_t y_stride,
     size_t u_stride,
     size_t v_stride,
@@ -270,7 +270,7 @@
   DCHECK_EQ(media::PIXEL_STORAGE_CPU, frame_format.pixel_storage);
   DCHECK_EQ(0, clockwise_rotation) << "Rotation not supported";
 
-  uint8 *y_plane_data, *u_plane_data, *v_plane_data;
+  uint8_t *y_plane_data, *u_plane_data, *v_plane_data;
   scoped_ptr<Buffer> buffer(ReserveI420OutputBuffer(
       frame_format.frame_size, frame_format.pixel_storage, &y_plane_data,
       &u_plane_data, &v_plane_data));
@@ -351,9 +351,9 @@
       frame = VideoFrame::WrapExternalYuvGpuMemoryBuffers(
           media::PIXEL_FORMAT_I420, frame_format.frame_size,
           gfx::Rect(frame_format.frame_size), frame_format.frame_size, 0, 0, 0,
-          reinterpret_cast<uint8*>(buffer->data(media::VideoFrame::kYPlane)),
-          reinterpret_cast<uint8*>(buffer->data(media::VideoFrame::kUPlane)),
-          reinterpret_cast<uint8*>(buffer->data(media::VideoFrame::kVPlane)),
+          reinterpret_cast<uint8_t*>(buffer->data(media::VideoFrame::kYPlane)),
+          reinterpret_cast<uint8_t*>(buffer->data(media::VideoFrame::kUPlane)),
+          reinterpret_cast<uint8_t*>(buffer->data(media::VideoFrame::kVPlane)),
           handle, handle, handle, base::TimeDelta());
       break;
     }
@@ -361,7 +361,7 @@
       frame = VideoFrame::WrapExternalSharedMemory(
           media::PIXEL_FORMAT_I420, frame_format.frame_size,
           gfx::Rect(frame_format.frame_size), frame_format.frame_size,
-          reinterpret_cast<uint8*>(buffer->data()),
+          reinterpret_cast<uint8_t*>(buffer->data()),
           VideoFrame::AllocationSize(media::PIXEL_FORMAT_I420,
                                      frame_format.frame_size),
           base::SharedMemory::NULLHandle(), 0u, base::TimeDelta());
@@ -419,9 +419,9 @@
 VideoCaptureDeviceClient::ReserveI420OutputBuffer(
     const gfx::Size& dimensions,
     media::VideoPixelStorage storage,
-    uint8** y_plane_data,
-    uint8** u_plane_data,
-    uint8** v_plane_data) {
+    uint8_t** y_plane_data,
+    uint8_t** u_plane_data,
+    uint8_t** v_plane_data) {
   DCHECK(storage == media::PIXEL_STORAGE_GPUMEMORYBUFFER ||
          storage == media::PIXEL_STORAGE_CPU);
   DCHECK(dimensions.height());
@@ -437,7 +437,7 @@
     case media::PIXEL_STORAGE_CPU:
       // TODO(emircan): See http://crbug.com/521068, move this pointer
       // arithmetic inside Buffer::data() when this bug is resolved.
-      *y_plane_data = reinterpret_cast<uint8*>(buffer->data());
+      *y_plane_data = reinterpret_cast<uint8_t*>(buffer->data());
       *u_plane_data =
           *y_plane_data +
           VideoFrame::PlaneSize(format, VideoFrame::kYPlane, dimensions)
@@ -449,11 +449,11 @@
       return buffer.Pass();
     case media::PIXEL_STORAGE_GPUMEMORYBUFFER:
       *y_plane_data =
-          reinterpret_cast<uint8*>(buffer->data(VideoFrame::kYPlane));
+          reinterpret_cast<uint8_t*>(buffer->data(VideoFrame::kYPlane));
       *u_plane_data =
-          reinterpret_cast<uint8*>(buffer->data(VideoFrame::kUPlane));
+          reinterpret_cast<uint8_t*>(buffer->data(VideoFrame::kUPlane));
       *v_plane_data =
-          reinterpret_cast<uint8*>(buffer->data(VideoFrame::kVPlane));
+          reinterpret_cast<uint8_t*>(buffer->data(VideoFrame::kVPlane));
       return buffer.Pass();
   }
   NOTREACHED();
diff --git a/content/browser/renderer_host/media/video_capture_device_client.h b/content/browser/renderer_host/media/video_capture_device_client.h
index 111839c..8215f5642 100644
--- a/content/browser/renderer_host/media/video_capture_device_client.h
+++ b/content/browser/renderer_host/media/video_capture_device_client.h
@@ -5,6 +5,10 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_DEVICE_CLIENT_H_
 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_DEVICE_CLIENT_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
@@ -40,14 +44,14 @@
   ~VideoCaptureDeviceClient() override;
 
   // VideoCaptureDevice::Client implementation.
-  void OnIncomingCapturedData(const uint8* data,
+  void OnIncomingCapturedData(const uint8_t* data,
                               int length,
                               const media::VideoCaptureFormat& frame_format,
                               int rotation,
                               const base::TimeTicks& timestamp) override;
-  void OnIncomingCapturedYuvData(const uint8* y_data,
-                                 const uint8* u_data,
-                                 const uint8* v_data,
+  void OnIncomingCapturedYuvData(const uint8_t* y_data,
+                                 const uint8_t* u_data,
+                                 const uint8_t* v_data,
                                  size_t y_stride,
                                  size_t u_stride,
                                  size_t v_stride,
@@ -85,9 +89,9 @@
   // are destroyed or returned.
   scoped_ptr<Buffer> ReserveI420OutputBuffer(const gfx::Size& dimensions,
                                              media::VideoPixelStorage storage,
-                                             uint8** y_plane_data,
-                                             uint8** u_plane_data,
-                                             uint8** v_plane_data);
+                                             uint8_t** y_plane_data,
+                                             uint8_t** u_plane_data,
+                                             uint8_t** v_plane_data);
 
   // The controller to which we post events.
   const base::WeakPtr<VideoCaptureController> controller_;
diff --git a/content/browser/renderer_host/media/video_capture_device_client_unittest.cc b/content/browser/renderer_host/media/video_capture_device_client_unittest.cc
index 0918974b..56c0a12 100644
--- a/content/browser/renderer_host/media/video_capture_device_client_unittest.cc
+++ b/content/browser/renderer_host/media/video_capture_device_client_unittest.cc
@@ -2,11 +2,15 @@
 // 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/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
+#include "build/build_config.h"
 #include "content/browser/renderer_host/media/video_capture_buffer_pool.h"
 #include "content/browser/renderer_host/media/video_capture_controller.h"
 #include "content/browser/renderer_host/media/video_capture_device_client.h"
diff --git a/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc b/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc
index a370ccf5..c48181a 100644
--- a/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc
+++ b/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc
@@ -14,6 +14,7 @@
 #include "base/strings/stringprintf.h"
 #include "base/thread_task_runner_handle.h"
 #include "base/trace_event/trace_event.h"
+#include "build/build_config.h"
 #include "content/browser/gpu/browser_gpu_channel_host_factory.h"
 #include "content/common/gpu/client/gpu_jpeg_decode_accelerator_host.h"
 #include "content/public/browser/browser_thread.h"
diff --git a/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.h b/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.h
index f87c288b..554cb10 100644
--- a/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.h
+++ b/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.h
@@ -5,9 +5,13 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_GPU_JPEG_DECODER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_GPU_JPEG_DECODER_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <string>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
diff --git a/content/browser/renderer_host/media/video_capture_host.h b/content/browser/renderer_host/media/video_capture_host.h
index b7bb275..c35153f 100644
--- a/content/browser/renderer_host/media/video_capture_host.h
+++ b/content/browser/renderer_host/media/video_capture_host.h
@@ -53,6 +53,7 @@
 
 #include <map>
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
 #include "base/sequenced_task_runner_helpers.h"
diff --git a/content/browser/renderer_host/media/video_capture_host_unittest.cc b/content/browser/renderer_host/media/video_capture_host_unittest.cc
index a26a9c30..b1d991a9 100644
--- a/content/browser/renderer_host/media/video_capture_host_unittest.cc
+++ b/content/browser/renderer_host/media/video_capture_host_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 <map>
 #include <string>
 
@@ -10,12 +12,14 @@
 #include "base/files/file_util.h"
 #include "base/files/scoped_file.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/stl_util.h"
 #include "base/strings/stringprintf.h"
 #include "base/thread_task_runner_handle.h"
+#include "build/build_config.h"
 #include "content/browser/browser_thread_impl.h"
 #include "content/browser/renderer_host/media/media_stream_manager.h"
 #include "content/browser/renderer_host/media/media_stream_requester.h"
@@ -199,7 +203,7 @@
   // These handler methods do minimal things and delegate to the mock methods.
   void OnNewBufferCreatedDispatch(int device_id,
                                   base::SharedMemoryHandle handle,
-                                  uint32 length,
+                                  uint32_t length,
                                   int buffer_id) {
     OnNewBufferCreated(device_id, handle, length, buffer_id);
     base::SharedMemory* dib = new base::SharedMemory(handle, false);
diff --git a/content/browser/renderer_host/media/video_capture_manager.cc b/content/browser/renderer_host/media/video_capture_manager.cc
index 82af565..7c1da945 100644
--- a/content/browser/renderer_host/media/video_capture_manager.cc
+++ b/content/browser/renderer_host/media/video_capture_manager.cc
@@ -19,6 +19,7 @@
 #include "base/task_runner_util.h"
 #include "base/thread_task_runner_handle.h"
 #include "base/threading/sequenced_worker_pool.h"
+#include "build/build_config.h"
 #include "content/browser/media/capture/web_contents_video_capture_device.h"
 #include "content/browser/media/media_internals.h"
 #include "content/browser/renderer_host/media/video_capture_controller.h"
diff --git a/content/browser/renderer_host/media/video_capture_manager.h b/content/browser/renderer_host/media/video_capture_manager.h
index 54bd1ff..6a5fc9c 100644
--- a/content/browser/renderer_host/media/video_capture_manager.h
+++ b/content/browser/renderer_host/media/video_capture_manager.h
@@ -17,6 +17,7 @@
 #include <set>
 #include <string>
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_vector.h"
 #include "base/memory/weak_ptr.h"
@@ -24,6 +25,7 @@
 #include "base/process/process_handle.h"
 #include "base/threading/thread_checker.h"
 #include "base/timer/elapsed_timer.h"
+#include "build/build_config.h"
 #include "content/browser/renderer_host/media/media_stream_provider.h"
 #include "content/browser/renderer_host/media/video_capture_controller_event_handler.h"
 #include "content/common/content_export.h"
diff --git a/content/browser/renderer_host/media/video_capture_manager_unittest.cc b/content/browser/renderer_host/media/video_capture_manager_unittest.cc
index 53fa76d..954544c 100644
--- a/content/browser/renderer_host/media/video_capture_manager_unittest.cc
+++ b/content/browser/renderer_host/media/video_capture_manager_unittest.cc
@@ -4,9 +4,12 @@
 
 // Unit test for VideoCaptureManager.
 
+#include <stdint.h>
+
 #include <string>
 
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/run_loop.h"
@@ -83,7 +86,7 @@
     video_capture_device_factory_ =
         static_cast<media::FakeVideoCaptureDeviceFactory*>(
             vcm_->video_capture_device_factory());
-    const int32 kNumberOfFakeDevices = 2;
+    const int32_t kNumberOfFakeDevices = 2;
     video_capture_device_factory_->set_number_of_devices(kNumberOfFakeDevices);
     vcm_->Register(listener_.get(), message_loop_->task_runner().get());
     frame_observer_.reset(new MockFrameObserver());
diff --git a/content/browser/renderer_host/media/webrtc_identity_service_host.h b/content/browser/renderer_host/media/webrtc_identity_service_host.h
index 2b2a4af9..51744f4 100644
--- a/content/browser/renderer_host/media/webrtc_identity_service_host.h
+++ b/content/browser/renderer_host/media/webrtc_identity_service_host.h
@@ -7,7 +7,7 @@
 
 #include <string>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/browser_message_filter.h"
 
diff --git a/content/browser/renderer_host/memory_benchmark_message_filter.cc b/content/browser/renderer_host/memory_benchmark_message_filter.cc
index 6073253..9125a8c 100644
--- a/content/browser/renderer_host/memory_benchmark_message_filter.cc
+++ b/content/browser/renderer_host/memory_benchmark_message_filter.cc
@@ -4,6 +4,7 @@
 
 #include "content/browser/renderer_host/memory_benchmark_message_filter.h"
 
+#include "build/build_config.h"
 #include "content/common/memory_benchmark_messages.h"
 
 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID))
diff --git a/content/browser/renderer_host/memory_benchmark_message_filter.h b/content/browser/renderer_host/memory_benchmark_message_filter.h
index d30e3a7..0bafa73 100644
--- a/content/browser/renderer_host/memory_benchmark_message_filter.h
+++ b/content/browser/renderer_host/memory_benchmark_message_filter.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "content/public/browser/browser_message_filter.h"
 
 namespace content {
diff --git a/content/browser/renderer_host/overscroll_controller.h b/content/browser/renderer_host/overscroll_controller.h
index 6ea77e60..92fa093 100644
--- a/content/browser/renderer_host/overscroll_controller.h
+++ b/content/browser/renderer_host/overscroll_controller.h
@@ -5,8 +5,8 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_OVERSCROLL_CONTROLLER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_OVERSCROLL_CONTROLLER_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "third_party/WebKit/public/web/WebInputEvent.h"
 
 namespace ui {
diff --git a/content/browser/renderer_host/overscroll_controller_delegate.h b/content/browser/renderer_host/overscroll_controller_delegate.h
index b3d47579..0533cde 100644
--- a/content/browser/renderer_host/overscroll_controller_delegate.h
+++ b/content/browser/renderer_host/overscroll_controller_delegate.h
@@ -5,8 +5,8 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_OVERSCROLL_CONTROLLER_DELEGATE_H_
 #define CONTENT_BROWSER_RENDERER_HOST_OVERSCROLL_CONTROLLER_DELEGATE_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "content/browser/renderer_host/overscroll_controller.h"
 #include "content/common/content_export.h"
 #include "ui/gfx/geometry/rect.h"
diff --git a/content/browser/renderer_host/p2p/socket_dispatcher_host.cc b/content/browser/renderer_host/p2p/socket_dispatcher_host.cc
index df0224d5..784a808 100644
--- a/content/browser/renderer_host/p2p/socket_dispatcher_host.cc
+++ b/content/browser/renderer_host/p2p/socket_dispatcher_host.cc
@@ -4,6 +4,8 @@
 
 #include "content/browser/renderer_host/p2p/socket_dispatcher_host.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/stl_util.h"
 #include "content/browser/renderer_host/p2p/socket_host.h"
@@ -44,10 +46,8 @@
  public:
   typedef base::Callback<void(const net::IPAddressList&)> DoneCallback;
 
-  DnsRequest(int32 request_id, net::HostResolver* host_resolver)
-      : request_id_(request_id),
-        resolver_(host_resolver) {
-  }
+  DnsRequest(int32_t request_id, net::HostResolver* host_resolver)
+      : request_id_(request_id), resolver_(host_resolver) {}
 
   void Resolve(const std::string& host_name,
                const DoneCallback& done_callback) {
@@ -80,7 +80,7 @@
       OnDone(result);
   }
 
-  int32 request_id() { return request_id_; }
+  int32_t request_id() { return request_id_; }
 
  private:
   void OnDone(int result) {
@@ -100,7 +100,7 @@
     done_callback_.Run(list);
   }
 
-  int32 request_id_;
+  int32_t request_id_;
   net::AddressList addresses_;
 
   std::string host_name_;
@@ -228,7 +228,7 @@
 }
 
 void P2PSocketDispatcherHost::OnGetHostAddress(const std::string& host_name,
-                                               int32 request_id) {
+                                               int32_t request_id) {
   DnsRequest* request = new DnsRequest(request_id,
                                        resource_context_->GetHostResolver());
   dns_requests_.insert(request);
@@ -292,7 +292,7 @@
                                      const net::IPEndPoint& socket_address,
                                      const std::vector<char>& data,
                                      const rtc::PacketOptions& options,
-                                     uint64 packet_id) {
+                                     uint64_t packet_id) {
   P2PSocketHost* socket = LookupSocket(socket_id);
   if (!socket) {
     LOG(ERROR) << "Received P2PHostMsg_Send for invalid socket_id.";
diff --git a/content/browser/renderer_host/p2p/socket_dispatcher_host.h b/content/browser/renderer_host/p2p/socket_dispatcher_host.h
index ec19453..d783e1f 100644
--- a/content/browser/renderer_host/p2p/socket_dispatcher_host.h
+++ b/content/browser/renderer_host/p2p/socket_dispatcher_host.h
@@ -5,11 +5,14 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_DISPATCHER_HOST_H_
 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_DISPATCHER_HOST_H_
 
+#include <stdint.h>
+
 #include <map>
 #include <set>
 #include <string>
 #include <vector>
 
+#include "base/macros.h"
 #include "content/browser/renderer_host/p2p/socket_host_throttler.h"
 #include "content/common/p2p_socket_type.h"
 #include "content/public/browser/browser_message_filter.h"
@@ -71,8 +74,7 @@
   // Handlers for the messages coming from the renderer.
   void OnStartNetworkNotifications();
   void OnStopNetworkNotifications();
-  void OnGetHostAddress(const std::string& host_name,
-                        int32 request_id);
+  void OnGetHostAddress(const std::string& host_name, int32_t request_id);
 
   void OnCreateSocket(P2PSocketType type,
                       int socket_id,
@@ -85,7 +87,7 @@
               const net::IPEndPoint& socket_address,
               const std::vector<char>& data,
               const rtc::PacketOptions& options,
-              uint64 packet_id);
+              uint64_t packet_id);
   void OnSetOption(int socket_id, P2PSocketOption option, int value);
   void OnDestroySocket(int socket_id);
 
diff --git a/content/browser/renderer_host/p2p/socket_host.cc b/content/browser/renderer_host/p2p/socket_host.cc
index fefc4a5..ef6b588 100644
--- a/content/browser/renderer_host/p2p/socket_host.cc
+++ b/content/browser/renderer_host/p2p/socket_host.cc
@@ -19,7 +19,7 @@
 
 namespace {
 
-const uint32 kStunMagicCookie = 0x2112A442;
+const uint32_t kStunMagicCookie = 0x2112A442;
 const size_t kMinRtpHeaderLength = 12;
 const size_t kMinRtcpHeaderLength = 8;
 const size_t kRtpExtensionHeaderLength = 4;
@@ -41,7 +41,7 @@
 }
 
 bool IsDtlsPacket(const char* data, size_t length) {
-  const uint8* u = reinterpret_cast<const uint8*>(data);
+  const uint8_t* u = reinterpret_cast<const uint8_t*>(data);
   return (length >= kDtlsRecordHeaderLength && (u[0] > 19 && u[0] < 64));
 }
 
@@ -50,7 +50,7 @@
     return false;
   }
 
-  int type = (static_cast<uint8>(data[1]) & 0x7F);
+  int type = (static_cast<uint8_t>(data[1]) & 0x7F);
   return (type >= 64 && type < 96);
 }
 
@@ -59,7 +59,7 @@
     return false;
   }
 
-  uint16 type = rtc::GetBE16(data);
+  uint16_t type = rtc::GetBE16(data);
   return (type == cricket::TURN_SEND_INDICATION);
 }
 
@@ -100,7 +100,7 @@
 
   // Getting extension profile length.
   // Length is in 32 bit words.
-  uint16 extension_length_in_32bits = rtc::GetBE16(rtp + 2);
+  uint16_t extension_length_in_32bits = rtc::GetBE16(rtp + 2);
   size_t extension_length = extension_length_in_32bits * 4;
 
   size_t rtp_header_length = extension_length +
@@ -120,7 +120,7 @@
 
 void UpdateAbsSendTimeExtensionValue(char* extension_data,
                                      size_t length,
-                                     uint32 abs_send_time) {
+                                     uint32_t abs_send_time) {
   // Absolute send time in RTP streams.
   //
   // The absolute send time is signaled to the receiver in-band using the
@@ -142,18 +142,18 @@
   }
 
   // Now() has resolution ~1-15ms
-  uint32 now_second = abs_send_time;
+  uint32_t now_second = abs_send_time;
   if (!now_second) {
-    uint64 now_us =
+    uint64_t now_us =
         (base::TimeTicks::Now() - base::TimeTicks()).InMicroseconds();
     // Convert second to 24-bit unsigned with 18 bit fractional part
     now_second =
         ((now_us << 18) / base::Time::kMicrosecondsPerSecond) & 0x00FFFFFF;
   }
   // TODO(mallinath) - Add SetBE24 to byteorder.h in libjingle.
-  extension_data[0] = static_cast<uint8>(now_second >> 16);
-  extension_data[1] = static_cast<uint8>(now_second >> 8);
-  extension_data[2] = static_cast<uint8>(now_second);
+  extension_data[0] = static_cast<uint8_t>(now_second >> 16);
+  extension_data[1] = static_cast<uint8_t>(now_second >> 8);
+  extension_data[2] = static_cast<uint8_t>(now_second);
 }
 
 // Assumes |length| is actual packet length + tag length. Updates HMAC at end of
@@ -218,7 +218,7 @@
 bool ApplyPacketOptions(char* data,
                         size_t length,
                         const rtc::PacketOptions& options,
-                        uint32 abs_send_time) {
+                        uint32_t abs_send_time) {
   DCHECK(data != NULL);
   DCHECK(length > 0);
   // if there is no valid |rtp_sendtime_extension_id| and |srtp_auth_key| in
@@ -311,7 +311,7 @@
       // is not a multiple of 4 bytes are padded with 1, 2, or 3 bytes of
       // padding so that its value contains a multiple of 4 bytes.  The
       // padding bits are ignored, and may be any value.
-      uint16 attr_type, attr_length;
+      uint16_t attr_type, attr_length;
       const int kAttrHeaderLength = sizeof(attr_type) + sizeof(attr_length);
 
       if (length < rtp_begin + kAttrHeaderLength) {
@@ -372,7 +372,7 @@
 bool UpdateRtpAbsSendTimeExtension(char* rtp,
                                    size_t length,
                                    int extension_id,
-                                   uint32 abs_send_time) {
+                                   uint32_t abs_send_time) {
   //  0                   1                   2                   3
   //  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -397,9 +397,9 @@
   rtp += header_length_without_extension;
 
   // Getting extension profile ID and length.
-  uint16 profile_id = rtc::GetBE16(rtp);
+  uint16_t profile_id = rtc::GetBE16(rtp);
   // Length is in 32 bit words.
-  uint16 extension_length_in_32bits = rtc::GetBE16(rtp + 2);
+  uint16_t extension_length_in_32bits = rtc::GetBE16(rtp + 2);
   size_t extension_length = extension_length_in_32bits * 4;
 
   rtp += kRtpExtensionHeaderLength;  // Moving past extension header.
@@ -500,17 +500,20 @@
     return false;
   }
 
-  uint32 cookie = base::NetToHost32(*reinterpret_cast<const uint32*>(data + 4));
+  uint32_t cookie =
+      base::NetToHost32(*reinterpret_cast<const uint32_t*>(data + 4));
   if (cookie != kStunMagicCookie) {
     return false;
   }
 
-  uint16 length = base::NetToHost16(*reinterpret_cast<const uint16*>(data + 2));
+  uint16_t length =
+      base::NetToHost16(*reinterpret_cast<const uint16_t*>(data + 2));
   if (length != data_size - kStunHeaderSize) {
     return false;
   }
 
-  int message_type = base::NetToHost16(*reinterpret_cast<const uint16*>(data));
+  int message_type =
+      base::NetToHost16(*reinterpret_cast<const uint16_t*>(data));
 
   // Verify that the type is known:
   switch (message_type) {
@@ -633,7 +636,7 @@
     return;
   }
 
-  scoped_ptr<uint8[]> header_buffer(new uint8[header_length]);
+  scoped_ptr<uint8_t[]> header_buffer(new uint8_t[header_length]);
   memcpy(header_buffer.get(), packet, header_length);
 
   // Posts to the IO thread as the data members should be accessed on the IO
@@ -645,7 +648,7 @@
                  header_length, rtp_packet_length, incoming));
 }
 
-void P2PSocketHost::DumpRtpPacketOnIOThread(scoped_ptr<uint8[]> packet_header,
+void P2PSocketHost::DumpRtpPacketOnIOThread(scoped_ptr<uint8_t[]> packet_header,
                                             size_t header_length,
                                             size_t packet_length,
                                             bool incoming) {
@@ -672,14 +675,14 @@
   send_packets_total_++;
 }
 
-void P2PSocketHost::IncrementDelayedBytes(uint32 size) {
+void P2PSocketHost::IncrementDelayedBytes(uint32_t size) {
   send_bytes_delayed_cur_ += size;
   if (send_bytes_delayed_cur_ > send_bytes_delayed_max_) {
     send_bytes_delayed_max_ = send_bytes_delayed_cur_;
   }
 }
 
-void P2PSocketHost::DecrementDelayedBytes(uint32 size) {
+void P2PSocketHost::DecrementDelayedBytes(uint32_t size) {
   send_bytes_delayed_cur_ -= size;
   DCHECK_GE(send_bytes_delayed_cur_, 0);
 }
diff --git a/content/browser/renderer_host/p2p/socket_host.h b/content/browser/renderer_host/p2p/socket_host.h
index b569a0a..37ffddb 100644
--- a/content/browser/renderer_host/p2p/socket_host.h
+++ b/content/browser/renderer_host/p2p/socket_host.h
@@ -5,6 +5,10 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_
 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "content/common/content_export.h"
 #include "content/common/p2p_socket_type.h"
@@ -36,7 +40,7 @@
 CONTENT_EXPORT bool ApplyPacketOptions(char* data,
                                        size_t length,
                                        const rtc::PacketOptions& options,
-                                       uint32 abs_send_time);
+                                       uint32_t abs_send_time);
 
 // Helper method which finds RTP ofset and length if the packet is encapsulated
 // in a TURN Channel Message or TURN Send Indication message.
@@ -50,7 +54,7 @@
 CONTENT_EXPORT bool UpdateRtpAbsSendTimeExtension(char* rtp,
                                                   size_t length,
                                                   int extension_id,
-                                                  uint32 abs_send_time);
+                                                  uint32_t abs_send_time);
 
 }  // packet_processing_helpers
 
@@ -75,7 +79,7 @@
   virtual void Send(const net::IPEndPoint& to,
                     const std::vector<char>& data,
                     const rtc::PacketOptions& options,
-                    uint64 packet_id) = 0;
+                    uint64_t packet_id) = 0;
 
   virtual P2PSocketHost* AcceptIncomingTcpConnection(
       const net::IPEndPoint& remote_address, int id) = 0;
@@ -142,7 +146,7 @@
   void DumpRtpPacket(const char* packet, size_t length, bool incoming);
 
   // A helper to dump the packet on the IO thread.
-  void DumpRtpPacketOnIOThread(scoped_ptr<uint8[]> packet_header,
+  void DumpRtpPacketOnIOThread(scoped_ptr<uint8_t[]> packet_header,
                                size_t header_length,
                                size_t packet_length,
                                bool incoming);
@@ -150,8 +154,8 @@
   // Used by subclasses to track the metrics of delayed bytes and packets.
   void IncrementDelayedPackets();
   void IncrementTotalSentPackets();
-  void IncrementDelayedBytes(uint32 size);
-  void DecrementDelayedBytes(uint32 size);
+  void IncrementDelayedBytes(uint32_t size);
+  void DecrementDelayedBytes(uint32_t size);
 
   IPC::Sender* message_sender_;
   int id_;
@@ -165,13 +169,13 @@
  private:
   // Track total delayed packets for calculating how many packets are
   // delayed by system at the end of call.
-  uint32 send_packets_delayed_total_;
-  uint32 send_packets_total_;
+  uint32_t send_packets_delayed_total_;
+  uint32_t send_packets_total_;
 
   // Track the maximum of consecutive delayed bytes caused by system's
   // EWOULDBLOCK.
-  int32 send_bytes_delayed_max_;
-  int32 send_bytes_delayed_cur_;
+  int32_t send_bytes_delayed_max_;
+  int32_t send_bytes_delayed_cur_;
 
   base::WeakPtrFactory<P2PSocketHost> weak_ptr_factory_;
 
diff --git a/content/browser/renderer_host/p2p/socket_host_tcp.cc b/content/browser/renderer_host/p2p/socket_host_tcp.cc
index cb4d60d..3570847 100644
--- a/content/browser/renderer_host/p2p/socket_host_tcp.cc
+++ b/content/browser/renderer_host/p2p/socket_host_tcp.cc
@@ -4,6 +4,8 @@
 
 #include "content/browser/renderer_host/p2p/socket_host_tcp.h"
 
+#include <stddef.h>
+
 #include "base/location.h"
 #include "base/single_thread_task_runner.h"
 #include "base/sys_byteorder.h"
@@ -24,7 +26,7 @@
 
 namespace {
 
-typedef uint16 PacketLength;
+typedef uint16_t PacketLength;
 const int kPacketHeaderSize = sizeof(PacketLength);
 const int kReadBufferSize = 4096;
 const int kPacketLengthOffset = 2;
@@ -349,7 +351,7 @@
 void P2PSocketHostTcpBase::Send(const net::IPEndPoint& to,
                                 const std::vector<char>& data,
                                 const rtc::PacketOptions& options,
-                                uint64 packet_id) {
+                                uint64_t packet_id) {
   if (!socket_) {
     // The Send message may be sent after the an OnError message was
     // sent by hasn't been processed the renderer.
@@ -504,7 +506,7 @@
 int P2PSocketHostTcp::ProcessInput(char* input, int input_len) {
   if (input_len < kPacketHeaderSize)
     return 0;
-  int packet_size = base::NetToHost16(*reinterpret_cast<uint16*>(input));
+  int packet_size = base::NetToHost16(*reinterpret_cast<uint16_t*>(input));
   if (input_len < packet_size + kPacketHeaderSize)
     return 0;
 
@@ -522,7 +524,7 @@
   int size = kPacketHeaderSize + data.size();
   scoped_refptr<net::DrainableIOBuffer> buffer =
       new net::DrainableIOBuffer(new net::IOBuffer(size), size);
-  *reinterpret_cast<uint16*>(buffer->data()) = base::HostToNet16(data.size());
+  *reinterpret_cast<uint16_t*>(buffer->data()) = base::HostToNet16(data.size());
   memcpy(buffer->data() + kPacketHeaderSize, &data[0], data.size());
 
   packet_processing_helpers::ApplyPacketOptions(
@@ -616,11 +618,12 @@
     const char* data, int len, int* pad_bytes) {
   DCHECK_LE(kTurnChannelDataHeaderSize, len);
   // Both stun and turn had length at offset 2.
-  int packet_size = base::NetToHost16(*reinterpret_cast<const uint16*>(
-      data + kPacketLengthOffset));
+  int packet_size = base::NetToHost16(
+      *reinterpret_cast<const uint16_t*>(data + kPacketLengthOffset));
 
   // Get packet type (STUN or TURN).
-  uint16 msg_type = base::NetToHost16(*reinterpret_cast<const uint16*>(data));
+  uint16_t msg_type =
+      base::NetToHost16(*reinterpret_cast<const uint16_t*>(data));
 
   *pad_bytes = 0;
   // Add heder length to packet length.
diff --git a/content/browser/renderer_host/p2p/socket_host_tcp.h b/content/browser/renderer_host/p2p/socket_host_tcp.h
index 4c2bb31..fb4b995 100644
--- a/content/browser/renderer_host/p2p/socket_host_tcp.h
+++ b/content/browser/renderer_host/p2p/socket_host_tcp.h
@@ -5,10 +5,13 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_H_
 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_H_
 
+#include <stdint.h>
+
 #include <queue>
 #include <vector>
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
@@ -43,7 +46,7 @@
   void Send(const net::IPEndPoint& to,
             const std::vector<char>& data,
             const rtc::PacketOptions& options,
-            uint64 packet_id) override;
+            uint64_t packet_id) override;
   P2PSocketHost* AcceptIncomingTcpConnection(
       const net::IPEndPoint& remote_address,
       int id) override;
diff --git a/content/browser/renderer_host/p2p/socket_host_tcp_server.cc b/content/browser/renderer_host/p2p/socket_host_tcp_server.cc
index 0976b22..dc49bfdc 100644
--- a/content/browser/renderer_host/p2p/socket_host_tcp_server.cc
+++ b/content/browser/renderer_host/p2p/socket_host_tcp_server.cc
@@ -120,7 +120,7 @@
 void P2PSocketHostTcpServer::Send(const net::IPEndPoint& to,
                                   const std::vector<char>& data,
                                   const rtc::PacketOptions& options,
-                                  uint64 packet_id) {
+                                  uint64_t packet_id) {
   NOTREACHED();
   OnError();
 }
diff --git a/content/browser/renderer_host/p2p/socket_host_tcp_server.h b/content/browser/renderer_host/p2p/socket_host_tcp_server.h
index df20532..c709177e 100644
--- a/content/browser/renderer_host/p2p/socket_host_tcp_server.h
+++ b/content/browser/renderer_host/p2p/socket_host_tcp_server.h
@@ -5,10 +5,13 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_SERVER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_SERVER_H_
 
+#include <stdint.h>
+
 #include <map>
 #include <vector>
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "content/browser/renderer_host/p2p/socket_host.h"
@@ -39,7 +42,7 @@
   void Send(const net::IPEndPoint& to,
             const std::vector<char>& data,
             const rtc::PacketOptions& options,
-            uint64 packet_id) override;
+            uint64_t packet_id) override;
   P2PSocketHost* AcceptIncomingTcpConnection(
       const net::IPEndPoint& remote_address,
       int id) override;
diff --git a/content/browser/renderer_host/p2p/socket_host_tcp_server_unittest.cc b/content/browser/renderer_host/p2p/socket_host_tcp_server_unittest.cc
index 64b420b..e11c0c0 100644
--- a/content/browser/renderer_host/p2p/socket_host_tcp_server_unittest.cc
+++ b/content/browser/renderer_host/p2p/socket_host_tcp_server_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "content/browser/renderer_host/p2p/socket_host_tcp_server.h"
 
+#include <stdint.h>
+
 #include <list>
 
 #include "content/browser/renderer_host/p2p/socket_host_tcp.h"
@@ -95,8 +97,9 @@
         new P2PSocketHostTcpServer(&sender_, 0, P2P_SOCKET_TCP_CLIENT));
     socket_host_->socket_.reset(socket_);
 
-    EXPECT_CALL(sender_, Send(
-        MatchMessage(static_cast<uint32>(P2PMsg_OnSocketCreated::ID))))
+    EXPECT_CALL(
+        sender_,
+        Send(MatchMessage(static_cast<uint32_t>(P2PMsg_OnSocketCreated::ID))))
         .WillOnce(DoAll(DeleteArg<0>(), Return(true)));
 
     P2PHostAndIPEndPoint dest;
diff --git a/content/browser/renderer_host/p2p/socket_host_tcp_unittest.cc b/content/browser/renderer_host/p2p/socket_host_tcp_unittest.cc
index cd5a9093..59aa336 100644
--- a/content/browser/renderer_host/p2p/socket_host_tcp_unittest.cc
+++ b/content/browser/renderer_host/p2p/socket_host_tcp_unittest.cc
@@ -4,8 +4,12 @@
 
 #include "content/browser/renderer_host/p2p/socket_host_tcp.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <deque>
 
+#include "base/macros.h"
 #include "base/sys_byteorder.h"
 #include "content/browser/renderer_host/p2p/socket_host_test_utils.h"
 #include "net/socket/stream_socket.h"
@@ -26,8 +30,9 @@
   }
 
   void SetUp() override {
-    EXPECT_CALL(sender_, Send(
-        MatchMessage(static_cast<uint32>(P2PMsg_OnSocketCreated::ID))))
+    EXPECT_CALL(
+        sender_,
+        Send(MatchMessage(static_cast<uint32_t>(P2PMsg_OnSocketCreated::ID))))
         .WillOnce(DoAll(DeleteArg<0>(), Return(true)));
 
     if (socket_type_ == P2P_SOCKET_TCP_CLIENT) {
@@ -53,7 +58,7 @@
 
   std::string IntToSize(int size) {
     std::string result;
-    uint16 size16 = base::HostToNet16(size);
+    uint16_t size16 = base::HostToNet16(size);
     result.resize(sizeof(size16));
     memcpy(&result[0], &size16, sizeof(size16));
     return result;
@@ -84,8 +89,9 @@
 // Verify that we can send STUN message and that they are formatted
 // properly.
 TEST_F(P2PSocketHostTcpTest, SendStunNoAuth) {
-  EXPECT_CALL(sender_, Send(
-      MatchMessage(static_cast<uint32>(P2PMsg_OnSendComplete::ID))))
+  EXPECT_CALL(
+      sender_,
+      Send(MatchMessage(static_cast<uint32_t>(P2PMsg_OnSendComplete::ID))))
       .Times(3)
       .WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
 
@@ -116,8 +122,9 @@
 // Verify that we can receive STUN messages from the socket, and that
 // the messages are parsed properly.
 TEST_F(P2PSocketHostTcpTest, ReceiveStun) {
-  EXPECT_CALL(sender_, Send(
-      MatchMessage(static_cast<uint32>(P2PMsg_OnSendComplete::ID))))
+  EXPECT_CALL(
+      sender_,
+      Send(MatchMessage(static_cast<uint32_t>(P2PMsg_OnSendComplete::ID))))
       .Times(3)
       .WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
 
@@ -164,8 +171,8 @@
 // Verify that we can't send data before we've received STUN response
 // from the other side.
 TEST_F(P2PSocketHostTcpTest, SendDataNoAuth) {
-  EXPECT_CALL(sender_, Send(
-      MatchMessage(static_cast<uint32>(P2PMsg_OnError::ID))))
+  EXPECT_CALL(sender_,
+              Send(MatchMessage(static_cast<uint32_t>(P2PMsg_OnError::ID))))
       .WillOnce(DoAll(DeleteArg<0>(), Return(true)));
 
   rtc::PacketOptions options;
@@ -187,8 +194,9 @@
   received_data.append(IntToSize(request_packet.size()));
   received_data.append(request_packet.begin(), request_packet.end());
 
-  EXPECT_CALL(sender_, Send(
-      MatchMessage(static_cast<uint32>(P2PMsg_OnSendComplete::ID))))
+  EXPECT_CALL(
+      sender_,
+      Send(MatchMessage(static_cast<uint32_t>(P2PMsg_OnSendComplete::ID))))
       .WillOnce(DoAll(DeleteArg<0>(), Return(true)));
   EXPECT_CALL(sender_, Send(MatchPacketMessage(request_packet)))
       .WillOnce(DoAll(DeleteArg<0>(), Return(true)));
@@ -213,8 +221,9 @@
 
   socket_->set_async_write(true);
 
-  EXPECT_CALL(sender_, Send(
-      MatchMessage(static_cast<uint32>(P2PMsg_OnSendComplete::ID))))
+  EXPECT_CALL(
+      sender_,
+      Send(MatchMessage(static_cast<uint32_t>(P2PMsg_OnSendComplete::ID))))
       .Times(2)
       .WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
 
@@ -247,8 +256,9 @@
   received_data.append(IntToSize(request_packet.size()));
   received_data.append(request_packet.begin(), request_packet.end());
 
-  EXPECT_CALL(sender_, Send(
-      MatchMessage(static_cast<uint32>(P2PMsg_OnSendComplete::ID))))
+  EXPECT_CALL(
+      sender_,
+      Send(MatchMessage(static_cast<uint32_t>(P2PMsg_OnSendComplete::ID))))
       .WillOnce(DoAll(DeleteArg<0>(), Return(true)));
   EXPECT_CALL(sender_, Send(MatchPacketMessage(request_packet)))
       .WillOnce(DoAll(DeleteArg<0>(), Return(true)));
@@ -260,7 +270,7 @@
   std::vector<char> packet;
   CreateRandomPacket(&packet);
   // Make it a RTP packet.
-  *reinterpret_cast<uint16*>(&*packet.begin()) = base::HostToNet16(0x8000);
+  *reinterpret_cast<uint16_t*>(&*packet.begin()) = base::HostToNet16(0x8000);
   socket_host_->Send(dest_.ip_address, packet, options, 0);
 
   std::string expected_data;
@@ -273,8 +283,9 @@
 // Verify that we can send STUN message and that they are formatted
 // properly.
 TEST_F(P2PSocketHostStunTcpTest, SendStunNoAuth) {
-  EXPECT_CALL(sender_, Send(
-      MatchMessage(static_cast<uint32>(P2PMsg_OnSendComplete::ID))))
+  EXPECT_CALL(
+      sender_,
+      Send(MatchMessage(static_cast<uint32_t>(P2PMsg_OnSendComplete::ID))))
       .Times(3)
       .WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
 
@@ -302,8 +313,9 @@
 // Verify that we can receive STUN messages from the socket, and that
 // the messages are parsed properly.
 TEST_F(P2PSocketHostStunTcpTest, ReceiveStun) {
-  EXPECT_CALL(sender_, Send(
-      MatchMessage(static_cast<uint32>(P2PMsg_OnSendComplete::ID))))
+  EXPECT_CALL(
+      sender_,
+      Send(MatchMessage(static_cast<uint32_t>(P2PMsg_OnSendComplete::ID))))
       .Times(3)
       .WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
 
@@ -347,8 +359,8 @@
 // Verify that we can't send data before we've received STUN response
 // from the other side.
 TEST_F(P2PSocketHostStunTcpTest, SendDataNoAuth) {
-  EXPECT_CALL(sender_, Send(
-      MatchMessage(static_cast<uint32>(P2PMsg_OnError::ID))))
+  EXPECT_CALL(sender_,
+              Send(MatchMessage(static_cast<uint32_t>(P2PMsg_OnError::ID))))
       .WillOnce(DoAll(DeleteArg<0>(), Return(true)));
 
   rtc::PacketOptions options;
@@ -365,8 +377,9 @@
 
   socket_->set_async_write(true);
 
-  EXPECT_CALL(sender_, Send(
-      MatchMessage(static_cast<uint32>(P2PMsg_OnSendComplete::ID))))
+  EXPECT_CALL(
+      sender_,
+      Send(MatchMessage(static_cast<uint32_t>(P2PMsg_OnSendComplete::ID))))
       .Times(2)
       .WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
 
diff --git a/content/browser/renderer_host/p2p/socket_host_test_utils.cc b/content/browser/renderer_host/p2p/socket_host_test_utils.cc
index 1f56903..dce2bd60 100644
--- a/content/browser/renderer_host/p2p/socket_host_test_utils.cc
+++ b/content/browser/renderer_host/p2p/socket_host_test_utils.cc
@@ -4,6 +4,8 @@
 
 #include "content/browser/renderer_host/p2p/socket_host_test_utils.h"
 
+#include <stddef.h>
+
 #include "base/logging.h"
 #include "base/sys_byteorder.h"
 #include "base/thread_task_runner_handle.h"
@@ -11,10 +13,10 @@
 #include "net/base/io_buffer.h"
 
 const int kStunHeaderSize = 20;
-const uint16 kStunBindingRequest = 0x0001;
-const uint16 kStunBindingResponse = 0x0102;
-const uint16 kStunBindingError = 0x0111;
-const uint32 kStunMagicCookie = 0x2112A442;
+const uint16_t kStunBindingRequest = 0x0001;
+const uint16_t kStunBindingResponse = 0x0102;
+const uint16_t kStunBindingError = 0x0111;
+const uint32_t kStunMagicCookie = 0x2112A442;
 
 MockIPCSender::MockIPCSender() { }
 MockIPCSender::~MockIPCSender() { }
@@ -104,12 +106,12 @@
   callback.Run(buf_len);
 }
 
-int FakeSocket::SetReceiveBufferSize(int32 size) {
+int FakeSocket::SetReceiveBufferSize(int32_t size) {
   NOTIMPLEMENTED();
   return net::ERR_NOT_IMPLEMENTED;
 }
 
-int FakeSocket::SetSendBufferSize(int32 size) {
+int FakeSocket::SetSendBufferSize(int32_t size) {
   NOTIMPLEMENTED();
   return net::ERR_NOT_IMPLEMENTED;
 }
@@ -193,12 +195,12 @@
   (*packet)[0] = (*packet)[0] | 0x80;
 }
 
-static void CreateStunPacket(std::vector<char>* packet, uint16 type) {
+static void CreateStunPacket(std::vector<char>* packet, uint16_t type) {
   CreateRandomPacket(packet);
-  *reinterpret_cast<uint16*>(&*packet->begin()) = base::HostToNet16(type);
-  *reinterpret_cast<uint16*>(&*packet->begin() + 2) =
+  *reinterpret_cast<uint16_t*>(&*packet->begin()) = base::HostToNet16(type);
+  *reinterpret_cast<uint16_t*>(&*packet->begin() + 2) =
       base::HostToNet16(packet->size() - kStunHeaderSize);
-  *reinterpret_cast<uint32*>(&*packet->begin() + 4) =
+  *reinterpret_cast<uint32_t*>(&*packet->begin() + 4) =
       base::HostToNet32(kStunMagicCookie);
 }
 
@@ -214,7 +216,7 @@
   CreateStunPacket(packet, kStunBindingError);
 }
 
-net::IPEndPoint ParseAddress(const std::string& ip_str, uint16 port) {
+net::IPEndPoint ParseAddress(const std::string& ip_str, uint16_t port) {
   net::IPAddressNumber ip;
   EXPECT_TRUE(net::ParseIPLiteralToNumber(ip_str, &ip));
   return net::IPEndPoint(ip, port);
diff --git a/content/browser/renderer_host/p2p/socket_host_test_utils.h b/content/browser/renderer_host/p2p/socket_host_test_utils.h
index 497b672..77a8319 100644
--- a/content/browser/renderer_host/p2p/socket_host_test_utils.h
+++ b/content/browser/renderer_host/p2p/socket_host_test_utils.h
@@ -5,6 +5,8 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TEST_UTILS_H_
 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TEST_UTILS_H_
 
+#include <stdint.h>
+
 #include <vector>
 
 #include "content/common/p2p_messages.h"
@@ -16,9 +18,9 @@
 
 const char kTestLocalIpAddress[] = "123.44.22.4";
 const char kTestIpAddress1[] = "123.44.22.31";
-const uint16 kTestPort1 = 234;
+const uint16_t kTestPort1 = 234;
 const char kTestIpAddress2[] = "133.11.22.33";
-const uint16 kTestPort2 = 543;
+const uint16_t kTestPort2 = 543;
 
 class MockIPCSender : public IPC::Sender {
  public:
@@ -47,8 +49,8 @@
   int Write(net::IOBuffer* buf,
             int buf_len,
             const net::CompletionCallback& callback) override;
-  int SetReceiveBufferSize(int32 size) override;
-  int SetSendBufferSize(int32 size) override;
+  int SetReceiveBufferSize(int32_t size) override;
+  int SetSendBufferSize(int32_t size) override;
   int Connect(const net::CompletionCallback& callback) override;
   void Disconnect() override;
   bool IsConnected() const override;
@@ -96,7 +98,7 @@
 void CreateStunResponse(std::vector<char>* packet);
 void CreateStunError(std::vector<char>* packet);
 
-net::IPEndPoint ParseAddress(const std::string& ip_str, uint16 port);
+net::IPEndPoint ParseAddress(const std::string& ip_str, uint16_t port);
 
 MATCHER_P(MatchMessage, type, "") {
   return arg->type() == type;
diff --git a/content/browser/renderer_host/p2p/socket_host_throttler.h b/content/browser/renderer_host/p2p/socket_host_throttler.h
index a28a588..0ab1e9db 100644
--- a/content/browser/renderer_host/p2p/socket_host_throttler.h
+++ b/content/browser/renderer_host/p2p/socket_host_throttler.h
@@ -5,6 +5,9 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_THROTTLER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_THROTTLER_H_
 
+#include <stddef.h>
+
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
 
diff --git a/content/browser/renderer_host/p2p/socket_host_udp.cc b/content/browser/renderer_host/p2p/socket_host_udp.cc
index a40c451..0dbfcec4 100644
--- a/content/browser/renderer_host/p2p/socket_host_udp.cc
+++ b/content/browser/renderer_host/p2p/socket_host_udp.cc
@@ -10,6 +10,7 @@
 #include "base/stl_util.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/trace_event/trace_event.h"
+#include "build/build_config.h"
 #include "content/browser/renderer_host/p2p/socket_host_throttler.h"
 #include "content/common/p2p_messages.h"
 #include "content/public/browser/content_browser_client.h"
@@ -75,7 +76,7 @@
     const net::IPEndPoint& to,
     const std::vector<char>& content,
     const rtc::PacketOptions& options,
-    uint64 id)
+    uint64_t id)
     : to(to),
       data(new net::IOBuffer(content.size())),
       size(content.size()),
@@ -233,7 +234,7 @@
 void P2PSocketHostUdp::Send(const net::IPEndPoint& to,
                             const std::vector<char>& data,
                             const rtc::PacketOptions& options,
-                            uint64 packet_id) {
+                            uint64_t packet_id) {
   if (!socket_) {
     // The Send message may be sent after the an OnError message was
     // sent by hasn't been processed the renderer.
diff --git a/content/browser/renderer_host/p2p/socket_host_udp.h b/content/browser/renderer_host/p2p/socket_host_udp.h
index fff23a5..93fb633 100644
--- a/content/browser/renderer_host/p2p/socket_host_udp.h
+++ b/content/browser/renderer_host/p2p/socket_host_udp.h
@@ -5,11 +5,15 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_UDP_H_
 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_UDP_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <deque>
 #include <set>
 #include <vector>
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
@@ -38,7 +42,7 @@
   void Send(const net::IPEndPoint& to,
             const std::vector<char>& data,
             const rtc::PacketOptions& options,
-            uint64 packet_id) override;
+            uint64_t packet_id) override;
   P2PSocketHost* AcceptIncomingTcpConnection(
       const net::IPEndPoint& remote_address,
       int id) override;
@@ -53,13 +57,13 @@
     PendingPacket(const net::IPEndPoint& to,
                   const std::vector<char>& content,
                   const rtc::PacketOptions& options,
-                  uint64 id);
+                  uint64_t id);
     ~PendingPacket();
     net::IPEndPoint to;
     scoped_refptr<net::IOBuffer> data;
     int size;
     rtc::PacketOptions packet_options;
-    uint64 id;
+    uint64_t id;
   };
 
   void OnError();
diff --git a/content/browser/renderer_host/p2p/socket_host_udp_unittest.cc b/content/browser/renderer_host/p2p/socket_host_udp_unittest.cc
index 5d67a24f..7258eafa 100644
--- a/content/browser/renderer_host/p2p/socket_host_udp_unittest.cc
+++ b/content/browser/renderer_host/p2p/socket_host_udp_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "content/browser/renderer_host/p2p/socket_host_udp.h"
 
+#include <stdint.h>
+
 #include <deque>
 #include <vector>
 
@@ -95,9 +97,9 @@
     return buf_len;
   }
 
-  int SetReceiveBufferSize(int32 size) override { return net::OK; }
+  int SetReceiveBufferSize(int32_t size) override { return net::OK; }
 
-  int SetSendBufferSize(int32 size) override { return net::OK; }
+  int SetSendBufferSize(int32_t size) override { return net::OK; }
 
   void ReceivePacket(const net::IPEndPoint& address, std::vector<char> data) {
     if (!recv_callback_.is_null()) {
@@ -129,7 +131,7 @@
     return net::ERR_NOT_IMPLEMENTED;
   }
 
-  int SetMulticastInterface(uint32 interface_index) override {
+  int SetMulticastInterface(uint32_t interface_index) override {
     NOTIMPLEMENTED();
     return net::ERR_NOT_IMPLEMENTED;
   }
@@ -170,8 +172,9 @@
 class P2PSocketHostUdpTest : public testing::Test {
  protected:
   void SetUp() override {
-    EXPECT_CALL(sender_, Send(
-        MatchMessage(static_cast<uint32>(P2PMsg_OnSocketCreated::ID))))
+    EXPECT_CALL(
+        sender_,
+        Send(MatchMessage(static_cast<uint32_t>(P2PMsg_OnSocketCreated::ID))))
         .WillOnce(DoAll(DeleteArg<0>(), Return(true)));
 
     socket_host_.reset(new P2PSocketHostUdp(&sender_, 0, &throttler_));
@@ -203,8 +206,9 @@
 // Verify that we can send STUN messages before we receive anything
 // from the other side.
 TEST_F(P2PSocketHostUdpTest, SendStunNoAuth) {
-  EXPECT_CALL(sender_, Send(
-      MatchMessage(static_cast<uint32>(P2PMsg_OnSendComplete::ID))))
+  EXPECT_CALL(
+      sender_,
+      Send(MatchMessage(static_cast<uint32_t>(P2PMsg_OnSendComplete::ID))))
       .Times(3)
       .WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
 
@@ -230,8 +234,8 @@
 // Verify that no data packets can be sent before STUN binding has
 // finished.
 TEST_F(P2PSocketHostUdpTest, SendDataNoAuth) {
-  EXPECT_CALL(sender_, Send(
-      MatchMessage(static_cast<uint32>(P2PMsg_OnError::ID))))
+  EXPECT_CALL(sender_,
+              Send(MatchMessage(static_cast<uint32_t>(P2PMsg_OnError::ID))))
       .WillOnce(DoAll(DeleteArg<0>(), Return(true)));
 
   rtc::PacketOptions options;
@@ -254,8 +258,9 @@
   socket_->ReceivePacket(dest1_, request_packet);
 
   // Now we should be able to send any data to |dest1_|.
-  EXPECT_CALL(sender_, Send(
-      MatchMessage(static_cast<uint32>(P2PMsg_OnSendComplete::ID))))
+  EXPECT_CALL(
+      sender_,
+      Send(MatchMessage(static_cast<uint32_t>(P2PMsg_OnSendComplete::ID))))
       .WillOnce(DoAll(DeleteArg<0>(), Return(true)));
 
   rtc::PacketOptions options;
@@ -279,8 +284,9 @@
   socket_->ReceivePacket(dest1_, request_packet);
 
   // Now we should be able to send any data to |dest1_|.
-  EXPECT_CALL(sender_, Send(
-      MatchMessage(static_cast<uint32>(P2PMsg_OnSendComplete::ID))))
+  EXPECT_CALL(
+      sender_,
+      Send(MatchMessage(static_cast<uint32_t>(P2PMsg_OnSendComplete::ID))))
       .WillOnce(DoAll(DeleteArg<0>(), Return(true)));
 
   rtc::PacketOptions options;
@@ -307,8 +313,8 @@
   rtc::PacketOptions options;
   std::vector<char> packet;
   CreateRandomPacket(&packet);
-  EXPECT_CALL(sender_, Send(
-      MatchMessage(static_cast<uint32>(P2PMsg_OnError::ID))))
+  EXPECT_CALL(sender_,
+              Send(MatchMessage(static_cast<uint32_t>(P2PMsg_OnError::ID))))
       .WillOnce(DoAll(DeleteArg<0>(), Return(true)));
   socket_host_->Send(dest2_, packet, options, 0);
 }
@@ -316,8 +322,9 @@
 // Verify throttler not allowing unlimited sending of ICE messages to
 // any destination.
 TEST_F(P2PSocketHostUdpTest, ThrottleAfterLimit) {
-  EXPECT_CALL(sender_, Send(
-      MatchMessage(static_cast<uint32>(P2PMsg_OnSendComplete::ID))))
+  EXPECT_CALL(
+      sender_,
+      Send(MatchMessage(static_cast<uint32_t>(P2PMsg_OnSendComplete::ID))))
       .Times(2)
       .WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
 
@@ -345,8 +352,9 @@
       .WillOnce(DoAll(DeleteArg<0>(), Return(true)));
   socket_->ReceivePacket(dest1_, request_packet);
 
-  EXPECT_CALL(sender_, Send(
-      MatchMessage(static_cast<uint32>(P2PMsg_OnSendComplete::ID))))
+  EXPECT_CALL(
+      sender_,
+      Send(MatchMessage(static_cast<uint32_t>(P2PMsg_OnSendComplete::ID))))
       .Times(4)
       .WillRepeatedly(DoAll(DeleteArg<0>(), Return(true)));
 
diff --git a/content/browser/renderer_host/p2p/socket_host_unittest.cc b/content/browser/renderer_host/p2p/socket_host_unittest.cc
index 7e9393fd..c92e9d7 100644
--- a/content/browser/renderer_host/p2p/socket_host_unittest.cc
+++ b/content/browser/renderer_host/p2p/socket_host_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "content/browser/renderer_host/p2p/socket_host.h"
 
+#include <stddef.h>
+
 #include <vector>
 
 #include "base/memory/scoped_ptr.h"
diff --git a/content/browser/renderer_host/pepper/browser_ppapi_host_impl.h b/content/browser/renderer_host/pepper/browser_ppapi_host_impl.h
index d851434..dd112390 100644
--- a/content/browser/renderer_host/pepper/browser_ppapi_host_impl.h
+++ b/content/browser/renderer_host/pepper/browser_ppapi_host_impl.h
@@ -8,10 +8,10 @@
 #include <map>
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
 #include "base/containers/scoped_ptr_hash_map.h"
 #include "base/files/file_path.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/content/browser/renderer_host/pepper/browser_ppapi_host_test.h b/content/browser/renderer_host/pepper/browser_ppapi_host_test.h
index 3f375eea..b7ca9d4 100644
--- a/content/browser/renderer_host/pepper/browser_ppapi_host_test.h
+++ b/content/browser/renderer_host/pepper/browser_ppapi_host_test.h
@@ -5,7 +5,7 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_BROWSER_PPAPI_HOST_TEST_H_
 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_BROWSER_PPAPI_HOST_TEST_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "content/public/browser/browser_ppapi_host.h"
 #include "ppapi/proxy/resource_message_test_sink.h"
diff --git a/content/browser/renderer_host/pepper/content_browser_pepper_host_factory.cc b/content/browser/renderer_host/pepper/content_browser_pepper_host_factory.cc
index f52a201..79f7f56 100644
--- a/content/browser/renderer_host/pepper/content_browser_pepper_host_factory.cc
+++ b/content/browser/renderer_host/pepper/content_browser_pepper_host_factory.cc
@@ -4,6 +4,8 @@
 
 #include "content/browser/renderer_host/pepper/content_browser_pepper_host_factory.h"
 
+#include <stddef.h>
+
 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h"
 #include "content/browser/renderer_host/pepper/pepper_browser_font_singleton_host.h"
 #include "content/browser/renderer_host/pepper/pepper_file_io_host.h"
diff --git a/content/browser/renderer_host/pepper/content_browser_pepper_host_factory.h b/content/browser/renderer_host/pepper/content_browser_pepper_host_factory.h
index dffa7fe..c8e98fa 100644
--- a/content/browser/renderer_host/pepper/content_browser_pepper_host_factory.h
+++ b/content/browser/renderer_host/pepper/content_browser_pepper_host_factory.h
@@ -6,6 +6,7 @@
 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_CONTENT_BROWSER_PEPPER_HOST_FACTORY_H_
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "net/socket/tcp_socket.h"
diff --git a/content/browser/renderer_host/pepper/pepper_browser_font_singleton_host.cc b/content/browser/renderer_host/pepper/pepper_browser_font_singleton_host.cc
index e2c909c9..5a4db23 100644
--- a/content/browser/renderer_host/pepper/pepper_browser_font_singleton_host.cc
+++ b/content/browser/renderer_host/pepper/pepper_browser_font_singleton_host.cc
@@ -4,6 +4,10 @@
 
 #include "content/browser/renderer_host/pepper/pepper_browser_font_singleton_host.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/threading/sequenced_worker_pool.h"
 #include "base/values.h"
 #include "content/common/font_list.h"
diff --git a/content/browser/renderer_host/pepper/pepper_browser_font_singleton_host.h b/content/browser/renderer_host/pepper/pepper_browser_font_singleton_host.h
index 643be70..b438e00 100644
--- a/content/browser/renderer_host/pepper/pepper_browser_font_singleton_host.h
+++ b/content/browser/renderer_host/pepper/pepper_browser_font_singleton_host.h
@@ -5,7 +5,7 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_BROWSER_FONT_SINGLETON_HOST_H_
 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_BROWSER_FONT_SINGLETON_HOST_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "ppapi/host/resource_host.h"
 
 namespace content {
diff --git a/content/browser/renderer_host/pepper/pepper_external_file_ref_backend.h b/content/browser/renderer_host/pepper/pepper_external_file_ref_backend.h
index f3c3c947..2a95284 100644
--- a/content/browser/renderer_host/pepper/pepper_external_file_ref_backend.h
+++ b/content/browser/renderer_host/pepper/pepper_external_file_ref_backend.h
@@ -5,10 +5,13 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_EXTERNAL_FILE_REF_BACKEND_H_
 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_EXTERNAL_FILE_REF_BACKEND_H_
 
+#include <stdint.h>
+
 #include <string>
 
 #include "base/files/file.h"
 #include "base/files/file_path.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/task_runner.h"
 #include "content/browser/renderer_host/pepper/pepper_file_ref_host.h"
diff --git a/content/browser/renderer_host/pepper/pepper_file_io_host.h b/content/browser/renderer_host/pepper/pepper_file_io_host.h
index bae9a54b..90de1da 100644
--- a/content/browser/renderer_host/pepper/pepper_file_io_host.h
+++ b/content/browser/renderer_host/pepper/pepper_file_io_host.h
@@ -5,12 +5,14 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_IO_HOST_H_
 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_IO_HOST_H_
 
+#include <stdint.h>
+
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/callback_forward.h"
 #include "base/files/file.h"
 #include "base/files/file_proxy.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h"
 #include "ipc/ipc_listener.h"
diff --git a/content/browser/renderer_host/pepper/pepper_file_ref_host.h b/content/browser/renderer_host/pepper/pepper_file_ref_host.h
index 5f6d11e..cd8f67b 100644
--- a/content/browser/renderer_host/pepper/pepper_file_ref_host.h
+++ b/content/browser/renderer_host/pepper/pepper_file_ref_host.h
@@ -5,8 +5,11 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_REF_HOST_H_
 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_REF_HOST_H_
 
+#include <stdint.h>
+
 #include <string>
 
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "content/public/browser/browser_ppapi_host.h"
 #include "ppapi/c/pp_file_info.h"
diff --git a/content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc b/content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc
index bdb2514..70e29a7 100644
--- a/content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc
+++ b/content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc
@@ -233,7 +233,7 @@
     const GURL& root,
     const std::string& /* unused */,
     base::File::Error error) {
-  int32 pp_error = ppapi::FileErrorToPepperError(error);
+  int32_t pp_error = ppapi::FileErrorToPepperError(error);
   if (pp_error == PP_OK) {
     opened_ = true;
     root_url_ = root;
@@ -319,7 +319,7 @@
     ppapi::host::ReplyMessageContext reply_context,
     const std::string& fsid,
     base::File::Error error) {
-  int32 pp_error = ppapi::FileErrorToPepperError(error);
+  int32_t pp_error = ppapi::FileErrorToPepperError(error);
   if (pp_error == PP_OK)
     opened_ = true;
   SendReplyForIsolatedFileSystem(reply_context, fsid, pp_error);
diff --git a/content/browser/renderer_host/pepper/pepper_file_system_browser_host.h b/content/browser/renderer_host/pepper/pepper_file_system_browser_host.h
index 669adde..bf56a1ad 100644
--- a/content/browser/renderer_host/pepper/pepper_file_system_browser_host.h
+++ b/content/browser/renderer_host/pepper/pepper_file_system_browser_host.h
@@ -5,12 +5,14 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_SYSTEM_BROWSER_HOST_H_
 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FILE_SYSTEM_BROWSER_HOST_H_
 
+#include <stdint.h>
+
 #include <queue>
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "content/browser/renderer_host/pepper/quota_reservation.h"
 #include "content/common/content_export.h"
diff --git a/content/browser/renderer_host/pepper/pepper_file_system_browser_host_unittest.cc b/content/browser/renderer_host/pepper/pepper_file_system_browser_host_unittest.cc
index ccc9c61..bbc5a14 100644
--- a/content/browser/renderer_host/pepper/pepper_file_system_browser_host_unittest.cc
+++ b/content/browser/renderer_host/pepper/pepper_file_system_browser_host_unittest.cc
@@ -6,7 +6,7 @@
 
 #include <string>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "content/browser/renderer_host/pepper/browser_ppapi_host_test.h"
 #include "ppapi/c/pp_instance.h"
diff --git a/content/browser/renderer_host/pepper/pepper_flash_file_message_filter.h b/content/browser/renderer_host/pepper/pepper_flash_file_message_filter.h
index fa6bb6f..a488a558 100644
--- a/content/browser/renderer_host/pepper/pepper_flash_file_message_filter.h
+++ b/content/browser/renderer_host/pepper/pepper_flash_file_message_filter.h
@@ -5,9 +5,12 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FLASH_FILE_MESSAGE_FILTER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FLASH_FILE_MESSAGE_FILTER_H_
 
+#include <stdint.h>
+
 #include "base/callback_forward.h"
 #include "base/compiler_specific.h"
 #include "base/files/file_path.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/process/process.h"
 #include "ppapi/c/pp_instance.h"
diff --git a/content/browser/renderer_host/pepper/pepper_gamepad_host.h b/content/browser/renderer_host/pepper/pepper_gamepad_host.h
index 8d6ee73..963f7901 100644
--- a/content/browser/renderer_host/pepper/pepper_gamepad_host.h
+++ b/content/browser/renderer_host/pepper/pepper_gamepad_host.h
@@ -5,7 +5,10 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_GAMEPAD_HOST_H_
 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_GAMEPAD_HOST_H_
 
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "content/browser/gamepad/gamepad_consumer.h"
 #include "content/common/content_export.h"
diff --git a/content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc b/content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc
index ca94c7f..a325e7a39 100644
--- a/content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc
+++ b/content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc
@@ -2,10 +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 <string.h>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
+#include "build/build_config.h"
 #include "content/browser/gamepad/gamepad_test_helpers.h"
 #include "content/browser/renderer_host/pepper/browser_ppapi_host_test.h"
 #include "content/browser/renderer_host/pepper/pepper_gamepad_host.h"
diff --git a/content/browser/renderer_host/pepper/pepper_host_resolver_message_filter.cc b/content/browser/renderer_host/pepper/pepper_host_resolver_message_filter.cc
index 3789ffa..c841981c 100644
--- a/content/browser/renderer_host/pepper/pepper_host_resolver_message_filter.cc
+++ b/content/browser/renderer_host/pepper/pepper_host_resolver_message_filter.cc
@@ -4,6 +4,8 @@
 
 #include "content/browser/renderer_host/pepper/pepper_host_resolver_message_filter.h"
 
+#include <stddef.h>
+
 #include "base/logging.h"
 #include "base/memory/scoped_ptr.h"
 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h"
diff --git a/content/browser/renderer_host/pepper/pepper_host_resolver_message_filter.h b/content/browser/renderer_host/pepper/pepper_host_resolver_message_filter.h
index a5321845..42f7569 100644
--- a/content/browser/renderer_host/pepper/pepper_host_resolver_message_filter.h
+++ b/content/browser/renderer_host/pepper/pepper_host_resolver_message_filter.h
@@ -5,11 +5,13 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_HOST_RESOLVER_MESSAGE_FILTER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_HOST_RESOLVER_MESSAGE_FILTER_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "content/common/content_export.h"
 #include "content/public/common/process_type.h"
 #include "ppapi/c/pp_instance.h"
diff --git a/content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.h b/content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.h
index e210763c..95734fe 100644
--- a/content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.h
+++ b/content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.h
@@ -5,8 +5,11 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_INTERNAL_FILE_REF_BACKEND_H_
 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_INTERNAL_FILE_REF_BACKEND_H_
 
+#include <stdint.h>
+
 #include <string>
 
+#include "base/macros.h"
 #include "content/browser/renderer_host/pepper/pepper_file_ref_host.h"
 #include "ppapi/c/pp_instance.h"
 #include "ppapi/c/pp_resource.h"
diff --git a/content/browser/renderer_host/pepper/pepper_lookup_request.h b/content/browser/renderer_host/pepper/pepper_lookup_request.h
index b36bd5e..ecbf646 100644
--- a/content/browser/renderer_host/pepper/pepper_lookup_request.h
+++ b/content/browser/renderer_host/pepper/pepper_lookup_request.h
@@ -6,6 +6,7 @@
 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_LOOKUP_REQUEST_H_
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "net/base/address_list.h"
 #include "net/base/net_errors.h"
diff --git a/content/browser/renderer_host/pepper/pepper_message_filter.h b/content/browser/renderer_host/pepper/pepper_message_filter.h
index 02a89ad..04cd120 100644
--- a/content/browser/renderer_host/pepper/pepper_message_filter.h
+++ b/content/browser/renderer_host/pepper/pepper_message_filter.h
@@ -7,8 +7,8 @@
 
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "content/public/browser/browser_message_filter.h"
 
diff --git a/content/browser/renderer_host/pepper/pepper_network_monitor_host.cc b/content/browser/renderer_host/pepper/pepper_network_monitor_host.cc
index bc5795b6e..d14603a1 100644
--- a/content/browser/renderer_host/pepper/pepper_network_monitor_host.cc
+++ b/content/browser/renderer_host/pepper/pepper_network_monitor_host.cc
@@ -4,6 +4,8 @@
 
 #include "content/browser/renderer_host/pepper/pepper_network_monitor_host.h"
 
+#include <stddef.h>
+
 #include "base/task_runner_util.h"
 #include "base/threading/sequenced_worker_pool.h"
 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h"
diff --git a/content/browser/renderer_host/pepper/pepper_network_monitor_host.h b/content/browser/renderer_host/pepper/pepper_network_monitor_host.h
index 2225a93..ef1b305 100644
--- a/content/browser/renderer_host/pepper/pepper_network_monitor_host.h
+++ b/content/browser/renderer_host/pepper/pepper_network_monitor_host.h
@@ -6,6 +6,7 @@
 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_NETWORK_MONITOR_HOST_H_
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "content/common/content_export.h"
 #include "net/base/network_change_notifier.h"
diff --git a/content/browser/renderer_host/pepper/pepper_network_proxy_host.h b/content/browser/renderer_host/pepper/pepper_network_proxy_host.h
index eddbc89..0992c9fc 100644
--- a/content/browser/renderer_host/pepper/pepper_network_proxy_host.h
+++ b/content/browser/renderer_host/pepper/pepper_network_proxy_host.h
@@ -5,10 +5,13 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_NETWORK_PROXY_HOST_H_
 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_NETWORK_PROXY_HOST_H_
 
+#include <stdint.h>
+
 #include <queue>
 #include <string>
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "content/common/content_export.h"
 #include "net/proxy/proxy_service.h"
diff --git a/content/browser/renderer_host/pepper/pepper_print_settings_manager.h b/content/browser/renderer_host/pepper/pepper_print_settings_manager.h
index 9199e726..8c53ede 100644
--- a/content/browser/renderer_host/pepper/pepper_print_settings_manager.h
+++ b/content/browser/renderer_host/pepper/pepper_print_settings_manager.h
@@ -5,8 +5,11 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_PRINT_SETTINGS_MANAGER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_PRINT_SETTINGS_MANAGER_H_
 
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "content/common/content_export.h"
 #include "ppapi/c/dev/pp_print_settings_dev.h"
 
diff --git a/content/browser/renderer_host/pepper/pepper_printing_host.h b/content/browser/renderer_host/pepper/pepper_printing_host.h
index fb2536d9..fc022f1 100644
--- a/content/browser/renderer_host/pepper/pepper_printing_host.h
+++ b/content/browser/renderer_host/pepper/pepper_printing_host.h
@@ -5,7 +5,10 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_PRINTING_HOST_H_
 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_PRINTING_HOST_H_
 
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "content/browser/renderer_host/pepper/pepper_print_settings_manager.h"
diff --git a/content/browser/renderer_host/pepper/pepper_printing_host_unittest.cc b/content/browser/renderer_host/pepper/pepper_printing_host_unittest.cc
index e61f75f..7bc8af99 100644
--- a/content/browser/renderer_host/pepper/pepper_printing_host_unittest.cc
+++ b/content/browser/renderer_host/pepper/pepper_printing_host_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 "base/macros.h"
 #include "content/browser/renderer_host/pepper/browser_ppapi_host_test.h"
 #include "content/browser/renderer_host/pepper/pepper_print_settings_manager.h"
 #include "content/browser/renderer_host/pepper/pepper_printing_host.h"
@@ -86,7 +89,7 @@
   // Simulate a message being received.
   ppapi::proxy::ResourceMessageCallParams call_params(pp_resource, 1);
   ppapi::host::HostMessageContext context(call_params);
-  int32 result = printing.OnResourceMessageReceived(
+  int32_t result = printing.OnResourceMessageReceived(
       PpapiHostMsg_Printing_GetDefaultPrintSettings(), &context);
   EXPECT_EQ(PP_OK_COMPLETIONPENDING, result);
 
diff --git a/content/browser/renderer_host/pepper/pepper_renderer_connection.cc b/content/browser/renderer_host/pepper/pepper_renderer_connection.cc
index 1e03a84..bbce5909 100644
--- a/content/browser/renderer_host/pepper/pepper_renderer_connection.cc
+++ b/content/browser/renderer_host/pepper/pepper_renderer_connection.cc
@@ -4,15 +4,19 @@
 
 #include "content/browser/renderer_host/pepper/pepper_renderer_connection.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "content/browser/browser_child_process_host_impl.h"
 #include "content/browser/ppapi_plugin_process_host.h"
 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h"
-#include "content/common/frame_messages.h"
-#include "content/common/pepper_renderer_instance_data.h"
 #include "content/browser/renderer_host/pepper/pepper_file_ref_host.h"
 #include "content/browser/renderer_host/pepper/pepper_file_system_browser_host.h"
+#include "content/common/frame_messages.h"
+#include "content/common/pepper_renderer_instance_data.h"
 #include "content/public/browser/content_browser_client.h"
 #include "content/public/common/content_client.h"
 #include "ipc/ipc_message_macros.h"
@@ -25,9 +29,8 @@
 
 namespace {
 
-const uint32 kFilteredMessageClasses[] = {
-  PpapiMsgStart,
-  FrameMsgStart,
+const uint32_t kFilteredMessageClasses[] = {
+    PpapiMsgStart, FrameMsgStart,
 };
 
 // Responsible for creating the pending resource hosts, holding their IDs until
diff --git a/content/browser/renderer_host/pepper/pepper_renderer_connection.h b/content/browser/renderer_host/pepper/pepper_renderer_connection.h
index 109da1f..37c5a07 100644
--- a/content/browser/renderer_host/pepper/pepper_renderer_connection.h
+++ b/content/browser/renderer_host/pepper/pepper_renderer_connection.h
@@ -7,8 +7,8 @@
 
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "content/public/browser/browser_message_filter.h"
 #include "ppapi/c/pp_instance.h"
diff --git a/content/browser/renderer_host/pepper/pepper_socket_utils.cc b/content/browser/renderer_host/pepper/pepper_socket_utils.cc
index 4b70dedd..c421fe2 100644
--- a/content/browser/renderer_host/pepper/pepper_socket_utils.cc
+++ b/content/browser/renderer_host/pepper/pepper_socket_utils.cc
@@ -10,6 +10,7 @@
 #include "base/logging.h"
 #include "base/memory/ref_counted.h"
 #include "base/strings/string_util.h"
+#include "build/build_config.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/content_browser_client.h"
 #include "content/public/browser/render_frame_host.h"
@@ -33,7 +34,7 @@
     const PP_NetAddress_Private& net_addr) {
   std::string host =
       ppapi::NetAddressPrivateImpl::DescribeNetAddress(net_addr, false);
-  uint16 port = 0;
+  uint16_t port = 0;
   std::vector<unsigned char> address;
   ppapi::NetAddressPrivateImpl::NetAddressToIPEndPoint(
       net_addr, &address, &port);
diff --git a/content/browser/renderer_host/pepper/pepper_socket_utils.h b/content/browser/renderer_host/pepper/pepper_socket_utils.h
index 6061cc34..ce33b02 100644
--- a/content/browser/renderer_host/pepper/pepper_socket_utils.h
+++ b/content/browser/renderer_host/pepper/pepper_socket_utils.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_SOCKET_UTILS_H_
 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_SOCKET_UTILS_H_
 
+#include "build/build_config.h"
 #include "content/public/common/socket_permission_request.h"
 #include "ppapi/c/pp_stdint.h"
 
diff --git a/content/browser/renderer_host/pepper/pepper_tcp_server_socket_message_filter.cc b/content/browser/renderer_host/pepper/pepper_tcp_server_socket_message_filter.cc
index 93e18041e..34db559 100644
--- a/content/browser/renderer_host/pepper/pepper_tcp_server_socket_message_filter.cc
+++ b/content/browser/renderer_host/pepper/pepper_tcp_server_socket_message_filter.cc
@@ -7,6 +7,7 @@
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/logging.h"
+#include "build/build_config.h"
 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h"
 #include "content/browser/renderer_host/pepper/content_browser_pepper_host_factory.h"
 #include "content/browser/renderer_host/pepper/pepper_socket_utils.h"
@@ -170,7 +171,7 @@
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
 
   net::IPAddressNumber address;
-  uint16 port;
+  uint16_t port;
   if (state_ != STATE_BEFORE_LISTENING ||
       !NetAddressPrivateImpl::NetAddressToIPEndPoint(addr, &address, &port)) {
     SendListenError(context, PP_ERROR_FAILED);
diff --git a/content/browser/renderer_host/pepper/pepper_tcp_server_socket_message_filter.h b/content/browser/renderer_host/pepper/pepper_tcp_server_socket_message_filter.h
index eded1be..f633ccb0 100644
--- a/content/browser/renderer_host/pepper/pepper_tcp_server_socket_message_filter.h
+++ b/content/browser/renderer_host/pepper/pepper_tcp_server_socket_message_filter.h
@@ -5,10 +5,14 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_TCP_SERVER_SOCKET_MESSAGE_FILTER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_TCP_SERVER_SOCKET_MESSAGE_FILTER_H_
 
-#include "base/basictypes.h"
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
+#include "build/build_config.h"
 #include "content/common/content_export.h"
 #include "net/base/ip_endpoint.h"
 #include "net/socket/tcp_socket.h"
diff --git a/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc b/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc
index 7f98861..0fcbc10e 100644
--- a/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc
+++ b/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc
@@ -575,7 +575,7 @@
   int pp_result = PP_OK;
   do {
     net::IPAddressNumber address;
-    uint16 port;
+    uint16_t port;
     if (!NetAddressPrivateImpl::NetAddressToIPEndPoint(
             net_addr, &address, &port)) {
       pp_result = PP_ERROR_ADDRESS_INVALID;
@@ -665,7 +665,7 @@
   state_.SetPendingTransition(TCPSocketState::CONNECT);
 
   net::IPAddressNumber address;
-  uint16 port;
+  uint16_t port;
   if (!NetAddressPrivateImpl::NetAddressToIPEndPoint(
           net_addr, &address, &port)) {
     state_.CompletePendingTransition(false);
diff --git a/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.h b/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.h
index 51443eb..8fe42c1b 100644
--- a/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.h
+++ b/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.h
@@ -5,13 +5,17 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_TCP_SOCKET_MESSAGE_FILTER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_TCP_SOCKET_MESSAGE_FILTER_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
+#include "build/build_config.h"
 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h"
 #include "content/browser/renderer_host/pepper/ssl_context_helper.h"
 #include "content/common/content_export.h"
diff --git a/content/browser/renderer_host/pepper/pepper_truetype_font.h b/content/browser/renderer_host/pepper/pepper_truetype_font.h
index f26b9bd9..63ed2c6 100644
--- a/content/browser/renderer_host/pepper/pepper_truetype_font.h
+++ b/content/browser/renderer_host/pepper/pepper_truetype_font.h
@@ -5,6 +5,8 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_TRUETYPE_FONT_H_
 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_TRUETYPE_FONT_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
diff --git a/content/browser/renderer_host/pepper/pepper_truetype_font_host.h b/content/browser/renderer_host/pepper/pepper_truetype_font_host.h
index b449547..f574c317 100644
--- a/content/browser/renderer_host/pepper/pepper_truetype_font_host.h
+++ b/content/browser/renderer_host/pepper/pepper_truetype_font_host.h
@@ -5,10 +5,13 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_TRUETYPE_FONT_HOST_H_
 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_TRUETYPE_FONT_HOST_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/sequenced_task_runner.h"
diff --git a/content/browser/renderer_host/pepper/pepper_truetype_font_linux.cc b/content/browser/renderer_host/pepper/pepper_truetype_font_linux.cc
index ebfacb87..4c51d6f2 100644
--- a/content/browser/renderer_host/pepper/pepper_truetype_font_linux.cc
+++ b/content/browser/renderer_host/pepper/pepper_truetype_font_linux.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 "base/compiler_specific.h"
 #include "base/files/scoped_file.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/numerics/safe_conversions.h"
 #include "base/sys_byteorder.h"
diff --git a/content/browser/renderer_host/pepper/pepper_truetype_font_list_host.cc b/content/browser/renderer_host/pepper/pepper_truetype_font_list_host.cc
index 3730724..4c72d4d 100644
--- a/content/browser/renderer_host/pepper/pepper_truetype_font_list_host.cc
+++ b/content/browser/renderer_host/pepper/pepper_truetype_font_list_host.cc
@@ -4,8 +4,11 @@
 
 #include "content/browser/renderer_host/pepper/pepper_truetype_font_list_host.h"
 
+#include <stdint.h>
+
 #include <algorithm>
 
+#include "base/macros.h"
 #include "base/numerics/safe_conversions.h"
 #include "base/threading/sequenced_worker_pool.h"
 #include "content/browser/renderer_host/pepper/pepper_truetype_font_list.h"
diff --git a/content/browser/renderer_host/pepper/pepper_truetype_font_list_host.h b/content/browser/renderer_host/pepper/pepper_truetype_font_list_host.h
index 19999ca..46a975b 100644
--- a/content/browser/renderer_host/pepper/pepper_truetype_font_list_host.h
+++ b/content/browser/renderer_host/pepper/pepper_truetype_font_list_host.h
@@ -5,7 +5,7 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_TRUETYPE_FONT_LIST_HOST_H_
 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_TRUETYPE_FONT_LIST_HOST_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "ppapi/host/resource_host.h"
 
 namespace content {
diff --git a/content/browser/renderer_host/pepper/pepper_truetype_font_list_mac.mm b/content/browser/renderer_host/pepper/pepper_truetype_font_list_mac.mm
index 7615723..c59c4a8 100644
--- a/content/browser/renderer_host/pepper/pepper_truetype_font_list_mac.mm
+++ b/content/browser/renderer_host/pepper/pepper_truetype_font_list_mac.mm
@@ -7,6 +7,7 @@
 #import <Cocoa/Cocoa.h>
 
 #include "base/mac/scoped_nsautorelease_pool.h"
+#include "base/macros.h"
 #include "base/strings/sys_string_conversions.h"
 #include "ppapi/c/dev/ppb_truetype_font_dev.h"
 #include "ppapi/proxy/serialized_structs.h"
diff --git a/content/browser/renderer_host/pepper/pepper_truetype_font_mac.mm b/content/browser/renderer_host/pepper/pepper_truetype_font_mac.mm
index 1e52e17..db8a8b51 100644
--- a/content/browser/renderer_host/pepper/pepper_truetype_font_mac.mm
+++ b/content/browser/renderer_host/pepper/pepper_truetype_font_mac.mm
@@ -5,6 +5,8 @@
 #include "content/browser/renderer_host/pepper/pepper_truetype_font.h"
 
 #import <ApplicationServices/ApplicationServices.h>
+#include <stddef.h>
+#include <stdint.h>
 
 #include <stdio.h>
 
@@ -12,6 +14,7 @@
 #include "base/mac/foundation_util.h"
 #include "base/mac/scoped_cftyperef.h"
 #include "base/mac/scoped_nsautorelease_pool.h"
+#include "base/macros.h"
 #include "base/numerics/safe_conversions.h"
 #include "base/strings/sys_string_conversions.h"
 #include "base/sys_byteorder.h"
diff --git a/content/browser/renderer_host/pepper/pepper_truetype_font_win.cc b/content/browser/renderer_host/pepper/pepper_truetype_font_win.cc
index 59119cd..194decd8 100644
--- a/content/browser/renderer_host/pepper/pepper_truetype_font_win.cc
+++ b/content/browser/renderer_host/pepper/pepper_truetype_font_win.cc
@@ -5,10 +5,12 @@
 #include "content/browser/renderer_host/pepper/pepper_truetype_font.h"
 
 #include <windows.h>
+#include <stdint.h>
 #include <algorithm>
 #include <set>
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/sys_byteorder.h"
diff --git a/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc b/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc
index 5474831..278ed63 100644
--- a/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc
+++ b/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc
@@ -9,6 +9,7 @@
 #include "base/compiler_specific.h"
 #include "base/logging.h"
 #include "base/metrics/histogram_macros.h"
+#include "build/build_config.h"
 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h"
 #include "content/browser/renderer_host/pepper/pepper_socket_utils.h"
 #include "content/public/browser/browser_thread.h"
@@ -361,7 +362,7 @@
     return PP_ERROR_FAILED;
 
   net::IPAddressNumber group;
-  uint16 port;
+  uint16_t port;
 
   if (!NetAddressPrivateImpl::NetAddressToIPEndPoint(addr, &group, &port))
     return PP_ERROR_ADDRESS_INVALID;
@@ -382,7 +383,7 @@
     return PP_ERROR_FAILED;
 
   net::IPAddressNumber group;
-  uint16 port;
+  uint16_t port;
 
   if (!NetAddressPrivateImpl::NetAddressToIPEndPoint(addr, &group, &port))
     return PP_ERROR_ADDRESS_INVALID;
@@ -405,7 +406,7 @@
       NULL, net::NetLog::Source()));
 
   net::IPAddressNumber address;
-  uint16 port;
+  uint16_t port;
   if (!NetAddressPrivateImpl::NetAddressToIPEndPoint(addr, &address, &port)) {
     SendBindError(context, PP_ERROR_ADDRESS_INVALID);
     return;
@@ -585,7 +586,7 @@
   }
 
   net::IPAddressNumber address;
-  uint16 port;
+  uint16_t port;
   if (!NetAddressPrivateImpl::NetAddressToIPEndPoint(addr, &address, &port)) {
     SendSendToError(context, PP_ERROR_ADDRESS_INVALID);
     return;
diff --git a/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.h b/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.h
index a4ea58c8..42d84c0 100644
--- a/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.h
+++ b/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.h
@@ -5,14 +5,17 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_UDP_SOCKET_MESSAGE_FILTER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_UDP_SOCKET_MESSAGE_FILTER_H_
 
+#include <stddef.h>
+
 #include <queue>
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
+#include "build/build_config.h"
 #include "content/common/content_export.h"
 #include "content/public/common/process_type.h"
 #include "net/base/completion_callback.h"
diff --git a/content/browser/renderer_host/pepper/quota_reservation.h b/content/browser/renderer_host/pepper/quota_reservation.h
index 7ea637c..84a5f90 100644
--- a/content/browser/renderer_host/pepper/quota_reservation.h
+++ b/content/browser/renderer_host/pepper/quota_reservation.h
@@ -7,8 +7,8 @@
 
 #include <map>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "content/common/content_export.h"
 #include "ppapi/c/pp_stdint.h"  // For int64_t on Windows.
 #include "ppapi/shared_impl/file_growth.h"
diff --git a/content/browser/renderer_host/pepper/quota_reservation_unittest.cc b/content/browser/renderer_host/pepper/quota_reservation_unittest.cc
index 5d7445b4..c1068db 100644
--- a/content/browser/renderer_host/pepper/quota_reservation_unittest.cc
+++ b/content/browser/renderer_host/pepper/quota_reservation_unittest.cc
@@ -4,12 +4,15 @@
 
 #include "content/browser/renderer_host/pepper/quota_reservation.h"
 
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/files/file.h"
 #include "base/files/file_util.h"
 #include "base/files/scoped_temp_dir.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
@@ -40,7 +43,7 @@
   void ReserveQuota(
       const GURL& origin,
       storage::FileSystemType type,
-      int64 delta,
+      int64_t delta,
       const QuotaReservationManager::ReserveQuotaCallback& callback) override {
     base::ThreadTaskRunnerHandle::Get()->PostTask(
         FROM_HERE,
@@ -49,11 +52,11 @@
 
   void ReleaseReservedQuota(const GURL& origin,
                             storage::FileSystemType type,
-                            int64 size) override {}
+                            int64_t size) override {}
 
   void CommitQuotaUsage(const GURL& origin,
                         storage::FileSystemType type,
-                        int64 delta) override {}
+                        int64_t delta) override {}
 
   void IncrementDirtyCount(const GURL& origin,
                            storage::FileSystemType type) override {}
@@ -102,7 +105,7 @@
         new QuotaReservation(reservation, origin, type));
   }
 
-  void SetFileSize(const base::FilePath::StringType& file_name, int64 size) {
+  void SetFileSize(const base::FilePath::StringType& file_name, int64_t size) {
     base::File file(MakeFilePath(file_name),
                     base::File::FLAG_OPEN_ALWAYS | base::File::FLAG_WRITE);
     ASSERT_TRUE(file.IsValid());
@@ -121,9 +124,9 @@
   DISALLOW_COPY_AND_ASSIGN(QuotaReservationTest);
 };
 
-void GotReservedQuota(int64* reserved_quota_ptr,
+void GotReservedQuota(int64_t* reserved_quota_ptr,
                       ppapi::FileGrowthMap* file_growths_ptr,
-                      int64 reserved_quota,
+                      int64_t reserved_quota,
                       const ppapi::FileSizeMap& maximum_written_offsets) {
   *reserved_quota_ptr = reserved_quota;
 
@@ -135,8 +138,8 @@
 }
 
 void ReserveQuota(scoped_refptr<QuotaReservation> quota_reservation,
-                  int64 amount,
-                  int64* reserved_quota,
+                  int64_t amount,
+                  int64_t* reserved_quota,
                   ppapi::FileGrowthMap* file_growths) {
   quota_reservation->ReserveQuota(
       amount,
@@ -158,17 +161,17 @@
       CreateQuotaReservation(reservation, origin, type);
 
   // Reserve quota with no files open.
-  int64 amount = 100;
-  int64 reserved_quota;
+  int64_t amount = 100;
+  int64_t reserved_quota;
   ppapi::FileGrowthMap file_growths;
   ReserveQuota(test, amount, &reserved_quota, &file_growths);
   EXPECT_EQ(amount, reserved_quota);
   EXPECT_EQ(0U, file_growths.size());
 
   // Open a file, refresh the reservation, extend the file, and close it.
-  int64 file_size = 10;
+  int64_t file_size = 10;
   SetFileSize(file1_name, file_size);
-  int64 open_file_size =
+  int64_t open_file_size =
       test->OpenFile(kFile1ID, MakeFileSystemURL(file1_name));
   EXPECT_EQ(file_size, open_file_size);
 
@@ -178,7 +181,7 @@
   EXPECT_EQ(1U, file_growths.size());
   EXPECT_EQ(file_size, file_growths[kFile1ID].max_written_offset);
 
-  int64 new_file_size = 30;
+  int64_t new_file_size = 30;
   SetFileSize(file1_name, new_file_size);
 
   EXPECT_EQ(amount, reservation->remaining_quota());
@@ -199,25 +202,25 @@
       CreateQuotaReservation(reservation, origin, type);
 
   // Open some files of different sizes.
-  int64 file1_size = 10;
+  int64_t file1_size = 10;
   SetFileSize(file1_name, file1_size);
-  int64 open_file1_size =
+  int64_t open_file1_size =
       test->OpenFile(kFile1ID, MakeFileSystemURL(file1_name));
   EXPECT_EQ(file1_size, open_file1_size);
-  int64 file2_size = 20;
+  int64_t file2_size = 20;
   SetFileSize(file2_name, file2_size);
-  int64 open_file2_size =
+  int64_t open_file2_size =
       test->OpenFile(kFile2ID, MakeFileSystemURL(file2_name));
   EXPECT_EQ(file2_size, open_file2_size);
-  int64 file3_size = 30;
+  int64_t file3_size = 30;
   SetFileSize(file3_name, file3_size);
-  int64 open_file3_size =
+  int64_t open_file3_size =
       test->OpenFile(kFile3ID, MakeFileSystemURL(file3_name));
   EXPECT_EQ(file3_size, open_file3_size);
 
   // Reserve quota.
-  int64 amount = 100;
-  int64 reserved_quota;
+  int64_t amount = 100;
+  int64_t reserved_quota;
   ppapi::FileGrowthMap file_growths;
   file_growths[kFile1ID] = ppapi::FileGrowth(file1_size, 0);  // 3 files open.
   file_growths[kFile2ID] = ppapi::FileGrowth(file2_size, 0);
diff --git a/content/browser/renderer_host/pepper/ssl_context_helper.h b/content/browser/renderer_host/pepper/ssl_context_helper.h
index f1da2a6..f979529 100644
--- a/content/browser/renderer_host/pepper/ssl_context_helper.h
+++ b/content/browser/renderer_host/pepper/ssl_context_helper.h
@@ -5,7 +5,7 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_SSL_CONTEXT_HELPER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_SSL_CONTEXT_HELPER_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "net/ssl/ssl_config_service.h"
diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc
index 3ffdc89d..215c09d 100644
--- a/content/browser/renderer_host/render_message_filter.cc
+++ b/content/browser/renderer_host/render_message_filter.cc
@@ -13,11 +13,13 @@
 #include "base/bind_helpers.h"
 #include "base/command_line.h"
 #include "base/debug/alias.h"
+#include "base/macros.h"
 #include "base/numerics/safe_math.h"
 #include "base/strings/sys_string_conversions.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/threading/thread.h"
 #include "base/threading/worker_pool.h"
+#include "build/build_config.h"
 #include "content/browser/browser_main_loop.h"
 #include "content/browser/dom_storage/dom_storage_context_wrapper.h"
 #include "content/browser/dom_storage/session_storage_namespace_impl.h"
@@ -87,10 +89,8 @@
 namespace content {
 namespace {
 
-const uint32 kFilteredMessageClasses[] = {
-  ChildProcessMsgStart,
-  RenderProcessMsgStart,
-  ViewMsgStart,
+const uint32_t kFilteredMessageClasses[] = {
+    ChildProcessMsgStart, RenderProcessMsgStart, ViewMsgStart,
 };
 
 #if defined(OS_WIN)
@@ -430,7 +430,7 @@
 }
 
 void RenderMessageFilter::AllocateSharedMemoryOnFileThread(
-    uint32 buffer_size,
+    uint32_t buffer_size,
     IPC::Message* reply_msg) {
   base::SharedMemoryHandle handle;
   ChildProcessHostImpl::AllocateSharedMemory(buffer_size, PeerHandle(),
@@ -440,7 +440,7 @@
   Send(reply_msg);
 }
 
-void RenderMessageFilter::OnAllocateSharedMemory(uint32 buffer_size,
+void RenderMessageFilter::OnAllocateSharedMemory(uint32_t buffer_size,
                                                  IPC::Message* reply_msg) {
   BrowserThread::PostTask(
       BrowserThread::FILE_USER_BLOCKING, FROM_HERE,
@@ -449,7 +449,7 @@
 }
 
 void RenderMessageFilter::AllocateSharedBitmapOnFileThread(
-    uint32 buffer_size,
+    uint32_t buffer_size,
     const cc::SharedBitmapId& id,
     IPC::Message* reply_msg) {
   base::SharedMemoryHandle handle;
@@ -460,7 +460,7 @@
   Send(reply_msg);
 }
 
-void RenderMessageFilter::OnAllocateSharedBitmap(uint32 buffer_size,
+void RenderMessageFilter::OnAllocateSharedBitmap(uint32_t buffer_size,
                                                  const cc::SharedBitmapId& id,
                                                  IPC::Message* reply_msg) {
   BrowserThread::PostTask(
@@ -486,7 +486,7 @@
 }
 
 void RenderMessageFilter::AllocateLockedDiscardableSharedMemoryOnFileThread(
-    uint32 size,
+    uint32_t size,
     DiscardableSharedMemoryId id,
     IPC::Message* reply_msg) {
   base::SharedMemoryHandle handle;
@@ -499,7 +499,7 @@
 }
 
 void RenderMessageFilter::OnAllocateLockedDiscardableSharedMemory(
-    uint32 size,
+    uint32_t size,
     DiscardableSharedMemoryId id,
     IPC::Message* reply_msg) {
   BrowserThread::PostTask(
@@ -546,7 +546,7 @@
                        data.size());
 }
 
-void RenderMessageFilter::OnKeygen(uint32 key_size_index,
+void RenderMessageFilter::OnKeygen(uint32_t key_size_index,
                                    const std::string& challenge_string,
                                    const GURL& url,
                                    IPC::Message* reply_msg) {
@@ -644,8 +644,8 @@
 #endif
 
 void RenderMessageFilter::OnAllocateGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
-                                                    uint32 width,
-                                                    uint32 height,
+                                                    uint32_t width,
+                                                    uint32_t height,
                                                     gfx::BufferFormat format,
                                                     gfx::BufferUsage usage,
                                                     IPC::Message* reply) {
diff --git a/content/browser/renderer_host/render_message_filter.h b/content/browser/renderer_host/render_message_filter.h
index da1f387..b87ad3f0 100644
--- a/content/browser/renderer_host/render_message_filter.h
+++ b/content/browser/renderer_host/render_message_filter.h
@@ -5,14 +5,14 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_MESSAGE_FILTER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_MESSAGE_FILTER_H_
 
-#if defined(OS_WIN)
-#include <windows.h>
-#endif
+#include <stddef.h>
+#include <stdint.h>
 
 #include <string>
 #include <vector>
 
 #include "base/files/file_path.h"
+#include "base/macros.h"
 #include "base/memory/linked_ptr.h"
 #include "base/memory/shared_memory.h"
 #include "base/sequenced_task_runner_helpers.h"
@@ -31,6 +31,10 @@
 #include "ui/gfx/native_widget_types.h"
 #include "ui/surface/transport_dib.h"
 
+#if defined(OS_WIN)
+#include <windows.h>
+#endif
+
 #if defined(OS_MACOSX)
 #include <IOSurface/IOSurface.h>
 #include "content/common/mac/font_loader.h"
@@ -159,13 +163,13 @@
   // Used to ask the browser to allocate a block of shared memory for the
   // renderer to send back data in, since shared memory can't be created
   // in the renderer on POSIX due to the sandbox.
-  void AllocateSharedMemoryOnFileThread(uint32 buffer_size,
+  void AllocateSharedMemoryOnFileThread(uint32_t buffer_size,
                                         IPC::Message* reply_msg);
-  void OnAllocateSharedMemory(uint32 buffer_size, IPC::Message* reply_msg);
-  void AllocateSharedBitmapOnFileThread(uint32 buffer_size,
+  void OnAllocateSharedMemory(uint32_t buffer_size, IPC::Message* reply_msg);
+  void AllocateSharedBitmapOnFileThread(uint32_t buffer_size,
                                         const cc::SharedBitmapId& id,
                                         IPC::Message* reply_msg);
-  void OnAllocateSharedBitmap(uint32 buffer_size,
+  void OnAllocateSharedBitmap(uint32_t buffer_size,
                               const cc::SharedBitmapId& id,
                               IPC::Message* reply_msg);
   void OnAllocatedSharedBitmap(size_t buffer_size,
@@ -176,10 +180,10 @@
 
   // Browser side discardable shared memory allocation.
   void AllocateLockedDiscardableSharedMemoryOnFileThread(
-      uint32 size,
+      uint32_t size,
       DiscardableSharedMemoryId id,
       IPC::Message* reply_message);
-  void OnAllocateLockedDiscardableSharedMemory(uint32 size,
+  void OnAllocateLockedDiscardableSharedMemory(uint32_t size,
                                                DiscardableSharedMemoryId id,
                                                IPC::Message* reply_message);
   void DeletedDiscardableSharedMemoryOnFileThread(DiscardableSharedMemoryId id);
@@ -188,8 +192,10 @@
   void OnCacheableMetadataAvailable(const GURL& url,
                                     base::Time expected_response_time,
                                     const std::vector<char>& data);
-  void OnKeygen(uint32 key_size_index, const std::string& challenge_string,
-                const GURL& url, IPC::Message* reply_msg);
+  void OnKeygen(uint32_t key_size_index,
+                const std::string& challenge_string,
+                const GURL& url,
+                IPC::Message* reply_msg);
   void PostKeygenToWorkerThread(IPC::Message* reply_msg,
                                 scoped_ptr<net::KeygenHandler> keygen_handler);
   void OnKeygenOnWorkerThread(scoped_ptr<net::KeygenHandler> keygen_handler,
@@ -206,8 +212,8 @@
 #endif
 
   void OnAllocateGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
-                                 uint32 width,
-                                 uint32 height,
+                                 uint32_t width,
+                                 uint32_t height,
                                  gfx::BufferFormat format,
                                  gfx::BufferUsage usage,
                                  IPC::Message* reply);
diff --git a/content/browser/renderer_host/render_process_host_browsertest.cc b/content/browser/renderer_host/render_process_host_browsertest.cc
index 96a5803..e0c4d27a 100644
--- a/content/browser/renderer_host/render_process_host_browsertest.cc
+++ b/content/browser/renderer_host/render_process_host_browsertest.cc
@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 
 #include "base/command_line.h"
+#include "build/build_config.h"
 #include "content/browser/renderer_host/render_process_host_impl.h"
 #include "content/common/child_process_messages.h"
 #include "content/public/browser/render_process_host.h"
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index a7d4c3f..23ca20d 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -23,6 +23,7 @@
 #include "base/lazy_instance.h"
 #include "base/location.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/metrics/field_trial.h"
 #include "base/metrics/histogram.h"
 #include "base/process/process_handle.h"
@@ -36,6 +37,7 @@
 #include "base/threading/thread_restrictions.h"
 #include "base/trace_event/trace_event.h"
 #include "base/tracked_objects.h"
+#include "build/build_config.h"
 #include "cc/base/switches.h"
 #include "components/scheduler/common/scheduler_switches.h"
 #include "components/tracing/tracing_switches.h"
@@ -245,11 +247,11 @@
     FILE_PATH_LITERAL("event_log");
 #endif
 
-void CacheShaderInfo(int32 id, base::FilePath path) {
+void CacheShaderInfo(int32_t id, base::FilePath path) {
   ShaderCacheFactory::GetInstance()->SetCacheInfo(id, path);
 }
 
-void RemoveShaderInfo(int32 id) {
+void RemoveShaderInfo(int32_t id) {
   ShaderCacheFactory::GetInstance()->RemoveCacheInfo(id);
 }
 
@@ -1148,14 +1150,14 @@
     Cleanup();
 }
 
-void RenderProcessHostImpl::AddRoute(int32 routing_id,
+void RenderProcessHostImpl::AddRoute(int32_t routing_id,
                                      IPC::Listener* listener) {
   CHECK(!listeners_.Lookup(routing_id)) << "Found Routing ID Conflict: "
                                         << routing_id;
   listeners_.AddWithID(listener, routing_id);
 }
 
-void RenderProcessHostImpl::RemoveRoute(int32 routing_id) {
+void RenderProcessHostImpl::RemoveRoute(int32_t routing_id) {
   DCHECK(listeners_.Lookup(routing_id) != NULL);
   listeners_.Remove(routing_id);
 
@@ -1708,7 +1710,7 @@
   return listener->OnMessageReceived(msg);
 }
 
-void RenderProcessHostImpl::OnChannelConnected(int32 peer_pid) {
+void RenderProcessHostImpl::OnChannelConnected(int32_t peer_pid) {
   channel_connected_ = true;
   if (IsReady()) {
     DCHECK(!sent_render_process_ready_);
diff --git a/content/browser/renderer_host/render_process_host_impl.h b/content/browser/renderer_host/render_process_host_impl.h
index 6120527..c9cc5ac7 100644
--- a/content/browser/renderer_host/render_process_host_impl.h
+++ b/content/browser/renderer_host/render_process_host_impl.h
@@ -5,14 +5,19 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_
 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_PROCESS_HOST_IMPL_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <map>
 #include <queue>
 #include <string>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/observer_list.h"
 #include "base/process/process.h"
 #include "base/synchronization/waitable_event.h"
+#include "build/build_config.h"
 #include "content/browser/child_process_launcher.h"
 #include "content/browser/dom_storage/session_storage_namespace_impl.h"
 #include "content/browser/power_monitor_message_broadcaster.h"
@@ -106,8 +111,8 @@
   void EnableSendQueue() override;
   bool Init() override;
   int GetNextRoutingID() override;
-  void AddRoute(int32 routing_id, IPC::Listener* listener) override;
-  void RemoveRoute(int32 routing_id) override;
+  void AddRoute(int32_t routing_id, IPC::Listener* listener) override;
+  void RemoveRoute(int32_t routing_id) override;
   void AddObserver(RenderProcessHostObserver* observer) override;
   void RemoveObserver(RenderProcessHostObserver* observer) override;
   void ShutdownForBadMessage() override;
@@ -173,7 +178,7 @@
 
   // IPC::Listener via RenderProcessHost.
   bool OnMessageReceived(const IPC::Message& msg) override;
-  void OnChannelConnected(int32 peer_pid) override;
+  void OnChannelConnected(int32_t peer_pid) override;
   void OnChannelError() override;
   void OnBadMessageReceived(const IPC::Message& message) override;
 
@@ -280,7 +285,7 @@
   // The count of currently swapped out but pending RenderViews.  We have
   // started to swap these in, so the renderer process should not exit if
   // this count is non-zero.
-  int32 pending_views_;
+  int32_t pending_views_;
 
  private:
   friend class VisitRelayingRenderProcessHost;
@@ -354,7 +359,7 @@
   // The count of currently visible widgets.  Since the host can be a container
   // for multiple widgets, it uses this count to determine when it should be
   // backgrounded.
-  int32 visible_widgets_;
+  int32_t visible_widgets_;
 
   // Whether this process currently has backgrounded priority. Tracked so that
   // UpdateProcessPriority() can avoid redundantly setting the priority.
diff --git a/content/browser/renderer_host/render_process_host_unittest.cc b/content/browser/renderer_host/render_process_host_unittest.cc
index ee2395c..019cae63 100644
--- a/content/browser/renderer_host/render_process_host_unittest.cc
+++ b/content/browser/renderer_host/render_process_host_unittest.cc
@@ -2,8 +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 <limits>
 
+#include "build/build_config.h"
 #include "content/public/common/content_constants.h"
 #include "content/public/test/mock_render_process_host.h"
 #include "content/public/test/test_utils.h"
diff --git a/content/browser/renderer_host/render_sandbox_host_linux.h b/content/browser/renderer_host/render_sandbox_host_linux.h
index a9f8a02..b9fad88 100644
--- a/content/browser/renderer_host/render_sandbox_host_linux.h
+++ b/content/browser/renderer_host/render_sandbox_host_linux.h
@@ -8,6 +8,7 @@
 #include <string>
 
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/threading/simple_thread.h"
 #include "content/browser/renderer_host/sandbox_ipc_linux.h"
diff --git a/content/browser/renderer_host/render_view_host_browsertest.cc b/content/browser/renderer_host/render_view_host_browsertest.cc
index 3e16cdfb..5e14d47d 100644
--- a/content/browser/renderer_host/render_view_host_browsertest.cc
+++ b/content/browser/renderer_host/render_view_host_browsertest.cc
@@ -2,10 +2,12 @@
 // 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/path_service.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/time/time.h"
 #include "base/values.h"
+#include "build/build_config.h"
 #include "content/browser/frame_host/render_frame_host_impl.h"
 #include "content/browser/renderer_host/render_view_host_impl.h"
 #include "content/browser/web_contents/web_contents_impl.h"
diff --git a/content/browser/renderer_host/render_view_host_delegate.h b/content/browser/renderer_host/render_view_host_delegate.h
index 2ea9fdd2..8fc436c 100644
--- a/content/browser/renderer_host/render_view_host_delegate.h
+++ b/content/browser/renderer_host/render_view_host_delegate.h
@@ -5,9 +5,10 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_
 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_
 
+#include <stdint.h>
+
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
 #include "base/process/kill.h"
 #include "base/strings/string16.h"
@@ -101,7 +102,7 @@
 
   // The state for the page changed and should be updated.
   virtual void UpdateState(RenderViewHost* render_view_host,
-                           int32 page_id,
+                           int32_t page_id,
                            const PageState& state) {}
 
   // The destination URL has changed should be updated.
@@ -138,8 +139,8 @@
   // Notification that the RenderViewHost's load state changed.
   virtual void LoadStateChanged(const GURL& url,
                                 const net::LoadStateWithParam& load_state,
-                                uint64 upload_position,
-                                uint64 upload_size) {}
+                                uint64_t upload_position,
+                                uint64_t upload_size) {}
 
   // The page wants the hosting window to activate itself (it called the
   // JavaScript window.focus() method).
@@ -184,13 +185,13 @@
   // happen in response to ShowCreatedWidget.
   // |popup_type| indicates if the widget is a popup and what kind of popup it
   // is (select, autofill...).
-  virtual void CreateNewWidget(int32 render_process_id,
-                               int32 route_id,
+  virtual void CreateNewWidget(int32_t render_process_id,
+                               int32_t route_id,
                                blink::WebPopupType popup_type) {}
 
   // Creates a full screen RenderWidget. Similar to above.
-  virtual void CreateNewFullscreenWidget(int32 render_process_id,
-                                         int32 route_id) {}
+  virtual void CreateNewFullscreenWidget(int32_t render_process_id,
+                                         int32_t route_id) {}
 
   // Show a previously created page with the specified disposition and bounds.
   // The window is identified by the route_id passed to CreateNewWindow.
diff --git a/content/browser/renderer_host/render_view_host_delegate_view.h b/content/browser/renderer_host/render_view_host_delegate_view.h
index 4c249122..1e05290a 100644
--- a/content/browser/renderer_host/render_view_host_delegate_view.h
+++ b/content/browser/renderer_host/render_view_host_delegate_view.h
@@ -7,8 +7,8 @@
 
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "build/build_config.h"
 #include "content/common/content_export.h"
 #include "content/common/drag_event_source_info.h"
 #include "third_party/WebKit/public/web/WebDragOperation.h"
diff --git a/content/browser/renderer_host/render_view_host_factory.cc b/content/browser/renderer_host/render_view_host_factory.cc
index 2e166c4e..7fa252aa 100644
--- a/content/browser/renderer_host/render_view_host_factory.cc
+++ b/content/browser/renderer_host/render_view_host_factory.cc
@@ -17,8 +17,8 @@
     SiteInstance* instance,
     RenderViewHostDelegate* delegate,
     RenderWidgetHostDelegate* widget_delegate,
-    int32 routing_id,
-    int32 main_frame_routing_id,
+    int32_t routing_id,
+    int32_t main_frame_routing_id,
     bool swapped_out,
     bool hidden) {
   // RenderViewHost creation can be either browser-driven (by the user opening a
diff --git a/content/browser/renderer_host/render_view_host_factory.h b/content/browser/renderer_host/render_view_host_factory.h
index be2aae5..62b2390 100644
--- a/content/browser/renderer_host/render_view_host_factory.h
+++ b/content/browser/renderer_host/render_view_host_factory.h
@@ -5,7 +5,9 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_FACTORY_H_
 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_FACTORY_H_
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "content/common/content_export.h"
 
 namespace content {
@@ -27,8 +29,8 @@
   static RenderViewHost* Create(SiteInstance* instance,
                                 RenderViewHostDelegate* delegate,
                                 RenderWidgetHostDelegate* widget_delegate,
-                                int32 routing_id,
-                                int32 main_frame_routing_id,
+                                int32_t routing_id,
+                                int32_t main_frame_routing_id,
                                 bool swapped_out,
                                 bool hidden);
 
@@ -47,8 +49,8 @@
       SiteInstance* instance,
       RenderViewHostDelegate* delegate,
       RenderWidgetHostDelegate* widget_delegate,
-      int32 routing_id,
-      int32 main_frame_routing_id,
+      int32_t routing_id,
+      int32_t main_frame_routing_id,
       bool swapped_out) = 0;
 
   // Registers your factory to be called when new RenderViewHosts are created.
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index ceaa92b..76596b6 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -23,6 +23,7 @@
 #include "base/time/time.h"
 #include "base/trace_event/trace_event.h"
 #include "base/values.h"
+#include "build/build_config.h"
 #include "cc/base/switches.h"
 #include "content/browser/bad_message.h"
 #include "content/browser/child_process_security_policy_impl.h"
@@ -163,7 +164,7 @@
 }  // namespace
 
 // static
-const int64 RenderViewHostImpl::kUnloadTimeoutMS = 1000;
+const int64_t RenderViewHostImpl::kUnloadTimeoutMS = 1000;
 
 ///////////////////////////////////////////////////////////////////////////////
 // RenderViewHost, public:
@@ -208,8 +209,8 @@
     SiteInstance* instance,
     RenderViewHostDelegate* delegate,
     RenderWidgetHostDelegate* widget_delegate,
-    int32 routing_id,
-    int32 main_frame_routing_id,
+    int32_t routing_id,
+    int32_t main_frame_routing_id,
     bool swapped_out,
     bool hidden,
     bool has_initialized_audio_host)
@@ -286,7 +287,7 @@
 bool RenderViewHostImpl::CreateRenderView(
     int opener_frame_route_id,
     int proxy_route_id,
-    int32 max_page_id,
+    int32_t max_page_id,
     const FrameReplicationState& replicated_frame_state,
     bool window_was_created_with_opener) {
   TRACE_EVENT0("renderer_host,navigation",
@@ -308,7 +309,7 @@
 
   // Ensure the RenderView starts with a next_page_id larger than any existing
   // page ID it might be asked to render.
-  int32 next_page_id = 1;
+  int32_t next_page_id = 1;
   if (max_page_id > -1)
     next_page_id = max_page_id + 1;
 
@@ -884,8 +885,8 @@
 void RenderViewHostImpl::LoadStateChanged(
     const GURL& url,
     const net::LoadStateWithParam& load_state,
-    uint64 upload_position,
-    uint64 upload_size) {
+    uint64_t upload_position,
+    uint64_t upload_size) {
   delegate_->LoadStateChanged(url, load_state, upload_position, upload_size);
 }
 
@@ -1010,12 +1011,12 @@
                              session_storage_namespace);
 }
 
-void RenderViewHostImpl::CreateNewWidget(int32 route_id,
+void RenderViewHostImpl::CreateNewWidget(int32_t route_id,
                                          blink::WebPopupType popup_type) {
   delegate_->CreateNewWidget(GetProcess()->GetID(), route_id, popup_type);
 }
 
-void RenderViewHostImpl::CreateNewFullscreenWidget(int32 route_id) {
+void RenderViewHostImpl::CreateNewFullscreenWidget(int32_t route_id) {
   delegate_->CreateNewFullscreenWidget(GetProcess()->GetID(), route_id);
 }
 
@@ -1048,7 +1049,8 @@
   // decoupled.
 }
 
-void RenderViewHostImpl::OnUpdateState(int32 page_id, const PageState& state) {
+void RenderViewHostImpl::OnUpdateState(int32_t page_id,
+                                       const PageState& state) {
   // If the following DCHECK fails, you have encountered a tricky edge-case that
   // has evaded reproduction for a very long time. Please report what you were
   // doing on http://crbug.com/407376, whether or not you can reproduce the
diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h
index 4e8afe0..396747b7 100644
--- a/content/browser/renderer_host/render_view_host_impl.h
+++ b/content/browser/renderer_host/render_view_host_impl.h
@@ -5,6 +5,9 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_
 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <map>
 #include <string>
 #include <vector>
@@ -13,8 +16,10 @@
 #include "base/compiler_specific.h"
 #include "base/gtest_prod_util.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/process/kill.h"
+#include "build/build_config.h"
 #include "content/browser/renderer_host/render_widget_host_impl.h"
 #include "content/browser/renderer_host/render_widget_host_owner_delegate.h"
 #include "content/browser/site_instance_impl.h"
@@ -99,8 +104,8 @@
   RenderViewHostImpl(SiteInstance* instance,
                      RenderViewHostDelegate* delegate,
                      RenderWidgetHostDelegate* widget_delegate,
-                     int32 routing_id,
-                     int32 main_frame_routing_id,
+                     int32_t routing_id,
+                     int32_t main_frame_routing_id,
                      bool swapped_out,
                      bool hidden,
                      bool has_initialized_audio_host);
@@ -199,7 +204,7 @@
   virtual bool CreateRenderView(
       int opener_frame_route_id,
       int proxy_route_id,
-      int32 max_page_id,
+      int32_t max_page_id,
       const FrameReplicationState& replicated_frame_state,
       bool window_was_created_with_opener);
 
@@ -253,8 +258,8 @@
   // Notifies the RenderViewHost that its load state changed.
   void LoadStateChanged(const GURL& url,
                         const net::LoadStateWithParam& load_state,
-                        uint64 upload_position,
-                        uint64 upload_size);
+                        uint64_t upload_position,
+                        uint64_t upload_size);
 
   bool SuddenTerminationAllowed() const;
   void set_sudden_termination_allowed(bool enabled) {
@@ -273,11 +278,10 @@
 
   // Creates a new RenderWidget with the given route id.  |popup_type| indicates
   // if this widget is a popup and what kind of popup it is (select, autofill).
-  void CreateNewWidget(int32 route_id,
-                       blink::WebPopupType popup_type);
+  void CreateNewWidget(int32_t route_id, blink::WebPopupType popup_type);
 
   // Creates a full screen RenderWidget.
-  void CreateNewFullscreenWidget(int32 route_id);
+  void CreateNewFullscreenWidget(int32_t route_id);
 
   void set_main_frame_routing_id(int routing_id) {
     main_frame_routing_id_ = routing_id;
@@ -327,7 +331,7 @@
   void OnShowWidget(int route_id, const gfx::Rect& initial_rect);
   void OnShowFullscreenWidget(int route_id);
   void OnRenderProcessGone(int status, int error_code);
-  void OnUpdateState(int32 page_id, const PageState& state);
+  void OnUpdateState(int32_t page_id, const PageState& state);
   void OnUpdateTargetURL(const GURL& url);
   void OnClose();
   void OnRequestMove(const gfx::Rect& pos);
@@ -367,7 +371,7 @@
   // TODO(creis): Move to a private namespace on RenderFrameHostImpl.
   // Delay to wait on closing the WebContents for a beforeunload/unload handler
   // to fire.
-  static const int64 kUnloadTimeoutMS;
+  static const int64_t kUnloadTimeoutMS;
 
   // Returns the content specific prefs for this RenderViewHost.
   // TODO(creis): Move most of this method to RenderProcessHost, since it's
@@ -407,7 +411,7 @@
   // The most recent page ID we've heard from the renderer process.  This is
   // used as context when other session history related IPCs arrive.
   // TODO(creis): Allocate this in WebContents/NavigationController instead.
-  int32 page_id_;
+  int32_t page_id_;
 
   // Tracks whether this RenderViewHost is in an active state.  False if the
   // main frame is pending swap out, pending deletion, or swapped out, because
diff --git a/content/browser/renderer_host/render_view_host_unittest.cc b/content/browser/renderer_host/render_view_host_unittest.cc
index 00b7b3d..fc7d722b 100644
--- a/content/browser/renderer_host/render_view_host_unittest.cc
+++ b/content/browser/renderer_host/render_view_host_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 "base/macros.h"
 #include "base/path_service.h"
 #include "base/strings/utf_string_conversions.h"
 #include "content/browser/child_process_security_policy_impl.h"
@@ -74,7 +77,7 @@
 
 // Create a full screen popup RenderWidgetHost and View.
 TEST_F(RenderViewHostTest, CreateFullscreenWidget) {
-  int32 routing_id = process()->GetNextRoutingID();
+  int32_t routing_id = process()->GetNextRoutingID();
   test_rvh()->CreateNewFullscreenWidget(routing_id);
 }
 
diff --git a/content/browser/renderer_host/render_widget_helper.cc b/content/browser/renderer_host/render_widget_helper.cc
index 4a37ca5..9328373 100644
--- a/content/browser/renderer_host/render_widget_helper.cc
+++ b/content/browser/renderer_host/render_widget_helper.cc
@@ -172,8 +172,8 @@
                  opener_id, *route_id));
 }
 
-void RenderWidgetHelper::OnCreateWidgetOnUI(int32 opener_id,
-                                            int32 route_id,
+void RenderWidgetHelper::OnCreateWidgetOnUI(int32_t opener_id,
+                                            int32_t route_id,
                                             blink::WebPopupType popup_type) {
   RenderViewHostImpl* host = RenderViewHostImpl::FromID(
       render_process_id_, opener_id);
@@ -181,8 +181,8 @@
     host->CreateNewWidget(route_id, popup_type);
 }
 
-void RenderWidgetHelper::OnCreateFullscreenWidgetOnUI(int32 opener_id,
-                                                      int32 route_id) {
+void RenderWidgetHelper::OnCreateFullscreenWidgetOnUI(int32_t opener_id,
+                                                      int32_t route_id) {
   RenderViewHostImpl* host = RenderViewHostImpl::FromID(
       render_process_id_, opener_id);
   if (host)
diff --git a/content/browser/renderer_host/render_widget_helper.h b/content/browser/renderer_host/render_widget_helper.h
index 881dd50..c4b8baf 100644
--- a/content/browser/renderer_host/render_widget_helper.h
+++ b/content/browser/renderer_host/render_widget_helper.h
@@ -5,10 +5,13 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_
 
+#include <stdint.h>
+
 #include <map>
 
 #include "base/atomic_sequence_num.h"
 #include "base/containers/hash_tables.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/process/process.h"
 #include "content/public/browser/browser_thread.h"
@@ -129,12 +132,12 @@
   void OnResumeRequestsForView(int route_id);
 
   // Called on the UI thread to finish creating a widget.
-  void OnCreateWidgetOnUI(int32 opener_id,
-                          int32 route_id,
+  void OnCreateWidgetOnUI(int32_t opener_id,
+                          int32_t route_id,
                           blink::WebPopupType popup_type);
 
   // Called on the UI thread to create a fullscreen widget.
-  void OnCreateFullscreenWidgetOnUI(int32 opener_id, int32 route_id);
+  void OnCreateFullscreenWidgetOnUI(int32_t opener_id, int32_t route_id);
 
   // Called on the IO thread to resume a paused navigation in the network
   // stack without transferring it to a new renderer process.
diff --git a/content/browser/renderer_host/render_widget_host_delegate.cc b/content/browser/renderer_host/render_widget_host_delegate.cc
index 0609826f..c158a41 100644
--- a/content/browser/renderer_host/render_widget_host_delegate.cc
+++ b/content/browser/renderer_host/render_widget_host_delegate.cc
@@ -2,7 +2,7 @@
 // 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 "build/build_config.h"
 #include "content/browser/renderer_host/render_widget_host_delegate.h"
 #include "ui/gfx/geometry/rect.h"
 
diff --git a/content/browser/renderer_host/render_widget_host_delegate.h b/content/browser/renderer_host/render_widget_host_delegate.h
index b4e4169..f7fbb0e 100644
--- a/content/browser/renderer_host/render_widget_host_delegate.h
+++ b/content/browser/renderer_host/render_widget_host_delegate.h
@@ -5,9 +5,10 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_
 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_
 
+#include <stdint.h>
+
 #include <vector>
 
-#include "base/basictypes.h"
 #include "build/build_config.h"
 #include "content/common/content_export.h"
 #include "third_party/WebKit/public/platform/WebDisplayMode.h"
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 026bf20f..81d89aab6 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -15,6 +15,7 @@
 #include "base/i18n/rtl.h"
 #include "base/lazy_instance.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/metrics/field_trial.h"
 #include "base/metrics/histogram.h"
 #include "base/single_thread_task_runner.h"
@@ -22,6 +23,7 @@
 #include "base/strings/utf_string_conversions.h"
 #include "base/thread_task_runner_handle.h"
 #include "base/trace_event/trace_event.h"
+#include "build/build_config.h"
 #include "cc/base/switches.h"
 #include "cc/output/compositor_frame.h"
 #include "cc/output/compositor_frame_ack.h"
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index 0f017b47..48c2a90 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -5,6 +5,9 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <list>
 #include <map>
 #include <string>
@@ -12,6 +15,7 @@
 #include <vector>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
diff --git a/content/browser/renderer_host/render_widget_host_input_event_router.h b/content/browser/renderer_host/render_widget_host_input_event_router.h
index 062b3f3..0c01a6c 100644
--- a/content/browser/renderer_host/render_widget_host_input_event_router.h
+++ b/content/browser/renderer_host/render_widget_host_input_event_router.h
@@ -8,6 +8,7 @@
 #include <stdint.h>
 
 #include "base/containers/hash_tables.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "content/common/content_export.h"
 
diff --git a/content/browser/renderer_host/render_widget_host_unittest.cc b/content/browser/renderer_host/render_widget_host_unittest.cc
index 83b3d6f..49fa2d4 100644
--- a/content/browser/renderer_host/render_widget_host_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_unittest.cc
@@ -2,14 +2,18 @@
 // 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 <stddef.h>
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/command_line.h"
 #include "base/location.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"
 #include "base/timer/timer.h"
+#include "build/build_config.h"
 #include "content/browser/browser_thread_impl.h"
 #include "content/browser/gpu/compositor_util.h"
 #include "content/browser/gpu/gpu_surface_tracker.h"
@@ -498,9 +502,7 @@
   virtual void ConfigureView(TestView* view) {
   }
 
-  int64 GetLatencyComponentId() {
-    return host_->GetLatencyComponentId();
-  }
+  int64_t GetLatencyComponentId() { return host_->GetLatencyComponentId(); }
 
   void SendInputEventACK(WebInputEvent::Type type,
                          InputEventAckState ack_result) {
@@ -588,8 +590,8 @@
 
   // Sends a touch event (irrespective of whether the page has a touch-event
   // handler or not).
-  uint32 SendTouchEvent() {
-    uint32 touch_event_id = touch_event_.uniqueTouchEventId;
+  uint32_t SendTouchEvent() {
+    uint32_t touch_event_id = touch_event_.uniqueTouchEventId;
     host_->ForwardTouchEventWithLatencyInfo(touch_event_, ui::LatencyInfo());
 
     touch_event_.ResetPoints();
@@ -1528,7 +1530,7 @@
 }
 
 void CheckLatencyInfoComponentInMessage(RenderWidgetHostProcess* process,
-                                        int64 component_id,
+                                        int64_t component_id,
                                         WebInputEvent::Type input_type) {
   ui::LatencyInfo latency_info = GetLatencyInfoFromInputEvent(process);
   EXPECT_TRUE(latency_info.FindLatency(
@@ -1587,7 +1589,7 @@
 
   // Tests RWHI::ForwardTouchEventWithLatencyInfo().
   PressTouchPoint(0, 1);
-  uint32 touch_event_id = SendTouchEvent();
+  uint32_t touch_event_id = SendTouchEvent();
   InputEventAck ack(WebInputEvent::TouchStart, INPUT_EVENT_ACK_STATE_CONSUMED,
                     touch_event_id);
   host_->OnMessageReceived(InputHostMsg_HandleInputEvent_ACK(0, ack));
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index 9994db5..76f0195 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -7,11 +7,11 @@
 #include <android/bitmap.h>
 
 #include "base/android/build_info.h"
-#include "base/basictypes.h"
 #include "base/bind.h"
 #include "base/callback_helpers.h"
 #include "base/command_line.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/message_loop/message_loop.h"
 #include "base/metrics/histogram.h"
 #include "base/strings/utf_string_conversions.h"
@@ -296,7 +296,7 @@
 }  // anonymous namespace
 
 RenderWidgetHostViewAndroid::LastFrameInfo::LastFrameInfo(
-    uint32 output_id,
+    uint32_t output_id,
     scoped_ptr<cc::CompositorFrame> output_frame)
     : output_surface_id(output_id), frame(output_frame.Pass()) {}
 
@@ -950,7 +950,7 @@
 }
 
 void RenderWidgetHostViewAndroid::SendDelegatedFrameAck(
-    uint32 output_surface_id) {
+    uint32_t output_surface_id) {
   DCHECK(host_);
   cc::CompositorFrameAck ack;
   if (!surface_returned_resources_.empty())
@@ -962,7 +962,7 @@
 }
 
 void RenderWidgetHostViewAndroid::SendReturnedDelegatedResources(
-    uint32 output_surface_id) {
+    uint32_t output_surface_id) {
   DCHECK(host_);
   cc::CompositorFrameAck ack;
   if (!surface_returned_resources_.empty()) {
@@ -1011,7 +1011,7 @@
 }
 
 void RenderWidgetHostViewAndroid::CheckOutputSurfaceChanged(
-    uint32 output_surface_id) {
+    uint32_t output_surface_id) {
   if (output_surface_id == last_output_surface_id_)
     return;
   // Drop the cc::DelegatedFrameResourceCollection so that we will not return
@@ -1083,7 +1083,7 @@
 }
 
 void RenderWidgetHostViewAndroid::SwapDelegatedFrame(
-    uint32 output_surface_id,
+    uint32_t output_surface_id,
     scoped_ptr<cc::CompositorFrame> frame) {
   CheckOutputSurfaceChanged(output_surface_id);
   bool has_content = !texture_size_in_layer_.IsEmpty();
@@ -1120,7 +1120,7 @@
 }
 
 void RenderWidgetHostViewAndroid::InternalSwapCompositorFrame(
-    uint32 output_surface_id,
+    uint32_t output_surface_id,
     scoped_ptr<cc::CompositorFrame> frame) {
   last_scroll_offset_ = frame->metadata.root_scroll_offset;
   if (!frame->delegated_frame_data) {
@@ -1160,7 +1160,7 @@
 }
 
 void RenderWidgetHostViewAndroid::OnSwapCompositorFrame(
-    uint32 output_surface_id,
+    uint32_t output_surface_id,
     scoped_ptr<cc::CompositorFrame> frame) {
   InternalSwapCompositorFrame(output_surface_id, frame.Pass());
 }
@@ -1170,7 +1170,7 @@
 }
 
 void RenderWidgetHostViewAndroid::RetainFrame(
-    uint32 output_surface_id,
+    uint32_t output_surface_id,
     scoped_ptr<cc::CompositorFrame> frame) {
   DCHECK(locks_on_frame_count_);
 
@@ -1457,7 +1457,7 @@
   content_view_core_->RemoveLayer(layer_);
 }
 
-void RenderWidgetHostViewAndroid::RequestVSyncUpdate(uint32 requests) {
+void RenderWidgetHostViewAndroid::RequestVSyncUpdate(uint32_t requests) {
   bool should_request_vsync = !outstanding_vsync_requests_ && requests;
   outstanding_vsync_requests_ |= requests;
 
@@ -1483,7 +1483,7 @@
   content_view_core_window_android_->AddObserver(this);
 
   // Clear existing vsync requests to allow a request to the new window.
-  uint32 outstanding_vsync_requests = outstanding_vsync_requests_;
+  uint32_t outstanding_vsync_requests = outstanding_vsync_requests_;
   outstanding_vsync_requests_ = 0;
   RequestVSyncUpdate(outstanding_vsync_requests);
 }
@@ -1916,7 +1916,7 @@
 
   // This allows for SendBeginFrame and FlushInput to modify
   // outstanding_vsync_requests.
-  uint32 outstanding_vsync_requests = outstanding_vsync_requests_;
+  uint32_t outstanding_vsync_requests = outstanding_vsync_requests_;
   outstanding_vsync_requests_ = 0;
   RequestVSyncUpdate(outstanding_vsync_requests);
 }
@@ -2000,7 +2000,7 @@
 
   scoped_ptr<SkAutoLockPixels> bitmap_pixels_lock(
       new SkAutoLockPixels(*bitmap));
-  uint8* pixels = static_cast<uint8*>(bitmap->getPixels());
+  uint8_t* pixels = static_cast<uint8_t*>(bitmap->getPixels());
 
   cc::TextureMailbox texture_mailbox;
   scoped_ptr<cc::SingleReleaseCallback> release_callback;
diff --git a/content/browser/renderer_host/render_widget_host_view_android.h b/content/browser/renderer_host/render_widget_host_view_android.h
index 49d7a614..0d51b703 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.h
+++ b/content/browser/renderer_host/render_widget_host_view_android.h
@@ -5,12 +5,16 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <map>
 #include <queue>
 
 #include "base/callback.h"
 #include "base/compiler_specific.h"
 #include "base/i18n/rtl.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/process/process.h"
@@ -26,8 +30,8 @@
 #include "content/common/content_export.h"
 #include "content/public/browser/readback_types.h"
 #include "gpu/command_buffer/common/mailbox.h"
-#include "third_party/skia/include/core/SkColor.h"
 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
+#include "third_party/skia/include/core/SkColor.h"
 #include "ui/android/window_android_observer.h"
 #include "ui/events/gesture_detection/filtered_gesture_provider.h"
 #include "ui/gfx/geometry/size.h"
@@ -148,7 +152,7 @@
       BrowserAccessibilityDelegate* delegate) override;
   bool LockMouse() override;
   void UnlockMouse() override;
-  void OnSwapCompositorFrame(uint32 output_surface_id,
+  void OnSwapCompositorFrame(uint32_t output_surface_id,
                              scoped_ptr<cc::CompositorFrame> frame) override;
   void ClearCompositorFrame() override;
   void DidOverscroll(const DidOverscrollParams& params) override;
@@ -262,12 +266,12 @@
   void RunAckCallbacks(cc::SurfaceDrawStatus status);
 
   void DestroyDelegatedContent();
-  void CheckOutputSurfaceChanged(uint32 output_surface_id);
+  void CheckOutputSurfaceChanged(uint32_t output_surface_id);
   void SubmitCompositorFrame(scoped_ptr<cc::CompositorFrame> frame_data);
-  void SwapDelegatedFrame(uint32 output_surface_id,
+  void SwapDelegatedFrame(uint32_t output_surface_id,
                           scoped_ptr<cc::CompositorFrame> frame_data);
-  void SendDelegatedFrameAck(uint32 output_surface_id);
-  void SendReturnedDelegatedResources(uint32 output_surface_id);
+  void SendDelegatedFrameAck(uint32_t output_surface_id);
+  void SendReturnedDelegatedResources(uint32_t output_surface_id);
 
   void OnFrameMetadataUpdated(
       const cc::CompositorFrameMetadata& frame_metadata);
@@ -308,10 +312,10 @@
 
   // Drop any incoming frames from the renderer when there are locks on the
   // current frame.
-  void RetainFrame(uint32 output_surface_id,
+  void RetainFrame(uint32_t output_surface_id,
                    scoped_ptr<cc::CompositorFrame> frame);
 
-  void InternalSwapCompositorFrame(uint32 output_surface_id,
+  void InternalSwapCompositorFrame(uint32_t output_surface_id,
                                    scoped_ptr<cc::CompositorFrame> frame);
   void OnLostResources();
 
@@ -320,7 +324,7 @@
     BEGIN_FRAME = 1 << 1,
     PERSISTENT_BEGIN_FRAME = 1 << 2
   };
-  void RequestVSyncUpdate(uint32 requests);
+  void RequestVSyncUpdate(uint32_t requests);
   void StartObservingRootWindow();
   void StopObservingRootWindow();
   void SendBeginFrame(base::TimeTicks frame_time, base::TimeDelta vsync_period);
@@ -335,7 +339,7 @@
   bool use_surfaces_;
 
   // Used to control action dispatch at the next |OnVSync()| call.
-  uint32 outstanding_vsync_requests_;
+  uint32_t outstanding_vsync_requests_;
 
   bool is_showing_;
 
@@ -405,10 +409,10 @@
   bool observing_root_window_;
 
   struct LastFrameInfo {
-    LastFrameInfo(uint32 output_id,
+    LastFrameInfo(uint32_t output_id,
                   scoped_ptr<cc::CompositorFrame> output_frame);
     ~LastFrameInfo();
-    uint32 output_surface_id;
+    uint32_t output_surface_id;
     scoped_ptr<cc::CompositorFrame> frame;
   };
 
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 954549e..9834f89 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -8,14 +8,15 @@
 #include <utility>
 
 #include "base/auto_reset.h"
-#include "base/basictypes.h"
 #include "base/bind.h"
 #include "base/callback_helpers.h"
 #include "base/command_line.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/message_loop/message_loop.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/trace_event/trace_event.h"
+#include "build/build_config.h"
 #include "cc/layers/layer.h"
 #include "cc/output/copy_output_request.h"
 #include "cc/output/copy_output_result.h"
@@ -1206,7 +1207,7 @@
 #endif
 
 void RenderWidgetHostViewAura::OnSwapCompositorFrame(
-    uint32 output_surface_id,
+    uint32_t output_surface_id,
     scoped_ptr<cc::CompositorFrame> frame) {
   TRACE_EVENT0("content", "RenderWidgetHostViewAura::OnSwapCompositorFrame");
 
@@ -1729,7 +1730,7 @@
 }
 
 bool RenderWidgetHostViewAura::GetCompositionCharacterBounds(
-    uint32 index,
+    uint32_t index,
     gfx::Rect* rect) const {
   DCHECK(rect);
   if (index >= composition_character_bounds_.size())
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h
index 6617b4b..e5d4b23 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.h
+++ b/content/browser/renderer_host/render_widget_host_view_aura.h
@@ -5,6 +5,9 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <map>
 #include <set>
 #include <string>
@@ -12,10 +15,12 @@
 
 #include "base/callback.h"
 #include "base/gtest_prod_util.h"
+#include "base/macros.h"
 #include "base/memory/linked_ptr.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
+#include "build/build_config.h"
 #include "content/browser/accessibility/browser_accessibility_manager.h"
 #include "content/browser/compositor/delegated_frame_host.h"
 #include "content/browser/compositor/image_transport_factory.h"
@@ -180,7 +185,7 @@
                                const SkBitmap& zoomed_bitmap) override;
   bool LockMouse() override;
   void UnlockMouse() override;
-  void OnSwapCompositorFrame(uint32 output_surface_id,
+  void OnSwapCompositorFrame(uint32_t output_surface_id,
                              scoped_ptr<cc::CompositorFrame> frame) override;
   void ClearCompositorFrame() override;
   void DidStopFlinging() override;
@@ -215,7 +220,7 @@
   int GetTextInputFlags() const override;
   bool CanComposeInline() const override;
   gfx::Rect GetCaretBounds() const override;
-  bool GetCompositionCharacterBounds(uint32 index,
+  bool GetCompositionCharacterBounds(uint32_t index,
                                      gfx::Rect* rect) const override;
   bool HasCompositionText() const override;
   bool GetTextRange(gfx::Range* range) const override;
diff --git a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
index bab8c0c9..8de1e73 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
@@ -4,13 +4,17 @@
 
 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
 
-#include "base/basictypes.h"
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/command_line.h"
+#include "base/macros.h"
 #include "base/memory/shared_memory.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/test/simple_test_tick_clock.h"
+#include "build/build_config.h"
 #include "cc/output/begin_frame_args.h"
 #include "cc/output/compositor_frame.h"
 #include "cc/output/compositor_frame_metadata.h"
@@ -235,7 +239,7 @@
       : WindowEventDispatcher(host),
         processed_touch_event_count_(0) {}
 
-  void ProcessedTouchEvent(uint32 unique_event_id,
+  void ProcessedTouchEvent(uint32_t unique_event_id,
                            aura::Window* window,
                            ui::EventResult result) override {
     WindowEventDispatcher::ProcessedTouchEvent(unique_event_id, window, result);
@@ -396,7 +400,7 @@
 
     sink_ = &process_host_->sink();
 
-    int32 routing_id = process_host_->GetNextRoutingID();
+    int32_t routing_id = process_host_->GetNextRoutingID();
     parent_host_ =
         new RenderWidgetHostImpl(&delegate_, process_host_, routing_id, false);
     parent_view_ = new RenderWidgetHostViewAura(parent_host_,
@@ -474,7 +478,7 @@
 
   void SendTouchEventACK(WebInputEvent::Type type,
                          InputEventAckState ack_result,
-                         uint32 event_id) {
+                         uint32_t event_id) {
     DCHECK(WebInputEvent::isTouchEventType(type));
     InputEventAck ack(type, ack_result, event_id);
     InputHostMsg_HandleInputEvent_ACK response(0, ack);
@@ -734,8 +738,8 @@
     return overscroll_delegate_.get();
   }
 
-  uint32 SendTouchEvent() {
-    uint32 touch_event_id = touch_event_.uniqueTouchEventId;
+  uint32_t SendTouchEvent() {
+    uint32_t touch_event_id = touch_event_.uniqueTouchEventId;
     widget_host_->ForwardTouchEventWithLatencyInfo(touch_event_,
                                                    ui::LatencyInfo());
     touch_event_.ResetPoints();
@@ -1726,7 +1730,7 @@
       root_window->GetHost()->compositor());
 
   bool has_resize = false;
-  for (uint32 i = 0; i < sink_->message_count(); ++i) {
+  for (uint32_t i = 0; i < sink_->message_count(); ++i) {
     const IPC::Message* msg = sink_->GetMessageAt(i);
     switch (msg->type()) {
       case InputMsg_HandleInputEvent::ID: {
@@ -1913,7 +1917,7 @@
 
   // Create a bunch of renderers.
   for (size_t i = 0; i < renderer_count; ++i) {
-    int32 routing_id = process_host_->GetNextRoutingID();
+    int32_t routing_id = process_host_->GetNextRoutingID();
     hosts[i] =
         new RenderWidgetHostImpl(&delegate_, process_host_, routing_id, false);
     hosts[i]->Init();
@@ -2077,7 +2081,7 @@
 
   // Create a bunch of renderers.
   for (size_t i = 0; i < renderer_count; ++i) {
-    int32 routing_id = process_host_->GetNextRoutingID();
+    int32_t routing_id = process_host_->GetNextRoutingID();
     hosts[i] =
         new RenderWidgetHostImpl(&delegate_, process_host_, routing_id, false);
     hosts[i]->Init();
@@ -2146,7 +2150,7 @@
 
   // Create a bunch of renderers.
   for (size_t i = 0; i < renderer_count; ++i) {
-    int32 routing_id = process_host_->GetNextRoutingID();
+    int32_t routing_id = process_host_->GetNextRoutingID();
     hosts[i] =
         new RenderWidgetHostImpl(&delegate_, process_host_, routing_id, false);
     hosts[i]->Init();
@@ -3015,13 +3019,13 @@
 
   // The test sends an intermingled sequence of touch and gesture events.
   PressTouchPoint(0, 1);
-  uint32 touch_press_event_id1 = SendTouchEvent();
+  uint32_t touch_press_event_id1 = SendTouchEvent();
   SendTouchEventACK(WebInputEvent::TouchStart,
                     INPUT_EVENT_ACK_STATE_NOT_CONSUMED, touch_press_event_id1);
   EXPECT_EQ(1U, GetSentMessageCountAndResetSink());
 
   MoveTouchPoint(0, 20, 5);
-  uint32 touch_move_event_id1 = SendTouchEvent();
+  uint32_t touch_move_event_id1 = SendTouchEvent();
   SendTouchEventACK(WebInputEvent::TouchMove,
                     INPUT_EVENT_ACK_STATE_NOT_CONSUMED, touch_move_event_id1);
   EXPECT_EQ(1U, GetSentMessageCountAndResetSink());
diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc
index 1c07d7d..a2a0884 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
@@ -5,6 +5,7 @@
 #include "content/browser/renderer_host/render_widget_host_view_base.h"
 
 #include "base/logging.h"
+#include "build/build_config.h"
 #include "content/browser/accessibility/browser_accessibility_manager.h"
 #include "content/browser/gpu/gpu_data_manager_impl.h"
 #include "content/browser/renderer_host/input/synthetic_gesture_target_base.h"
@@ -568,7 +569,7 @@
   NOTREACHED();
 }
 
-uint32 RenderWidgetHostViewBase::RendererFrameNumber() {
+uint32_t RenderWidgetHostViewBase::RendererFrameNumber() {
   return renderer_frame_number_;
 }
 
diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h
index 33d3b678..d714137 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.h
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
@@ -5,13 +5,18 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
 #include "base/callback_forward.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/process/kill.h"
 #include "base/timer/timer.h"
+#include "build/build_config.h"
 #include "cc/output/compositor_frame.h"
 #include "content/browser/renderer_host/event_with_latency_info.h"
 #include "content/common/content_export.h"
@@ -92,7 +97,7 @@
 
   // Return a value that is incremented each time the renderer swaps a new frame
   // to the view.
-  uint32 RendererFrameNumber();
+  uint32_t RendererFrameNumber();
 
   // Called each time the RenderWidgetHost receives a new frame for display from
   // the renderer.
@@ -162,7 +167,7 @@
   // Informs that the focused DOM node has changed.
   virtual void FocusedNodeChanged(bool is_editable_node) {}
 
-  virtual void OnSwapCompositorFrame(uint32 output_surface_id,
+  virtual void OnSwapCompositorFrame(uint32_t output_surface_id,
                                      scoped_ptr<cc::CompositorFrame> frame) {}
 
   // This method exists to allow removing of displayed graphics, after a new
@@ -438,7 +443,7 @@
 
   gfx::Rect current_display_area_;
 
-  uint32 renderer_frame_number_;
+  uint32_t renderer_frame_number_;
 
   base::OneShotTimer flush_input_timer_;
 
diff --git a/content/browser/renderer_host/render_widget_host_view_browsertest.cc b/content/browser/renderer_host/render_widget_host_view_browsertest.cc
index 794d8ce..1c33876 100644
--- a/content/browser/renderer_host/render_widget_host_view_browsertest.cc
+++ b/content/browser/renderer_host/render_widget_host_view_browsertest.cc
@@ -2,13 +2,17 @@
 // 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/barrier_closure.h"
 #include "base/command_line.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/path_service.h"
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
+#include "build/build_config.h"
 #include "content/browser/gpu/compositor_util.h"
 #include "content/browser/gpu/gpu_data_manager_impl.h"
 #include "content/browser/renderer_host/dip_util.h"
@@ -584,7 +588,7 @@
     //      is allowed to transiently fail.  The purpose of these tests is to
     //      confirm correct cropping/scaling behavior; and not that every
     //      readback must succeed.  http://crbug.com/444237
-    uint32 last_frame_number = 0;
+    uint32_t last_frame_number = 0;
     do {
       // Wait for renderer to provide the next frame.
       while (!GetRenderWidgetHost()->ScheduleComposite())
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
index 0bdce70d..63b4209 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -7,6 +7,8 @@
 
 #import <Cocoa/Cocoa.h>
 #include <IOSurface/IOSurface.h>
+#include <stddef.h>
+#include <stdint.h>
 #include <list>
 #include <map>
 #include <set>
@@ -322,7 +324,7 @@
   void BeginFrameSubscription(
       scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber) override;
   void EndFrameSubscription() override;
-  void OnSwapCompositorFrame(uint32 output_surface_id,
+  void OnSwapCompositorFrame(uint32_t output_surface_id,
                              scoped_ptr<cc::CompositorFrame> frame) override;
   void ClearCompositorFrame() override;
   BrowserAccessibilityManager* CreateBrowserAccessibilityManager(
diff --git a/content/browser/renderer_host/render_widget_host_view_mac_dictionary_helper.h b/content/browser/renderer_host/render_widget_host_view_mac_dictionary_helper.h
index 4a94d9f..71deadb 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac_dictionary_helper.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac_dictionary_helper.h
@@ -5,7 +5,7 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_DICTIONARY_HELPER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_DICTIONARY_HELPER_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "ui/gfx/geometry/vector2d.h"
 
 namespace content {
diff --git a/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper.h b/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper.h
index 9ba16b3..9cdb0aa 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper.h
@@ -7,9 +7,9 @@
 
 #import <Cocoa/Cocoa.h>
 
-#include "base/basictypes.h"
 #include "base/containers/hash_tables.h"
 #include "base/gtest_prod_util.h"
+#include "base/macros.h"
 #include "content/browser/renderer_host/render_widget_host_view_mac.h"
 
 namespace content {
diff --git a/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper.mm b/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper.mm
index 14ee158..25dbcfe 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper.mm
@@ -5,7 +5,9 @@
 #import "content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper.h"
 
 #import <objc/runtime.h>
+#include <stddef.h>
 
+#include "base/macros.h"
 #include "content/browser/renderer_host/render_widget_host_impl.h"
 #import "content/browser/renderer_host/render_widget_host_view_mac.h"
 
diff --git a/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm b/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm
index a6af135..dfa92c1 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm
@@ -5,6 +5,8 @@
 #import "content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper.h"
 
 #import <Cocoa/Cocoa.h>
+#include <stddef.h>
+#include <stdint.h>
 
 #include "base/mac/scoped_nsautorelease_pool.h"
 #include "base/message_loop/message_loop.h"
@@ -86,7 +88,7 @@
  public:
   RenderWidgetHostEditCommandCounter(RenderWidgetHostDelegate* delegate,
                                      RenderProcessHost* process,
-                                     int32 routing_id)
+                                     int32_t routing_id)
       : RenderWidgetHostImpl(delegate, process, routing_id, false),
         edit_command_message_count_(0) {}
 
@@ -124,7 +126,7 @@
   supported_factors.push_back(ui::SCALE_FACTOR_100P);
   ui::test::ScopedSetSupportedScaleFactors scoped_supported(supported_factors);
 
-  int32 routing_id = process_host.GetNextRoutingID();
+  int32_t routing_id = process_host.GetNextRoutingID();
   RenderWidgetHostEditCommandCounter* render_widget =
       new RenderWidgetHostEditCommandCounter(&delegate, &process_host,
                                              routing_id);
diff --git a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm b/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
index db7b5e7e..ac3cb94 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
@@ -5,10 +5,13 @@
 #include "content/browser/renderer_host/render_widget_host_view_mac.h"
 
 #include <Cocoa/Cocoa.h>
+#include <stddef.h>
+#include <stdint.h>
 
 #include "base/mac/mac_util.h"
 #include "base/mac/scoped_nsautorelease_pool.h"
 #include "base/mac/sdk_forward_declarations.h"
+#include "base/macros.h"
 #include "base/strings/utf_string_conversions.h"
 #include "content/browser/browser_thread_impl.h"
 #include "content/browser/compositor/test/no_transport_image_transport_factory.h"
@@ -146,7 +149,7 @@
  public:
   MockRenderWidgetHostImpl(RenderWidgetHostDelegate* delegate,
                            RenderProcessHost* process,
-                           int32 routing_id)
+                           int32_t routing_id)
       : RenderWidgetHostImpl(delegate, process, routing_id, false) {}
 
   MOCK_METHOD0(Focus, void());
@@ -292,7 +295,7 @@
   TestBrowserContext browser_context;
   MockRenderProcessHost* process_host =
       new MockRenderProcessHost(&browser_context);
-  int32 routing_id = process_host->GetNextRoutingID();
+  int32_t routing_id = process_host->GetNextRoutingID();
   // Owned by its |cocoa_view()|.
   RenderWidgetHostImpl* rwh =
       new RenderWidgetHostImpl(&delegate, process_host, routing_id, false);
@@ -326,7 +329,7 @@
   TestBrowserContext browser_context;
   MockRenderProcessHost* process_host =
       new MockRenderProcessHost(&browser_context);
-  int32 routing_id = process_host->GetNextRoutingID();
+  int32_t routing_id = process_host->GetNextRoutingID();
   // Owned by its |cocoa_view()|.
   RenderWidgetHostImpl* rwh =
       new RenderWidgetHostImpl(&delegate, process_host, routing_id, false);
@@ -355,7 +358,7 @@
       new MockRenderProcessHost(&browser_context);
   process_host->Init();
   MockRenderWidgetHostDelegate delegate;
-  int32 routing_id = process_host->GetNextRoutingID();
+  int32_t routing_id = process_host->GetNextRoutingID();
   MockRenderWidgetHostImpl* host =
       new MockRenderWidgetHostImpl(&delegate, process_host, routing_id);
   RenderWidgetHostViewMac* view = new RenderWidgetHostViewMac(host, false);
@@ -753,7 +756,7 @@
       new MockRenderProcessHost(&browser_context);
 
   // Owned by its |cocoa_view()|.
-  int32 routing_id = process_host->GetNextRoutingID();
+  int32_t routing_id = process_host->GetNextRoutingID();
   MockRenderWidgetHostImpl* rwh =
       new MockRenderWidgetHostImpl(&delegate, process_host, routing_id);
   RenderWidgetHostViewMac* view = new RenderWidgetHostViewMac(rwh, false);
@@ -801,7 +804,7 @@
       new MockRenderProcessHost(&browser_context);
   process_host->Init();
   MockRenderWidgetHostDelegate delegate;
-  int32 routing_id = process_host->GetNextRoutingID();
+  int32_t routing_id = process_host->GetNextRoutingID();
   MockRenderWidgetHostImpl* host =
       new MockRenderWidgetHostImpl(&delegate, process_host, routing_id);
   RenderWidgetHostViewMac* view = new RenderWidgetHostViewMac(host, false);
@@ -842,7 +845,7 @@
       new MockRenderProcessHost(&browser_context);
   process_host->Init();
   MockRenderWidgetHostDelegate delegate;
-  int32 routing_id = process_host->GetNextRoutingID();
+  int32_t routing_id = process_host->GetNextRoutingID();
   MockRenderWidgetHostImpl* host =
       new MockRenderWidgetHostImpl(&delegate, process_host, routing_id);
   RenderWidgetHostViewMac* view = new RenderWidgetHostViewMac(host, false);
@@ -893,7 +896,7 @@
   TestBrowserContext browser_context;
   MockRenderProcessHost* process_host =
       new MockRenderProcessHost(&browser_context);
-  int32 routing_id = process_host->GetNextRoutingID();
+  int32_t routing_id = process_host->GetNextRoutingID();
 
   // Owned by its |cocoa_view()|.
   MockRenderWidgetHostImpl* rwh =
@@ -936,7 +939,7 @@
   MockRenderProcessHost* process_host =
       new MockRenderProcessHost(&browser_context);
   MockRenderWidgetHostDelegate delegate;
-  int32 routing_id = process_host->GetNextRoutingID();
+  int32_t routing_id = process_host->GetNextRoutingID();
   MockRenderWidgetHostImpl* host =
       new MockRenderWidgetHostImpl(&delegate, process_host, routing_id);
   RenderWidgetHostViewMac* view = new RenderWidgetHostViewMac(host, false);
@@ -1013,7 +1016,7 @@
   process_host_ = new MockRenderProcessHost(&browser_context);
   process_host_->Init();
   MockRenderWidgetHostDelegate delegate;
-  int32 routing_id = process_host_->GetNextRoutingID();
+  int32_t routing_id = process_host_->GetNextRoutingID();
   MockRenderWidgetHostImpl* host =
       new MockRenderWidgetHostImpl(&delegate, process_host_, routing_id);
   RenderWidgetHostViewMac* view = new RenderWidgetHostViewMac(host, false);
diff --git a/content/browser/renderer_host/render_widget_host_view_mus.cc b/content/browser/renderer_host/render_widget_host_view_mus.cc
index b1822efe..cb35976 100644
--- a/content/browser/renderer_host/render_widget_host_view_mus.cc
+++ b/content/browser/renderer_host/render_widget_host_view_mus.cc
@@ -4,6 +4,7 @@
 
 #include "content/browser/renderer_host/render_widget_host_view_mus.h"
 
+#include "build/build_config.h"
 #include "components/mus/public/cpp/window.h"
 #include "components/mus/public/cpp/window_tree_connection.h"
 #include "content/browser/mojo/mojo_shell_client_host.h"
diff --git a/content/browser/renderer_host/render_widget_host_view_mus.h b/content/browser/renderer_host/render_widget_host_view_mus.h
index ca110e8..0db6d73 100644
--- a/content/browser/renderer_host/render_widget_host_view_mus.h
+++ b/content/browser/renderer_host/render_widget_host_view_mus.h
@@ -5,7 +5,10 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MUS_H_
 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MUS_H_
 
+#include <stddef.h>
+
 #include "base/macros.h"
+#include "build/build_config.h"
 #include "components/mus/public/cpp/scoped_window_ptr.h"
 #include "components/mus/public/cpp/window.h"
 #include "content/browser/renderer_host/render_widget_host_view_base.h"
diff --git a/content/browser/renderer_host/renderer_frame_manager.cc b/content/browser/renderer_host/renderer_frame_manager.cc
index 3467781..3f2281f6 100644
--- a/content/browser/renderer_host/renderer_frame_manager.cc
+++ b/content/browser/renderer_host/renderer_frame_manager.cc
@@ -12,6 +12,7 @@
 #include "base/memory/memory_pressure_monitor.h"
 #include "base/memory/shared_memory.h"
 #include "base/sys_info.h"
+#include "build/build_config.h"
 #include "content/common/host_shared_bitmap_manager.h"
 
 namespace content {
diff --git a/content/browser/renderer_host/renderer_frame_manager.h b/content/browser/renderer_host/renderer_frame_manager.h
index f8d4a9c..87385481 100644
--- a/content/browser/renderer_host/renderer_frame_manager.h
+++ b/content/browser/renderer_host/renderer_frame_manager.h
@@ -5,10 +5,12 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDERER_FRAME_MANAGER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_RENDERER_FRAME_MANAGER_H_
 
+#include <stddef.h>
+
 #include <list>
 #include <map>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/memory_pressure_listener.h"
 #include "base/memory/singleton.h"
 #include "content/common/content_export.h"
diff --git a/content/browser/renderer_host/sandbox_ipc_linux.cc b/content/browser/renderer_host/sandbox_ipc_linux.cc
index b77ec14..3603d1f3 100644
--- a/content/browser/renderer_host/sandbox_ipc_linux.cc
+++ b/content/browser/renderer_host/sandbox_ipc_linux.cc
@@ -5,11 +5,12 @@
 #include "content/browser/renderer_host/sandbox_ipc_linux.h"
 
 #include <fcntl.h>
+#include <stddef.h>
+#include <stdint.h>
 #include <sys/poll.h>
 #include <sys/socket.h>
 #include <sys/stat.h>
 
-#include "base/basictypes.h"
 #include "base/command_line.h"
 #include "base/files/scoped_file.h"
 #include "base/linux_util.h"
@@ -286,7 +287,7 @@
     const std::vector<base::ScopedFD>& fds) {
   std::string family;
   bool bold, italic;
-  uint16 pixel_size;
+  uint16_t pixel_size;
 
   if (!iter.ReadString(&family) ||
       !iter.ReadBool(&bold) ||
@@ -373,7 +374,7 @@
     const std::vector<base::ScopedFD>& fds) {
   std::string face;
   bool is_bold, is_italic;
-  uint32 charset, fallback_family;
+  uint32_t charset, fallback_family;
 
   if (!iter.ReadString(&face) || face.empty() ||
       !iter.ReadBool(&is_bold) ||
diff --git a/content/browser/renderer_host/sandbox_ipc_linux.h b/content/browser/renderer_host/sandbox_ipc_linux.h
index 0d647049..a11a878 100644
--- a/content/browser/renderer_host/sandbox_ipc_linux.h
+++ b/content/browser/renderer_host/sandbox_ipc_linux.h
@@ -10,6 +10,7 @@
 #include <vector>
 
 #include "base/files/scoped_file.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/pickle.h"
 #include "base/threading/simple_thread.h"
diff --git a/content/browser/renderer_host/text_input_client_mac.h b/content/browser/renderer_host/text_input_client_mac.h
index 4f03a931..eeb48a8 100644
--- a/content/browser/renderer_host/text_input_client_mac.h
+++ b/content/browser/renderer_host/text_input_client_mac.h
@@ -9,6 +9,7 @@
 
 #include "base/mac/scoped_block.h"
 #include "base/mac/scoped_nsobject.h"
+#include "base/macros.h"
 #include "base/synchronization/condition_variable.h"
 #include "base/synchronization/lock.h"
 #include "content/common/content_export.h"
diff --git a/content/browser/renderer_host/text_input_client_mac_unittest.mm b/content/browser/renderer_host/text_input_client_mac_unittest.mm
index 7078266..aa265fca 100644
--- a/content/browser/renderer_host/text_input_client_mac_unittest.mm
+++ b/content/browser/renderer_host/text_input_client_mac_unittest.mm
@@ -4,6 +4,9 @@
 
 #import "content/browser/renderer_host/text_input_client_mac.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/message_loop/message_loop.h"
 #include "base/threading/thread.h"
@@ -21,7 +24,7 @@
 namespace content {
 
 namespace {
-const int64 kTaskDelayMs = 200;
+const int64_t kTaskDelayMs = 200;
 
 class MockRenderWidgetHostDelegate : public RenderWidgetHostDelegate {
  public:
@@ -47,7 +50,7 @@
         thread_("TextInputClientMacTestThread") {
     RenderProcessHost* rph =
         process_factory_.CreateRenderProcessHost(&browser_context_, nullptr);
-    int32 routing_id = rph->GetNextRoutingID();
+    int32_t routing_id = rph->GetNextRoutingID();
     widget_.reset(new RenderWidgetHostImpl(&delegate_, rph, routing_id, false));
   }
 
diff --git a/content/browser/renderer_host/text_input_client_message_filter.h b/content/browser/renderer_host/text_input_client_message_filter.h
index 992a9a2..9400065 100644
--- a/content/browser/renderer_host/text_input_client_message_filter.h
+++ b/content/browser/renderer_host/text_input_client_message_filter.h
@@ -5,6 +5,9 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_TEXT_INPUT_CLIENT_MESSAGE_FILTER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_TEXT_INPUT_CLIENT_MESSAGE_FILTER_H_
 
+#include <stddef.h>
+
+#include "base/macros.h"
 #include "content/common/mac/attributed_string_coder.h"
 #include "content/public/browser/browser_message_filter.h"
 
diff --git a/content/browser/renderer_host/ui_events_helper.cc b/content/browser/renderer_host/ui_events_helper.cc
index e3dc5652..a062303 100644
--- a/content/browser/renderer_host/ui_events_helper.cc
+++ b/content/browser/renderer_host/ui_events_helper.cc
@@ -4,6 +4,8 @@
 
 #include "content/browser/renderer_host/ui_events_helper.h"
 
+#include <stdint.h>
+
 #include "content/browser/renderer_host/input/web_input_event_util.h"
 #include "content/common/input/web_touch_event_traits.h"
 #include "third_party/WebKit/public/web/WebInputEvent.h"
@@ -63,7 +65,7 @@
 
   int flags = WebEventModifiersToEventFlags(touch.modifiers);
   base::TimeDelta timestamp = base::TimeDelta::FromMicroseconds(
-      static_cast<int64>(touch.timeStampSeconds * 1000000));
+      static_cast<int64_t>(touch.timeStampSeconds * 1000000));
   for (unsigned i = 0; i < touch.touchesLength; ++i) {
     const blink::WebTouchPoint& point = touch.touches[i];
     if (WebTouchPointStateToEventType(point.state) != type)
diff --git a/content/browser/renderer_host/web_input_event_aura.cc b/content/browser/renderer_host/web_input_event_aura.cc
index 7d67025a..79dda38 100644
--- a/content/browser/renderer_host/web_input_event_aura.cc
+++ b/content/browser/renderer_host/web_input_event_aura.cc
@@ -4,6 +4,7 @@
 
 #include "content/browser/renderer_host/web_input_event_aura.h"
 
+#include "build/build_config.h"
 #include "content/browser/renderer_host/input/web_input_event_util.h"
 #include "content/browser/renderer_host/ui_events_helper.h"
 #include "ui/aura/client/screen_position_client.h"
diff --git a/content/browser/renderer_host/web_input_event_aura_unittest.cc b/content/browser/renderer_host/web_input_event_aura_unittest.cc
index ae4a99c..2d46dfb 100644
--- a/content/browser/renderer_host/web_input_event_aura_unittest.cc
+++ b/content/browser/renderer_host/web_input_event_aura_unittest.cc
@@ -4,7 +4,11 @@
 
 #include "content/browser/renderer_host/web_input_event_aura.h"
 
-#include "base/basictypes.h"
+#include <stddef.h>
+#include <stdint.h>
+
+#include "base/macros.h"
+#include "build/build_config.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "ui/events/blink/blink_event_util.h"
 #include "ui/events/event.h"
@@ -161,7 +165,7 @@
   struct TestCase {
     ui::DomCode dom_code;         // The physical key (location).
     ui::KeyboardCode ui_keycode;  // The virtual key code.
-    uint32 x_keysym;              // The X11 keysym.
+    uint32_t x_keysym;            // The X11 keysym.
     bool expected_result;         // true if the event has "isKeyPad" modifier.
   } kTesCases[] = {
       {ui::DomCode::DIGIT0, ui::VKEY_0, XK(0), false},
diff --git a/content/browser/renderer_host/webmenurunner_mac.mm b/content/browser/renderer_host/webmenurunner_mac.mm
index 94e77453..0e189bed 100644
--- a/content/browser/renderer_host/webmenurunner_mac.mm
+++ b/content/browser/renderer_host/webmenurunner_mac.mm
@@ -4,6 +4,8 @@
 
 #include "content/browser/renderer_host/webmenurunner_mac.h"
 
+#include <stddef.h>
+
 #include "base/strings/sys_string_conversions.h"
 
 @interface WebMenuRunner (PrivateAPI)
diff --git a/content/browser/renderer_host/websocket_dispatcher_host.cc b/content/browser/renderer_host/websocket_dispatcher_host.cc
index ab4e68b..0cdf6638 100644
--- a/content/browser/renderer_host/websocket_dispatcher_host.cc
+++ b/content/browser/renderer_host/websocket_dispatcher_host.cc
@@ -4,6 +4,8 @@
 
 #include "content/browser/renderer_host/websocket_dispatcher_host.h"
 
+#include <stddef.h>
+
 #include <string>
 #include <vector>
 
@@ -131,8 +133,8 @@
 }
 
 WebSocketHostState WebSocketDispatcherHost::SendOrDrop(IPC::Message* message) {
-  const uint32 message_type = message->type();
-  const int32 message_routing_id = message->routing_id();
+  const uint32_t message_type = message->type();
+  const int32_t message_routing_id = message->routing_id();
   if (!Send(message)) {
     message = NULL;
     DVLOG(1) << "Sending of message type " << message_type
@@ -168,7 +170,7 @@
 }
 
 WebSocketHostState WebSocketDispatcherHost::SendFlowControl(int routing_id,
-                                                            int64 quota) {
+                                                            int64_t quota) {
   return SendOrDrop(new WebSocketMsg_FlowControl(routing_id, quota));
 }
 
@@ -203,7 +205,7 @@
 WebSocketHostState WebSocketDispatcherHost::DoDropChannel(
     int routing_id,
     bool was_clean,
-    uint16 code,
+    uint16_t code,
     const std::string& reason) {
   if (SendOrDrop(
           new WebSocketMsg_DropChannel(routing_id, was_clean, code, reason)) ==
diff --git a/content/browser/renderer_host/websocket_dispatcher_host.h b/content/browser/renderer_host/websocket_dispatcher_host.h
index 5039078..56c5f3a 100644
--- a/content/browser/renderer_host/websocket_dispatcher_host.h
+++ b/content/browser/renderer_host/websocket_dispatcher_host.h
@@ -12,6 +12,7 @@
 #include "base/callback.h"
 #include "base/compiler_specific.h"
 #include "base/containers/hash_tables.h"
+#include "base/macros.h"
 #include "base/time/time.h"
 #include "base/timer/timer.h"
 #include "content/common/content_export.h"
@@ -74,7 +75,7 @@
 
   // Sends a WebSocketMsg_FlowControl IPC.
   WebSocketHostState SendFlowControl(int routing_id,
-                                     int64 quota) WARN_UNUSED_RESULT;
+                                     int64_t quota) WARN_UNUSED_RESULT;
 
   // Sends a WebSocketMsg_NotifyClosing IPC
   WebSocketHostState NotifyClosingHandshake(int routing_id) WARN_UNUSED_RESULT;
@@ -97,11 +98,11 @@
 
   // Sends a WebSocketMsg_DropChannel IPC and deletes and unregisters the
   // channel.
-  WebSocketHostState DoDropChannel(
-      int routing_id,
-      bool was_clean,
-      uint16 code,
-      const std::string& reason) WARN_UNUSED_RESULT;
+  WebSocketHostState DoDropChannel(int routing_id,
+                                   bool was_clean,
+                                   uint16_t code,
+                                   const std::string& reason)
+      WARN_UNUSED_RESULT;
 
   // Returns whether the associated renderer process can read raw cookies.
   bool CanReadRawCookies() const;
diff --git a/content/browser/renderer_host/websocket_host.cc b/content/browser/renderer_host/websocket_host.cc
index 8c04e04..f032282 100644
--- a/content/browser/renderer_host/websocket_host.cc
+++ b/content/browser/renderer_host/websocket_host.cc
@@ -4,8 +4,8 @@
 
 #include "content/browser/renderer_host/websocket_host.h"
 
-#include "base/basictypes.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "base/strings/string_util.h"
@@ -102,9 +102,9 @@
                            WebSocketMessageType type,
                            const std::vector<char>& data) override;
   ChannelState OnClosingHandshake() override;
-  ChannelState OnFlowControl(int64 quota) override;
+  ChannelState OnFlowControl(int64_t quota) override;
   ChannelState OnDropChannel(bool was_clean,
-                             uint16 code,
+                             uint16_t code,
                              const std::string& reason) override;
   ChannelState OnFailChannel(const std::string& message) override;
   ChannelState OnStartOpeningHandshake(
@@ -189,7 +189,7 @@
   return StateCast(dispatcher_->NotifyClosingHandshake(routing_id_));
 }
 
-ChannelState WebSocketEventHandler::OnFlowControl(int64 quota) {
+ChannelState WebSocketEventHandler::OnFlowControl(int64_t quota) {
   DVLOG(3) << "WebSocketEventHandler::OnFlowControl"
            << " routing_id=" << routing_id_ << " quota=" << quota;
 
@@ -197,7 +197,7 @@
 }
 
 ChannelState WebSocketEventHandler::OnDropChannel(bool was_clean,
-                                                  uint16 code,
+                                                  uint16_t code,
                                                   const std::string& reason) {
   DVLOG(3) << "WebSocketEventHandler::OnDropChannel"
            << " routing_id=" << routing_id_ << " was_clean=" << was_clean
@@ -327,7 +327,8 @@
 WebSocketHost::~WebSocketHost() {}
 
 void WebSocketHost::GoAway() {
-  OnDropChannel(false, static_cast<uint16>(net::kWebSocketErrorGoingAway), "");
+  OnDropChannel(false, static_cast<uint16_t>(net::kWebSocketErrorGoingAway),
+                "");
 }
 
 bool WebSocketHost::OnMessageReceived(const IPC::Message& message) {
@@ -412,7 +413,7 @@
   channel_->SendFrame(fin, MessageTypeToOpCode(type), data);
 }
 
-void WebSocketHost::OnFlowControl(int64 quota) {
+void WebSocketHost::OnFlowControl(int64_t quota) {
   DVLOG(3) << "WebSocketHost::OnFlowControl"
            << " routing_id=" << routing_id_ << " quota=" << quota;
 
@@ -428,7 +429,7 @@
 }
 
 void WebSocketHost::OnDropChannel(bool was_clean,
-                                  uint16 code,
+                                  uint16_t code,
                                   const std::string& reason) {
   DVLOG(3) << "WebSocketHost::OnDropChannel"
            << " routing_id=" << routing_id_ << " was_clean=" << was_clean
diff --git a/content/browser/renderer_host/websocket_host.h b/content/browser/renderer_host/websocket_host.h
index 89b3686..efdc9d1 100644
--- a/content/browser/renderer_host/websocket_host.h
+++ b/content/browser/renderer_host/websocket_host.h
@@ -5,9 +5,12 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_WEBSOCKET_HOST_H_
 #define CONTENT_BROWSER_RENDERER_HOST_WEBSOCKET_HOST_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/time/time.h"
@@ -74,9 +77,9 @@
                    WebSocketMessageType type,
                    const std::vector<char>& data);
 
-  void OnFlowControl(int64 quota);
+  void OnFlowControl(int64_t quota);
 
-  void OnDropChannel(bool was_clean, uint16 code, const std::string& reason);
+  void OnDropChannel(bool was_clean, uint16_t code, const std::string& reason);
 
   // The channel we use to send events to the network.
   scoped_ptr<net::WebSocketChannel> channel_;
diff --git a/content/browser/webui/generic_handler.h b/content/browser/webui/generic_handler.h
index 62f0e420..4a6d123b 100644
--- a/content/browser/webui/generic_handler.h
+++ b/content/browser/webui/generic_handler.h
@@ -6,6 +6,7 @@
 #define CONTENT_BROWSER_WEBUI_GENERIC_HANDLER_H_
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "content/public/browser/web_ui_message_handler.h"
 
 namespace base {
diff --git a/content/child/db_message_filter.h b/content/child/db_message_filter.h
index 783b827a..c6ee0cb1 100644
--- a/content/child/db_message_filter.h
+++ b/content/child/db_message_filter.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_CHILD_DB_MESSAGE_FILTER_H_
 #define CONTENT_CHILD_DB_MESSAGE_FILTER_H_
 
+#include "base/basictypes.h"
 #include "base/strings/string16.h"
 #include "ipc/message_filter.h"
 
diff --git a/content/child/indexed_db/mock_webidbcallbacks.h b/content/child/indexed_db/mock_webidbcallbacks.h
index c31ced9..f7299b3 100644
--- a/content/child/indexed_db/mock_webidbcallbacks.h
+++ b/content/child/indexed_db/mock_webidbcallbacks.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_CHILD_INDEXED_DB_MOCK_WEBIDBCALLBACKS_H_
 #define CONTENT_CHILD_INDEXED_DB_MOCK_WEBIDBCALLBACKS_H_
 
+#include "base/macros.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "third_party/WebKit/public/platform/WebBlobInfo.h"
 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBCallbacks.h"
diff --git a/content/child/web_memory_allocator_dump_impl.h b/content/child/web_memory_allocator_dump_impl.h
index e5a35df3..47e00dc5 100644
--- a/content/child/web_memory_allocator_dump_impl.h
+++ b/content/child/web_memory_allocator_dump_impl.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_CHILD_WEB_MEMORY_ALLOCATOR_DUMP_IMPL_H_
 #define CONTENT_CHILD_WEB_MEMORY_ALLOCATOR_DUMP_IMPL_H_
 
+#include "base/basictypes.h"
 #include "third_party/WebKit/public/platform/WebMemoryAllocatorDump.h"
 
 namespace base {
diff --git a/content/common/accessibility_messages.h b/content/common/accessibility_messages.h
index 56e1bf25..f30b5e41 100644
--- a/content/common/accessibility_messages.h
+++ b/content/common/accessibility_messages.h
@@ -5,7 +5,6 @@
 // IPC messages for accessibility.
 // Multiply-included message file, hence no include guard.
 
-#include "base/basictypes.h"
 #include "content/common/ax_content_node_data.h"
 #include "content/common/content_export.h"
 #include "content/common/view_message_enums.h"
diff --git a/content/common/android/address_parser.h b/content/common/android/address_parser.h
index 036e27e..cff7f5c 100644
--- a/content/common/android/address_parser.h
+++ b/content/common/android/address_parser.h
@@ -5,6 +5,8 @@
 #ifndef CONTENT_COMMON_ANDROID_ADDRESS_PARSER_H_
 #define CONTENT_COMMON_ANDROID_ADDRESS_PARSER_H_
 
+#include <stddef.h>
+
 #include "base/strings/string16.h"
 #include "content/common/content_export.h"
 
diff --git a/content/common/android/address_parser_internal.cc b/content/common/android/address_parser_internal.cc
index e1ee2b42..4f114a3f 100644
--- a/content/common/android/address_parser_internal.cc
+++ b/content/common/android/address_parser_internal.cc
@@ -7,6 +7,7 @@
 #include <bitset>
 
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/strings/string_util.h"
 
 namespace {
diff --git a/content/common/android/address_parser_internal.h b/content/common/android/address_parser_internal.h
index 760dea60..5defd08 100644
--- a/content/common/android/address_parser_internal.h
+++ b/content/common/android/address_parser_internal.h
@@ -5,8 +5,11 @@
 #ifndef CONTENT_COMMON_ANDROID_ADDRESS_PARSER_INTERNAL_H_
 #define CONTENT_COMMON_ANDROID_ADDRESS_PARSER_INTERNAL_H_
 
+#include <stddef.h>
+
 #include <vector>
 
+#include "base/macros.h"
 #include "base/strings/string_tokenizer.h"
 #include "content/common/content_export.h"
 
diff --git a/content/common/android/address_parser_unittest.cc b/content/common/android/address_parser_unittest.cc
index bf1b602..b15c1a6 100644
--- a/content/common/android/address_parser_unittest.cc
+++ b/content/common/android/address_parser_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 "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
diff --git a/content/common/android/common_jni_registrar.cc b/content/common/android/common_jni_registrar.cc
index bf631c3..2ba3387 100644
--- a/content/common/android/common_jni_registrar.cc
+++ b/content/common/android/common_jni_registrar.cc
@@ -6,6 +6,7 @@
 
 #include "base/android/jni_android.h"
 #include "base/android/jni_registrar.h"
+#include "base/macros.h"
 #include "content/common/android/hash_set.h"
 
 namespace {
diff --git a/content/common/android/gin_java_bridge_value.cc b/content/common/android/gin_java_bridge_value.cc
index b9de5f9c..755de64e1e 100644
--- a/content/common/android/gin_java_bridge_value.cc
+++ b/content/common/android/gin_java_bridge_value.cc
@@ -14,12 +14,12 @@
 // else than holding GinJavaBridgeValues.  If a need for such scenario ever
 // emerges, the best solution would be to extend GinJavaBridgeValue to be able
 // to wrap raw BinaryValues.
-const uint32 kHeaderMagic = 0xBEEFCAFE;
+const uint32_t kHeaderMagic = 0xBEEFCAFE;
 
 #pragma pack(push, 4)
 struct Header : public base::Pickle::Header {
-  uint32 magic;
-  int32 type;
+  uint32_t magic;
+  int32_t type;
 };
 #pragma pack(pop)
 
@@ -47,7 +47,7 @@
 
 // static
 scoped_ptr<base::BinaryValue> GinJavaBridgeValue::CreateObjectIDValue(
-    int32 in_value) {
+    int32_t in_value) {
   GinJavaBridgeValue gin_value(TYPE_OBJECT_ID);
   gin_value.pickle_.WriteInt(in_value);
   return make_scoped_ptr(gin_value.SerializeToBinaryValue());
@@ -99,7 +99,7 @@
   }
 }
 
-bool GinJavaBridgeValue::GetAsObjectID(int32* out_object_id) const {
+bool GinJavaBridgeValue::GetAsObjectID(int32_t* out_object_id) const {
   if (GetType() == TYPE_OBJECT_ID) {
     base::PickleIterator iter(pickle_);
     return iter.ReadInt(out_object_id);
diff --git a/content/common/android/gin_java_bridge_value.h b/content/common/android/gin_java_bridge_value.h
index 3a832bfd..11a06ca6a 100644
--- a/content/common/android/gin_java_bridge_value.h
+++ b/content/common/android/gin_java_bridge_value.h
@@ -5,6 +5,9 @@
 #ifndef CONTENT_COMMON_ANDROID_GIN_JAVA_BRIDGE_VALUE_H_
 #define CONTENT_COMMON_ANDROID_GIN_JAVA_BRIDGE_VALUE_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/pickle.h"
 #include "base/values.h"
@@ -36,7 +39,7 @@
   CONTENT_EXPORT static scoped_ptr<base::BinaryValue> CreateNonFiniteValue(
       double in_value);
   CONTENT_EXPORT static scoped_ptr<base::BinaryValue> CreateObjectIDValue(
-      int32 in_value);
+      int32_t in_value);
 
   // De-serialization
   CONTENT_EXPORT static bool ContainsGinJavaBridgeValue(
@@ -48,7 +51,7 @@
   CONTENT_EXPORT bool IsType(Type type) const;
 
   CONTENT_EXPORT bool GetAsNonFinite(float* out_value) const;
-  CONTENT_EXPORT bool GetAsObjectID(int32* out_object_id) const;
+  CONTENT_EXPORT bool GetAsObjectID(int32_t* out_object_id) const;
 
  private:
   explicit GinJavaBridgeValue(Type type);
diff --git a/content/common/android/gin_java_bridge_value_unittest.cc b/content/common/android/gin_java_bridge_value_unittest.cc
index 0276848..1a64cd92 100644
--- a/content/common/android/gin_java_bridge_value_unittest.cc
+++ b/content/common/android/gin_java_bridge_value_unittest.cc
@@ -2,9 +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 <cmath>
 
-#include "base/basictypes.h"
 #include "base/memory/scoped_ptr.h"
 #include "content/common/android/gin_java_bridge_value.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -16,7 +17,7 @@
 
 TEST_F(GinJavaBridgeValueTest, BasicValues) {
   float native_float;
-  int32 native_object_id;
+  int32_t native_object_id;
 
   scoped_ptr<base::BinaryValue> undefined(
       GinJavaBridgeValue::CreateUndefinedValue());
diff --git a/content/common/android/surface_texture_peer.h b/content/common/android/surface_texture_peer.h
index 03113b8..0afe3ef 100644
--- a/content/common/android/surface_texture_peer.h
+++ b/content/common/android/surface_texture_peer.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_COMMON_ANDROID_SURFACE_TEXTURE_PEER_H_
 #define CONTENT_COMMON_ANDROID_SURFACE_TEXTURE_PEER_H_
 
+#include "base/macros.h"
 #include "base/process/process.h"
 #include "ui/gl/android/surface_texture.h"
 
diff --git a/content/common/android/sync_compositor_messages.h b/content/common/android/sync_compositor_messages.h
index 0e14214..4e2b704 100644
--- a/content/common/android/sync_compositor_messages.h
+++ b/content/common/android/sync_compositor_messages.h
@@ -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/memory/shared_memory_handle.h"
 #include "cc/output/begin_frame_args.h"
 #include "cc/output/compositor_frame.h"
diff --git a/content/common/appcache_interfaces.h b/content/common/appcache_interfaces.h
index 72afaa8..8ba2da0 100644
--- a/content/common/appcache_interfaces.h
+++ b/content/common/appcache_interfaces.h
@@ -5,9 +5,10 @@
 #ifndef CONTENT_COMMON_APPCACHE_INTERFACES_H_
 #define CONTENT_COMMON_APPCACHE_INTERFACES_H_
 
+#include <stdint.h>
+
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/files/file_path.h"
 #include "content/public/common/appcache_info.h"
 
@@ -64,14 +65,14 @@
   ~AppCacheResourceInfo();
 
   GURL url;
-  int64 size;
+  int64_t size;
   bool is_master;
   bool is_manifest;
   bool is_intercept;
   bool is_fallback;
   bool is_foreign;
   bool is_explicit;
-  int64 response_id;
+  int64_t response_id;
 };
 
 struct CONTENT_EXPORT AppCacheErrorDetails {
@@ -141,17 +142,16 @@
   virtual void SetSpawningHostId(int host_id, int spawning_host_id) = 0;
   virtual void SelectCache(int host_id,
                            const GURL& document_url,
-                           const int64 cache_document_was_loaded_from,
+                           const int64_t cache_document_was_loaded_from,
                            const GURL& manifest_url) = 0;
   virtual void SelectCacheForWorker(
                            int host_id,
                            int parent_process_id,
                            int parent_host_id) = 0;
-  virtual void SelectCacheForSharedWorker(
-                           int host_id,
-                           int64 appcache_id) = 0;
-  virtual void MarkAsForeignEntry(int host_id, const GURL& document_url,
-                                  int64 cache_document_was_loaded_from) = 0;
+  virtual void SelectCacheForSharedWorker(int host_id, int64_t appcache_id) = 0;
+  virtual void MarkAsForeignEntry(int host_id,
+                                  const GURL& document_url,
+                                  int64_t cache_document_was_loaded_from) = 0;
   virtual AppCacheStatus GetStatus(int host_id) = 0;
   virtual bool StartUpdate(int host_id) = 0;
   virtual bool SwapCache(int host_id) = 0;
diff --git a/content/common/appcache_messages.h b/content/common/appcache_messages.h
index 15d37582..7e74848 100644
--- a/content/common/appcache_messages.h
+++ b/content/common/appcache_messages.h
@@ -5,6 +5,9 @@
 // Multiply-included message file, hence no include guard.
 
 #include "ipc/ipc_message_macros.h"
+
+#include <stdint.h>
+
 #include "content/common/appcache_interfaces.h"
 
 #define IPC_MESSAGE_START AppCacheMsgStart
@@ -74,9 +77,9 @@
 // 'opt_manifest_url' the manifest url specified in the <html> tag if any
 IPC_MESSAGE_CONTROL4(AppCacheHostMsg_SelectCache,
                      int /* host_id */,
-                     GURL  /* document_url */,
-                     int64 /* appcache_document_was_loaded_from */,
-                     GURL  /* opt_manifest_url */)
+                     GURL /* document_url */,
+                     int64_t /* appcache_document_was_loaded_from */,
+                     GURL /* opt_manifest_url */)
 
 // Initiates worker specific cache selection algorithm for the given host.
 IPC_MESSAGE_CONTROL3(AppCacheHostMsg_SelectCacheForWorker,
@@ -85,13 +88,13 @@
                      int /* parent_host_id */)
 IPC_MESSAGE_CONTROL2(AppCacheHostMsg_SelectCacheForSharedWorker,
                      int /* host_id */,
-                     int64 /* appcache_id */)
+                     int64_t /* appcache_id */)
 
 // Informs the browser of a 'foreign' entry in an appcache.
 IPC_MESSAGE_CONTROL3(AppCacheHostMsg_MarkAsForeignEntry,
                      int /* host_id */,
-                     GURL  /* document_url */,
-                     int64 /* appcache_document_was_loaded_from */)
+                     GURL /* document_url */,
+                     int64_t /* appcache_document_was_loaded_from */)
 
 // Returns the status of the appcache associated with host_id.
 IPC_SYNC_MESSAGE_CONTROL1_1(AppCacheHostMsg_GetStatus,
diff --git a/content/common/ax_content_node_data.cc b/content/common/ax_content_node_data.cc
index c7053b9..fda3668 100644
--- a/content/common/ax_content_node_data.cc
+++ b/content/common/ax_content_node_data.cc
@@ -61,8 +61,8 @@
   return false;
 }
 
-void AXContentNodeData::AddContentIntAttribute(
-    AXContentIntAttribute attribute, int32 value) {
+void AXContentNodeData::AddContentIntAttribute(AXContentIntAttribute attribute,
+                                               int32_t value) {
   content_int_attributes.push_back(std::make_pair(attribute, value));
 }
 
diff --git a/content/common/ax_content_node_data.h b/content/common/ax_content_node_data.h
index f6148d4..00849cd 100644
--- a/content/common/ax_content_node_data.h
+++ b/content/common/ax_content_node_data.h
@@ -5,6 +5,8 @@
 #ifndef CONTENT_COMMON_AX_CONTENT_NODE_DATA_H_
 #define CONTENT_COMMON_AX_CONTENT_NODE_DATA_H_
 
+#include <stdint.h>
+
 #include "content/common/content_export.h"
 #include "ui/accessibility/ax_node_data.h"
 #include "ui/accessibility/ax_tree_data.h"
@@ -39,7 +41,7 @@
 
   // This is a simple serializable struct. All member variables should be
   // public and copyable.
-  std::vector<std::pair<AXContentIntAttribute, int32> > content_int_attributes;
+  std::vector<std::pair<AXContentIntAttribute, int32_t>> content_int_attributes;
 };
 
 // A subclass of AXTreeData that contains extra fields for
diff --git a/content/common/bluetooth/bluetooth_device.cc b/content/common/bluetooth/bluetooth_device.cc
index ece3ce4d..2812d8a4 100644
--- a/content/common/bluetooth/bluetooth_device.cc
+++ b/content/common/bluetooth/bluetooth_device.cc
@@ -27,11 +27,11 @@
     const base::string16& name,
     int8_t tx_power,
     int8_t rssi,
-    uint32 device_class,
+    uint32_t device_class,
     device::BluetoothDevice::VendorIDSource vendor_id_source,
-    uint16 vendor_id,
-    uint16 product_id,
-    uint16 product_version,
+    uint16_t vendor_id,
+    uint16_t product_id,
+    uint16_t product_version,
     bool paired,
     const std::vector<std::string>& uuids)
     : id(id),
diff --git a/content/common/bluetooth/bluetooth_device.h b/content/common/bluetooth/bluetooth_device.h
index 575f43a..064c4ab 100644
--- a/content/common/bluetooth/bluetooth_device.h
+++ b/content/common/bluetooth/bluetooth_device.h
@@ -5,9 +5,10 @@
 #ifndef CONTENT_COMMON_BLUETOOTH_BLUETOOTH_DEVICE_H_
 #define CONTENT_COMMON_BLUETOOTH_BLUETOOTH_DEVICE_H_
 
+#include <stdint.h>
+
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/strings/string16.h"
 #include "content/common/content_export.h"
 #include "device/bluetooth/bluetooth_device.h"
@@ -22,11 +23,11 @@
                   const base::string16& name,
                   int8_t tx_power,
                   int8_t rssi,
-                  uint32 device_class,
+                  uint32_t device_class,
                   device::BluetoothDevice::VendorIDSource vendor_id_source,
-                  uint16 vendor_id,
-                  uint16 product_id,
-                  uint16 product_version,
+                  uint16_t vendor_id,
+                  uint16_t product_id,
+                  uint16_t product_version,
                   bool paired,
                   const std::vector<std::string>& uuids);
   ~BluetoothDevice();
@@ -45,11 +46,11 @@
   base::string16 name;
   int8_t tx_power;
   int8_t rssi;
-  uint32 device_class;
+  uint32_t device_class;
   device::BluetoothDevice::VendorIDSource vendor_id_source;
-  uint16 vendor_id;
-  uint16 product_id;
-  uint16 product_version;
+  uint16_t vendor_id;
+  uint16_t product_id;
+  uint16_t product_version;
   bool paired;
   std::vector<std::string> uuids;  // 128bit UUIDs with dashes. 36 chars.
 };
diff --git a/content/common/bluetooth/bluetooth_messages.h b/content/common/bluetooth/bluetooth_messages.h
index b7518c1..54dcb67 100644
--- a/content/common/bluetooth/bluetooth_messages.h
+++ b/content/common/bluetooth/bluetooth_messages.h
@@ -79,6 +79,9 @@
 // """
 
 #include "ipc/ipc_message_macros.h"
+
+#include <stdint.h>
+
 #include "content/common/bluetooth/bluetooth_device.h"
 #include "content/common/bluetooth/bluetooth_scan_filter.h"
 #include "third_party/WebKit/public/platform/modules/bluetooth/WebBluetoothError.h"
@@ -155,7 +158,7 @@
                      int /* thread_id */,
                      int /* request_id */,
                      std::string /* characteristic_instance_id */,
-                     uint32 /* characteristic_properties */)
+                     uint32_t /* characteristic_properties */)
 
 // Informs the renderer that the characteristic request |request_id| failed.
 IPC_MESSAGE_CONTROL3(BluetoothMsg_GetCharacteristicError,
diff --git a/content/common/browser_plugin/browser_plugin_messages.h b/content/common/browser_plugin/browser_plugin_messages.h
index 91f5f60..1a264ce 100644
--- a/content/common/browser_plugin/browser_plugin_messages.h
+++ b/content/common/browser_plugin/browser_plugin_messages.h
@@ -6,7 +6,6 @@
 
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/process/process.h"
 #include "cc/surfaces/surface.h"
 #include "content/common/content_export.h"
diff --git a/content/common/cache_storage/cache_storage_types.h b/content/common/cache_storage/cache_storage_types.h
index b52d517..bd29296 100644
--- a/content/common/cache_storage/cache_storage_types.h
+++ b/content/common/cache_storage/cache_storage_types.h
@@ -8,7 +8,6 @@
 #include <map>
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/strings/string16.h"
 #include "content/common/content_export.h"
 #include "content/common/service_worker/service_worker_types.h"
diff --git a/content/common/cc_messages.cc b/content/common/cc_messages.cc
index 992ff8a..e31067d2 100644
--- a/content/common/cc_messages.cc
+++ b/content/common/cc_messages.cc
@@ -4,6 +4,8 @@
 
 #include "content/common/cc_messages.h"
 
+#include <stddef.h>
+
 #include "cc/output/compositor_frame.h"
 #include "cc/output/filter_operations.h"
 #include "cc/quads/draw_quad.h"
diff --git a/content/common/cc_messages_unittest.cc b/content/common/cc_messages_unittest.cc
index 87073960..d7f12cc6 100644
--- a/content/common/cc_messages_unittest.cc
+++ b/content/common/cc_messages_unittest.cc
@@ -4,10 +4,13 @@
 
 #include "content/common/cc_messages.h"
 
+#include <stddef.h>
 #include <string.h>
 
 #include <algorithm>
 
+#include "base/macros.h"
+#include "build/build_config.h"
 #include "cc/output/compositor_frame.h"
 #include "content/public/common/common_param_traits.h"
 #include "ipc/ipc_message.h"
diff --git a/content/common/child_process_host_impl.cc b/content/common/child_process_host_impl.cc
index 4b3c4882..d69d5352 100644
--- a/content/common/child_process_host_impl.cc
+++ b/content/common/child_process_host_impl.cc
@@ -19,6 +19,7 @@
 #include "base/strings/stringprintf.h"
 #include "base/synchronization/lock.h"
 #include "base/third_party/dynamic_annotations/dynamic_annotations.h"
+#include "build/build_config.h"
 #include "content/common/child_process_messages.h"
 #include "content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h"
 #include "content/public/common/child_process_host_delegate.h"
@@ -47,8 +48,8 @@
 
 int ChildProcessHost::kInvalidUniqueID = -1;
 
-uint64 ChildProcessHost::kBrowserTracingProcessId =
-    std::numeric_limits<uint64>::max();
+uint64_t ChildProcessHost::kBrowserTracingProcessId =
+    std::numeric_limits<uint64_t>::max();
 
 // static
 ChildProcessHost* ChildProcessHost::Create(ChildProcessHostDelegate* delegate) {
@@ -196,7 +197,7 @@
   return id;
 }
 
-uint64 ChildProcessHostImpl::ChildProcessUniqueIdToTracingProcessId(
+uint64_t ChildProcessHostImpl::ChildProcessUniqueIdToTracingProcessId(
     int child_process_id) {
   // In single process mode, all the children are hosted in the same process,
   // therefore the generated memory dump guids should not be conditioned by the
@@ -209,7 +210,7 @@
 
   // The hash value is incremented so that the tracing id is never equal to
   // MemoryDumpManager::kInvalidTracingProcessId.
-  return static_cast<uint64>(
+  return static_cast<uint64_t>(
              base::Hash(reinterpret_cast<const char*>(&child_process_id),
                         sizeof(child_process_id))) +
          1;
@@ -264,7 +265,7 @@
   return handled;
 }
 
-void ChildProcessHostImpl::OnChannelConnected(int32 peer_pid) {
+void ChildProcessHostImpl::OnChannelConnected(int32_t peer_pid) {
   if (!peer_process_.IsValid()) {
     peer_process_ = base::Process::OpenWithExtraPrivileges(peer_pid);
     if (!peer_process_.IsValid())
@@ -293,7 +294,7 @@
 }
 
 void ChildProcessHostImpl::OnAllocateSharedMemory(
-    uint32 buffer_size,
+    uint32_t buffer_size,
     base::SharedMemoryHandle* handle) {
   AllocateSharedMemory(buffer_size, peer_process_.Handle(), handle);
 }
@@ -305,8 +306,8 @@
 
 void ChildProcessHostImpl::OnAllocateGpuMemoryBuffer(
     gfx::GpuMemoryBufferId id,
-    uint32 width,
-    uint32 height,
+    uint32_t width,
+    uint32_t height,
     gfx::BufferFormat format,
     gfx::BufferUsage usage,
     gfx::GpuMemoryBufferHandle* handle) {
diff --git a/content/common/child_process_host_impl.h b/content/common/child_process_host_impl.h
index f07e2a88..6fae2f4d 100644
--- a/content/common/child_process_host_impl.h
+++ b/content/common/child_process_host_impl.h
@@ -5,12 +5,15 @@
 #ifndef CONTENT_COMMON_CHILD_PROCESS_HOST_IMPL_H_
 #define CONTENT_COMMON_CHILD_PROCESS_HOST_IMPL_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
 #include "build/build_config.h"
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/shared_memory.h"
 #include "base/memory/singleton.h"
@@ -71,7 +74,7 @@
   // Never returns MemoryDumpManager::kInvalidTracingProcessId.
   // Returns only ChildProcessHost::kBrowserTracingProcessId in single-process
   // mode.
-  static uint64 ChildProcessUniqueIdToTracingProcessId(int child_process_id);
+  static uint64_t ChildProcessUniqueIdToTracingProcessId(int child_process_id);
 
   // ChildProcessHost implementation
   bool Send(IPC::Message* message) override;
@@ -90,17 +93,17 @@
 
   // IPC::Listener methods:
   bool OnMessageReceived(const IPC::Message& msg) override;
-  void OnChannelConnected(int32 peer_pid) override;
+  void OnChannelConnected(int32_t peer_pid) override;
   void OnChannelError() override;
   void OnBadMessageReceived(const IPC::Message& message) override;
 
   // Message handlers:
   void OnShutdownRequest();
-  void OnAllocateSharedMemory(uint32 buffer_size,
+  void OnAllocateSharedMemory(uint32_t buffer_size,
                               base::SharedMemoryHandle* handle);
   void OnAllocateGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
-                                 uint32 width,
-                                 uint32 height,
+                                 uint32_t width,
+                                 uint32_t height,
                                  gfx::BufferFormat format,
                                  gfx::BufferUsage usage,
                                  gfx::GpuMemoryBufferHandle* handle);
diff --git a/content/common/child_process_messages.h b/content/common/child_process_messages.h
index bbca77c..7516ec8 100644
--- a/content/common/child_process_messages.h
+++ b/content/common/child_process_messages.h
@@ -5,12 +5,15 @@
 // Common IPC messages used for child processes.
 // Multiply-included message file, hence no include guard.
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
 #include "base/memory/shared_memory.h"
 #include "base/tracked_objects.h"
 #include "base/values.h"
+#include "build/build_config.h"
 #include "cc/resources/shared_bitmap_manager.h"
 #include "content/common/content_export.h"
 #include "content/common/host_discardable_shared_memory_manager.h"
@@ -174,19 +177,19 @@
 // Asks the browser to create a block of shared memory for the child process to
 // fill in and pass back to the browser.
 IPC_SYNC_MESSAGE_CONTROL1_1(ChildProcessHostMsg_SyncAllocateSharedMemory,
-                            uint32 /* buffer size */,
+                            uint32_t /* buffer size */,
                             base::SharedMemoryHandle)
 
 // Asks the browser to create a block of shared memory for the child process to
 // fill in and pass back to the browser.
 IPC_SYNC_MESSAGE_CONTROL2_1(ChildProcessHostMsg_SyncAllocateSharedBitmap,
-                            uint32 /* buffer size */,
+                            uint32_t /* buffer size */,
                             cc::SharedBitmapId,
                             base::SharedMemoryHandle)
 
 // Informs the browser that the child allocated a shared bitmap.
 IPC_MESSAGE_CONTROL3(ChildProcessHostMsg_AllocatedSharedBitmap,
-                     uint32 /* buffer size */,
+                     uint32_t /* buffer size */,
                      base::SharedMemoryHandle,
                      cc::SharedBitmapId)
 
@@ -197,8 +200,8 @@
 // Asks the browser to create a gpu memory buffer.
 IPC_SYNC_MESSAGE_CONTROL5_1(ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer,
                             gfx::GpuMemoryBufferId /* new_id */,
-                            uint32 /* width */,
-                            uint32 /* height */,
+                            uint32_t /* width */,
+                            uint32_t /* height */,
                             gfx::BufferFormat,
                             gfx::BufferUsage,
                             gfx::GpuMemoryBufferHandle)
@@ -212,7 +215,7 @@
 // child process.
 IPC_SYNC_MESSAGE_CONTROL2_1(
     ChildProcessHostMsg_SyncAllocateLockedDiscardableSharedMemory,
-    uint32 /* size */,
+    uint32_t /* size */,
     content::DiscardableSharedMemoryId,
     base::SharedMemoryHandle)
 
diff --git a/content/common/child_process_sandbox_support_impl_linux.cc b/content/common/child_process_sandbox_support_impl_linux.cc
index cecd833..b7b683e 100644
--- a/content/common/child_process_sandbox_support_impl_linux.cc
+++ b/content/common/child_process_sandbox_support_impl_linux.cc
@@ -4,11 +4,11 @@
 
 #include "content/common/child_process_sandbox_support_impl_linux.h"
 
+#include <stddef.h>
 #include <sys/stat.h>
 
 #include <limits>
 
-#include "base/basictypes.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/numerics/safe_conversions.h"
 #include "base/pickle.h"
@@ -74,7 +74,7 @@
   const bool bold = size_and_style & 1;
   const bool italic = size_and_style & 2;
   const int pixel_size = size_and_style >> 2;
-  if (pixel_size > std::numeric_limits<uint16>::max())
+  if (pixel_size > std::numeric_limits<uint16_t>::max())
     return;
 
   base::Pickle request;
diff --git a/content/common/child_process_sandbox_support_impl_linux.h b/content/common/child_process_sandbox_support_impl_linux.h
index 50f3c3d3..97221f6e 100644
--- a/content/common/child_process_sandbox_support_impl_linux.h
+++ b/content/common/child_process_sandbox_support_impl_linux.h
@@ -5,6 +5,8 @@
 #ifndef CONTENT_COMMON_CHILD_PROCESS_SANDBOX_SUPPORT_IMPL_LINUX_H_
 #define CONTENT_COMMON_CHILD_PROCESS_SANDBOX_SUPPORT_IMPL_LINUX_H_
 
+#include <stdint.h>
+
 #include "base/posix/global_descriptors.h"
 #include "content/public/common/child_process_sandbox_support_linux.h"
 #include "content/public/common/content_descriptors.h"
diff --git a/content/common/child_process_sandbox_support_impl_shm_linux.cc b/content/common/child_process_sandbox_support_impl_shm_linux.cc
index 1553826a..eb4f67da 100644
--- a/content/common/child_process_sandbox_support_impl_shm_linux.cc
+++ b/content/common/child_process_sandbox_support_impl_shm_linux.cc
@@ -4,6 +4,9 @@
 
 #include "content/common/child_process_sandbox_support_impl_linux.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/pickle.h"
 #include "base/posix/unix_domain_socket_linux.h"
 #include "content/common/sandbox_linux/sandbox_linux.h"
diff --git a/content/common/clipboard_messages.h b/content/common/clipboard_messages.h
index 5c797f0a..00a198c1 100644
--- a/content/common/clipboard_messages.h
+++ b/content/common/clipboard_messages.h
@@ -4,12 +4,15 @@
 
 // Multiply-included message file, so no include guard.
 
+#include <stdint.h>
+
 #include <map>
 #include <string>
 #include <vector>
 
 #include "base/memory/shared_memory.h"
 #include "base/strings/string16.h"
+#include "build/build_config.h"
 #include "content/common/clipboard_format.h"
 #include "content/public/common/common_param_traits.h"
 #include "ipc/ipc_message_macros.h"
@@ -39,7 +42,7 @@
 
 IPC_SYNC_MESSAGE_CONTROL1_1(ClipboardHostMsg_GetSequenceNumber,
                             ui::ClipboardType /* type */,
-                            uint64 /* result */)
+                            uint64_t /* result */)
 IPC_SYNC_MESSAGE_CONTROL2_1(ClipboardHostMsg_IsFormatAvailable,
                             content::ClipboardFormat /* format */,
                             ui::ClipboardType /* type */,
@@ -57,15 +60,15 @@
                             ui::ClipboardType /* type */,
                             base::string16 /* markup */,
                             GURL /* url */,
-                            uint32 /* fragment start */,
-                            uint32 /* fragment end */)
+                            uint32_t /* fragment start */,
+                            uint32_t /* fragment end */)
 IPC_SYNC_MESSAGE_CONTROL1_1(ClipboardHostMsg_ReadRTF,
                             ui::ClipboardType /* type */,
                             std::string /* result */)
 IPC_SYNC_MESSAGE_CONTROL1_2(ClipboardHostMsg_ReadImage,
                             ui::ClipboardType /* type */,
                             base::SharedMemoryHandle /* PNG-encoded image */,
-                            uint32 /* image size */)
+                            uint32_t /* image size */)
 IPC_SYNC_MESSAGE_CONTROL2_1(ClipboardHostMsg_ReadCustomData,
                             ui::ClipboardType /* type */,
                             base::string16 /* type */,
diff --git a/content/common/common_param_traits_unittest.cc b/content/common/common_param_traits_unittest.cc
index 31491df..03c19a0 100644
--- a/content/common/common_param_traits_unittest.cc
+++ b/content/common/common_param_traits_unittest.cc
@@ -2,9 +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 <string.h>
 #include <utility>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/values.h"
 #include "content/public/common/common_param_traits.h"
diff --git a/content/common/content_constants_internal.cc b/content/common/content_constants_internal.cc
index 3b0608e9..7b8b68a 100644
--- a/content/common/content_constants_internal.cc
+++ b/content/common/content_constants_internal.cc
@@ -4,21 +4,23 @@
 
 #include "content/common/content_constants_internal.h"
 
+#include "build/build_config.h"
+
 namespace content {
 
 #if defined(OS_ANDROID)
-const int64 kHungRendererDelayMs = 5000;
+const int64_t kHungRendererDelayMs = 5000;
 #else
 // TODO(jdduke): Consider shortening this delay on desktop. It was originally
 // set to 5 seconds but was extended to accomodate less responsive plugins.
-const int64 kHungRendererDelayMs = 30000;
+const int64_t kHungRendererDelayMs = 30000;
 #endif
 
-const int64 kNewContentRenderingDelayMs = 4000;
+const int64_t kNewContentRenderingDelayMs = 4000;
 
-const uint16 kMaxPluginSideLength = 1 << 15;
+const uint16_t kMaxPluginSideLength = 1 << 15;
 // 8m pixels.
-const uint32 kMaxPluginSize = 8 << 20;
+const uint32_t kMaxPluginSize = 8 << 20;
 
 // 20MiB
 const size_t kMaxLengthOfDataURLString = 1024 * 1024 * 20;
diff --git a/content/common/content_constants_internal.h b/content/common/content_constants_internal.h
index 9422b32..46f351b 100644
--- a/content/common/content_constants_internal.h
+++ b/content/common/content_constants_internal.h
@@ -5,23 +5,25 @@
 #ifndef CONTENT_COMMON_CONTENT_CONSTANTS_INTERNAL_H_
 #define CONTENT_COMMON_CONTENT_CONSTANTS_INTERNAL_H_
 
-#include "base/basictypes.h"
+#include <stddef.h>
+#include <stdint.h>
+
 #include "content/common/content_export.h"
 
 namespace content {
 
 // How long to wait before we consider a renderer hung.
-CONTENT_EXPORT extern const int64 kHungRendererDelayMs;
+CONTENT_EXPORT extern const int64_t kHungRendererDelayMs;
 
 // How long to wait for newly loaded content to send a compositor frame
 // before clearing previously displayed graphics.
-extern const int64 kNewContentRenderingDelayMs;
+extern const int64_t kNewContentRenderingDelayMs;
 
 // The maximum plugin width and height.
-extern const uint16 kMaxPluginSideLength;
+extern const uint16_t kMaxPluginSideLength;
 // The maximum plugin size, defined as the number of pixels occupied by the
 // plugin.
-extern const uint32 kMaxPluginSize;
+extern const uint32_t kMaxPluginSize;
 
 // The maximum length of string as data url.
 extern const size_t kMaxLengthOfDataURLString;
diff --git a/content/common/content_ipc_logging.cc b/content/common/content_ipc_logging.cc
index 682c422..2012f07 100644
--- a/content/common/content_ipc_logging.cc
+++ b/content/common/content_ipc_logging.cc
@@ -4,6 +4,8 @@
 
 #include "ipc/ipc_message.h"  // For IPC_MESSAGE_LOG_ENABLED.
 
+#include <stdint.h>
+
 #if defined(IPC_MESSAGE_LOG_ENABLED)
 #define IPC_MESSAGE_MACROS_LOG_ENABLED
 #include "content/public/common/content_ipc_logging.h"
@@ -21,12 +23,12 @@
 
 namespace {
 
-base::LazyInstance<base::hash_map<uint32, LogFunction> >::Leaky
+base::LazyInstance<base::hash_map<uint32_t, LogFunction>>::Leaky
     g_log_function_mapping = LAZY_INSTANCE_INITIALIZER;
 
 }  // namespace
 
-void RegisterIPCLogger(uint32 msg_id, LogFunction logger) {
+void RegisterIPCLogger(uint32_t msg_id, LogFunction logger) {
   if (g_log_function_mapping == NULL)
     IPC::Logging::set_log_function_map(g_log_function_mapping.Pointer());
   g_log_function_mapping.Get()[msg_id] = logger;
diff --git a/content/common/content_message_generator.h b/content/common/content_message_generator.h
index 9210587..3d49ab2 100644
--- a/content/common/content_message_generator.h
+++ b/content/common/content_message_generator.h
@@ -6,6 +6,7 @@
 
 #include "content/common/child_process_messages.h"
 
+#include "build/build_config.h"
 #include "content/common/accessibility_messages.h"
 #include "content/common/appcache_messages.h"
 #include "content/common/bluetooth/bluetooth_messages.h"
diff --git a/content/common/content_param_traits.cc b/content/common/content_param_traits.cc
index 2924d61..0c60380e 100644
--- a/content/common/content_param_traits.cc
+++ b/content/common/content_param_traits.cc
@@ -4,6 +4,8 @@
 
 #include "content/common/content_param_traits.h"
 
+#include <stddef.h>
+
 #include "base/strings/string_number_conversions.h"
 #include "content/common/input/web_input_event_traits.h"
 #include "net/base/ip_endpoint.h"
diff --git a/content/common/content_paths.cc b/content/common/content_paths.cc
index 0c7050113..0268287 100644
--- a/content/common/content_paths.cc
+++ b/content/common/content_paths.cc
@@ -7,6 +7,7 @@
 #include "base/files/file_util.h"
 #include "base/mac/bundle_locations.h"
 #include "base/path_service.h"
+#include "build/build_config.h"
 
 namespace content {
 
diff --git a/content/common/content_switches_internal.cc b/content/common/content_switches_internal.cc
index 933d0144..d18540f 100644
--- a/content/common/content_switches_internal.cc
+++ b/content/common/content_switches_internal.cc
@@ -8,6 +8,7 @@
 
 #include "base/command_line.h"
 #include "base/metrics/field_trial.h"
+#include "build/build_config.h"
 #include "content/public/common/content_switches.h"
 
 #if defined(OS_WIN)
diff --git a/content/common/content_switches_internal.h b/content/common/content_switches_internal.h
index 692e1a7..3724a99 100644
--- a/content/common/content_switches_internal.h
+++ b/content/common/content_switches_internal.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_COMMON_CONTENT_SWITCHES_INTERNAL_H_
 #define CONTENT_COMMON_CONTENT_SWITCHES_INTERNAL_H_
 
+#include "build/build_config.h"
 #include "content/public/common/web_preferences.h"
 
 namespace content {
diff --git a/content/common/cross_site_document_classifier.cc b/content/common/cross_site_document_classifier.cc
index 4231610..85778cb 100644
--- a/content/common/cross_site_document_classifier.cc
+++ b/content/common/cross_site_document_classifier.cc
@@ -4,10 +4,10 @@
 
 #include "content/common/cross_site_document_classifier.h"
 
-#include "base/basictypes.h"
 #include "base/command_line.h"
 #include "base/lazy_instance.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/metrics/histogram.h"
 #include "base/strings/string_util.h"
 #include "content/public/common/content_switches.h"
@@ -137,6 +137,8 @@
   // signatures. This can weaken our document block policy, but we can
   // break less websites.
   // TODO(dsjang): parameterize |net::SniffForHTML| with an option
+#include <stddef.h>
+
   // that decides whether to include <!-- or not, so that we can
   // remove this function.
   // TODO(dsjang): Once CrossSiteDocumentClassifier is moved into the browser
diff --git a/content/common/cross_site_document_classifier.h b/content/common/cross_site_document_classifier.h
index 5f204635..e32ee52 100644
--- a/content/common/cross_site_document_classifier.h
+++ b/content/common/cross_site_document_classifier.h
@@ -5,7 +5,7 @@
 #ifndef CONTENT_COMMON_CROSS_SITE_DOCUMENT_CLASSIFIER_H_
 #define CONTENT_COMMON_CROSS_SITE_DOCUMENT_CLASSIFIER_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/strings/string_piece.h"
 #include "content/common/content_export.h"
 #include "url/gurl.h"
diff --git a/content/common/cursors/webcursor.cc b/content/common/cursors/webcursor.cc
index 57c0e39..51db2eac 100644
--- a/content/common/cursors/webcursor.cc
+++ b/content/common/cursors/webcursor.cc
@@ -6,6 +6,7 @@
 
 #include "base/logging.h"
 #include "base/pickle.h"
+#include "build/build_config.h"
 #include "third_party/WebKit/public/platform/WebImage.h"
 
 using blink::WebCursorInfo;
diff --git a/content/common/cursors/webcursor.h b/content/common/cursors/webcursor.h
index b0e36cb..3eca6b88 100644
--- a/content/common/cursors/webcursor.h
+++ b/content/common/cursors/webcursor.h
@@ -7,7 +7,7 @@
 
 #include <vector>
 
-#include "base/basictypes.h"
+#include "build/build_config.h"
 #include "content/common/content_export.h"
 #include "third_party/WebKit/public/platform/WebCursorInfo.h"
 #include "ui/gfx/display.h"
diff --git a/content/common/cursors/webcursor_mac.mm b/content/common/cursors/webcursor_mac.mm
index 38870edf..0205cbf 100644
--- a/content/common/cursors/webcursor_mac.mm
+++ b/content/common/cursors/webcursor_mac.mm
@@ -5,6 +5,7 @@
 #include "content/common/cursors/webcursor.h"
 
 #import <AppKit/AppKit.h>
+#include <stddef.h>
 
 #include "base/logging.h"
 #include "base/mac/mac_util.h"
diff --git a/content/common/cursors/webcursor_unittest.cc b/content/common/cursors/webcursor_unittest.cc
index 3a56f8b..fb0fbca 100644
--- a/content/common/cursors/webcursor_unittest.cc
+++ b/content/common/cursors/webcursor_unittest.cc
@@ -2,15 +2,18 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#if defined(OS_WIN)
-#include <windows.h>
-#endif
+#include <stddef.h>
 
 #include "base/pickle.h"
+#include "build/build_config.h"
 #include "content/common/cursors/webcursor.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/WebKit/public/platform/WebCursorInfo.h"
 
+#if defined(OS_WIN)
+#include <windows.h>
+#endif
+
 using blink::WebCursorInfo;
 
 namespace content {
diff --git a/content/common/database_connections_unittest.cc b/content/common/database_connections_unittest.cc
index a329553d..f50f8756 100644
--- a/content/common/database_connections_unittest.cc
+++ b/content/common/database_connections_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/bind.h"
 #include "base/message_loop/message_loop.h"
 #include "base/strings/utf_string_conversions.h"
@@ -32,7 +34,7 @@
   const std::string kOriginId("origin_id");
   const base::string16 kName(ASCIIToUTF16("database_name"));
   const base::string16 kName2(ASCIIToUTF16("database_name2"));
-  const int64 kSize = 1000;
+  const int64_t kSize = 1000;
 
   DatabaseConnections connections;
 
diff --git a/content/common/database_identifier_unittest.cc b/content/common/database_identifier_unittest.cc
index c2cc9fe..f866b76 100644
--- a/content/common/database_identifier_unittest.cc
+++ b/content/common/database_identifier_unittest.cc
@@ -4,7 +4,9 @@
 
 #include "storage/common/database/database_identifier.h"
 
-#include "base/basictypes.h"
+#include <stddef.h>
+
+#include "base/macros.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "url/gurl.h"
 
diff --git a/content/common/database_messages.h b/content/common/database_messages.h
index 713db98..0e5c1f9 100644
--- a/content/common/database_messages.h
+++ b/content/common/database_messages.h
@@ -4,6 +4,8 @@
 
 // Multiply-included message file, no include guard.
 
+#include <stdint.h>
+
 #include "ipc/ipc_message_macros.h"
 #include "ipc/ipc_param_traits.h"
 #include "ipc/ipc_platform_file.h"
@@ -16,12 +18,12 @@
 IPC_MESSAGE_CONTROL3(DatabaseMsg_UpdateSize,
                      std::string /* the origin */,
                      base::string16 /* the database name */,
-                     int64 /* the new database size */)
+                     int64_t /* the new database size */)
 
 // Notifies the child process of the new space available
 IPC_MESSAGE_CONTROL2(DatabaseMsg_UpdateSpaceAvailable,
                      std::string /* the origin */,
-                     int64 /* space available to origin */)
+                     int64_t /* space available to origin */)
 
 // Notifies the child process to reset it's cached value for the origin.
 IPC_MESSAGE_CONTROL1(DatabaseMsg_ResetSpaceAvailable,
@@ -49,22 +51,22 @@
 // Asks the browser process to return the attributes of a DB file
 IPC_SYNC_MESSAGE_CONTROL1_1(DatabaseHostMsg_GetFileAttributes,
                             base::string16 /* vfs file name */,
-                            int32 /* the attributes for the given DB file */)
+                            int32_t /* the attributes for the given DB file */)
 
 // Asks the browser process to return the size of a DB file
 IPC_SYNC_MESSAGE_CONTROL1_1(DatabaseHostMsg_GetFileSize,
                             base::string16 /* vfs file name */,
-                            int64 /* the size of the given DB file */)
+                            int64_t /* the size of the given DB file */)
 
 // Asks the browser process for the amount of space available to an origin
 IPC_SYNC_MESSAGE_CONTROL1_1(DatabaseHostMsg_GetSpaceAvailable,
                             std::string /* origin identifier */,
-                            int64 /* remaining space available */)
+                            int64_t /* remaining space available */)
 
 // Asks the browser set the size of a DB file
 IPC_SYNC_MESSAGE_CONTROL2_1(DatabaseHostMsg_SetFileSize,
                             base::string16 /* vfs file name */,
-                            int64 /* expected size of the given DB file */,
+                            int64_t /* expected size of the given DB file */,
                             bool /* indicates success */)
 
 // Notifies the browser process that a new database has been opened
@@ -72,7 +74,7 @@
                      std::string /* origin identifier */,
                      base::string16 /* database name */,
                      base::string16 /* database description */,
-                     int64 /* estimated size */)
+                     int64_t /* estimated size */)
 
 // Notifies the browser process that a database might have been modified
 IPC_MESSAGE_CONTROL2(DatabaseHostMsg_Modified,
diff --git a/content/common/discardable_shared_memory_heap.cc b/content/common/discardable_shared_memory_heap.cc
index fc5ed20..9b62df3 100644
--- a/content/common/discardable_shared_memory_heap.cc
+++ b/content/common/discardable_shared_memory_heap.cc
@@ -7,6 +7,7 @@
 #include <algorithm>
 
 #include "base/format_macros.h"
+#include "base/macros.h"
 #include "base/memory/discardable_shared_memory.h"
 #include "base/strings/stringprintf.h"
 #include "base/trace_event/memory_dump_manager.h"
@@ -417,7 +418,7 @@
   // to avoid double-counting segments when both browser and child process emit
   // them. In the special case of single-process-mode, this will be the only
   // dumper active and the single ownership edge will become a no-op in the UI.
-  const uint64 tracing_process_id =
+  const uint64_t tracing_process_id =
       base::trace_event::MemoryDumpManager::GetInstance()
           ->GetTracingProcessId();
   base::trace_event::MemoryAllocatorDumpGuid shared_segment_guid =
@@ -439,8 +440,9 @@
 
 // static
 base::trace_event::MemoryAllocatorDumpGuid
-DiscardableSharedMemoryHeap::GetSegmentGUIDForTracing(uint64 tracing_process_id,
-                                                      int32 segment_id) {
+DiscardableSharedMemoryHeap::GetSegmentGUIDForTracing(
+    uint64_t tracing_process_id,
+    int32_t segment_id) {
   return base::trace_event::MemoryAllocatorDumpGuid(base::StringPrintf(
       "discardable-x-process/%" PRIx64 "/%d", tracing_process_id, segment_id));
 }
diff --git a/content/common/discardable_shared_memory_heap.h b/content/common/discardable_shared_memory_heap.h
index ce8787a..010e0187 100644
--- a/content/common/discardable_shared_memory_heap.h
+++ b/content/common/discardable_shared_memory_heap.h
@@ -5,9 +5,13 @@
 #ifndef CONTENT_COMMON_DISCARDABLE_SHARED_MEMORY_HEAP_H_
 #define CONTENT_COMMON_DISCARDABLE_SHARED_MEMORY_HEAP_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/callback.h"
 #include "base/containers/hash_tables.h"
 #include "base/containers/linked_list.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
 #include "base/trace_event/process_memory_dump.h"
@@ -93,8 +97,8 @@
   // Returns a unique identifier for a given tuple of (process id, segment id)
   // that can be used to match memory dumps across different processes.
   static base::trace_event::MemoryAllocatorDumpGuid GetSegmentGUIDForTracing(
-      uint64 tracing_process_id,
-      int32 segment_id);
+      uint64_t tracing_process_id,
+      int32_t segment_id);
 
   // Returns a MemoryAllocatorDump for a given span on |pmd| with the size of
   // the span.
diff --git a/content/common/discardable_shared_memory_heap_perftest.cc b/content/common/discardable_shared_memory_heap_perftest.cc
index dda5c63..e81aa84a 100644
--- a/content/common/discardable_shared_memory_heap_perftest.cc
+++ b/content/common/discardable_shared_memory_heap_perftest.cc
@@ -4,6 +4,8 @@
 
 #include "content/common/discardable_shared_memory_heap.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 #include <cmath>
 #include <cstdlib>
diff --git a/content/common/discardable_shared_memory_heap_unittest.cc b/content/common/discardable_shared_memory_heap_unittest.cc
index 20594ecf..318f528c 100644
--- a/content/common/discardable_shared_memory_heap_unittest.cc
+++ b/content/common/discardable_shared_memory_heap_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "content/common/discardable_shared_memory_heap.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/memory/discardable_shared_memory.h"
 #include "base/process/process_metrics.h"
diff --git a/content/common/dom_storage/dom_storage_map.h b/content/common/dom_storage/dom_storage_map.h
index 7130d27..00283339 100644
--- a/content/common/dom_storage/dom_storage_map.h
+++ b/content/common/dom_storage/dom_storage_map.h
@@ -5,6 +5,8 @@
 #ifndef CONTENT_COMMON_DOM_STORAGE_DOM_STORAGE_MAP_H_
 #define CONTENT_COMMON_DOM_STORAGE_DOM_STORAGE_MAP_H_
 
+#include <stddef.h>
+
 #include <map>
 
 #include "base/memory/ref_counted.h"
diff --git a/content/common/dom_storage/dom_storage_map_unittest.cc b/content/common/dom_storage/dom_storage_map_unittest.cc
index 31283fd..480f9f3 100644
--- a/content/common/dom_storage/dom_storage_map_unittest.cc
+++ b/content/common/dom_storage/dom_storage_map_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/strings/utf_string_conversions.h"
 #include "content/common/dom_storage/dom_storage_map.h"
 #include "testing/gtest/include/gtest/gtest.h"
diff --git a/content/common/dom_storage/dom_storage_messages.h b/content/common/dom_storage/dom_storage_messages.h
index 95ccf22..7fd4426 100644
--- a/content/common/dom_storage/dom_storage_messages.h
+++ b/content/common/dom_storage/dom_storage_messages.h
@@ -3,6 +3,9 @@
 // found in the LICENSE file.
 
 // Multiply-included message file, no traditional include guard.
+
+#include <stdint.h>
+
 #include "content/common/dom_storage/dom_storage_types.h"
 #include "content/public/common/common_param_traits.h"
 #include "ipc/ipc_message_macros.h"
@@ -38,7 +41,7 @@
 
   // The non-zero session namespace_id associated with the event or 0 if
   // this is a local storage event.
-  IPC_STRUCT_MEMBER(int64, namespace_id)
+  IPC_STRUCT_MEMBER(int64_t, namespace_id)
 IPC_STRUCT_END()
 
 // DOM Storage messages sent from the browser to the renderer.
@@ -59,7 +62,7 @@
 // Open the storage area for a particular origin within a namespace.
 IPC_MESSAGE_CONTROL3(DOMStorageHostMsg_OpenStorageArea,
                      int /* connection_id */,
-                     int64 /* namespace_id */,
+                     int64_t /* namespace_id */,
                      GURL /* origin */)
 
 // Close a previously opened storage area.
diff --git a/content/common/dom_storage/dom_storage_types.h b/content/common/dom_storage/dom_storage_types.h
index 1b25b41..4650f9bf 100644
--- a/content/common/dom_storage/dom_storage_types.h
+++ b/content/common/dom_storage/dom_storage_types.h
@@ -5,9 +5,11 @@
 #ifndef CONTENT_COMMON_DOM_STORAGE_DOM_STORAGE_TYPES_H_
 #define CONTENT_COMMON_DOM_STORAGE_DOM_STORAGE_TYPES_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <map>
 
-#include "base/basictypes.h"
 #include "base/strings/nullable_string16.h"
 #include "base/strings/string16.h"
 #include "base/time/time.h"
@@ -29,12 +31,12 @@
 
 // Value to indicate the localstorage namespace vs non-zero
 // values for sessionstorage namespaces.
-const int64 kLocalStorageNamespaceId = 0;
+const int64_t kLocalStorageNamespaceId = 0;
 
-const int64 kInvalidSessionStorageNamespaceId = kLocalStorageNamespaceId;
+const int64_t kInvalidSessionStorageNamespaceId = kLocalStorageNamespaceId;
 
 // Start purging memory if the number of in-memory areas exceeds this.
-const int64 kMaxInMemoryStorageAreas = 100;
+const int64_t kMaxInMemoryStorageAreas = 100;
 
 }  // namespace content
 
diff --git a/content/common/dwrite_font_platform_win.cc b/content/common/dwrite_font_platform_win.cc
index 224509bf3..25755f58 100644
--- a/content/common/dwrite_font_platform_win.cc
+++ b/content/common/dwrite_font_platform_win.cc
@@ -5,15 +5,18 @@
 #include "content/public/common/dwrite_font_platform_win.h"
 
 #include <windows.h>
+#include <stddef.h>
+#include <stdint.h>
 
 #include <dwrite.h>
+#include <wrl/implements.h>
+#include <wrl/wrappers/corewrappers.h>
+
 #include <limits>
 #include <map>
 #include <string>
 #include <utility>
 #include <vector>
-#include <wrl/implements.h>
-#include <wrl/wrappers/corewrappers.h>
 
 #include "base/command_line.h"
 #include "base/debug/alias.h"
@@ -22,6 +25,7 @@
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
 #include "base/files/memory_mapped_file.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/shared_memory.h"
 #include "base/metrics/field_trial.h"
@@ -378,7 +382,7 @@
 
     // We will skip writing entries beyond allowed limit. Following condition
     // doesn't enforce hard file size. We need to write complete font entry.
-    int64 length = static_cache_->GetLength();
+    int64_t length = static_cache_->GetLength();
     if (length == -1 || length >= kArbitraryCacheFileSizeLimit) {
       count_font_entries_ignored_++;
       return false;
@@ -1133,7 +1137,7 @@
   }
 
   base::TimeDelta time_delta = base::TimeTicks::Now() - start_tick;
-  int64 delta = time_delta.ToInternalValue();
+  int64_t delta = time_delta.ToInternalValue();
   base::debug::Alias(&delta);
   UINT32 size = g_font_loader->GetFontMapSize();
   base::debug::Alias(&size);
@@ -1207,7 +1211,7 @@
   g_font_loader->LeaveStaticCacheMode();
 
   base::TimeDelta time_delta = base::TimeTicks::Now() - start_tick;
-  int64 delta = time_delta.ToInternalValue();
+  int64_t delta = time_delta.ToInternalValue();
   base::debug::Alias(&delta);
   UINT32 size = g_font_loader->GetFontMapSize();
   base::debug::Alias(&size);
diff --git a/content/common/dwrite_font_proxy_messages.h b/content/common/dwrite_font_proxy_messages.h
index 727fd20..cc8aced1 100644
--- a/content/common/dwrite_font_proxy_messages.h
+++ b/content/common/dwrite_font_proxy_messages.h
@@ -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 <utility>
 #include <vector>
 
diff --git a/content/common/fileapi/file_system_messages.h b/content/common/fileapi/file_system_messages.h
index 5b620b88..99bfd2a 100644
--- a/content/common/fileapi/file_system_messages.h
+++ b/content/common/fileapi/file_system_messages.h
@@ -5,6 +5,8 @@
 // IPC messages for the file system.
 // Multiply-included message file, hence no include guard.
 
+#include <stdint.h>
+
 #include "ipc/ipc_message_macros.h"
 #include "ipc/ipc_platform_file.h"
 #include "storage/common/fileapi/directory_entry.h"
@@ -60,7 +62,7 @@
                      bool /* has_more */)
 IPC_MESSAGE_CONTROL3(FileSystemMsg_DidWrite,
                      int /* request_id */,
-                     int64 /* byte count */,
+                     int64_t /* byte count */,
                      bool /* complete */)
 IPC_MESSAGE_CONTROL2(FileSystemMsg_DidFail,
                      int /* request_id */,
@@ -132,13 +134,13 @@
                      int /* request id */,
                      GURL /* file path */,
                      std::string /* blob uuid */,
-                     int64 /* position */)
+                     int64_t /* position */)
 
 // WebFileWriter::truncate() message.
 IPC_MESSAGE_CONTROL3(FileSystemHostMsg_Truncate,
                      int /* request id */,
                      GURL /* file path */,
-                     int64 /* length */)
+                     int64_t /* length */)
 
 // Pepper's Touch() message.
 IPC_MESSAGE_CONTROL4(FileSystemHostMsg_TouchFile,
diff --git a/content/common/fileapi/file_system_util_unittest.cc b/content/common/fileapi/file_system_util_unittest.cc
index 9dc47dd..4a617d5 100644
--- a/content/common/fileapi/file_system_util_unittest.cc
+++ b/content/common/fileapi/file_system_util_unittest.cc
@@ -4,7 +4,10 @@
 
 #include "storage/common/fileapi/file_system_util.h"
 
+#include <stddef.h>
+
 #include "base/files/file_path.h"
+#include "base/macros.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "url/gurl.h"
 
diff --git a/content/common/fileapi/webblob_messages.h b/content/common/fileapi/webblob_messages.h
index 7527b18..a836fd4 100644
--- a/content/common/fileapi/webblob_messages.h
+++ b/content/common/fileapi/webblob_messages.h
@@ -5,6 +5,8 @@
 // IPC messages for HTML5 Blob and Stream.
 // Multiply-included message file, hence no include guard.
 
+#include <stddef.h>
+
 #include "content/common/content_export.h"
 #include "content/public/common/common_param_traits.h"
 #include "ipc/ipc_message_macros.h"
diff --git a/content/common/font_cache_dispatcher_win.cc b/content/common/font_cache_dispatcher_win.cc
index 49ff631..d0d053e 100644
--- a/content/common/font_cache_dispatcher_win.cc
+++ b/content/common/font_cache_dispatcher_win.cc
@@ -8,6 +8,7 @@
 #include <vector>
 
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/profiler/scoped_tracker.h"
 #include "base/strings/string16.h"
 #include "content/common/child_process_messages.h"
diff --git a/content/common/font_cache_dispatcher_win.h b/content/common/font_cache_dispatcher_win.h
index 3c0faf8..dbdcb4f 100644
--- a/content/common/font_cache_dispatcher_win.h
+++ b/content/common/font_cache_dispatcher_win.h
@@ -7,7 +7,7 @@
 
 #include <windows.h>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/singleton.h"
 #include "ipc/ipc_sender.h"
 #include "ipc/message_filter.h"
diff --git a/content/common/font_config_ipc_linux.cc b/content/common/font_config_ipc_linux.cc
index cceb578..d1dd8ca1 100644
--- a/content/common/font_config_ipc_linux.cc
+++ b/content/common/font_config_ipc_linux.cc
@@ -6,6 +6,7 @@
 
 #include <errno.h>
 #include <fcntl.h>
+#include <stdint.h>
 #include <sys/mman.h>
 #include <sys/socket.h>
 #include <sys/stat.h>
diff --git a/content/common/font_config_ipc_linux.h b/content/common/font_config_ipc_linux.h
index f3bd6364..472c2f1 100644
--- a/content/common/font_config_ipc_linux.h
+++ b/content/common/font_config_ipc_linux.h
@@ -7,12 +7,15 @@
 
 #include "base/compiler_specific.h"
 #include "base/containers/mru_cache.h"
+#include "base/macros.h"
 #include "base/synchronization/lock.h"
 #include "skia/ext/refptr.h"
 #include "third_party/skia/include/core/SkStream.h"
 #include "third_party/skia/include/core/SkTypeface.h"
 #include "third_party/skia/include/ports/SkFontConfigInterface.h"
 
+#include <stddef.h>
+
 #include <string>
 
 class SkString;
diff --git a/content/common/font_warmup_win.cc b/content/common/font_warmup_win.cc
index ddc1889..f9825fef 100644
--- a/content/common/font_warmup_win.cc
+++ b/content/common/font_warmup_win.cc
@@ -5,12 +5,14 @@
 #include "content/common/font_warmup_win.h"
 
 #include <dwrite.h>
+#include <stdint.h>
 #include <map>
 
 #include "base/debug/alias.h"
 #include "base/files/file_path.h"
 #include "base/lazy_instance.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/numerics/safe_conversions.h"
 #include "base/numerics/safe_math.h"
diff --git a/content/common/font_warmup_win.h b/content/common/font_warmup_win.h
index 587b731a..8539b9e 100644
--- a/content/common/font_warmup_win.h
+++ b/content/common/font_warmup_win.h
@@ -5,7 +5,10 @@
 #ifndef CONTENT_COMMON_FONT_WARMUP_WIN_H_
 #define CONTENT_COMMON_FONT_WARMUP_WIN_H_
 
+#include <stddef.h>
+
 #include "base/files/file_path.h"
+#include "base/macros.h"
 #include "content/common/content_export.h"
 
 class SkFontMgr;
diff --git a/content/common/font_warmup_win_unittest.cc b/content/common/font_warmup_win_unittest.cc
index c6ba7b1..362373fd 100644
--- a/content/common/font_warmup_win_unittest.cc
+++ b/content/common/font_warmup_win_unittest.cc
@@ -4,6 +4,9 @@
 
 #include "content/common/font_warmup_win.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <vector>
 
 #include "base/files/file_path.h"
diff --git a/content/common/frame_messages.h b/content/common/frame_messages.h
index c0b6a43..561e0e9 100644
--- a/content/common/frame_messages.h
+++ b/content/common/frame_messages.h
@@ -5,6 +5,10 @@
 // IPC messages for interacting with frames.
 // Multiply-included message file, hence no include guard.
 
+#include <stddef.h>
+#include <stdint.h>
+
+#include "build/build_config.h"
 #include "cc/surfaces/surface_id.h"
 #include "cc/surfaces/surface_sequence.h"
 #include "content/common/content_export.h"
@@ -210,7 +214,7 @@
   IPC_STRUCT_MEMBER(bool, is_post)
 
   // The POST body identifier. -1 if it doesn't exist.
-  IPC_STRUCT_MEMBER(int64, post_id)
+  IPC_STRUCT_MEMBER(int64_t, post_id)
 
   // Whether the frame navigation resulted in no change to the documents within
   // the page. For example, the navigation may have just resulted in scrolling
@@ -525,7 +529,7 @@
 
 // Requests that the RenderFrame send back a response after waiting for the
 // commit, activation and frame swap of the current DOM tree in blink.
-IPC_MESSAGE_ROUTED1(FrameMsg_VisualStateRequest, uint64 /* id */)
+IPC_MESSAGE_ROUTED1(FrameMsg_VisualStateRequest, uint64_t /* id */)
 
 // Instructs the renderer to create a new RenderFrame object.
 IPC_MESSAGE_CONTROL1(FrameMsg_NewFrame, FrameMsg_NewFrame_Params /* params */)
@@ -794,10 +798,10 @@
 // Blink and JavaScript error messages to log to the console
 // or debugger UI.
 IPC_MESSAGE_ROUTED4(FrameHostMsg_AddMessageToConsole,
-                    int32, /* log level */
+                    int32_t,        /* log level */
                     base::string16, /* msg */
-                    int32, /* line number */
-                    base::string16 /* source id */ )
+                    int32_t,        /* line number */
+                    base::string16 /* source id */)
 
 // Sent by the renderer when a child frame is created in the renderer.
 //
@@ -805,12 +809,12 @@
 // sent when the frame is detached from the DOM.
 IPC_SYNC_MESSAGE_CONTROL5_1(
     FrameHostMsg_CreateChildFrame,
-    int32 /* parent_routing_id */,
+    int32_t /* parent_routing_id */,
     blink::WebTreeScopeType /* scope */,
     std::string /* frame_name */,
     blink::WebSandboxFlags /* sandbox flags */,
     blink::WebFrameOwnerProperties /* frame_owner_properties */,
-    int32 /* new_routing_id */)
+    int32_t /* new_routing_id */)
 
 // Sent by the renderer to the parent RenderFrameHost when a child frame is
 // detached from the DOM.
@@ -905,19 +909,18 @@
 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidChangeOpener, int /* opener_routing_id */)
 
 // Notifies the browser that a page id was assigned.
-IPC_MESSAGE_ROUTED1(FrameHostMsg_DidAssignPageId,
-                    int32 /* page_id */)
+IPC_MESSAGE_ROUTED1(FrameHostMsg_DidAssignPageId, int32_t /* page_id */)
 
 // Notifies the browser that sandbox flags have changed for a subframe of this
 // frame.
 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeSandboxFlags,
-                    int32 /* subframe_routing_id */,
+                    int32_t /* subframe_routing_id */,
                     blink::WebSandboxFlags /* updated_flags */)
 
 // Notifies the browser that frame owner properties have changed for a subframe
 // of this frame.
 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeFrameOwnerProperties,
-                    int32 /* subframe_routing_id */,
+                    int32_t /* subframe_routing_id */,
                     blink::WebFrameOwnerProperties /* frame_owner_properties */)
 
 // Changes the title for the page in the UI when the page is navigated or the
@@ -1062,13 +1065,13 @@
 // Message from the renderer to the browser indicating the in-process instance
 // has been created.
 IPC_MESSAGE_CONTROL2(FrameHostMsg_DidCreateInProcessInstance,
-                     int32 /* instance */,
+                     int32_t /* instance */,
                      content::PepperRendererInstanceData /* instance_data */)
 
 // Message from the renderer to the browser indicating the in-process instance
 // has been destroyed.
 IPC_MESSAGE_CONTROL1(FrameHostMsg_DidDeleteInProcessInstance,
-                     int32 /* instance */)
+                     int32_t /* instance */)
 
 // Notification that a plugin has created a new plugin instance. The parameters
 // indicate:
@@ -1087,7 +1090,7 @@
 IPC_SYNC_MESSAGE_CONTROL4_0(
     FrameHostMsg_DidCreateOutOfProcessPepperInstance,
     int /* plugin_child_id */,
-    int32 /* pp_instance */,
+    int32_t /* pp_instance */,
     content::PepperRendererInstanceData /* creation_data */,
     bool /* is_external */)
 
@@ -1095,7 +1098,7 @@
 // the "DidCreate" message above.
 IPC_MESSAGE_CONTROL3(FrameHostMsg_DidDeleteOutOfProcessPepperInstance,
                      int /* plugin_child_id */,
-                     int32 /* pp_instance */,
+                     int32_t /* pp_instance */,
                      bool /* is_external */)
 
 // A renderer sends this to the browser process when it wants to
@@ -1111,7 +1114,7 @@
 // a plugin instance for the Plugin Power Saver feature.
 IPC_MESSAGE_CONTROL3(FrameHostMsg_PluginInstanceThrottleStateChange,
                      int /* plugin_child_id */,
-                     int32 /* pp_instance */,
+                     int32_t /* pp_instance */,
                      bool /* is_throttled */)
 #endif  // defined(ENABLE_PLUGINS)
 
@@ -1211,13 +1214,13 @@
 
 // Notifies the browser that media has started/stopped playing.
 IPC_MESSAGE_ROUTED4(FrameHostMsg_MediaPlayingNotification,
-                    int64 /* player_cookie, distinguishes instances */,
+                    int64_t /* player_cookie, distinguishes instances */,
                     bool /* has_video */,
                     bool /* has_audio */,
                     bool /* is_remote */)
 
 IPC_MESSAGE_ROUTED1(FrameHostMsg_MediaPausedNotification,
-                    int64 /* player_cookie, distinguishes instances */)
+                    int64_t /* player_cookie, distinguishes instances */)
 
 // Notify browser the theme color has been changed.
 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidChangeThemeColor,
@@ -1263,7 +1266,7 @@
 
 // Sent as a response to FrameMsg_VisualStateRequest.
 // The message is delivered using RenderWidget::QueueMessage.
-IPC_MESSAGE_ROUTED1(FrameHostMsg_VisualStateResponse, uint64 /* id */)
+IPC_MESSAGE_ROUTED1(FrameHostMsg_VisualStateResponse, uint64_t /* id */)
 
 // Puts the browser into "tab fullscreen" mode for the sending renderer.
 // See the comment in chrome/browser/ui/browser.h for more details.
diff --git a/content/common/frame_param_macros.h b/content/common/frame_param_macros.h
index a163747..fd2256d7 100644
--- a/content/common/frame_param_macros.h
+++ b/content/common/frame_param_macros.h
@@ -13,6 +13,8 @@
 #ifndef CONTENT_COMMON_FRAME_PARAM_MACROS_H_
 #define CONTENT_COMMON_FRAME_PARAM_MACROS_H_
 
+#include <stdint.h>
+
 #include "cc/output/compositor_frame.h"
 #include "cc/output/compositor_frame_ack.h"
 #include "content/public/common/common_param_traits.h"
@@ -35,7 +37,7 @@
   IPC_STRUCT_MEMBER(int, producing_route_id)
 
   IPC_STRUCT_MEMBER(cc::CompositorFrame, frame)
-  IPC_STRUCT_MEMBER(uint32, output_surface_id)
+  IPC_STRUCT_MEMBER(uint32_t, output_surface_id)
   IPC_STRUCT_MEMBER(base::SharedMemoryHandle, shared_memory_handle)
 IPC_STRUCT_END()
 
@@ -44,13 +46,13 @@
   IPC_STRUCT_MEMBER(int, producing_host_id)
   IPC_STRUCT_MEMBER(int, producing_route_id)
 
-  IPC_STRUCT_MEMBER(uint32, output_surface_id)
+  IPC_STRUCT_MEMBER(uint32_t, output_surface_id)
   IPC_STRUCT_MEMBER(cc::CompositorFrameAck, ack)
 IPC_STRUCT_END()
 
 IPC_STRUCT_BEGIN(FrameHostMsg_ReclaimCompositorResources_Params)
   IPC_STRUCT_MEMBER(int, route_id)
-  IPC_STRUCT_MEMBER(uint32, output_surface_id)
+  IPC_STRUCT_MEMBER(uint32_t, output_surface_id)
   IPC_STRUCT_MEMBER(int, renderer_host_id)
   IPC_STRUCT_MEMBER(cc::CompositorFrameAck, ack)
 IPC_STRUCT_END()
diff --git a/content/common/gamepad_param_traits.cc b/content/common/gamepad_param_traits.cc
index cbc7e6a..095154d8 100644
--- a/content/common/gamepad_param_traits.cc
+++ b/content/common/gamepad_param_traits.cc
@@ -4,6 +4,9 @@
 
 #include "content/common/gamepad_param_traits.h"
 
+#include <stddef.h>
+
+#include "base/macros.h"
 #include "base/pickle.h"
 #include "base/strings/string16.h"
 #include "base/strings/utf_string_conversions.h"
diff --git a/content/common/geofencing_messages.h b/content/common/geofencing_messages.h
index e79b3aa..87853bd 100644
--- a/content/common/geofencing_messages.h
+++ b/content/common/geofencing_messages.h
@@ -4,6 +4,8 @@
 
 // IPC message for geofencing
 
+#include <stdint.h>
+
 #include "content/common/geofencing_types.h"
 #include "ipc/ipc_message_macros.h"
 #include "third_party/WebKit/public/platform/WebCircularGeofencingRegion.h"
@@ -38,18 +40,18 @@
                      int /* request_id */,
                      std::string /* region_id */,
                      blink::WebCircularGeofencingRegion /* region */,
-                     int64 /* serviceworker_registration_id */)
+                     int64_t /* serviceworker_registration_id */)
 
 IPC_MESSAGE_CONTROL4(GeofencingHostMsg_UnregisterRegion,
                      int /* thread_id */,
                      int /* request_id */,
                      std::string /* region_id */,
-                     int64 /* serviceworker_registration_id */)
+                     int64_t /* serviceworker_registration_id */)
 
 IPC_MESSAGE_CONTROL3(GeofencingHostMsg_GetRegisteredRegions,
                      int /* thread_id */,
                      int /* request_id */,
-                     int64 /* serviceworker_registration_id */)
+                     int64_t /* serviceworker_registration_id */)
 
 IPC_MESSAGE_CONTROL1(GeofencingHostMsg_SetMockProvider,
                      content::GeofencingMockState /* mock_state */)
diff --git a/content/common/gin_java_bridge_messages.h b/content/common/gin_java_bridge_messages.h
index 51f90e6..64a68747 100644
--- a/content/common/gin_java_bridge_messages.h
+++ b/content/common/gin_java_bridge_messages.h
@@ -6,7 +6,8 @@
 
 // Multiply-included message file, hence no include guard.
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
 #include "content/common/android/gin_java_bridge_errors.h"
 #include "content/common/content_export.h"
 #include "ipc/ipc_message_macros.h"
@@ -24,7 +25,7 @@
 // Object IDs are generated on the browser side.
 IPC_MESSAGE_ROUTED2(GinJavaBridgeMsg_AddNamedObject,
                     std::string /* name */,
-                    int32 /* object_id */)
+                    int32_t /* object_id */)
 
 // Sent from browser to renderer to remove a Java object with the given name.
 IPC_MESSAGE_ROUTED1(GinJavaBridgeMsg_RemoveNamedObject,
@@ -34,13 +35,13 @@
 // the given object. The query will only succeed if inspection of injected
 // objects is enabled on the browser side.
 IPC_SYNC_MESSAGE_ROUTED1_1(GinJavaBridgeHostMsg_GetMethods,
-                           int32 /* object_id */,
+                           int32_t /* object_id */,
                            std::set<std::string> /* returned_method_names */)
 
 // Sent from renderer to browser to find out, if an object has a method with
 // the given name.
 IPC_SYNC_MESSAGE_ROUTED2_1(GinJavaBridgeHostMsg_HasMethod,
-                           int32 /* object_id */,
+                           int32_t /* object_id */,
                            std::string /* method_name */,
                            bool /* result */)
 
@@ -54,7 +55,7 @@
 // Some special value types that are not supported by base::Value are encoded
 // as BinaryValues via GinJavaBridgeValue.
 IPC_SYNC_MESSAGE_ROUTED3_2(GinJavaBridgeHostMsg_InvokeMethod,
-                           int32 /* object_id */,
+                           int32_t /* object_id */,
                            std::string /* method_name */,
                            base::ListValue /* arguments */,
                            base::ListValue /* result */,
@@ -71,4 +72,4 @@
 //     the renderer side. Sending of this message informs the browser whether
 //     this expectation has failed.
 IPC_MESSAGE_ROUTED1(GinJavaBridgeHostMsg_ObjectWrapperDeleted,
-                    int32 /* object_id */)
+                    int32_t /* object_id */)
diff --git a/content/common/gpu/client/command_buffer_proxy_impl.cc b/content/common/gpu/client/command_buffer_proxy_impl.cc
index b247bf3f..ded3baf 100644
--- a/content/common/gpu/client/command_buffer_proxy_impl.cc
+++ b/content/common/gpu/client/command_buffer_proxy_impl.cc
@@ -30,15 +30,15 @@
 
 namespace {
 
-uint64_t CommandBufferProxyID(int channel_id, int32 route_id) {
+uint64_t CommandBufferProxyID(int channel_id, int32_t route_id) {
   return (static_cast<uint64_t>(channel_id) << 32) | route_id;
 }
 
 }  // namespace
 
 CommandBufferProxyImpl::CommandBufferProxyImpl(GpuChannelHost* channel,
-                                               int32 route_id,
-                                               int32 stream_id)
+                                               int32_t route_id,
+                                               int32_t stream_id)
     : lock_(nullptr),
       channel_(channel),
       command_buffer_id_(CommandBufferProxyID(channel->channel_id(), route_id)),
@@ -146,7 +146,7 @@
   deletion_observers_.RemoveObserver(observer);
 }
 
-void CommandBufferProxyImpl::OnSignalAck(uint32 id) {
+void CommandBufferProxyImpl::OnSignalAck(uint32_t id) {
   SignalTaskMap::iterator it = signal_tasks_.find(id);
   DCHECK(it != signal_tasks_.end());
   base::Closure callback = it->second;
@@ -201,12 +201,12 @@
   return last_state_;
 }
 
-int32 CommandBufferProxyImpl::GetLastToken() {
+int32_t CommandBufferProxyImpl::GetLastToken() {
   TryUpdateState();
   return last_state_.token;
 }
 
-void CommandBufferProxyImpl::Flush(int32 put_offset) {
+void CommandBufferProxyImpl::Flush(int32_t put_offset) {
   CheckLock();
   if (last_state_.error != gpu::error::kNoError)
     return;
@@ -239,7 +239,7 @@
     latency_info_.clear();
 }
 
-void CommandBufferProxyImpl::OrderingBarrier(int32 put_offset) {
+void CommandBufferProxyImpl::OrderingBarrier(int32_t put_offset) {
   if (last_state_.error != gpu::error::kNoError)
     return;
 
@@ -287,7 +287,7 @@
   update_vsync_parameters_completion_callback_ = callback;
 }
 
-void CommandBufferProxyImpl::WaitForTokenInRange(int32 start, int32 end) {
+void CommandBufferProxyImpl::WaitForTokenInRange(int32_t start, int32_t end) {
   CheckLock();
   TRACE_EVENT2("gpu",
                "CommandBufferProxyImpl::WaitForToken",
@@ -307,7 +307,8 @@
          last_state_.error != gpu::error::kNoError);
 }
 
-void CommandBufferProxyImpl::WaitForGetOffsetInRange(int32 start, int32 end) {
+void CommandBufferProxyImpl::WaitForGetOffsetInRange(int32_t start,
+                                                     int32_t end) {
   CheckLock();
   TRACE_EVENT2("gpu",
                "CommandBufferProxyImpl::WaitForGetOffset",
@@ -327,7 +328,7 @@
          last_state_.error != gpu::error::kNoError);
 }
 
-void CommandBufferProxyImpl::SetGetBuffer(int32 shm_id) {
+void CommandBufferProxyImpl::SetGetBuffer(int32_t shm_id) {
   CheckLock();
   if (last_state_.error != gpu::error::kNoError)
     return;
@@ -338,14 +339,14 @@
 
 scoped_refptr<gpu::Buffer> CommandBufferProxyImpl::CreateTransferBuffer(
     size_t size,
-    int32* id) {
+    int32_t* id) {
   CheckLock();
   *id = -1;
 
   if (last_state_.error != gpu::error::kNoError)
     return NULL;
 
-  int32 new_id = channel_->ReserveTransferBufferId();
+  int32_t new_id = channel_->ReserveTransferBufferId();
 
   scoped_ptr<base::SharedMemory> shared_memory(
       channel_->factory()->AllocateSharedMemory(size));
@@ -386,7 +387,7 @@
   return buffer;
 }
 
-void CommandBufferProxyImpl::DestroyTransferBuffer(int32 id) {
+void CommandBufferProxyImpl::DestroyTransferBuffer(int32_t id) {
   CheckLock();
   if (last_state_.error != gpu::error::kNoError)
     return;
@@ -406,7 +407,7 @@
   if (last_state_.error != gpu::error::kNoError)
     return -1;
 
-  int32 new_id = channel_->ReserveImageId();
+  int32_t new_id = channel_->ReserveImageId();
 
   gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager =
       channel_->gpu_memory_buffer_manager();
@@ -463,7 +464,7 @@
   return new_id;
 }
 
-void CommandBufferProxyImpl::DestroyImage(int32 id) {
+void CommandBufferProxyImpl::DestroyImage(int32_t id) {
   CheckLock();
   if (last_state_.error != gpu::error::kNoError)
     return;
@@ -488,12 +489,12 @@
   return CreateImage(buffer->AsClientBuffer(), width, height, internal_format);
 }
 
-uint32 CommandBufferProxyImpl::CreateStreamTexture(uint32 texture_id) {
+uint32_t CommandBufferProxyImpl::CreateStreamTexture(uint32_t texture_id) {
   CheckLock();
   if (last_state_.error != gpu::error::kNoError)
     return 0;
 
-  int32 stream_id = channel_->GenerateRouteID();
+  int32_t stream_id = channel_->GenerateRouteID();
   bool succeeded = false;
   Send(new GpuCommandBufferMsg_CreateStreamTexture(
       route_id_, texture_id, stream_id, &succeeded));
@@ -567,7 +568,7 @@
   if (last_state_.error != gpu::error::kNoError)
     return;
 
-  uint32 signal_id = next_signal_id_++;
+  uint32_t signal_id = next_signal_id_++;
   if (!Send(new GpuCommandBufferMsg_SignalSyncToken(route_id_,
                                                     sync_token,
                                                     signal_id))) {
@@ -598,12 +599,12 @@
   return true;
 }
 
-uint32 CommandBufferProxyImpl::InsertSyncPoint() {
+uint32_t CommandBufferProxyImpl::InsertSyncPoint() {
   CheckLock();
   if (last_state_.error != gpu::error::kNoError)
     return 0;
 
-  uint32 sync_point = 0;
+  uint32_t sync_point = 0;
   Send(new GpuCommandBufferMsg_InsertSyncPoint(route_id_, true, &sync_point));
   return sync_point;
 }
@@ -613,7 +614,7 @@
   if (last_state_.error != gpu::error::kNoError)
     return 0;
 
-  uint32 sync_point = 0;
+  uint32_t sync_point = 0;
   Send(new GpuCommandBufferMsg_InsertSyncPoint(route_id_, false, &sync_point));
   return sync_point;
 }
@@ -626,13 +627,13 @@
   Send(new GpuCommandBufferMsg_RetireSyncPoint(route_id_, sync_point));
 }
 
-void CommandBufferProxyImpl::SignalSyncPoint(uint32 sync_point,
+void CommandBufferProxyImpl::SignalSyncPoint(uint32_t sync_point,
                                              const base::Closure& callback) {
   CheckLock();
   if (last_state_.error != gpu::error::kNoError)
     return;
 
-  uint32 signal_id = next_signal_id_++;
+  uint32_t signal_id = next_signal_id_++;
   if (!Send(new GpuCommandBufferMsg_SignalSyncPoint(route_id_,
                                                     sync_point,
                                                     signal_id))) {
@@ -642,7 +643,7 @@
   signal_tasks_.insert(std::make_pair(signal_id, callback));
 }
 
-void CommandBufferProxyImpl::SignalQuery(uint32 query,
+void CommandBufferProxyImpl::SignalQuery(uint32_t query,
                                          const base::Closure& callback) {
   CheckLock();
   if (last_state_.error != gpu::error::kNoError)
@@ -656,7 +657,7 @@
   // would have to make calls at an astounding rate (300B/s) and even if they
   // could do that, all they would do is to prevent some callbacks from getting
   // called, leading to stalled threads and/or memory leaks.
-  uint32 signal_id = next_signal_id_++;
+  uint32_t signal_id = next_signal_id_++;
   if (!Send(new GpuCommandBufferMsg_SignalQuery(route_id_,
                                                 query,
                                                 signal_id))) {
diff --git a/content/common/gpu/client/command_buffer_proxy_impl.h b/content/common/gpu/client/command_buffer_proxy_impl.h
index b5468a7f..a79942a1 100644
--- a/content/common/gpu/client/command_buffer_proxy_impl.h
+++ b/content/common/gpu/client/command_buffer_proxy_impl.h
@@ -5,6 +5,9 @@
 #ifndef CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_
 #define CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <map>
 #include <queue>
 #include <string>
@@ -13,6 +16,7 @@
 #include "base/compiler_specific.h"
 #include "base/containers/hash_tables.h"
 #include "base/containers/scoped_ptr_hash_map.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
@@ -64,8 +68,8 @@
       const std::string& msg, int id)> GpuConsoleMessageCallback;
 
   CommandBufferProxyImpl(GpuChannelHost* channel,
-                         int32 route_id,
-                         int32 stream_id);
+                         int32_t route_id,
+                         int32_t stream_id);
   ~CommandBufferProxyImpl() override;
 
   // Sends an IPC message to create a GpuVideoDecodeAccelerator. Creates and
@@ -91,33 +95,33 @@
   // CommandBuffer implementation:
   bool Initialize() override;
   State GetLastState() override;
-  int32 GetLastToken() override;
-  void Flush(int32 put_offset) override;
-  void OrderingBarrier(int32 put_offset) override;
-  void WaitForTokenInRange(int32 start, int32 end) override;
-  void WaitForGetOffsetInRange(int32 start, int32 end) override;
-  void SetGetBuffer(int32 shm_id) override;
+  int32_t GetLastToken() override;
+  void Flush(int32_t put_offset) override;
+  void OrderingBarrier(int32_t put_offset) override;
+  void WaitForTokenInRange(int32_t start, int32_t end) override;
+  void WaitForGetOffsetInRange(int32_t start, int32_t end) override;
+  void SetGetBuffer(int32_t shm_id) override;
   scoped_refptr<gpu::Buffer> CreateTransferBuffer(size_t size,
-                                                  int32* id) override;
-  void DestroyTransferBuffer(int32 id) override;
+                                                  int32_t* id) override;
+  void DestroyTransferBuffer(int32_t id) override;
 
   // gpu::GpuControl implementation:
   gpu::Capabilities GetCapabilities() override;
-  int32 CreateImage(ClientBuffer buffer,
-                    size_t width,
-                    size_t height,
-                    unsigned internal_format) override;
-  void DestroyImage(int32 id) override;
-  int32 CreateGpuMemoryBufferImage(size_t width,
-                                   size_t height,
-                                   unsigned internal_format,
-                                   unsigned usage) override;
-  uint32 InsertSyncPoint() override;
+  int32_t CreateImage(ClientBuffer buffer,
+                      size_t width,
+                      size_t height,
+                      unsigned internal_format) override;
+  void DestroyImage(int32_t id) override;
+  int32_t CreateGpuMemoryBufferImage(size_t width,
+                                     size_t height,
+                                     unsigned internal_format,
+                                     unsigned usage) override;
+  uint32_t InsertSyncPoint() override;
   uint32_t InsertFutureSyncPoint() override;
   void RetireSyncPoint(uint32_t sync_point) override;
-  void SignalSyncPoint(uint32 sync_point,
+  void SignalSyncPoint(uint32_t sync_point,
                        const base::Closure& callback) override;
-  void SignalQuery(uint32 query, const base::Closure& callback) override;
+  void SignalQuery(uint32_t query, const base::Closure& callback) override;
   void SetLock(base::Lock* lock) override;
   bool IsGpuChannelLost() override;
   gpu::CommandBufferNamespace GetNamespaceID() const override;
@@ -160,20 +164,20 @@
   // CommandBufferProxyImpl implementation.
   gpu::error::Error GetLastError() override;
 
-  int32 route_id() const { return route_id_; }
+  int32_t route_id() const { return route_id_; }
 
-  int32 stream_id() const { return stream_id_; }
+  int32_t stream_id() const { return stream_id_; }
 
   GpuChannelHost* channel() const { return channel_; }
 
   base::SharedMemoryHandle GetSharedStateHandle() const {
     return shared_state_shm_->handle();
   }
-  uint32 CreateStreamTexture(uint32 texture_id);
+  uint32_t CreateStreamTexture(uint32_t texture_id);
 
  private:
-  typedef std::map<int32, scoped_refptr<gpu::Buffer> > TransferBufferMap;
-  typedef base::hash_map<uint32, base::Closure> SignalTaskMap;
+  typedef std::map<int32_t, scoped_refptr<gpu::Buffer>> TransferBufferMap;
+  typedef base::hash_map<uint32_t, base::Closure> SignalTaskMap;
 
   void CheckLock() {
     if (lock_)
@@ -190,7 +194,7 @@
   void OnDestroyed(gpu::error::ContextLostReason reason,
                    gpu::error::Error error);
   void OnConsoleMessage(const GPUCommandBufferConsoleMessage& message);
-  void OnSignalAck(uint32 id);
+  void OnSignalAck(uint32_t id);
   void OnSwapBuffersCompleted(const std::vector<ui::LatencyInfo>& latency_info,
                               gfx::SwapResult result);
   void OnUpdateVSyncParameters(base::TimeTicks timebase,
@@ -220,11 +224,11 @@
   // raw pointer is ok.
   GpuChannelHost* channel_;
   const uint64_t command_buffer_id_;
-  const int32 route_id_;
-  const int32 stream_id_;
-  uint32 flush_count_;
-  int32 last_put_offset_;
-  int32 last_barrier_put_offset_;
+  const int32_t route_id_;
+  const int32_t stream_id_;
+  uint32_t flush_count_;
+  int32_t last_put_offset_;
+  int32_t last_barrier_put_offset_;
 
   // Next generated fence sync.
   uint64_t next_fence_sync_release_;
@@ -243,7 +247,7 @@
   GpuConsoleMessageCallback console_message_callback_;
 
   // Tasks to be invoked in SignalSyncPoint responses.
-  uint32 next_signal_id_;
+  uint32_t next_signal_id_;
   SignalTaskMap signal_tasks_;
 
   gpu::Capabilities capabilities_;
diff --git a/content/common/gpu/client/context_provider_command_buffer.cc b/content/common/gpu/client/context_provider_command_buffer.cc
index 7259ea1..c9b57d8 100644
--- a/content/common/gpu/client/context_provider_command_buffer.cc
+++ b/content/common/gpu/client/context_provider_command_buffer.cc
@@ -4,6 +4,8 @@
 
 #include "content/common/gpu/client/context_provider_command_buffer.h"
 
+#include <stddef.h>
+
 #include <set>
 #include <vector>
 
diff --git a/content/common/gpu/client/context_provider_command_buffer.h b/content/common/gpu/client/context_provider_command_buffer.h
index 7444f35..564e76c 100644
--- a/content/common/gpu/client/context_provider_command_buffer.h
+++ b/content/common/gpu/client/context_provider_command_buffer.h
@@ -5,6 +5,8 @@
 #ifndef CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER_H_
 #define CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER_H_
 
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/synchronization/lock.h"
diff --git a/content/common/gpu/client/gl_helper.cc b/content/common/gpu/client/gl_helper.cc
index 5639cb21..5549caa 100644
--- a/content/common/gpu/client/gl_helper.cc
+++ b/content/common/gpu/client/gl_helper.cc
@@ -4,12 +4,16 @@
 
 #include "content/common/gpu/client/gl_helper.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <queue>
 #include <string>
 
 #include "base/bind.h"
 #include "base/lazy_instance.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/message_loop/message_loop.h"
 #include "base/strings/string_util.h"
@@ -160,14 +164,15 @@
 
   // Reads back bytes from the currently bound frame buffer.
   // Note that dst_size is specified in bytes, not pixels.
-  void ReadbackAsync(const gfx::Size& dst_size,
-                     int32 bytes_per_row,     // generally dst_size.width() * 4
-                     int32 row_stride_bytes,  // generally dst_size.width() * 4
-                     unsigned char* out,
-                     GLenum format,
-                     GLenum type,
-                     size_t bytes_per_pixel,
-                     const base::Callback<void(bool)>& callback);
+  void ReadbackAsync(
+      const gfx::Size& dst_size,
+      int32_t bytes_per_row,     // generally dst_size.width() * 4
+      int32_t row_stride_bytes,  // generally dst_size.width() * 4
+      unsigned char* out,
+      GLenum format,
+      GLenum type,
+      size_t bytes_per_pixel,
+      const base::Callback<void(bool)>& callback);
 
   void ReadbackPlane(TextureFrameBufferPair* source,
                      const scoped_refptr<media::VideoFrame>& target,
@@ -211,8 +216,8 @@
   // must be deleted by the main thread gl.
   struct Request {
     Request(const gfx::Size& size_,
-            int32 bytes_per_row_,
-            int32 row_stride_bytes_,
+            int32_t bytes_per_row_,
+            int32_t row_stride_bytes_,
             unsigned char* pixels_,
             const base::Callback<void(bool)>& callback_)
         : done(false),
@@ -485,8 +490,8 @@
 
 void GLHelper::CopyTextureToImpl::ReadbackAsync(
     const gfx::Size& dst_size,
-    int32 bytes_per_row,
-    int32 row_stride_bytes,
+    int32_t bytes_per_row,
+    int32_t row_stride_bytes,
     unsigned char* out,
     GLenum format,
     GLenum type,
@@ -612,9 +617,9 @@
                             texture,
                             0);
 
-  int32 bytes_per_row = out_color_type == kAlpha_8_SkColorType
-                            ? dst_size.width()
-                            : dst_size.width() * bytes_per_pixel;
+  int32_t bytes_per_row = out_color_type == kAlpha_8_SkColorType
+                              ? dst_size.width()
+                              : dst_size.width() * bytes_per_pixel;
 
   ReadbackAsync(readback_texture_size,
                 bytes_per_row,
diff --git a/content/common/gpu/client/gl_helper.h b/content/common/gpu/client/gl_helper.h
index 2c8b48ba..2be3f5a 100644
--- a/content/common/gpu/client/gl_helper.h
+++ b/content/common/gpu/client/gl_helper.h
@@ -6,8 +6,8 @@
 #define CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_
 
 #include "base/atomicops.h"
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
 #include "gpu/command_buffer/client/gles2_interface.h"
diff --git a/content/common/gpu/client/gl_helper_benchmark.cc b/content/common/gpu/client/gl_helper_benchmark.cc
index 75a204d..9e751b3 100644
--- a/content/common/gpu/client/gl_helper_benchmark.cc
+++ b/content/common/gpu/client/gl_helper_benchmark.cc
@@ -8,6 +8,7 @@
 // but cannot really "fail". There is no point in making these tests part
 // of any test automation run.
 
+#include <stddef.h>
 #include <stdio.h>
 #include <cmath>
 #include <string>
@@ -20,8 +21,10 @@
 #include "base/at_exit.h"
 #include "base/command_line.h"
 #include "base/files/file_util.h"
+#include "base/macros.h"
 #include "base/strings/stringprintf.h"
 #include "base/time/time.h"
+#include "build/build_config.h"
 #include "content/common/gpu/client/gl_helper.h"
 #include "content/common/gpu/client/gl_helper_scaling.h"
 #include "content/public/test/unittest_test_suite.h"
diff --git a/content/common/gpu/client/gl_helper_readback_support.h b/content/common/gpu/client/gl_helper_readback_support.h
index f60438f..f9329e9 100644
--- a/content/common/gpu/client/gl_helper_readback_support.h
+++ b/content/common/gpu/client/gl_helper_readback_support.h
@@ -5,6 +5,8 @@
 #ifndef CONTENT_COMMON_GPU_CLIENT_GL_HELPER_READBACK_SUPPORT_H_
 #define CONTENT_COMMON_GPU_CLIENT_GL_HELPER_READBACK_SUPPORT_H_
 
+#include <stddef.h>
+
 #include <vector>
 
 #include "content/common/gpu/client/gl_helper.h"
diff --git a/content/common/gpu/client/gl_helper_scaling.cc b/content/common/gpu/client/gl_helper_scaling.cc
index 49cab49..f4cd6b3 100644
--- a/content/common/gpu/client/gl_helper_scaling.cc
+++ b/content/common/gpu/client/gl_helper_scaling.cc
@@ -4,6 +4,8 @@
 
 #include "content/common/gpu/client/gl_helper_scaling.h"
 
+#include <stddef.h>
+
 #include <deque>
 #include <string>
 #include <vector>
@@ -11,6 +13,7 @@
 #include "base/bind.h"
 #include "base/lazy_instance.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/message_loop/message_loop.h"
 #include "base/time/time.h"
diff --git a/content/common/gpu/client/gl_helper_scaling.h b/content/common/gpu/client/gl_helper_scaling.h
index af7b7fc..6157d8e 100644
--- a/content/common/gpu/client/gl_helper_scaling.h
+++ b/content/common/gpu/client/gl_helper_scaling.h
@@ -9,6 +9,7 @@
 #include <map>
 #include <vector>
 
+#include "base/macros.h"
 #include "content/common/gpu/client/gl_helper.h"
 #include "ui/gfx/geometry/rect.h"
 #include "ui/gfx/geometry/size.h"
diff --git a/content/common/gpu/client/gl_helper_unittest.cc b/content/common/gpu/client/gl_helper_unittest.cc
index 782ff79..807a105 100644
--- a/content/common/gpu/client/gl_helper_unittest.cc
+++ b/content/common/gpu/client/gl_helper_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 <stdint.h>
 #include <stdio.h>
 #include <cmath>
 #include <string>
@@ -16,6 +18,7 @@
 #include "base/command_line.h"
 #include "base/files/file_util.h"
 #include "base/json/json_reader.h"
+#include "base/macros.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
 #include "base/strings/stringprintf.h"
@@ -24,6 +27,7 @@
 #include "base/test/test_suite.h"
 #include "base/time/time.h"
 #include "base/trace_event/trace_event.h"
+#include "build/build_config.h"
 #include "content/common/gpu/client/gl_helper.h"
 #include "content/common/gpu/client/gl_helper_readback_support.h"
 #include "content/common/gpu/client/gl_helper_scaling.h"
@@ -154,7 +158,7 @@
   // bitmaps.  Clamp x/y.
   int Channel(SkBitmap* pixels, int x, int y, int c) {
     if (pixels->bytesPerPixel() == 4) {
-      uint32* data =
+      uint32_t* data =
           pixels->getAddr32(std::max(0, std::min(x, pixels->width() - 1)),
                             std::max(0, std::min(y, pixels->height() - 1)));
       return (*data) >> (c * 8) & 0xff;
@@ -174,13 +178,13 @@
     DCHECK_LT(x, pixels->width());
     DCHECK_LT(y, pixels->height());
     if (pixels->bytesPerPixel() == 4) {
-      uint32* data = pixels->getAddr32(x, y);
+      uint32_t* data = pixels->getAddr32(x, y);
       v = std::max(0, std::min(v, 255));
       *data = (*data & ~(0xffu << (c * 8))) | (v << (c * 8));
     } else {
       DCHECK_EQ(pixels->bytesPerPixel(), 1);
       DCHECK_EQ(c, 0);
-      uint8* data = pixels->getAddr8(x, y);
+      uint8_t* data = pixels->getAddr8(x, y);
       v = std::max(0, std::min(v, 255));
       *data = v;
     }
@@ -1260,7 +1264,7 @@
     // Initialize the output bitmap with Green color.
     // When the readback is over output bitmap should have the red color.
     output_pixels.eraseColor(SK_ColorGREEN);
-    uint8* pixels = static_cast<uint8*>(output_pixels.getPixels());
+    uint8_t* pixels = static_cast<uint8_t*>(output_pixels.getPixels());
     ReadBackTexture(src_texture, src_size, pixels, color_type, async);
     bool result = IsEqual(input_pixels, output_pixels);
     if (!result) {
@@ -1420,9 +1424,9 @@
     unsigned char* Y = truth_frame->visible_data(media::VideoFrame::kYPlane);
     unsigned char* U = truth_frame->visible_data(media::VideoFrame::kUPlane);
     unsigned char* V = truth_frame->visible_data(media::VideoFrame::kVPlane);
-    int32 y_stride = truth_frame->stride(media::VideoFrame::kYPlane);
-    int32 u_stride = truth_frame->stride(media::VideoFrame::kUPlane);
-    int32 v_stride = truth_frame->stride(media::VideoFrame::kVPlane);
+    int32_t y_stride = truth_frame->stride(media::VideoFrame::kYPlane);
+    int32_t u_stride = truth_frame->stride(media::VideoFrame::kUPlane);
+    int32_t v_stride = truth_frame->stride(media::VideoFrame::kVPlane);
     memset(Y, 0x00, y_stride * output_ysize);
     memset(U, 0x80, u_stride * output_ysize / 2);
     memset(V, 0x80, v_stride * output_ysize / 2);
diff --git a/content/common/gpu/client/gpu_channel_host.cc b/content/common/gpu/client/gpu_channel_host.cc
index 652f93a..43bd544 100644
--- a/content/common/gpu/client/gpu_channel_host.cc
+++ b/content/common/gpu/client/gpu_channel_host.cc
@@ -14,6 +14,7 @@
 #include "base/thread_task_runner_handle.h"
 #include "base/threading/thread_restrictions.h"
 #include "base/trace_event/trace_event.h"
+#include "build/build_config.h"
 #include "content/common/gpu/client/command_buffer_proxy_impl.h"
 #include "content/common/gpu/client/gpu_jpeg_decode_accelerator_host.h"
 #include "content/common/gpu/gpu_messages.h"
@@ -132,10 +133,10 @@
 }
 
 uint32_t GpuChannelHost::OrderingBarrier(
-    int32 route_id,
-    int32 stream_id,
-    int32 put_offset,
-    uint32 flush_count,
+    int32_t route_id,
+    int32_t stream_id,
+    int32_t put_offset,
+    uint32_t flush_count,
     const std::vector<ui::LatencyInfo>& latency_info,
     bool put_offset_changed,
     bool do_flush) {
@@ -162,7 +163,7 @@
   return 0;
 }
 
-void GpuChannelHost::FlushPendingStream(int32 stream_id) {
+void GpuChannelHost::FlushPendingStream(int32_t stream_id) {
   AutoLock lock(context_lock_);
   auto flush_info_iter = stream_flush_info_.find(stream_id);
   if (flush_info_iter == stream_flush_info_.end())
@@ -188,11 +189,11 @@
 }
 
 scoped_ptr<CommandBufferProxyImpl> GpuChannelHost::CreateViewCommandBuffer(
-    int32 surface_id,
+    int32_t surface_id,
     CommandBufferProxyImpl* share_group,
-    int32 stream_id,
+    int32_t stream_id,
     GpuStreamPriority stream_priority,
-    const std::vector<int32>& attribs,
+    const std::vector<int32_t>& attribs,
     const GURL& active_url,
     gfx::GpuPreference gpu_preference) {
   DCHECK(!share_group || (stream_id == share_group->stream_id()));
@@ -210,7 +211,7 @@
   init_params.active_url = active_url;
   init_params.gpu_preference = gpu_preference;
 
-  int32 route_id = GenerateRouteID();
+  int32_t route_id = GenerateRouteID();
 
   CreateCommandBufferResult result = factory_->CreateViewCommandBuffer(
       surface_id, init_params, route_id);
@@ -242,9 +243,9 @@
 scoped_ptr<CommandBufferProxyImpl> GpuChannelHost::CreateOffscreenCommandBuffer(
     const gfx::Size& size,
     CommandBufferProxyImpl* share_group,
-    int32 stream_id,
+    int32_t stream_id,
     GpuStreamPriority stream_priority,
-    const std::vector<int32>& attribs,
+    const std::vector<int32_t>& attribs,
     const GURL& active_url,
     gfx::GpuPreference gpu_preference) {
   DCHECK(!share_group || (stream_id == share_group->stream_id()));
@@ -259,7 +260,7 @@
   init_params.active_url = active_url;
   init_params.gpu_preference = gpu_preference;
 
-  int32 route_id = GenerateRouteID();
+  int32_t route_id = GenerateRouteID();
 
   bool succeeded = false;
   if (!Send(new GpuChannelMsg_CreateOffscreenCommandBuffer(
@@ -287,7 +288,7 @@
 
   scoped_refptr<base::SingleThreadTaskRunner> io_task_runner =
       factory_->GetIOThreadTaskRunner();
-  int32 route_id = GenerateRouteID();
+  int32_t route_id = GenerateRouteID();
   scoped_ptr<GpuJpegDecodeAcceleratorHost> decoder(
       new GpuJpegDecodeAcceleratorHost(this, route_id, io_task_runner));
   if (!decoder->Initialize(client)) {
@@ -307,8 +308,8 @@
     CommandBufferProxyImpl* command_buffer) {
   TRACE_EVENT0("gpu", "GpuChannelHost::DestroyCommandBuffer");
 
-  int32 route_id = command_buffer->route_id();
-  int32 stream_id = command_buffer->stream_id();
+  int32_t route_id = command_buffer->route_id();
+  int32_t stream_id = command_buffer->stream_id();
   Send(new GpuChannelMsg_DestroyCommandBuffer(route_id));
   RemoveRoute(route_id);
 
@@ -369,7 +370,7 @@
 #endif  // defined(OS_WIN) || defined(OS_MACOSX)
 }
 
-int32 GpuChannelHost::ReserveTransferBufferId() {
+int32_t GpuChannelHost::ReserveTransferBufferId() {
   // 0 is a reserved value.
   return g_next_transfer_buffer_id.GetNext() + 1;
 }
@@ -398,31 +399,31 @@
   }
 }
 
-int32 GpuChannelHost::ReserveImageId() {
+int32_t GpuChannelHost::ReserveImageId() {
   return next_image_id_.GetNext();
 }
 
-int32 GpuChannelHost::GenerateRouteID() {
+int32_t GpuChannelHost::GenerateRouteID() {
   return next_route_id_.GetNext();
 }
 
-int32 GpuChannelHost::GenerateStreamID() {
-  const int32 stream_id = next_stream_id_.GetNext();
+int32_t GpuChannelHost::GenerateStreamID() {
+  const int32_t stream_id = next_stream_id_.GetNext();
   DCHECK_NE(0, stream_id);
   DCHECK_NE(kDefaultStreamId, stream_id);
   return stream_id;
 }
 
-uint32_t GpuChannelHost::ValidateFlushIDReachedServer(int32 stream_id,
+uint32_t GpuChannelHost::ValidateFlushIDReachedServer(int32_t stream_id,
                                                       bool force_validate) {
   // Store what flush ids we will be validating for all streams.
-  base::hash_map<int32, uint32_t> validate_flushes;
+  base::hash_map<int32_t, uint32_t> validate_flushes;
   uint32_t flushed_stream_flush_id = 0;
   uint32_t verified_stream_flush_id = 0;
   {
     AutoLock lock(context_lock_);
     for (const auto& iter : stream_flush_info_) {
-      const int32 iter_stream_id = iter.first;
+      const int32_t iter_stream_id = iter.first;
       const StreamFlushInfo& flush_info = iter.second;
       if (iter_stream_id == stream_id) {
         flushed_stream_flush_id = flush_info.flushed_stream_flush_id;
@@ -447,7 +448,7 @@
     uint32_t highest_flush_id = 0;
     AutoLock lock(context_lock_);
     for (const auto& iter : validate_flushes) {
-      const int32 validated_stream_id = iter.first;
+      const int32_t validated_stream_id = iter.first;
       const uint32_t validated_flush_id = iter.second;
       StreamFlushInfo& flush_info = stream_flush_info_[validated_stream_id];
       if (flush_info.verified_stream_flush_id < validated_flush_id) {
@@ -464,7 +465,7 @@
   return 0;
 }
 
-uint32_t GpuChannelHost::GetHighestValidatedFlushID(int32 stream_id) {
+uint32_t GpuChannelHost::GetHighestValidatedFlushID(int32_t stream_id) {
   AutoLock lock(context_lock_);
   StreamFlushInfo& flush_info = stream_flush_info_[stream_id];
   return flush_info.verified_stream_flush_id;
@@ -489,7 +490,7 @@
 GpuChannelHost::MessageFilter::~MessageFilter() {}
 
 void GpuChannelHost::MessageFilter::AddRoute(
-    int32 route_id,
+    int32_t route_id,
     base::WeakPtr<IPC::Listener> listener,
     scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
   DCHECK(listeners_.find(route_id) == listeners_.end());
@@ -500,7 +501,7 @@
   listeners_[route_id] = info;
 }
 
-void GpuChannelHost::MessageFilter::RemoveRoute(int32 route_id) {
+void GpuChannelHost::MessageFilter::RemoveRoute(int32_t route_id) {
   listeners_.erase(route_id);
 }
 
diff --git a/content/common/gpu/client/gpu_channel_host.h b/content/common/gpu/client/gpu_channel_host.h
index d33c7c7..bf7b3894c 100644
--- a/content/common/gpu/client/gpu_channel_host.h
+++ b/content/common/gpu/client/gpu_channel_host.h
@@ -5,11 +5,15 @@
 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_
 #define CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
 #include "base/atomic_sequence_num.h"
 #include "base/containers/scoped_ptr_hash_map.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
@@ -67,9 +71,9 @@
   GetIOThreadTaskRunner() = 0;
   virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory(size_t size) = 0;
   virtual CreateCommandBufferResult CreateViewCommandBuffer(
-      int32 surface_id,
+      int32_t surface_id,
       const GPUCreateCommandBufferConfig& init_params,
-      int32 route_id) = 0;
+      int32_t route_id) = 0;
 };
 
 // Encapsulates an IPC channel between the client and one GPU process.
@@ -88,7 +92,7 @@
       base::WaitableEvent* shutdown_event,
       gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager);
 
-  static const int32 kDefaultStreamId = -1;
+  static const int32_t kDefaultStreamId = -1;
   static const GpuStreamPriority kDefaultStreamPriority =
       GpuStreamPriority::NORMAL;
 
@@ -108,23 +112,23 @@
   // Set an ordering barrier.  AsyncFlushes any pending barriers on other
   // routes. Combines multiple OrderingBarriers into a single AsyncFlush.
   // Returns the flush ID for the stream or 0 if put offset was not changed.
-  uint32_t OrderingBarrier(int32 route_id,
-                           int32 stream_id,
-                           int32 put_offset,
-                           uint32 flush_count,
+  uint32_t OrderingBarrier(int32_t route_id,
+                           int32_t stream_id,
+                           int32_t put_offset,
+                           uint32_t flush_count,
                            const std::vector<ui::LatencyInfo>& latency_info,
                            bool put_offset_changed,
                            bool do_flush);
 
-  void FlushPendingStream(int32 stream_id);
+  void FlushPendingStream(int32_t stream_id);
 
   // Create and connect to a command buffer in the GPU process.
   scoped_ptr<CommandBufferProxyImpl> CreateViewCommandBuffer(
-      int32 surface_id,
+      int32_t surface_id,
       CommandBufferProxyImpl* share_group,
-      int32 stream_id,
+      int32_t stream_id,
       GpuStreamPriority stream_priority,
-      const std::vector<int32>& attribs,
+      const std::vector<int32_t>& attribs,
       const GURL& active_url,
       gfx::GpuPreference gpu_preference);
 
@@ -132,9 +136,9 @@
   scoped_ptr<CommandBufferProxyImpl> CreateOffscreenCommandBuffer(
       const gfx::Size& size,
       CommandBufferProxyImpl* share_group,
-      int32 stream_id,
+      int32_t stream_id,
       GpuStreamPriority stream_priority,
-      const std::vector<int32>& attribs,
+      const std::vector<int32_t>& attribs,
       const GURL& active_url,
       gfx::GpuPreference gpu_preference);
 
@@ -166,7 +170,7 @@
       base::SharedMemoryHandle source_handle);
 
   // Reserve one unused transfer buffer ID.
-  int32 ReserveTransferBufferId();
+  int32_t ReserveTransferBufferId();
 
   // Returns a GPU memory buffer handle to the buffer that can be sent via
   // IPC to the GPU process. The caller is responsible for ensuring it is
@@ -176,13 +180,13 @@
       bool* requires_sync_point);
 
   // Reserve one unused image ID.
-  int32 ReserveImageId();
+  int32_t ReserveImageId();
 
   // Generate a route ID guaranteed to be unique for this channel.
-  int32 GenerateRouteID();
+  int32_t GenerateRouteID();
 
   // Generate a stream ID guaranteed to be unique for this channel.
-  int32 GenerateStreamID();
+  int32_t GenerateStreamID();
 
   // Sends a synchronous nop to the server which validate that all previous IPC
   // messages have been received. Once the synchronous nop has been sent to the
@@ -192,10 +196,10 @@
   // If the validation fails (which can only happen upon context lost), the
   // highest validated flush id will not change. If no flush ID were ever
   // validated then it will return 0 (Note the lowest valid flush ID is 1).
-  uint32_t ValidateFlushIDReachedServer(int32 stream_id, bool force_validate);
+  uint32_t ValidateFlushIDReachedServer(int32_t stream_id, bool force_validate);
 
   // Returns the highest validated flush ID for a given stream.
-  uint32_t GetHighestValidatedFlushID(int32 stream_id);
+  uint32_t GetHighestValidatedFlushID(int32_t stream_id);
 
  private:
   friend class base::RefCountedThreadSafe<GpuChannelHost>;
@@ -208,11 +212,11 @@
     MessageFilter();
 
     // Called on the IO thread.
-    void AddRoute(int32 route_id,
+    void AddRoute(int32_t route_id,
                   base::WeakPtr<IPC::Listener> listener,
                   scoped_refptr<base::SingleThreadTaskRunner> task_runner);
     // Called on the IO thread.
-    void RemoveRoute(int32 route_id);
+    void RemoveRoute(int32_t route_id);
 
     // IPC::MessageFilter implementation
     // (called on the IO thread):
@@ -237,7 +241,7 @@
 
     // Threading notes: |listeners_| is only accessed on the IO thread. Every
     // other field is protected by |lock_|.
-    base::hash_map<int32, ListenerInfo> listeners_;
+    base::hash_map<int32_t, ListenerInfo> listeners_;
 
     // Protects all fields below this one.
     mutable base::Lock lock_;
@@ -257,9 +261,9 @@
 
     // These are local per context.
     bool flush_pending;
-    int32 route_id;
-    int32 put_offset;
-    uint32 flush_count;
+    int32_t route_id;
+    int32_t put_offset;
+    uint32_t flush_count;
     uint32_t flush_id;
     std::vector<ui::LatencyInfo> latency_info;
   };
@@ -304,7 +308,7 @@
   // Protects channel_ and stream_flush_info_.
   mutable base::Lock context_lock_;
   scoped_ptr<IPC::SyncChannel> channel_;
-  base::hash_map<int32, StreamFlushInfo> stream_flush_info_;
+  base::hash_map<int32_t, StreamFlushInfo> stream_flush_info_;
 
   DISALLOW_COPY_AND_ASSIGN(GpuChannelHost);
 };
diff --git a/content/common/gpu/client/gpu_jpeg_decode_accelerator_host.cc b/content/common/gpu/client/gpu_jpeg_decode_accelerator_host.cc
index 6470101..eac971b 100644
--- a/content/common/gpu/client/gpu_jpeg_decode_accelerator_host.cc
+++ b/content/common/gpu/client/gpu_jpeg_decode_accelerator_host.cc
@@ -4,11 +4,15 @@
 
 #include "content/common/gpu/client/gpu_jpeg_decode_accelerator_host.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/shared_memory_handle.h"
 #include "base/memory/weak_ptr.h"
 #include "base/synchronization/waitable_event.h"
+#include "build/build_config.h"
 #include "content/common/gpu/client/gpu_channel_host.h"
 #include "content/common/gpu/gpu_messages.h"
 #include "ipc/ipc_listener.h"
@@ -94,7 +98,7 @@
 
 GpuJpegDecodeAcceleratorHost::GpuJpegDecodeAcceleratorHost(
     GpuChannelHost* channel,
-    int32 route_id,
+    int32_t route_id,
     const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner)
     : channel_(channel),
       decoder_route_id_(route_id),
diff --git a/content/common/gpu/client/gpu_jpeg_decode_accelerator_host.h b/content/common/gpu/client/gpu_jpeg_decode_accelerator_host.h
index 8490801e..53465f3 100644
--- a/content/common/gpu/client/gpu_jpeg_decode_accelerator_host.h
+++ b/content/common/gpu/client/gpu_jpeg_decode_accelerator_host.h
@@ -5,6 +5,9 @@
 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_JPEG_DECODE_ACCELERATOR_HOST_H_
 #define CONTENT_COMMON_GPU_CLIENT_GPU_JPEG_DECODE_ACCELERATOR_HOST_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/threading/non_thread_safe.h"
 #include "media/video/jpeg_decode_accelerator.h"
@@ -31,7 +34,7 @@
   // guaranteed not to outlive |channel|.
   GpuJpegDecodeAcceleratorHost(
       GpuChannelHost* channel,
-      int32 route_id,
+      int32_t route_id,
       const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner);
   ~GpuJpegDecodeAcceleratorHost() override;
 
@@ -55,7 +58,7 @@
   GpuChannelHost* channel_;
 
   // Route ID for the associated decoder in the GPU process.
-  int32 decoder_route_id_;
+  int32_t decoder_route_id_;
 
   // GPU IO task runner.
   scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl.cc b/content/common/gpu/client/gpu_memory_buffer_impl.cc
index e900829f..5c6571a 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl.cc
+++ b/content/common/gpu/client/gpu_memory_buffer_impl.cc
@@ -5,6 +5,7 @@
 #include "content/common/gpu/client/gpu_memory_buffer_impl.h"
 
 #include "base/logging.h"
+#include "build/build_config.h"
 #include "content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h"
 
 #if defined(OS_MACOSX)
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl.h b/content/common/gpu/client/gpu_memory_buffer_impl.h
index a3ba3f5..954a8753 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl.h
+++ b/content/common/gpu/client/gpu_memory_buffer_impl.h
@@ -6,6 +6,7 @@
 #define CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_H_
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
 #include "gpu/command_buffer/common/sync_token.h"
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_io_surface.h b/content/common/gpu/client/gpu_memory_buffer_impl_io_surface.h
index 79cde4d..6a05dd6 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl_io_surface.h
+++ b/content/common/gpu/client/gpu_memory_buffer_impl_io_surface.h
@@ -6,8 +6,11 @@
 #define CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_
 
 #include <IOSurface/IOSurface.h>
+#include <stddef.h>
+#include <stdint.h>
 
 #include "base/mac/scoped_cftyperef.h"
+#include "base/macros.h"
 #include "content/common/content_export.h"
 #include "content/common/gpu/client/gpu_memory_buffer_impl.h"
 
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_pixmap.h b/content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_pixmap.h
index 8256fb45..aa073e1 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_pixmap.h
+++ b/content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_pixmap.h
@@ -5,6 +5,9 @@
 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_OZONE_NATIVE_PIXMAP_H_
 #define CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_OZONE_NATIVE_PIXMAP_H_
 
+#include <stddef.h>
+
+#include "base/macros.h"
 #include "content/common/content_export.h"
 #include "content/common/gpu/client/gpu_memory_buffer_impl.h"
 
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc b/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc
index 11f54c4..0c180c1 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc
+++ b/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc
@@ -4,6 +4,8 @@
 
 #include "content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h"
 
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/numerics/safe_math.h"
 #include "base/process/memory.h"
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h b/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h
index 22f292a..9416cbb3 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h
+++ b/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h
@@ -5,6 +5,9 @@
 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_SHARED_MEMORY_H_
 #define CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_SHARED_MEMORY_H_
 
+#include <stddef.h>
+
+#include "base/macros.h"
 #include "content/common/content_export.h"
 #include "content/common/gpu/client/gpu_memory_buffer_impl.h"
 
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.h b/content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.h
index b9d55f1b..1613c631 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.h
+++ b/content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.h
@@ -6,7 +6,9 @@
 #define CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_SURFACE_TEXTURE_H_
 
 #include <android/native_window.h>
+#include <stddef.h>
 
+#include "base/macros.h"
 #include "content/common/content_export.h"
 #include "content/common/gpu/client/gpu_memory_buffer_impl.h"
 
diff --git a/content/common/gpu/client/gpu_video_decode_accelerator_host.cc b/content/common/gpu/client/gpu_video_decode_accelerator_host.cc
index 621d210..19a336b 100644
--- a/content/common/gpu/client/gpu_video_decode_accelerator_host.cc
+++ b/content/common/gpu/client/gpu_video_decode_accelerator_host.cc
@@ -7,6 +7,7 @@
 #include "base/bind.h"
 #include "base/logging.h"
 #include "base/message_loop/message_loop.h"
+#include "build/build_config.h"
 #include "content/common/gpu/client/gpu_channel_host.h"
 #include "content/common/gpu/gpu_messages.h"
 #include "content/common/view_messages.h"
@@ -89,7 +90,7 @@
   if (!impl_)
     return false;
 
-  int32 route_id = channel_->GenerateRouteID();
+  int32_t route_id = channel_->GenerateRouteID();
   channel_->AddRoute(route_id, weak_this_factory_.GetWeakPtr());
 
   bool succeeded = false;
@@ -144,9 +145,9 @@
   if (!channel_)
     return;
   // Rearrange data for IPC command.
-  std::vector<int32> buffer_ids;
-  std::vector<uint32> texture_ids;
-  for (uint32 i = 0; i < buffers.size(); i++) {
+  std::vector<int32_t> buffer_ids;
+  std::vector<uint32_t> texture_ids;
+  for (uint32_t i = 0; i < buffers.size(); i++) {
     const media::PictureBuffer& buffer = buffers[i];
     if (buffer.size() != picture_buffer_dimensions_) {
       DLOG(ERROR) << "buffer.size() invalid: expected "
@@ -163,7 +164,7 @@
 }
 
 void GpuVideoDecodeAcceleratorHost::ReusePictureBuffer(
-    int32 picture_buffer_id) {
+    int32_t picture_buffer_id) {
   DCHECK(CalledOnValidThread());
   if (!channel_)
     return;
@@ -211,7 +212,7 @@
 
 void GpuVideoDecodeAcceleratorHost::Send(IPC::Message* message) {
   DCHECK(CalledOnValidThread());
-  uint32 message_type = message->type();
+  uint32_t message_type = message->type();
   if (!channel_->Send(message)) {
     DLOG(ERROR) << "Send(" << message_type << ") failed";
     PostNotifyError(PLATFORM_FAILURE);
@@ -225,16 +226,16 @@
 }
 
 void GpuVideoDecodeAcceleratorHost::OnBitstreamBufferProcessed(
-    int32 bitstream_buffer_id) {
+    int32_t bitstream_buffer_id) {
   DCHECK(CalledOnValidThread());
   if (client_)
     client_->NotifyEndOfBitstreamBuffer(bitstream_buffer_id);
 }
 
 void GpuVideoDecodeAcceleratorHost::OnProvidePictureBuffer(
-    uint32 num_requested_buffers,
+    uint32_t num_requested_buffers,
     const gfx::Size& dimensions,
-    uint32 texture_target) {
+    uint32_t texture_target) {
   DCHECK(CalledOnValidThread());
   picture_buffer_dimensions_ = dimensions;
   if (client_) {
@@ -244,15 +245,15 @@
 }
 
 void GpuVideoDecodeAcceleratorHost::OnDismissPictureBuffer(
-    int32 picture_buffer_id) {
+    int32_t picture_buffer_id) {
   DCHECK(CalledOnValidThread());
   if (client_)
     client_->DismissPictureBuffer(picture_buffer_id);
 }
 
 void GpuVideoDecodeAcceleratorHost::OnPictureReady(
-    int32 picture_buffer_id,
-    int32 bitstream_buffer_id,
+    int32_t picture_buffer_id,
+    int32_t bitstream_buffer_id,
     const gfx::Rect& visible_rect,
     bool allow_overlay) {
   DCHECK(CalledOnValidThread());
@@ -275,7 +276,7 @@
     client_->NotifyResetDone();
 }
 
-void GpuVideoDecodeAcceleratorHost::OnNotifyError(uint32 error) {
+void GpuVideoDecodeAcceleratorHost::OnNotifyError(uint32_t error) {
   DCHECK(CalledOnValidThread());
   if (!client_)
     return;
diff --git a/content/common/gpu/client/gpu_video_decode_accelerator_host.h b/content/common/gpu/client/gpu_video_decode_accelerator_host.h
index 33a516f..5e4ba9df 100644
--- a/content/common/gpu/client/gpu_video_decode_accelerator_host.h
+++ b/content/common/gpu/client/gpu_video_decode_accelerator_host.h
@@ -5,8 +5,11 @@
 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_
 #define CONTENT_COMMON_GPU_CLIENT_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_
 
+#include <stdint.h>
+
 #include <vector>
 
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/threading/non_thread_safe.h"
 #include "content/common/gpu/client/command_buffer_proxy_impl.h"
@@ -40,7 +43,7 @@
   void Decode(const media::BitstreamBuffer& bitstream_buffer) override;
   void AssignPictureBuffers(
       const std::vector<media::PictureBuffer>& buffers) override;
-  void ReusePictureBuffer(int32 picture_buffer_id) override;
+  void ReusePictureBuffer(int32_t picture_buffer_id) override;
   void Flush() override;
   void Reset() override;
   void Destroy() override;
@@ -60,18 +63,18 @@
   // IPC handlers, proxying media::VideoDecodeAccelerator::Client for the GPU
   // process.  Should not be called directly.
   void OnCdmAttached(bool success);
-  void OnBitstreamBufferProcessed(int32 bitstream_buffer_id);
-  void OnProvidePictureBuffer(uint32 num_requested_buffers,
+  void OnBitstreamBufferProcessed(int32_t bitstream_buffer_id);
+  void OnProvidePictureBuffer(uint32_t num_requested_buffers,
                               const gfx::Size& dimensions,
-                              uint32 texture_target);
-  void OnDismissPictureBuffer(int32 picture_buffer_id);
-  void OnPictureReady(int32 picture_buffer_id,
-                      int32 bitstream_buffer_id,
+                              uint32_t texture_target);
+  void OnDismissPictureBuffer(int32_t picture_buffer_id);
+  void OnPictureReady(int32_t picture_buffer_id,
+                      int32_t bitstream_buffer_id,
                       const gfx::Rect& visible_rect,
                       bool allow_overlay);
   void OnFlushDone();
   void OnResetDone();
-  void OnNotifyError(uint32 error);
+  void OnNotifyError(uint32_t error);
 
   // Unowned reference to the GpuChannelHost to send IPC messages to the GPU
   // process.  |channel_| outlives |impl_|, so the reference is always valid as
@@ -79,7 +82,7 @@
   GpuChannelHost* channel_;
 
   // Route ID for the associated decoder in the GPU process.
-  int32 decoder_route_id_;
+  int32_t decoder_route_id_;
 
   // The client that will receive callbacks from the decoder.
   Client* client_;
diff --git a/content/common/gpu/client/gpu_video_encode_accelerator_host.cc b/content/common/gpu/client/gpu_video_encode_accelerator_host.cc
index 458d96f..9002490e 100644
--- a/content/common/gpu/client/gpu_video_encode_accelerator_host.cc
+++ b/content/common/gpu/client/gpu_video_encode_accelerator_host.cc
@@ -80,7 +80,7 @@
     media::VideoPixelFormat input_format,
     const gfx::Size& input_visible_size,
     media::VideoCodecProfile output_profile,
-    uint32 initial_bitrate,
+    uint32_t initial_bitrate,
     Client* client) {
   DCHECK(CalledOnValidThread());
   client_ = client;
@@ -89,7 +89,7 @@
     return false;
   }
 
-  int32 route_id = channel_->GenerateRouteID();
+  int32_t route_id = channel_->GenerateRouteID();
   channel_->AddRoute(route_id, weak_this_factory_.GetWeakPtr());
 
   bool succeeded = false;
@@ -153,8 +153,8 @@
 }
 
 void GpuVideoEncodeAcceleratorHost::RequestEncodingParametersChange(
-    uint32 bitrate,
-    uint32 framerate) {
+    uint32_t bitrate,
+    uint32_t framerate) {
   DCHECK(CalledOnValidThread());
   if (!channel_)
     return;
@@ -252,7 +252,7 @@
 
 void GpuVideoEncodeAcceleratorHost::Send(IPC::Message* message) {
   DCHECK(CalledOnValidThread());
-  uint32 message_type = message->type();
+  uint32_t message_type = message->type();
   if (!channel_->Send(message)) {
     PostNotifyError(FROM_HERE, kPlatformFailureError,
                     base::StringPrintf("Send(%d) failed", message_type));
@@ -260,9 +260,9 @@
 }
 
 void GpuVideoEncodeAcceleratorHost::OnRequireBitstreamBuffers(
-    uint32 input_count,
+    uint32_t input_count,
     const gfx::Size& input_coded_size,
-    uint32 output_buffer_size) {
+    uint32_t output_buffer_size) {
   DCHECK(CalledOnValidThread());
   DVLOG(2) << "OnRequireBitstreamBuffers(): input_count=" << input_count
            << ", input_coded_size=" << input_coded_size.ToString()
@@ -273,7 +273,7 @@
   }
 }
 
-void GpuVideoEncodeAcceleratorHost::OnNotifyInputDone(int32 frame_id) {
+void GpuVideoEncodeAcceleratorHost::OnNotifyInputDone(int32_t frame_id) {
   DCHECK(CalledOnValidThread());
   DVLOG(3) << "OnNotifyInputDone(): frame_id=" << frame_id;
   // Fun-fact: std::hash_map is not spec'd to be re-entrant; since freeing a
@@ -294,8 +294,8 @@
 }
 
 void GpuVideoEncodeAcceleratorHost::OnBitstreamBufferReady(
-    int32 bitstream_buffer_id,
-    uint32 payload_size,
+    int32_t bitstream_buffer_id,
+    uint32_t payload_size,
     bool key_frame) {
   DCHECK(CalledOnValidThread());
   DVLOG(3) << "OnBitstreamBufferReady(): "
diff --git a/content/common/gpu/client/gpu_video_encode_accelerator_host.h b/content/common/gpu/client/gpu_video_encode_accelerator_host.h
index 6395356..3899593 100644
--- a/content/common/gpu/client/gpu_video_encode_accelerator_host.h
+++ b/content/common/gpu/client/gpu_video_encode_accelerator_host.h
@@ -5,9 +5,12 @@
 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_VIDEO_ENCODE_ACCELERATOR_HOST_H_
 #define CONTENT_COMMON_GPU_CLIENT_GPU_VIDEO_ENCODE_ACCELERATOR_HOST_H_
 
+#include <stdint.h>
+
 #include <vector>
 
 #include "base/containers/hash_tables.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
 #include "base/threading/non_thread_safe.h"
@@ -54,13 +57,13 @@
   bool Initialize(media::VideoPixelFormat input_format,
                   const gfx::Size& input_visible_size,
                   media::VideoCodecProfile output_profile,
-                  uint32 initial_bitrate,
+                  uint32_t initial_bitrate,
                   Client* client) override;
   void Encode(const scoped_refptr<media::VideoFrame>& frame,
               bool force_keyframe) override;
   void UseOutputBitstreamBuffer(const media::BitstreamBuffer& buffer) override;
-  void RequestEncodingParametersChange(uint32 bitrate,
-                                       uint32 framerate_num) override;
+  void RequestEncodingParametersChange(uint32_t bitrate,
+                                       uint32_t framerate_num) override;
   void Destroy() override;
 
   // CommandBufferProxyImpl::DeletionObserver implementation.
@@ -84,12 +87,12 @@
 
   // IPC handlers, proxying media::VideoEncodeAccelerator::Client for the GPU
   // process.  Should not be called directly.
-  void OnRequireBitstreamBuffers(uint32 input_count,
+  void OnRequireBitstreamBuffers(uint32_t input_count,
                                  const gfx::Size& input_coded_size,
-                                 uint32 output_buffer_size);
-  void OnNotifyInputDone(int32 frame_id);
-  void OnBitstreamBufferReady(int32 bitstream_buffer_id,
-                              uint32 payload_size,
+                                 uint32_t output_buffer_size);
+  void OnNotifyInputDone(int32_t frame_id);
+  void OnBitstreamBufferReady(int32_t bitstream_buffer_id,
+                              uint32_t payload_size,
                               bool key_frame);
   void OnNotifyError(Error error);
 
@@ -99,7 +102,7 @@
   GpuChannelHost* channel_;
 
   // Route ID for the associated encoder in the GPU process.
-  int32 encoder_route_id_;
+  int32_t encoder_route_id_;
 
   // The client that will receive callbacks from the encoder.
   Client* client_;
@@ -111,11 +114,11 @@
 
   // media::VideoFrames sent to the encoder.
   // base::IDMap not used here, since that takes pointers, not scoped_refptr.
-  typedef base::hash_map<int32, scoped_refptr<media::VideoFrame> > FrameMap;
+  typedef base::hash_map<int32_t, scoped_refptr<media::VideoFrame>> FrameMap;
   FrameMap frame_map_;
 
   // ID serial number for the next frame to send to the GPU process.
-  int32 next_frame_id_;
+  int32_t next_frame_id_;
 
   // WeakPtr factory for posting tasks back to itself.
   base::WeakPtrFactory<GpuVideoEncodeAcceleratorHost> weak_this_factory_;
diff --git a/content/common/gpu/client/grcontext_for_webgraphicscontext3d.cc b/content/common/gpu/client/grcontext_for_webgraphicscontext3d.cc
index 73c39ea..0032346 100644
--- a/content/common/gpu/client/grcontext_for_webgraphicscontext3d.cc
+++ b/content/common/gpu/client/grcontext_for_webgraphicscontext3d.cc
@@ -4,7 +4,10 @@
 
 #include "content/common/gpu/client/grcontext_for_webgraphicscontext3d.h"
 
+#include <stddef.h>
+
 #include "base/lazy_instance.h"
+#include "base/macros.h"
 #include "base/trace_event/trace_event.h"
 #include "gpu/blink/webgraphicscontext3d_impl.h"
 #include "gpu/command_buffer/client/gles2_lib.h"
diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
index 7ceb366..f778339 100644
--- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
+++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
@@ -178,7 +178,7 @@
   attribs_for_gles2.lose_context_when_out_of_memory =
       lose_context_when_out_of_memory_;
   DCHECK(attribs_for_gles2.buffer_preserved);
-  std::vector<int32> attribs;
+  std::vector<int32_t> attribs;
   attribs_for_gles2.Serialize(&attribs);
 
   // Create a proxy to a command buffer in the GPU process.
diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h
index 877b3e9..efa27ee 100644
--- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h
+++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h
@@ -5,10 +5,14 @@
 #ifndef CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_
 #define CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/synchronization/lock.h"
@@ -191,7 +195,7 @@
 
   // State needed by MaybeInitializeGL.
   scoped_refptr<GpuChannelHost> host_;
-  int32 surface_id_;
+  int32_t surface_id_;
   GURL active_url_;
   CommandBufferContextType context_type_;
 
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc
index 575dce7..b5e9aec2 100644
--- a/content/common/gpu/gpu_channel.cc
+++ b/content/common/gpu/gpu_channel.cc
@@ -27,6 +27,7 @@
 #include "base/trace_event/memory_dump_manager.h"
 #include "base/trace_event/process_memory_dump.h"
 #include "base/trace_event/trace_event.h"
+#include "build/build_config.h"
 #include "content/common/gpu/gpu_channel_manager.h"
 #include "content/common/gpu/gpu_memory_buffer_factory.h"
 #include "content/common/gpu/gpu_messages.h"
@@ -54,20 +55,20 @@
 
 // Number of milliseconds between successive vsync. Many GL commands block
 // on vsync, so thresholds for preemption should be multiples of this.
-const int64 kVsyncIntervalMs = 17;
+const int64_t kVsyncIntervalMs = 17;
 
 // Amount of time that we will wait for an IPC to be processed before
 // preempting. After a preemption, we must wait this long before triggering
 // another preemption.
-const int64 kPreemptWaitTimeMs = 2 * kVsyncIntervalMs;
+const int64_t kPreemptWaitTimeMs = 2 * kVsyncIntervalMs;
 
 // Once we trigger a preemption, the maximum duration that we will wait
 // before clearing the preemption.
-const int64 kMaxPreemptTimeMs = kVsyncIntervalMs;
+const int64_t kMaxPreemptTimeMs = kVsyncIntervalMs;
 
 // Stop the preemption once the time for the longest pending IPC drops
 // below this threshold.
-const int64 kStopPreemptThresholdMs = kVsyncIntervalMs;
+const int64_t kStopPreemptThresholdMs = kVsyncIntervalMs;
 
 }  // anonymous namespace
 
@@ -255,7 +256,7 @@
   timer_ = nullptr;
 }
 
-void GpuChannelMessageFilter::OnChannelConnected(int32 peer_pid) {
+void GpuChannelMessageFilter::OnChannelConnected(int32_t peer_pid) {
   DCHECK(peer_pid_ == base::kNullProcessId);
   peer_pid_ = peer_pid;
   for (scoped_refptr<IPC::MessageFilter>& filter : channel_filters_) {
@@ -525,19 +526,19 @@
   UpdatePreemptionState();
 }
 
-GpuChannel::StreamState::StreamState(int32 id, GpuStreamPriority priority)
+GpuChannel::StreamState::StreamState(int32_t id, GpuStreamPriority priority)
     : id_(id), priority_(priority) {}
 
 GpuChannel::StreamState::~StreamState() {}
 
-void GpuChannel::StreamState::AddRoute(int32 route_id) {
+void GpuChannel::StreamState::AddRoute(int32_t route_id) {
   routes_.insert(route_id);
 }
-void GpuChannel::StreamState::RemoveRoute(int32 route_id) {
+void GpuChannel::StreamState::RemoveRoute(int32_t route_id) {
   routes_.erase(route_id);
 }
 
-bool GpuChannel::StreamState::HasRoute(int32 route_id) const {
+bool GpuChannel::StreamState::HasRoute(int32_t route_id) const {
   return routes_.find(route_id) != routes_.end();
 }
 
@@ -694,17 +695,17 @@
 CreateCommandBufferResult GpuChannel::CreateViewCommandBuffer(
     const gfx::GLSurfaceHandle& window,
     const GPUCreateCommandBufferConfig& init_params,
-    int32 route_id) {
+    int32_t route_id) {
   TRACE_EVENT1("gpu", "GpuChannel::CreateViewCommandBuffer", "route_id",
                route_id);
 
-  int32 share_group_id = init_params.share_group_id;
+  int32_t share_group_id = init_params.share_group_id;
   GpuCommandBufferStub* share_group = stubs_.get(share_group_id);
 
   if (!share_group && share_group_id != MSG_ROUTING_NONE)
     return CREATE_COMMAND_BUFFER_FAILED;
 
-  int32 stream_id = init_params.stream_id;
+  int32_t stream_id = init_params.stream_id;
   GpuStreamPriority stream_priority = init_params.stream_priority;
 
   if (share_group && stream_id != share_group->stream_id())
@@ -748,7 +749,7 @@
   return CREATE_COMMAND_BUFFER_SUCCEEDED;
 }
 
-GpuCommandBufferStub* GpuChannel::LookupCommandBuffer(int32 route_id) {
+GpuCommandBufferStub* GpuChannel::LookupCommandBuffer(int32_t route_id) {
   return stubs_.get(route_id);
 }
 
@@ -761,11 +762,11 @@
     kv.second->MarkContextLost();
 }
 
-bool GpuChannel::AddRoute(int32 route_id, IPC::Listener* listener) {
+bool GpuChannel::AddRoute(int32_t route_id, IPC::Listener* listener) {
   return router_.AddRoute(route_id, listener);
 }
 
-void GpuChannel::RemoveRoute(int32 route_id) {
+void GpuChannel::RemoveRoute(int32_t route_id) {
   router_.RemoveRoute(route_id);
 }
 
@@ -904,12 +905,12 @@
 void GpuChannel::OnCreateOffscreenCommandBuffer(
     const gfx::Size& size,
     const GPUCreateCommandBufferConfig& init_params,
-    int32 route_id,
+    int32_t route_id,
     bool* succeeded) {
   TRACE_EVENT1("gpu", "GpuChannel::OnCreateOffscreenCommandBuffer", "route_id",
                route_id);
 
-  int32 share_group_id = init_params.share_group_id;
+  int32_t share_group_id = init_params.share_group_id;
   GpuCommandBufferStub* share_group = stubs_.get(share_group_id);
 
   if (!share_group && share_group_id != MSG_ROUTING_NONE) {
@@ -917,7 +918,7 @@
     return;
   }
 
-  int32 stream_id = init_params.stream_id;
+  int32_t stream_id = init_params.stream_id;
   GpuStreamPriority stream_priority = init_params.stream_priority;
 
   if (share_group && stream_id != share_group->stream_id()) {
@@ -967,7 +968,7 @@
   *succeeded = true;
 }
 
-void GpuChannel::OnDestroyCommandBuffer(int32 route_id) {
+void GpuChannel::OnDestroyCommandBuffer(int32_t route_id) {
   TRACE_EVENT1("gpu", "GpuChannel::OnDestroyCommandBuffer",
                "route_id", route_id);
 
@@ -978,7 +979,7 @@
 
   router_.RemoveRoute(route_id);
 
-  int32 stream_id = stub->stream_id();
+  int32_t stream_id = stub->stream_id();
   auto stream_it = streams_.find(stream_id);
   DCHECK(stream_it != streams_.end());
   stream_it->second.RemoveRoute(route_id);
@@ -993,7 +994,8 @@
   }
 }
 
-void GpuChannel::OnCreateJpegDecoder(int32 route_id, IPC::Message* reply_msg) {
+void GpuChannel::OnCreateJpegDecoder(int32_t route_id,
+                                     IPC::Message* reply_msg) {
   if (!jpeg_decoder_) {
     jpeg_decoder_.reset(new GpuJpegDecodeAccelerator(this, io_task_runner_));
   }
@@ -1018,14 +1020,14 @@
                             filter_, make_scoped_refptr(filter)));
 }
 
-uint64 GpuChannel::GetMemoryUsage() {
+uint64_t GpuChannel::GetMemoryUsage() {
   // Collect the unique memory trackers in use by the |stubs_|.
   std::set<gpu::gles2::MemoryTracker*> unique_memory_trackers;
   for (auto& kv : stubs_)
     unique_memory_trackers.insert(kv.second->GetMemoryTracker());
 
   // Sum the memory usage for all unique memory trackers.
-  uint64 size = 0;
+  uint64_t size = 0;
   for (auto* tracker : unique_memory_trackers) {
     size += gpu_channel_manager()->gpu_memory_manager()->GetTrackerMemoryUsage(
         tracker);
@@ -1038,7 +1040,7 @@
     const gfx::GpuMemoryBufferHandle& handle,
     const gfx::Size& size,
     gfx::BufferFormat format,
-    uint32 internalformat) {
+    uint32_t internalformat) {
   switch (handle.type) {
     case gfx::SHARED_MEMORY_BUFFER: {
       if (!base::IsValueInRangeForNumericType<size_t>(handle.stride))
diff --git a/content/common/gpu/gpu_channel.h b/content/common/gpu/gpu_channel.h
index a47ccf9..e170b21 100644
--- a/content/common/gpu/gpu_channel.h
+++ b/content/common/gpu/gpu_channel.h
@@ -5,10 +5,14 @@
 #ifndef CONTENT_COMMON_GPU_GPU_CHANNEL_H_
 #define CONTENT_COMMON_GPU_GPU_CHANNEL_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <string>
 
 #include "base/containers/hash_tables.h"
 #include "base/containers/scoped_ptr_hash_map.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
@@ -118,21 +122,21 @@
   CreateCommandBufferResult CreateViewCommandBuffer(
       const gfx::GLSurfaceHandle& window,
       const GPUCreateCommandBufferConfig& init_params,
-      int32 route_id);
+      int32_t route_id);
 
   gfx::GLShareGroup* share_group() const { return share_group_.get(); }
 
-  GpuCommandBufferStub* LookupCommandBuffer(int32 route_id);
+  GpuCommandBufferStub* LookupCommandBuffer(int32_t route_id);
 
   void LoseAllContexts();
   void MarkAllContextsLost();
 
   // Called to add a listener for a particular message routing ID.
   // Returns true if succeeded.
-  bool AddRoute(int32 route_id, IPC::Listener* listener);
+  bool AddRoute(int32_t route_id, IPC::Listener* listener);
 
   // Called to remove a listener for a particular message routing ID.
-  void RemoveRoute(int32 route_id);
+  void RemoveRoute(int32_t route_id);
 
   void SetPreemptingFlag(gpu::PreemptionFlag* flag);
 
@@ -146,13 +150,13 @@
   void AddFilter(IPC::MessageFilter* filter);
   void RemoveFilter(IPC::MessageFilter* filter);
 
-  uint64 GetMemoryUsage();
+  uint64_t GetMemoryUsage();
 
   scoped_refptr<gl::GLImage> CreateImageForGpuMemoryBuffer(
       const gfx::GpuMemoryBufferHandle& handle,
       const gfx::Size& size,
       gfx::BufferFormat format,
-      uint32 internalformat);
+      uint32_t internalformat);
 
   bool allow_future_sync_points() const { return allow_future_sync_points_; }
 
@@ -192,26 +196,26 @@
   scoped_refptr<GpuChannelMessageFilter> filter_;
 
   // Map of routing id to command buffer stub.
-  base::ScopedPtrHashMap<int32, scoped_ptr<GpuCommandBufferStub>> stubs_;
+  base::ScopedPtrHashMap<int32_t, scoped_ptr<GpuCommandBufferStub>> stubs_;
 
  private:
   class StreamState {
    public:
-    StreamState(int32 id, GpuStreamPriority priority);
+    StreamState(int32_t id, GpuStreamPriority priority);
     ~StreamState();
 
-    int32 id() const { return id_; }
+    int32_t id() const { return id_; }
     GpuStreamPriority priority() const { return priority_; }
 
-    void AddRoute(int32 route_id);
-    void RemoveRoute(int32 route_id);
-    bool HasRoute(int32 route_id) const;
+    void AddRoute(int32_t route_id);
+    void RemoveRoute(int32_t route_id);
+    bool HasRoute(int32_t route_id) const;
     bool HasRoutes() const;
 
    private:
-    int32 id_;
+    int32_t id_;
     GpuStreamPriority priority_;
-    base::hash_set<int32> routes_;
+    base::hash_set<int32_t> routes_;
   };
 
   void OnDestroy();
@@ -224,10 +228,10 @@
   void OnCreateOffscreenCommandBuffer(
       const gfx::Size& size,
       const GPUCreateCommandBufferConfig& init_params,
-      int32 route_id,
+      int32_t route_id,
       bool* succeeded);
-  void OnDestroyCommandBuffer(int32 route_id);
-  void OnCreateJpegDecoder(int32 route_id, IPC::Message* reply_msg);
+  void OnDestroyCommandBuffer(int32_t route_id);
+  void OnCreateJpegDecoder(int32_t route_id, IPC::Message* reply_msg);
 
   // The lifetime of objects of this class is managed by a GpuChannelManager.
   // The GpuChannelManager destroy all the GpuChannels that they own when they
@@ -284,7 +288,7 @@
   size_t num_stubs_descheduled_;
 
   // Map of stream id to stream state.
-  base::hash_map<int32, StreamState> streams_;
+  base::hash_map<int32_t, StreamState> streams_;
 
   bool allow_future_sync_points_;
   bool allow_real_time_streams_;
@@ -319,7 +323,7 @@
   // IPC::MessageFilter implementation.
   void OnFilterAdded(IPC::Sender* sender) override;
   void OnFilterRemoved() override;
-  void OnChannelConnected(int32 peer_pid) override;
+  void OnChannelConnected(int32_t peer_pid) override;
   void OnChannelError() override;
   void OnChannelClosing() override;
   bool OnMessageReceived(const IPC::Message& message) override;
@@ -393,7 +397,7 @@
 
   // TODO(dyen): Temporary sync point data, remove once new sync point lands.
   bool retire_sync_point;
-  uint32 sync_point;
+  uint32_t sync_point;
 
   GpuChannelMessage(const IPC::Message& msg)
       : order_number(0),
diff --git a/content/common/gpu/gpu_channel_manager.cc b/content/common/gpu/gpu_channel_manager.cc
index 60dbd9c..d5cf8c8 100644
--- a/content/common/gpu/gpu_channel_manager.cc
+++ b/content/common/gpu/gpu_channel_manager.cc
@@ -11,6 +11,7 @@
 #include "base/location.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
+#include "build/build_config.h"
 #include "content/common/gpu/gpu_channel.h"
 #include "content/common/gpu/gpu_memory_buffer_factory.h"
 #include "content/common/gpu/gpu_memory_manager.h"
@@ -114,15 +115,15 @@
   return ++last_id;
 }
 
-void GpuChannelManager::AddRoute(int32 routing_id, IPC::Listener* listener) {
+void GpuChannelManager::AddRoute(int32_t routing_id, IPC::Listener* listener) {
   router_.AddRoute(routing_id, listener);
 }
 
-void GpuChannelManager::RemoveRoute(int32 routing_id) {
+void GpuChannelManager::RemoveRoute(int32_t routing_id) {
   router_.RemoveRoute(routing_id);
 }
 
-GpuChannel* GpuChannelManager::LookupChannel(int32 client_id) const {
+GpuChannel* GpuChannelManager::LookupChannel(int32_t client_id) const {
   const auto& it = gpu_channels_.find(client_id);
   return it != gpu_channels_.end() ? it->second : nullptr;
 }
@@ -196,9 +197,9 @@
 
 void GpuChannelManager::OnCreateViewCommandBuffer(
     const gfx::GLSurfaceHandle& window,
-    int32 client_id,
+    int32_t client_id,
     const GPUCreateCommandBufferConfig& init_params,
-    int32 route_id) {
+    int32_t route_id) {
   CreateCommandBufferResult result = CREATE_COMMAND_BUFFER_FAILED;
 
   auto it = gpu_channels_.find(client_id);
diff --git a/content/common/gpu/gpu_channel_manager.h b/content/common/gpu/gpu_channel_manager.h
index c3e889a..81d7fbed 100644
--- a/content/common/gpu/gpu_channel_manager.h
+++ b/content/common/gpu/gpu_channel_manager.h
@@ -5,11 +5,14 @@
 #ifndef CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_
 #define CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_
 
+#include <stdint.h>
+
 #include <deque>
 #include <string>
 #include <vector>
 
 #include "base/containers/scoped_ptr_hash_map.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
@@ -86,8 +89,8 @@
   void LoseAllContexts();
 
   int GenerateRouteID();
-  void AddRoute(int32 routing_id, IPC::Listener* listener);
-  void RemoveRoute(int32 routing_id);
+  void AddRoute(int32_t routing_id, IPC::Listener* listener);
+  void RemoveRoute(int32_t routing_id);
 
   gpu::gles2::ProgramCache* program_cache();
   gpu::gles2::ShaderTranslatorCache* shader_translator_cache();
@@ -95,7 +98,7 @@
 
   GpuMemoryManager* gpu_memory_manager() { return &gpu_memory_manager_; }
 
-  GpuChannel* LookupChannel(int32 client_id) const;
+  GpuChannel* LookupChannel(int32_t client_id) const;
 
   gfx::GLSurface* GetDefaultOffscreenSurface();
 
@@ -140,19 +143,21 @@
   // These objects manage channels to individual renderer processes there is
   // one channel for each renderer process that has connected to this GPU
   // process.
-  base::ScopedPtrHashMap<int32, scoped_ptr<GpuChannel>> gpu_channels_;
+  base::ScopedPtrHashMap<int32_t, scoped_ptr<GpuChannel>> gpu_channels_;
 
  private:
   // Message handlers.
   bool OnControlMessageReceived(const IPC::Message& msg);
   void OnEstablishChannel(const GpuMsg_EstablishChannel_Params& params);
   void OnCloseChannel(const IPC::ChannelHandle& channel_handle);
-  void OnVisibilityChanged(int32 render_view_id, int32 client_id, bool visible);
+  void OnVisibilityChanged(int32_t render_view_id,
+                           int32_t client_id,
+                           bool visible);
   void OnCreateViewCommandBuffer(
       const gfx::GLSurfaceHandle& window,
-      int32 client_id,
+      int32_t client_id,
       const GPUCreateCommandBufferConfig& init_params,
-      int32 route_id);
+      int32_t route_id);
   void OnLoadedShader(const std::string& shader);
   void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, int client_id);
   void DestroyGpuMemoryBufferOnIO(gfx::GpuMemoryBufferId id, int client_id);
diff --git a/content/common/gpu/gpu_channel_manager_unittest.cc b/content/common/gpu/gpu_channel_manager_unittest.cc
index ddea0f1..bef6948 100644
--- a/content/common/gpu/gpu_channel_manager_unittest.cc
+++ b/content/common/gpu/gpu_channel_manager_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 "content/common/gpu/gpu_channel.h"
 #include "content/common/gpu/gpu_channel_manager.h"
 #include "content/common/gpu/gpu_channel_test_common.h"
@@ -23,8 +26,8 @@
 };
 
 TEST_F(GpuChannelManagerTest, EstablishChannel) {
-  int32 kClientId = 1;
-  uint64 kClientTracingId = 1;
+  int32_t kClientId = 1;
+  uint64_t kClientTracingId = 1;
 
   ASSERT_TRUE(channel_manager());
 
@@ -52,10 +55,10 @@
 }
 
 TEST_F(GpuChannelManagerTest, SecureValueStateForwarding) {
-  int32 kClientId1 = 111;
-  uint64 kClientTracingId1 = 11111;
-  int32 kClientId2 = 222;
-  uint64 kClientTracingId2 = 22222;
+  int32_t kClientId1 = 111;
+  uint64_t kClientTracingId1 = 11111;
+  int32_t kClientId2 = 222;
+  uint64_t kClientTracingId2 = 22222;
   ValueState value_state1;
   value_state1.int_value[0] = 1111;
   value_state1.int_value[1] = 0;
diff --git a/content/common/gpu/gpu_channel_test_common.h b/content/common/gpu/gpu_channel_test_common.h
index 33d92fc6..ed224353 100644
--- a/content/common/gpu/gpu_channel_test_common.h
+++ b/content/common/gpu/gpu_channel_test_common.h
@@ -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/memory/scoped_ptr.h"
 #include "content/common/gpu/gpu_channel.h"
 #include "content/common/gpu/gpu_channel_manager.h"
diff --git a/content/common/gpu/gpu_channel_unittest.cc b/content/common/gpu/gpu_channel_unittest.cc
index 37e1ba0f..d7a376ae 100644
--- a/content/common/gpu/gpu_channel_unittest.cc
+++ b/content/common/gpu/gpu_channel_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/test/test_simple_task_runner.h"
 #include "content/common/gpu/gpu_channel.h"
 #include "content/common/gpu/gpu_channel_manager.h"
@@ -16,9 +18,9 @@
   GpuChannelTest() : GpuChannelTestCommon() {}
   ~GpuChannelTest() override {}
 
-  GpuChannel* CreateChannel(int32 client_id, bool allow_real_time_streams) {
+  GpuChannel* CreateChannel(int32_t client_id, bool allow_real_time_streams) {
     DCHECK(channel_manager());
-    uint64 kClientTracingId = 1;
+    uint64_t kClientTracingId = 1;
     GpuMsg_EstablishChannel_Params params;
     params.client_id = client_id;
     params.client_tracing_id = kClientTracingId;
@@ -33,12 +35,12 @@
 };
 
 TEST_F(GpuChannelTest, CreateViewCommandBuffer) {
-  int32 kClientId = 1;
+  int32_t kClientId = 1;
   GpuChannel* channel = CreateChannel(kClientId, false);
   ASSERT_TRUE(channel);
 
   gfx::GLSurfaceHandle surface_handle;
-  int32 kRouteId = 1;
+  int32_t kRouteId = 1;
   GPUCreateCommandBufferConfig init_params;
   init_params.share_group_id = MSG_ROUTING_NONE;
   init_params.stream_id = 0;
@@ -65,13 +67,13 @@
 }
 
 TEST_F(GpuChannelTest, IncompatibleStreamIds) {
-  int32 kClientId = 1;
+  int32_t kClientId = 1;
   GpuChannel* channel = CreateChannel(kClientId, false);
   ASSERT_TRUE(channel);
 
   // Create first context.
-  int32 kRouteId1 = 1;
-  int32 kStreamId1 = 1;
+  int32_t kRouteId1 = 1;
+  int32_t kStreamId1 = 1;
   GPUCreateCommandBufferConfig init_params;
   init_params.share_group_id = MSG_ROUTING_NONE;
   init_params.stream_id = kStreamId1;
@@ -97,8 +99,8 @@
   ASSERT_TRUE(stub);
 
   // Create second context in same share group but different stream.
-  int32 kRouteId2 = 2;
-  int32 kStreamId2 = 2;
+  int32_t kRouteId2 = 2;
+  int32_t kStreamId2 = 2;
 
   init_params.share_group_id = kRouteId1;
   init_params.stream_id = kStreamId2;
@@ -123,13 +125,13 @@
 }
 
 TEST_F(GpuChannelTest, IncompatibleStreamPriorities) {
-  int32 kClientId = 1;
+  int32_t kClientId = 1;
   GpuChannel* channel = CreateChannel(kClientId, false);
   ASSERT_TRUE(channel);
 
   // Create first context.
-  int32 kRouteId1 = 1;
-  int32 kStreamId1 = 1;
+  int32_t kRouteId1 = 1;
+  int32_t kStreamId1 = 1;
   GpuStreamPriority kStreamPriority1 = GpuStreamPriority::NORMAL;
   GPUCreateCommandBufferConfig init_params;
   init_params.share_group_id = MSG_ROUTING_NONE;
@@ -156,8 +158,8 @@
   ASSERT_TRUE(stub);
 
   // Create second context in same share group but different stream.
-  int32 kRouteId2 = 2;
-  int32 kStreamId2 = kStreamId1;
+  int32_t kRouteId2 = 2;
+  int32_t kStreamId2 = kStreamId1;
   GpuStreamPriority kStreamPriority2 = GpuStreamPriority::LOW;
 
   init_params.share_group_id = MSG_ROUTING_NONE;
@@ -183,13 +185,13 @@
 }
 
 TEST_F(GpuChannelTest, StreamLifetime) {
-  int32 kClientId = 1;
+  int32_t kClientId = 1;
   GpuChannel* channel = CreateChannel(kClientId, false);
   ASSERT_TRUE(channel);
 
   // Create first context.
-  int32 kRouteId1 = 1;
-  int32 kStreamId1 = 1;
+  int32_t kRouteId1 = 1;
+  int32_t kStreamId1 = 1;
   GpuStreamPriority kStreamPriority1 = GpuStreamPriority::NORMAL;
   GPUCreateCommandBufferConfig init_params;
   init_params.share_group_id = MSG_ROUTING_NONE;
@@ -228,8 +230,8 @@
   ASSERT_FALSE(stub);
 
   // Create second context in same share group but different stream.
-  int32 kRouteId2 = 2;
-  int32 kStreamId2 = 2;
+  int32_t kRouteId2 = 2;
+  int32_t kStreamId2 = 2;
   GpuStreamPriority kStreamPriority2 = GpuStreamPriority::LOW;
 
   init_params.share_group_id = MSG_ROUTING_NONE;
@@ -255,14 +257,14 @@
 }
 
 TEST_F(GpuChannelTest, RealTimeStreamsDisallowed) {
-  int32 kClientId = 1;
+  int32_t kClientId = 1;
   bool allow_real_time_streams = false;
   GpuChannel* channel = CreateChannel(kClientId, allow_real_time_streams);
   ASSERT_TRUE(channel);
 
   // Create first context.
-  int32 kRouteId = 1;
-  int32 kStreamId = 1;
+  int32_t kRouteId = 1;
+  int32_t kStreamId = 1;
   GpuStreamPriority kStreamPriority = GpuStreamPriority::REAL_TIME;
   GPUCreateCommandBufferConfig init_params;
   init_params.share_group_id = MSG_ROUTING_NONE;
@@ -290,14 +292,14 @@
 }
 
 TEST_F(GpuChannelTest, RealTimeStreamsAllowed) {
-  int32 kClientId = 1;
+  int32_t kClientId = 1;
   bool allow_real_time_streams = true;
   GpuChannel* channel = CreateChannel(kClientId, allow_real_time_streams);
   ASSERT_TRUE(channel);
 
   // Create first context.
-  int32 kRouteId = 1;
-  int32 kStreamId = 1;
+  int32_t kRouteId = 1;
+  int32_t kStreamId = 1;
   GpuStreamPriority kStreamPriority = GpuStreamPriority::REAL_TIME;
   GPUCreateCommandBufferConfig init_params;
   init_params.share_group_id = MSG_ROUTING_NONE;
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
index 9dbe6b3..d21478d 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -7,6 +7,7 @@
 #include "base/command_line.h"
 #include "base/hash.h"
 #include "base/json/json_writer.h"
+#include "base/macros.h"
 #include "base/memory/shared_memory.h"
 #include "base/time/time.h"
 #include "base/trace_event/trace_event.h"
@@ -51,11 +52,11 @@
 
 namespace content {
 struct WaitForCommandState {
-  WaitForCommandState(int32 start, int32 end, IPC::Message* reply)
+  WaitForCommandState(int32_t start, int32_t end, IPC::Message* reply)
       : start(start), end(end), reply(reply) {}
 
-  int32 start;
-  int32 end;
+  int32_t start;
+  int32_t end;
   scoped_ptr<IPC::Message> reply;
 };
 
@@ -120,11 +121,11 @@
 // The first time polling a fence, delay some extra time to allow other
 // stubs to process some work, or else the timing of the fences could
 // allow a pattern of alternating fast and slow frames to occur.
-const int64 kHandleMoreWorkPeriodMs = 2;
-const int64 kHandleMoreWorkPeriodBusyMs = 1;
+const int64_t kHandleMoreWorkPeriodMs = 2;
+const int64_t kHandleMoreWorkPeriodBusyMs = 1;
 
 // Prevents idle work from being starved.
-const int64 kMaxTimeSinceIdleMs = 10;
+const int64_t kMaxTimeSinceIdleMs = 10;
 
 class DevToolsChannelData : public base::trace_event::ConvertableToTraceFormat {
  public:
@@ -161,7 +162,7 @@
   }
 }
 
-uint64_t GetCommandBufferID(int channel_id, int32 route_id) {
+uint64_t GetCommandBufferID(int channel_id, int32_t route_id) {
   return (static_cast<uint64_t>(channel_id) << 32) | route_id;
 }
 
@@ -179,10 +180,10 @@
     gpu::ValueStateMap* pending_valuebuffer_state,
     const gfx::Size& size,
     const gpu::gles2::DisallowedFeatures& disallowed_features,
-    const std::vector<int32>& attribs,
+    const std::vector<int32_t>& attribs,
     gfx::GpuPreference gpu_preference,
-    int32 stream_id,
-    int32 route_id,
+    int32_t stream_id,
+    int32_t route_id,
     bool offscreen,
     GpuWatchdog* watchdog,
     const GURL& active_url)
@@ -681,8 +682,9 @@
   initialized_ = true;
 }
 
-void GpuCommandBufferStub::OnCreateStreamTexture(
-    uint32 texture_id, int32 stream_id, bool* succeeded) {
+void GpuCommandBufferStub::OnCreateStreamTexture(uint32_t texture_id,
+                                                 int32_t stream_id,
+                                                 bool* succeeded) {
 #if defined(OS_ANDROID)
   *succeeded = StreamTexture::Create(this, texture_id, stream_id);
 #else
@@ -695,10 +697,10 @@
   latency_info_callback_ = callback;
 }
 
-int32 GpuCommandBufferStub::GetRequestedAttribute(int attr) const {
+int32_t GpuCommandBufferStub::GetRequestedAttribute(int attr) const {
   // The command buffer is pairs of enum, value
   // search for the requested attribute, return the value.
-  for (std::vector<int32>::const_iterator it = requested_attribs_.begin();
+  for (std::vector<int32_t>::const_iterator it = requested_attribs_.begin();
        it != requested_attribs_.end(); ++it) {
     if (*it++ == attr) {
       return *it;
@@ -707,7 +709,7 @@
   return -1;
 }
 
-void GpuCommandBufferStub::OnSetGetBuffer(int32 shm_id,
+void GpuCommandBufferStub::OnSetGetBuffer(int32_t shm_id,
                                           IPC::Message* reply_message) {
   TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnSetGetBuffer");
   if (command_buffer_)
@@ -750,8 +752,8 @@
   channel_->OnStubSchedulingChanged(this, scheduled);
 }
 
-void GpuCommandBufferStub::OnWaitForTokenInRange(int32 start,
-                                                 int32 end,
+void GpuCommandBufferStub::OnWaitForTokenInRange(int32_t start,
+                                                 int32_t end,
                                                  IPC::Message* reply_message) {
   TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnWaitForTokenInRange");
   DCHECK(command_buffer_.get());
@@ -764,8 +766,8 @@
 }
 
 void GpuCommandBufferStub::OnWaitForGetOffsetInRange(
-    int32 start,
-    int32 end,
+    int32_t start,
+    int32_t end,
     IPC::Message* reply_message) {
   TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnWaitForGetOffsetInRange");
   DCHECK(command_buffer_.get());
@@ -807,8 +809,8 @@
 }
 
 void GpuCommandBufferStub::OnAsyncFlush(
-    int32 put_offset,
-    uint32 flush_count,
+    int32_t put_offset,
+    uint32_t flush_count,
     const std::vector<ui::LatencyInfo>& latency_info) {
   TRACE_EVENT1(
       "gpu", "GpuCommandBufferStub::OnAsyncFlush", "put_offset", put_offset);
@@ -841,9 +843,9 @@
 }
 
 void GpuCommandBufferStub::OnRegisterTransferBuffer(
-    int32 id,
+    int32_t id,
     base::SharedMemoryHandle transfer_buffer,
-    uint32 size) {
+    uint32_t size) {
   TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnRegisterTransferBuffer");
 
   // Take ownership of the memory and map it into this process.
@@ -861,7 +863,7 @@
   }
 }
 
-void GpuCommandBufferStub::OnDestroyTransferBuffer(int32 id) {
+void GpuCommandBufferStub::OnDestroyTransferBuffer(int32_t id) {
   TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnDestroyTransferBuffer");
 
   if (command_buffer_)
@@ -882,7 +884,7 @@
 
 void GpuCommandBufferStub::OnCreateVideoDecoder(
     const media::VideoDecodeAccelerator::Config& config,
-    int32 decoder_route_id,
+    int32_t decoder_route_id,
     IPC::Message* reply_message) {
   TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnCreateVideoDecoder");
   GpuVideoDecodeAccelerator* decoder = new GpuVideoDecodeAccelerator(
@@ -896,8 +898,8 @@
     media::VideoPixelFormat input_format,
     const gfx::Size& input_visible_size,
     media::VideoCodecProfile output_profile,
-    uint32 initial_bitrate,
-    int32 encoder_route_id,
+    uint32_t initial_bitrate,
+    int32_t encoder_route_id,
     IPC::Message* reply_message) {
   TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnCreateVideoEncoder");
   GpuVideoEncodeAccelerator* encoder =
@@ -911,7 +913,7 @@
   // self-delete during destruction of this stub.
 }
 
-void GpuCommandBufferStub::InsertSyncPoint(uint32 sync_point, bool retire) {
+void GpuCommandBufferStub::InsertSyncPoint(uint32_t sync_point, bool retire) {
   sync_points_.push_back(sync_point);
   if (retire) {
     OnMessageReceived(
@@ -919,7 +921,7 @@
   }
 }
 
-void GpuCommandBufferStub::OnRetireSyncPoint(uint32 sync_point) {
+void GpuCommandBufferStub::OnRetireSyncPoint(uint32_t sync_point) {
   DCHECK(!sync_points_.empty() && sync_points_.front() == sync_point);
   sync_points_.pop_front();
 
@@ -938,7 +940,7 @@
   sync_point_manager_->RetireSyncPoint(sync_point);
 }
 
-bool GpuCommandBufferStub::OnWaitSyncPoint(uint32 sync_point) {
+bool GpuCommandBufferStub::OnWaitSyncPoint(uint32_t sync_point) {
   DCHECK(!waiting_for_sync_point_);
   DCHECK(scheduler_->scheduled());
   if (!sync_point)
@@ -965,7 +967,7 @@
   return !waiting_for_sync_point_;
 }
 
-void GpuCommandBufferStub::OnWaitSyncPointCompleted(uint32 sync_point) {
+void GpuCommandBufferStub::OnWaitSyncPointCompleted(uint32_t sync_point) {
   DCHECK(waiting_for_sync_point_);
   DCHECK(!scheduler_->scheduled());
   TRACE_EVENT_ASYNC_END1("gpu", "WaitSyncPoint", this, "GpuCommandBufferStub",
@@ -991,14 +993,14 @@
   }
 }
 
-void GpuCommandBufferStub::OnSignalSyncPoint(uint32 sync_point, uint32 id) {
+void GpuCommandBufferStub::OnSignalSyncPoint(uint32_t sync_point, uint32_t id) {
   sync_point_manager_->AddSyncPointCallback(
       sync_point,
       base::Bind(&GpuCommandBufferStub::OnSignalAck, this->AsWeakPtr(), id));
 }
 
 void GpuCommandBufferStub::OnSignalSyncToken(const gpu::SyncToken& sync_token,
-                                             uint32 id) {
+                                             uint32_t id) {
   scoped_refptr<gpu::SyncPointClientState> release_state =
       sync_point_manager_->GetSyncPointClientState(
           sync_token.namespace_id(), sync_token.command_buffer_id());
@@ -1012,11 +1014,11 @@
   }
 }
 
-void GpuCommandBufferStub::OnSignalAck(uint32 id) {
+void GpuCommandBufferStub::OnSignalAck(uint32_t id) {
   Send(new GpuCommandBufferMsg_SignalAck(route_id_, id));
 }
 
-void GpuCommandBufferStub::OnSignalQuery(uint32 query_id, uint32 id) {
+void GpuCommandBufferStub::OnSignalQuery(uint32_t query_id, uint32_t id) {
   if (decoder_) {
     gpu::gles2::QueryManager* query_manager = decoder_->GetQueryManager();
     if (query_manager) {
@@ -1145,7 +1147,7 @@
   }
 }
 
-void GpuCommandBufferStub::OnDestroyImage(int32 id) {
+void GpuCommandBufferStub::OnDestroyImage(int32_t id) {
   TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnDestroyImage");
 
   if (!decoder_)
@@ -1161,9 +1163,8 @@
   image_manager->RemoveImage(id);
 }
 
-void GpuCommandBufferStub::SendConsoleMessage(
-    int32 id,
-    const std::string& message) {
+void GpuCommandBufferStub::SendConsoleMessage(int32_t id,
+                                              const std::string& message) {
   GPUCommandBufferConsoleMessage console_message;
   console_message.id = id;
   console_message.message = message;
diff --git a/content/common/gpu/gpu_command_buffer_stub.h b/content/common/gpu/gpu_command_buffer_stub.h
index 188ede0..a9374d7 100644
--- a/content/common/gpu/gpu_command_buffer_stub.h
+++ b/content/common/gpu/gpu_command_buffer_stub.h
@@ -5,10 +5,14 @@
 #ifndef CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_
 #define CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <deque>
 #include <string>
 #include <vector>
 
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "base/time/time.h"
@@ -82,10 +86,10 @@
       gpu::ValueStateMap* pending_valuebuffer_state,
       const gfx::Size& size,
       const gpu::gles2::DisallowedFeatures& disallowed_features,
-      const std::vector<int32>& attribs,
+      const std::vector<int32_t>& attribs,
       gfx::GpuPreference gpu_preference,
-      int32 stream_id,
-      int32 route_id,
+      int32_t stream_id,
+      int32_t route_id,
       bool offscreen,
       GpuWatchdog* watchdog,
       const GURL& active_url);
@@ -115,17 +119,17 @@
 
   // Identifies the various GpuCommandBufferStubs in the GPU process belonging
   // to the same renderer process.
-  int32 route_id() const { return route_id_; }
+  int32_t route_id() const { return route_id_; }
 
   // Identifies the stream for this command buffer.
-  int32 stream_id() const { return stream_id_; }
+  int32_t stream_id() const { return stream_id_; }
 
   gfx::GpuPreference gpu_preference() { return gpu_preference_; }
 
-  int32 GetRequestedAttribute(int attr) const;
+  int32_t GetRequestedAttribute(int attr) const;
 
   // Sends a message to the console.
-  void SendConsoleMessage(int32 id, const std::string& message);
+  void SendConsoleMessage(int32_t id, const std::string& message);
 
   void SendCachedShader(const std::string& key, const std::string& shader);
 
@@ -136,7 +140,7 @@
 
   // Associates a sync point to this stub. When the stub is destroyed, it will
   // retire all sync points that haven't been previously retired.
-  void InsertSyncPoint(uint32 sync_point, bool retire);
+  void InsertSyncPoint(uint32_t sync_point, bool retire);
 
   void SetLatencyInfoCallback(const LatencyInfoCallback& callback);
 
@@ -163,42 +167,43 @@
   // Message handlers:
   void OnInitialize(base::SharedMemoryHandle shared_state_shm,
                     IPC::Message* reply_message);
-  void OnSetGetBuffer(int32 shm_id, IPC::Message* reply_message);
+  void OnSetGetBuffer(int32_t shm_id, IPC::Message* reply_message);
   void OnProduceFrontBuffer(const gpu::Mailbox& mailbox);
   void OnGetState(IPC::Message* reply_message);
-  void OnWaitForTokenInRange(int32 start,
-                             int32 end,
+  void OnWaitForTokenInRange(int32_t start,
+                             int32_t end,
                              IPC::Message* reply_message);
-  void OnWaitForGetOffsetInRange(int32 start,
-                                 int32 end,
+  void OnWaitForGetOffsetInRange(int32_t start,
+                                 int32_t end,
                                  IPC::Message* reply_message);
-  void OnAsyncFlush(int32 put_offset, uint32 flush_count,
+  void OnAsyncFlush(int32_t put_offset,
+                    uint32_t flush_count,
                     const std::vector<ui::LatencyInfo>& latency_info);
-  void OnRegisterTransferBuffer(int32 id,
+  void OnRegisterTransferBuffer(int32_t id,
                                 base::SharedMemoryHandle transfer_buffer,
-                                uint32 size);
-  void OnDestroyTransferBuffer(int32 id);
-  void OnGetTransferBuffer(int32 id, IPC::Message* reply_message);
+                                uint32_t size);
+  void OnDestroyTransferBuffer(int32_t id);
+  void OnGetTransferBuffer(int32_t id, IPC::Message* reply_message);
 
   void OnCreateVideoDecoder(const media::VideoDecodeAccelerator::Config& config,
-                            int32 route_id,
+                            int32_t route_id,
                             IPC::Message* reply_message);
   void OnCreateVideoEncoder(media::VideoPixelFormat input_format,
                             const gfx::Size& input_visible_size,
                             media::VideoCodecProfile output_profile,
-                            uint32 initial_bitrate,
-                            int32 route_id,
+                            uint32_t initial_bitrate,
+                            int32_t route_id,
                             IPC::Message* reply_message);
 
   void OnEnsureBackbuffer();
 
-  void OnRetireSyncPoint(uint32 sync_point);
-  bool OnWaitSyncPoint(uint32 sync_point);
-  void OnWaitSyncPointCompleted(uint32 sync_point);
-  void OnSignalSyncPoint(uint32 sync_point, uint32 id);
-  void OnSignalSyncToken(const gpu::SyncToken& sync_token, uint32 id);
-  void OnSignalAck(uint32 id);
-  void OnSignalQuery(uint32 query, uint32 id);
+  void OnRetireSyncPoint(uint32_t sync_point);
+  bool OnWaitSyncPoint(uint32_t sync_point);
+  void OnWaitSyncPointCompleted(uint32_t sync_point);
+  void OnSignalSyncPoint(uint32_t sync_point, uint32_t id);
+  void OnSignalSyncToken(const gpu::SyncToken& sync_token, uint32_t id);
+  void OnSignalAck(uint32_t id);
+  void OnSignalQuery(uint32_t query, uint32_t id);
 
   void OnFenceSyncRelease(uint64_t release);
   bool OnWaitFenceSync(gpu::CommandBufferNamespace namespace_id,
@@ -209,9 +214,9 @@
                                 uint64_t release);
 
   void OnCreateImage(const GpuCommandBufferMsg_CreateImage_Params& params);
-  void OnDestroyImage(int32 id);
-  void OnCreateStreamTexture(uint32 texture_id,
-                             int32 stream_id,
+  void OnDestroyImage(int32_t id);
+  void OnCreateStreamTexture(uint32_t texture_id,
+                             int32_t stream_id,
                              bool* succeeded);
 
   void OnCommandProcessed();
@@ -257,14 +262,14 @@
   gfx::GLSurfaceHandle handle_;
   gfx::Size initial_size_;
   gpu::gles2::DisallowedFeatures disallowed_features_;
-  std::vector<int32> requested_attribs_;
+  std::vector<int32_t> requested_attribs_;
   gfx::GpuPreference gpu_preference_;
   bool use_virtualized_gl_context_;
   const uint64_t command_buffer_id_;
-  const int32 stream_id_;
-  const int32 route_id_;
+  const int32_t stream_id_;
+  const int32_t route_id_;
   const bool offscreen_;
-  uint32 last_flush_count_;
+  uint32_t last_flush_count_;
 
   scoped_ptr<gpu::CommandBufferService> command_buffer_;
   scoped_ptr<gpu::gles2::GLES2Decoder> decoder_;
@@ -277,7 +282,7 @@
   base::ObserverList<DestructionObserver> destruction_observers_;
 
   // A queue of sync points associated with this stub.
-  std::deque<uint32> sync_points_;
+  std::deque<uint32_t> sync_points_;
   bool waiting_for_sync_point_;
 
   base::TimeTicks process_delayed_work_time_;
diff --git a/content/common/gpu/gpu_memory_buffer_factory.cc b/content/common/gpu/gpu_memory_buffer_factory.cc
index 31e2dbc..8469e16 100644
--- a/content/common/gpu/gpu_memory_buffer_factory.cc
+++ b/content/common/gpu/gpu_memory_buffer_factory.cc
@@ -5,6 +5,7 @@
 #include "content/common/gpu/gpu_memory_buffer_factory.h"
 
 #include "base/logging.h"
+#include "build/build_config.h"
 
 #if defined(OS_MACOSX)
 #include "content/common/gpu/gpu_memory_buffer_factory_io_surface.h"
diff --git a/content/common/gpu/gpu_memory_buffer_factory.h b/content/common/gpu/gpu_memory_buffer_factory.h
index 80f79fc..77a50f2 100644
--- a/content/common/gpu/gpu_memory_buffer_factory.h
+++ b/content/common/gpu/gpu_memory_buffer_factory.h
@@ -7,6 +7,7 @@
 
 #include <vector>
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
diff --git a/content/common/gpu/gpu_memory_buffer_factory_io_surface.h b/content/common/gpu/gpu_memory_buffer_factory_io_surface.h
index 60b2473..753e160 100644
--- a/content/common/gpu/gpu_memory_buffer_factory_io_surface.h
+++ b/content/common/gpu/gpu_memory_buffer_factory_io_surface.h
@@ -11,6 +11,7 @@
 
 #include "base/containers/hash_tables.h"
 #include "base/mac/scoped_cftyperef.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/synchronization/lock.h"
 #include "content/common/content_export.h"
diff --git a/content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.h b/content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.h
index 4ca2b23..f9ea0d2 100644
--- a/content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.h
+++ b/content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.h
@@ -6,6 +6,7 @@
 #define CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_OZONE_NATIVE_PIXMAP_H_
 
 #include "base/containers/hash_tables.h"
+#include "base/macros.h"
 #include "base/synchronization/lock.h"
 #include "content/common/content_export.h"
 #include "content/common/gpu/gpu_memory_buffer_factory.h"
diff --git a/content/common/gpu/gpu_memory_manager.cc b/content/common/gpu/gpu_memory_manager.cc
index 3dae2b1a..4b9eb7c 100644
--- a/content/common/gpu/gpu_memory_manager.cc
+++ b/content/common/gpu/gpu_memory_manager.cc
@@ -24,9 +24,11 @@
 namespace content {
 namespace {
 
-const uint64 kBytesAllocatedStep = 16 * 1024 * 1024;
+const uint64_t kBytesAllocatedStep = 16 * 1024 * 1024;
 
-void TrackValueChanged(uint64 old_size, uint64 new_size, uint64* total_size) {
+void TrackValueChanged(uint64_t old_size,
+                       uint64_t new_size,
+                       uint64_t* total_size) {
   DCHECK(new_size > old_size || *total_size >= (old_size - new_size));
   *total_size += (new_size - old_size);
 }
@@ -45,8 +47,8 @@
 
 void GpuMemoryManager::TrackMemoryAllocatedChange(
     GpuMemoryTrackingGroup* tracking_group,
-    uint64 old_size,
-    uint64 new_size) {
+    uint64_t old_size,
+    uint64_t new_size) {
   TrackValueChanged(old_size, new_size, &tracking_group->size_);
   TrackValueChanged(old_size, new_size, &bytes_allocated_current_);
 
@@ -59,12 +61,12 @@
   }
 }
 
-bool GpuMemoryManager::EnsureGPUMemoryAvailable(uint64 /* size_needed */) {
+bool GpuMemoryManager::EnsureGPUMemoryAvailable(uint64_t /* size_needed */) {
   // TODO: Check if there is enough space. Lose contexts until there is.
   return true;
 }
 
-uint64 GpuMemoryManager::GetTrackerMemoryUsage(
+uint64_t GpuMemoryManager::GetTrackerMemoryUsage(
     gpu::gles2::MemoryTracker* tracker) const {
   TrackingGroupMap::const_iterator tracking_group_it =
       tracking_groups_.find(tracker);
diff --git a/content/common/gpu/gpu_memory_manager.h b/content/common/gpu/gpu_memory_manager.h
index a5f7655d..7de22e5 100644
--- a/content/common/gpu/gpu_memory_manager.h
+++ b/content/common/gpu/gpu_memory_manager.h
@@ -5,13 +5,15 @@
 #ifndef CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_H_
 #define CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_H_
 
+#include <stdint.h>
+
 #include <list>
 #include <map>
 
-#include "base/basictypes.h"
 #include "base/cancelable_callback.h"
 #include "base/containers/hash_tables.h"
 #include "base/gtest_prod_util.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "content/common/content_export.h"
 #include "content/public/common/gpu_memory_stats.h"
@@ -36,7 +38,7 @@
   GpuMemoryTrackingGroup* CreateTrackingGroup(
       base::ProcessId pid, gpu::gles2::MemoryTracker* memory_tracker);
 
-  uint64 GetTrackerMemoryUsage(gpu::gles2::MemoryTracker* tracker) const;
+  uint64_t GetTrackerMemoryUsage(gpu::gles2::MemoryTracker* tracker) const;
 
  private:
   friend class GpuMemoryManagerTest;
@@ -50,17 +52,14 @@
   void SendUmaStatsToBrowser();
 
   // Get the current number of bytes allocated.
-  uint64 GetCurrentUsage() const {
-    return bytes_allocated_current_;
-  }
+  uint64_t GetCurrentUsage() const { return bytes_allocated_current_; }
 
   // GpuMemoryTrackingGroup interface
-  void TrackMemoryAllocatedChange(
-      GpuMemoryTrackingGroup* tracking_group,
-      uint64 old_size,
-      uint64 new_size);
+  void TrackMemoryAllocatedChange(GpuMemoryTrackingGroup* tracking_group,
+                                  uint64_t old_size,
+                                  uint64_t new_size);
   void OnDestroyTrackingGroup(GpuMemoryTrackingGroup* tracking_group);
-  bool EnsureGPUMemoryAvailable(uint64 size_needed);
+  bool EnsureGPUMemoryAvailable(uint64_t size_needed);
 
   GpuChannelManager* channel_manager_;
 
@@ -68,8 +67,8 @@
   TrackingGroupMap tracking_groups_;
 
   // The current total memory usage, and historical maximum memory usage
-  uint64 bytes_allocated_current_;
-  uint64 bytes_allocated_historical_max_;
+  uint64_t bytes_allocated_current_;
+  uint64_t bytes_allocated_historical_max_;
 
   DISALLOW_COPY_AND_ASSIGN(GpuMemoryManager);
 };
diff --git a/content/common/gpu/gpu_memory_tracking.cc b/content/common/gpu/gpu_memory_tracking.cc
index 9ddeb8b2..6fa447b5 100644
--- a/content/common/gpu/gpu_memory_tracking.cc
+++ b/content/common/gpu/gpu_memory_tracking.cc
@@ -23,14 +23,13 @@
   memory_manager_->OnDestroyTrackingGroup(this);
 }
 
-void GpuMemoryTrackingGroup::TrackMemoryAllocatedChange(
-    uint64 old_size,
-    uint64 new_size) {
+void GpuMemoryTrackingGroup::TrackMemoryAllocatedChange(uint64_t old_size,
+                                                        uint64_t new_size) {
   memory_manager_->TrackMemoryAllocatedChange(
       this, old_size, new_size);
 }
 
-bool GpuMemoryTrackingGroup::EnsureGPUMemoryAvailable(uint64 size_needed) {
+bool GpuMemoryTrackingGroup::EnsureGPUMemoryAvailable(uint64_t size_needed) {
   return memory_manager_->EnsureGPUMemoryAvailable(size_needed);
 }
 
diff --git a/content/common/gpu/gpu_memory_tracking.h b/content/common/gpu/gpu_memory_tracking.h
index bc06f9b..2889283 100644
--- a/content/common/gpu/gpu_memory_tracking.h
+++ b/content/common/gpu/gpu_memory_tracking.h
@@ -5,7 +5,8 @@
 #ifndef CONTENT_COMMON_GPU_GPU_MEMORY_TRACKING_H_
 #define CONTENT_COMMON_GPU_GPU_MEMORY_TRACKING_H_
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
 #include "base/process/process.h"
 #include "content/common/content_export.h"
 #include "gpu/command_buffer/service/memory_tracking.h"
@@ -19,16 +20,12 @@
 class CONTENT_EXPORT GpuMemoryTrackingGroup {
  public:
   ~GpuMemoryTrackingGroup();
-  void TrackMemoryAllocatedChange(
-      uint64 old_size,
-      uint64 new_size);
-  bool EnsureGPUMemoryAvailable(uint64 size_needed);
+  void TrackMemoryAllocatedChange(uint64_t old_size, uint64_t new_size);
+  bool EnsureGPUMemoryAvailable(uint64_t size_needed);
   base::ProcessId GetPid() const {
     return pid_;
   }
-  uint64 GetSize() const {
-    return size_;
-  }
+  uint64_t GetSize() const { return size_; }
   gpu::gles2::MemoryTracker* GetMemoryTracker() const {
     return memory_tracker_;
   }
@@ -41,7 +38,7 @@
                          GpuMemoryManager* memory_manager);
 
   base::ProcessId pid_;
-  uint64 size_;
+  uint64_t size_;
 
   // Set and used only during the Manage function, to determine which
   // non-surface clients should be hibernated.
diff --git a/content/common/gpu/gpu_memory_uma_stats.h b/content/common/gpu/gpu_memory_uma_stats.h
index f20376bd..15d874f 100644
--- a/content/common/gpu/gpu_memory_uma_stats.h
+++ b/content/common/gpu/gpu_memory_uma_stats.h
@@ -5,7 +5,7 @@
 #ifndef CONTENT_COMMON_GPU_GPU_MEMORY_UMA_STATS_H_
 #define CONTENT_COMMON_GPU_GPU_MEMORY_UMA_STATS_H_
 
-#include "base/basictypes.h"
+#include <stddef.h>
 
 namespace content {
 
diff --git a/content/common/gpu/gpu_messages.h b/content/common/gpu/gpu_messages.h
index 997a6e8..2f84f97ffc 100644
--- a/content/common/gpu/gpu_messages.h
+++ b/content/common/gpu/gpu_messages.h
@@ -5,10 +5,13 @@
 // Multiply-included message file, hence no include guard here, but see below
 // for a much smaller-than-usual include guard section.
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
 #include "base/memory/shared_memory.h"
+#include "build/build_config.h"
 #include "content/common/content_export.h"
 #include "content/common/content_param_traits.h"
 #include "content/common/gpu/gpu_memory_uma_stats.h"
@@ -80,8 +83,8 @@
                               gpu::VIDEO_CODEC_PROFILE_MAX)
 
 IPC_STRUCT_BEGIN(GPUCreateCommandBufferConfig)
-  IPC_STRUCT_MEMBER(int32, share_group_id)
-  IPC_STRUCT_MEMBER(int32, stream_id)
+  IPC_STRUCT_MEMBER(int32_t, share_group_id)
+  IPC_STRUCT_MEMBER(int32_t, stream_id)
   IPC_STRUCT_MEMBER(content::GpuStreamPriority, stream_priority)
   IPC_STRUCT_MEMBER(std::vector<int>, attribs)
   IPC_STRUCT_MEMBER(GURL, active_url)
@@ -90,7 +93,7 @@
 
 IPC_STRUCT_BEGIN(GpuMsg_EstablishChannel_Params)
   IPC_STRUCT_MEMBER(int, client_id)
-  IPC_STRUCT_MEMBER(uint64, client_tracing_id)
+  IPC_STRUCT_MEMBER(uint64_t, client_tracing_id)
   IPC_STRUCT_MEMBER(bool, preempts)
   IPC_STRUCT_MEMBER(bool, preempted)
   IPC_STRUCT_MEMBER(bool, allow_future_sync_points)
@@ -102,7 +105,7 @@
   IPC_STRUCT_MEMBER(gfx::Size, size)
   IPC_STRUCT_MEMBER(gfx::BufferFormat, format)
   IPC_STRUCT_MEMBER(gfx::BufferUsage, usage)
-  IPC_STRUCT_MEMBER(int32, client_id)
+  IPC_STRUCT_MEMBER(int32_t, client_id)
   IPC_STRUCT_MEMBER(gfx::PluginWindowHandle, surface_handle)
 IPC_STRUCT_END()
 
@@ -111,14 +114,14 @@
   IPC_STRUCT_MEMBER(gfx::GpuMemoryBufferId, id)
   IPC_STRUCT_MEMBER(gfx::Size, size)
   IPC_STRUCT_MEMBER(gfx::BufferFormat, format)
-  IPC_STRUCT_MEMBER(int32, client_id)
+  IPC_STRUCT_MEMBER(int32_t, client_id)
 IPC_STRUCT_END()
 
 #if defined(OS_MACOSX)
 IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params)
-  IPC_STRUCT_MEMBER(int32, surface_id)
-  IPC_STRUCT_MEMBER(uint64, surface_handle)
-  IPC_STRUCT_MEMBER(int32, route_id)
+  IPC_STRUCT_MEMBER(int32_t, surface_id)
+  IPC_STRUCT_MEMBER(uint64_t, surface_handle)
+  IPC_STRUCT_MEMBER(int32_t, route_id)
   IPC_STRUCT_MEMBER(gfx::Size, size)
   IPC_STRUCT_MEMBER(float, scale_factor)
   IPC_STRUCT_MEMBER(std::vector<ui::LatencyInfo>, latency_info)
@@ -132,18 +135,18 @@
 #endif
 
 IPC_STRUCT_BEGIN(AcceleratedJpegDecoderMsg_Decode_Params)
-  IPC_STRUCT_MEMBER(int32, input_buffer_id)
+  IPC_STRUCT_MEMBER(int32_t, input_buffer_id)
   IPC_STRUCT_MEMBER(gfx::Size, coded_size)
   IPC_STRUCT_MEMBER(base::SharedMemoryHandle, input_buffer_handle)
-  IPC_STRUCT_MEMBER(uint32, input_buffer_size)
+  IPC_STRUCT_MEMBER(uint32_t, input_buffer_size)
   IPC_STRUCT_MEMBER(base::SharedMemoryHandle, output_video_frame_handle)
-  IPC_STRUCT_MEMBER(uint32, output_buffer_size)
+  IPC_STRUCT_MEMBER(uint32_t, output_buffer_size)
 IPC_STRUCT_END()
 
 IPC_STRUCT_BEGIN(AcceleratedVideoDecoderMsg_Decode_Params)
-  IPC_STRUCT_MEMBER(int32, bitstream_buffer_id)
+  IPC_STRUCT_MEMBER(int32_t, bitstream_buffer_id)
   IPC_STRUCT_MEMBER(base::SharedMemoryHandle, buffer_handle)
-  IPC_STRUCT_MEMBER(uint32, size)
+  IPC_STRUCT_MEMBER(uint32_t, size)
   IPC_STRUCT_MEMBER(base::TimeDelta, presentation_timestamp)
   IPC_STRUCT_MEMBER(std::string, key_id)
   IPC_STRUCT_MEMBER(std::string, iv)
@@ -169,7 +172,7 @@
 IPC_STRUCT_END()
 
 IPC_STRUCT_BEGIN(GPUCommandBufferConsoleMessage)
-  IPC_STRUCT_MEMBER(int32, id)
+  IPC_STRUCT_MEMBER(int32_t, id)
   IPC_STRUCT_MEMBER(std::string, message)
 IPC_STRUCT_END()
 
@@ -195,12 +198,12 @@
 #endif
 
 IPC_STRUCT_BEGIN(GpuCommandBufferMsg_CreateImage_Params)
-  IPC_STRUCT_MEMBER(int32, id)
+  IPC_STRUCT_MEMBER(int32_t, id)
   IPC_STRUCT_MEMBER(gfx::GpuMemoryBufferHandle, gpu_memory_buffer)
   IPC_STRUCT_MEMBER(gfx::Size, size)
   IPC_STRUCT_MEMBER(gfx::BufferFormat, format)
-  IPC_STRUCT_MEMBER(uint32, internal_format)
-  IPC_STRUCT_MEMBER(uint64, image_release_count)
+  IPC_STRUCT_MEMBER(uint32_t, internal_format)
+  IPC_STRUCT_MEMBER(uint64_t, image_release_count)
 IPC_STRUCT_END()
 
 IPC_STRUCT_TRAITS_BEGIN(gpu::DxDiagNode)
@@ -343,9 +346,9 @@
 // to a native view. A corresponding GpuCommandBufferStub is created.
 IPC_MESSAGE_CONTROL4(GpuMsg_CreateViewCommandBuffer,
                      gfx::GLSurfaceHandle,         /* compositing_surface */
-                     int32,                        /* client_id */
+                     int32_t,                      /* client_id */
                      GPUCreateCommandBufferConfig, /* init_params */
-                     int32 /* route_id */)
+                     int32_t /* route_id */)
 
 // Tells the GPU process to create a new gpu memory buffer.
 IPC_MESSAGE_CONTROL1(GpuMsg_CreateGpuMemoryBuffer,
@@ -359,14 +362,14 @@
 // Tells the GPU process to destroy buffer.
 IPC_MESSAGE_CONTROL3(GpuMsg_DestroyGpuMemoryBuffer,
                      gfx::GpuMemoryBufferId, /* id */
-                     int32,                  /* client_id */
+                     int32_t,                /* client_id */
                      gpu::SyncToken /* sync_token */)
 
 // Create and initialize a hardware jpeg decoder using the specified route_id.
 // Created decoders should be freed with AcceleratedJpegDecoderMsg_Destroy when
 // no longer needed.
 IPC_SYNC_MESSAGE_CONTROL1_1(GpuMsg_CreateJpegDecoder,
-                            int32 /* route_id */,
+                            int32_t /* route_id */,
                             bool /* succeeded */)
 
 // Tells the GPU process to create a context for collecting graphics card
@@ -432,12 +435,11 @@
                      IPC::ChannelHandle /* channel_handle */)
 
 // Message from GPU to notify to destroy the channel.
-IPC_MESSAGE_CONTROL1(GpuHostMsg_DestroyChannel,
-                     int32 /* client_id */)
+IPC_MESSAGE_CONTROL1(GpuHostMsg_DestroyChannel, int32_t /* client_id */)
 
 // Message to cache the given shader information.
 IPC_MESSAGE_CONTROL3(GpuHostMsg_CacheShader,
-                     int32 /* client_id */,
+                     int32_t /* client_id */,
                      std::string /* key */,
                      std::string /* shader */)
 
@@ -492,13 +494,13 @@
 // Tells the browser that a context has subscribed to a new target and
 // the browser should start sending the corresponding information
 IPC_MESSAGE_CONTROL2(GpuHostMsg_AddSubscription,
-                     int32 /* client_id */,
+                     int32_t /* client_id */,
                      unsigned int /* target */)
 
 // Tells the browser that no contexts are subscribed to the target anymore
 // so the browser should stop sending the corresponding information
 IPC_MESSAGE_CONTROL2(GpuHostMsg_RemoveSubscription,
-                     int32 /* client_id */,
+                     int32_t /* client_id */,
                      unsigned int /* target */)
 
 //------------------------------------------------------------------------------
@@ -508,16 +510,16 @@
 // Tells the GPU process to create a new command buffer that renders to an
 // offscreen frame buffer.
 IPC_SYNC_MESSAGE_CONTROL3_1(GpuChannelMsg_CreateOffscreenCommandBuffer,
-                            gfx::Size, /* size */
+                            gfx::Size,                    /* size */
                             GPUCreateCommandBufferConfig, /* init_params */
-                            int32, /* route_id */
+                            int32_t,                      /* route_id */
                             bool /* succeeded */)
 
 // The CommandBufferProxy sends this to the GpuCommandBufferStub in its
 // destructor, so that the stub deletes the actual CommandBufferService
 // object that it's hosting.
 IPC_SYNC_MESSAGE_CONTROL1_0(GpuChannelMsg_DestroyCommandBuffer,
-                            int32 /* instance_id */)
+                            int32_t /* instance_id */)
 
 // Simple NOP message which can be used as fence to ensure all previous sent
 // messages have been received.
@@ -529,8 +531,8 @@
 // Tells the GPU process create and send the java surface texture object to
 // the renderer process through the binder thread.
 IPC_MESSAGE_ROUTED2(GpuStreamTextureMsg_EstablishPeer,
-                    int32, /* primary_id */
-                    int32  /* secondary_id */)
+                    int32_t, /* primary_id */
+                    int32_t /* secondary_id */)
 
 // Tells the GPU process to set the size of StreamTexture from the given
 // stream Id.
@@ -563,7 +565,7 @@
 
 // Sets the shared memory buffer used for commands.
 IPC_SYNC_MESSAGE_ROUTED1_0(GpuCommandBufferMsg_SetGetBuffer,
-                           int32 /* shm_id */)
+                           int32_t /* shm_id */)
 
 // Produces the front buffer into a mailbox. This allows another context to draw
 // the output of this context.
@@ -572,14 +574,14 @@
 
 // Wait until the token is in a specific range, inclusive.
 IPC_SYNC_MESSAGE_ROUTED2_1(GpuCommandBufferMsg_WaitForTokenInRange,
-                           int32 /* start */,
-                           int32 /* end */,
+                           int32_t /* start */,
+                           int32_t /* end */,
                            gpu::CommandBuffer::State /* state */)
 
 // Wait until the get offset is in a specific range, inclusive.
 IPC_SYNC_MESSAGE_ROUTED2_1(GpuCommandBufferMsg_WaitForGetOffsetInRange,
-                           int32 /* start */,
-                           int32 /* end */,
+                           int32_t /* start */,
+                           int32_t /* end */,
                            gpu::CommandBuffer::State /* state */)
 
 // Asynchronously synchronize the put and get offsets of both processes.
@@ -587,8 +589,8 @@
 // is returned in shared memory. The input latency info for the current
 // frame is also sent to the GPU process.
 IPC_MESSAGE_ROUTED3(GpuCommandBufferMsg_AsyncFlush,
-                    int32 /* put_offset */,
-                    uint32 /* flush_count */,
+                    int32_t /* put_offset */,
+                    uint32_t /* flush_count */,
                     std::vector<ui::LatencyInfo> /* latency_info */)
 
 // Sent by the GPU process to display messages in the console.
@@ -598,20 +600,19 @@
 // Register an existing shared memory transfer buffer. The id that can be
 // used to identify the transfer buffer from a command buffer.
 IPC_MESSAGE_ROUTED3(GpuCommandBufferMsg_RegisterTransferBuffer,
-                    int32 /* id */,
+                    int32_t /* id */,
                     base::SharedMemoryHandle /* transfer_buffer */,
-                    uint32 /* size */)
+                    uint32_t /* size */)
 
 // Destroy a previously created transfer buffer.
-IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_DestroyTransferBuffer,
-                    int32 /* id */)
+IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_DestroyTransferBuffer, int32_t /* id */)
 
 // Create and initialize a hardware video decoder using the specified route_id.
 // Created decoders should be freed with AcceleratedVideoDecoderMsg_Destroy when
 // no longer needed.
 IPC_SYNC_MESSAGE_ROUTED2_1(GpuCommandBufferMsg_CreateVideoDecoder,
                            media::VideoDecodeAccelerator::Config, /* config */
-                           int32, /* route_id */
+                           int32_t,                               /* route_id */
                            bool /* succeeded */)
 
 // Create and initialize a hardware video encoder using the specified route_id.
@@ -621,8 +622,8 @@
                            media::VideoPixelFormat /* input_format */,
                            gfx::Size /* input_visible_size */,
                            media::VideoCodecProfile /* output_profile */,
-                           uint32 /* initial_bitrate */,
-                           int32, /* route_id */
+                           uint32_t /* initial_bitrate */,
+                           int32_t, /* route_id */
                            bool /* succeeded */)
 
 // Tells the proxy that there was an error and the command buffer had to be
@@ -647,33 +648,32 @@
 // across channels.
 IPC_SYNC_MESSAGE_ROUTED1_1(GpuCommandBufferMsg_InsertSyncPoint,
                            bool /* retire */,
-                           uint32 /* sync_point */)
+                           uint32_t /* sync_point */)
 
 // Retires the sync point.
 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_RetireSyncPoint,
-                    uint32 /* sync_point */)
+                    uint32_t /* sync_point */)
 
 // Makes this command buffer signal when a sync point is reached, by sending
 // back a GpuCommandBufferMsg_SignalSyncPointAck message with the same
 // signal_id.
 IPC_MESSAGE_ROUTED2(GpuCommandBufferMsg_SignalSyncPoint,
-                    uint32 /* sync_point */,
-                    uint32 /* signal_id */)
+                    uint32_t /* sync_point */,
+                    uint32_t /* signal_id */)
 
 IPC_MESSAGE_ROUTED2(GpuCommandBufferMsg_SignalSyncToken,
                     gpu::SyncToken /* sync_token */,
-                    uint32 /* signal_id */)
+                    uint32_t /* signal_id */)
 
 // Makes this command buffer signal when a query is reached, by sending
 // back a GpuCommandBufferMsg_SignalSyncPointAck message with the same
 // signal_id.
 IPC_MESSAGE_ROUTED2(GpuCommandBufferMsg_SignalQuery,
-                    uint32 /* query */,
-                    uint32 /* signal_id */)
+                    uint32_t /* query */,
+                    uint32_t /* signal_id */)
 
 // Response to SignalSyncPoint, SignalSyncToken, and SignalQuery.
-IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_SignalAck,
-                    uint32 /* signal_id */)
+IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_SignalAck, uint32_t /* signal_id */)
 
 // Create an image from an existing gpu memory buffer. The id that can be
 // used to identify the image from a command buffer.
@@ -681,13 +681,12 @@
                     GpuCommandBufferMsg_CreateImage_Params /* params */)
 
 // Destroy a previously created image.
-IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_DestroyImage,
-                    int32 /* id */)
+IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_DestroyImage, int32_t /* id */)
 
 // Attaches an external image stream to the client texture.
 IPC_SYNC_MESSAGE_ROUTED2_1(GpuCommandBufferMsg_CreateStreamTexture,
-                           uint32, /* client_texture_id */
-                           int32, /* stream_id */
+                           uint32_t, /* client_texture_id */
+                           int32_t,  /* stream_id */
                            bool /* succeeded */)
 
 //------------------------------------------------------------------------------
@@ -704,13 +703,13 @@
 
 // Give the texture IDs for the textures the decoder will use for output.
 IPC_MESSAGE_ROUTED2(AcceleratedVideoDecoderMsg_AssignPictureBuffers,
-                    std::vector<int32>,  /* Picture buffer ID */
-                    std::vector<uint32>) /* Texture ID */
+                    std::vector<int32_t>,  /* Picture buffer ID */
+                    std::vector<uint32_t>) /* Texture ID */
 
 // Send from Renderer process to the GPU process to recycle the given picture
 // buffer for further decoding.
 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_ReusePictureBuffer,
-                    int32) /* Picture buffer ID */
+                    int32_t) /* Picture buffer ID */
 
 // Send flush request to the decoder.
 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderMsg_Flush)
@@ -733,24 +732,23 @@
 
 // Accelerated video decoder has consumed input buffer from transfer buffer.
 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed,
-                    int32) /* Processed buffer ID */
+                    int32_t) /* Processed buffer ID */
 
 // Allocate video frames for output of the hardware video decoder.
-IPC_MESSAGE_ROUTED3(
-    AcceleratedVideoDecoderHostMsg_ProvidePictureBuffers,
-    int32, /* Number of video frames to generate */
-    gfx::Size, /* Requested size of buffer */
-    uint32 ) /* Texture target */
+IPC_MESSAGE_ROUTED3(AcceleratedVideoDecoderHostMsg_ProvidePictureBuffers,
+                    int32_t,   /* Number of video frames to generate */
+                    gfx::Size, /* Requested size of buffer */
+                    uint32_t)  /* Texture target */
 
 // Decoder reports that a picture is ready and buffer does not need to be passed
 // back to the decoder.
 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_DismissPictureBuffer,
-                    int32) /* Picture buffer ID */
+                    int32_t) /* Picture buffer ID */
 
 // Decoder reports that a picture is ready.
 IPC_MESSAGE_ROUTED4(AcceleratedVideoDecoderHostMsg_PictureReady,
-                    int32,     /* Picture buffer ID */
-                    int32,     /* Bitstream buffer ID */
+                    int32_t,   /* Picture buffer ID */
+                    int32_t,   /* Bitstream buffer ID */
                     gfx::Rect, /* Visible rectangle */
                     bool)      /* Buffer is HW overlay capable */
 
@@ -762,7 +760,7 @@
 
 // Video decoder has encountered an error.
 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification,
-                    uint32) /* Error ID */
+                    uint32_t) /* Error ID */
 
 //------------------------------------------------------------------------------
 // Accelerated Video Encoder Messages
@@ -782,14 +780,14 @@
 // Queue a buffer to the encoder for use in returning output.  |buffer_id| will
 // be returned by AcceleratedVideoEncoderHostMsg_BitstreamBufferReady.
 IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderMsg_UseOutputBitstreamBuffer,
-                    int32 /* buffer_id */,
+                    int32_t /* buffer_id */,
                     base::SharedMemoryHandle /* buffer_handle */,
-                    uint32 /* buffer_size */)
+                    uint32_t /* buffer_size */)
 
 // Request a runtime encoding parameter change.
 IPC_MESSAGE_ROUTED2(AcceleratedVideoEncoderMsg_RequestEncodingParametersChange,
-                    uint32 /* bitrate */,
-                    uint32 /* framerate */)
+                    uint32_t /* bitrate */,
+                    uint32_t /* framerate */)
 
 //------------------------------------------------------------------------------
 // Accelerated Video Encoder Host Messages
@@ -797,21 +795,21 @@
 
 // Notify renderer of the input/output buffer requirements of the encoder.
 IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderHostMsg_RequireBitstreamBuffers,
-                    uint32 /* input_count */,
+                    uint32_t /* input_count */,
                     gfx::Size /* input_coded_size */,
-                    uint32 /* output_buffer_size */)
+                    uint32_t /* output_buffer_size */)
 
 // Notify the renderer that the encoder has finished using an input buffer.
 // There is no congruent entry point in the media::VideoEncodeAccelerator
 // interface, in VEA this same done condition is indicated by dropping the
 // reference to the media::VideoFrame passed to VEA::Encode().
 IPC_MESSAGE_ROUTED1(AcceleratedVideoEncoderHostMsg_NotifyInputDone,
-                    int32 /* frame_id */)
+                    int32_t /* frame_id */)
 
 // Notify the renderer that an output buffer has been filled with encoded data.
 IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderHostMsg_BitstreamBufferReady,
-                    int32 /* bitstream_buffer_id */,
-                    uint32 /* payload_size */,
+                    int32_t /* bitstream_buffer_id */,
+                    uint32_t /* payload_size */,
                     bool /* key_frame */)
 
 // Report error condition.
@@ -842,5 +840,5 @@
 //
 // Report decode status.
 IPC_MESSAGE_ROUTED2(AcceleratedJpegDecoderHostMsg_DecodeAck,
-                    int32, /* bitstream_buffer_id */
+                    int32_t, /* bitstream_buffer_id */
                     media::JpegDecodeAccelerator::Error /* error */)
diff --git a/content/common/gpu/gpu_surface_lookup.h b/content/common/gpu/gpu_surface_lookup.h
index 3ec4a6d..3f3a1e5 100644
--- a/content/common/gpu/gpu_surface_lookup.h
+++ b/content/common/gpu/gpu_surface_lookup.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_COMMON_GPU_GPU_SURFACE_LOOKUP_H_
 #define CONTENT_COMMON_GPU_GPU_SURFACE_LOOKUP_H_
 
+#include "base/macros.h"
 #include "content/common/content_export.h"
 #include "ui/gfx/native_widget_types.h"
 
diff --git a/content/common/gpu/gpu_watchdog.h b/content/common/gpu/gpu_watchdog.h
index 3f42513..069aeb72 100644
--- a/content/common/gpu/gpu_watchdog.h
+++ b/content/common/gpu/gpu_watchdog.h
@@ -5,6 +5,8 @@
 #ifndef CONTENT_COMMON_GPU_GPU_WATCHDOG_H_
 #define CONTENT_COMMON_GPU_GPU_WATCHDOG_H_
 
+#include "base/macros.h"
+
 namespace content {
 
 // Interface for objects that monitor the a GPUProcessor's progress. The
diff --git a/content/common/gpu/image_transport_surface.cc b/content/common/gpu/image_transport_surface.cc
index 2f13b03..1866786ea 100644
--- a/content/common/gpu/image_transport_surface.cc
+++ b/content/common/gpu/image_transport_surface.cc
@@ -4,10 +4,13 @@
 
 #include "content/common/gpu/image_transport_surface.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/command_line.h"
 #include "base/trace_event/trace_event.h"
+#include "build/build_config.h"
 #include "content/common/gpu/gpu_channel.h"
 #include "content/common/gpu/gpu_channel_manager.h"
 #include "content/common/gpu/gpu_command_buffer_stub.h"
diff --git a/content/common/gpu/image_transport_surface.h b/content/common/gpu/image_transport_surface.h
index 1ead11a..bfb6892 100644
--- a/content/common/gpu/image_transport_surface.h
+++ b/content/common/gpu/image_transport_surface.h
@@ -5,13 +5,17 @@
 #ifndef CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_
 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_
 
+#include <stdint.h>
+
 #include <vector>
 
 #include "base/callback.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
+#include "build/build_config.h"
 #include "content/common/content_export.h"
 #include "ipc/ipc_listener.h"
 #include "ipc/ipc_message.h"
@@ -148,7 +152,7 @@
   GpuChannelManager* manager_;
 
   base::WeakPtr<GpuCommandBufferStub> stub_;
-  int32 route_id_;
+  int32_t route_id_;
   gfx::PluginWindowHandle handle_;
 
   DISALLOW_COPY_AND_ASSIGN(ImageTransportHelper);
diff --git a/content/common/gpu/image_transport_surface_mac.mm b/content/common/gpu/image_transport_surface_mac.mm
index 04b6bc3..1059589 100644
--- a/content/common/gpu/image_transport_surface_mac.mm
+++ b/content/common/gpu/image_transport_surface_mac.mm
@@ -4,6 +4,7 @@
 
 #include "content/common/gpu/image_transport_surface.h"
 
+#include "base/macros.h"
 #include "content/common/gpu/gpu_messages.h"
 #include "ui/gfx/native_widget_types.h"
 #include "ui/gl/gl_context.h"
diff --git a/content/common/gpu/image_transport_surface_overlay_mac.mm b/content/common/gpu/image_transport_surface_overlay_mac.mm
index 7611e6d..5a950680 100644
--- a/content/common/gpu/image_transport_surface_overlay_mac.mm
+++ b/content/common/gpu/image_transport_surface_overlay_mac.mm
@@ -4,12 +4,14 @@
 
 #include "content/common/gpu/image_transport_surface_overlay_mac.h"
 
-#include <algorithm>
 #include <CoreGraphics/CoreGraphics.h>
 #include <IOSurface/IOSurface.h>
 #include <OpenGL/CGLRenderers.h>
 #include <OpenGL/CGLTypes.h>
 #include <OpenGL/gl.h>
+#include <stddef.h>
+
+#include <algorithm>
 
 // This type consistently causes problem on Mac, and needs to be dealt with
 // in a systemic way.
diff --git a/content/common/gpu/media/accelerated_video_decoder.h b/content/common/gpu/media/accelerated_video_decoder.h
index ff5a155..462e631a 100644
--- a/content/common/gpu/media/accelerated_video_decoder.h
+++ b/content/common/gpu/media/accelerated_video_decoder.h
@@ -5,6 +5,9 @@
 #ifndef CONTENT_COMMON_GPU_MEDIA_ACCELERATED_VIDEO_DECODER_H_
 #define CONTENT_COMMON_GPU_MEDIA_ACCELERATED_VIDEO_DECODER_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/macros.h"
 #include "content/common/content_export.h"
 #include "ui/gfx/geometry/size.h"
diff --git a/content/common/gpu/media/android_copying_backing_strategy.cc b/content/common/gpu/media/android_copying_backing_strategy.cc
index 30e4bc1..325b9de1 100644
--- a/content/common/gpu/media/android_copying_backing_strategy.cc
+++ b/content/common/gpu/media/android_copying_backing_strategy.cc
@@ -41,7 +41,7 @@
     glDeleteTextures(1, &surface_texture_id_);
 }
 
-uint32 AndroidCopyingBackingStrategy::GetTextureTarget() const {
+uint32_t AndroidCopyingBackingStrategy::GetTextureTarget() const {
   return GL_TEXTURE_2D;
 }
 
@@ -64,7 +64,7 @@
 }
 
 void AndroidCopyingBackingStrategy::UseCodecBufferForPictureBuffer(
-    int32 codec_buf_index,
+    int32_t codec_buf_index,
     const media::PictureBuffer& picture_buffer) {
   // Make sure that the decoder is available.
   RETURN_ON_FAILURE(state_provider_, state_provider_->GetGlDecoder().get(),
@@ -101,7 +101,7 @@
   float transfrom_matrix[16];
   surface_texture_->GetTransformMatrix(transfrom_matrix);
 
-  uint32 picture_buffer_texture_id = picture_buffer.texture_id();
+  uint32_t picture_buffer_texture_id = picture_buffer.texture_id();
 
   // Defer initializing the CopyTextureCHROMIUMResourceManager until it is
   // needed because it takes 10s of milliseconds to initialize.
diff --git a/content/common/gpu/media/android_copying_backing_strategy.h b/content/common/gpu/media/android_copying_backing_strategy.h
index 92f82ffe..cbecded 100644
--- a/content/common/gpu/media/android_copying_backing_strategy.h
+++ b/content/common/gpu/media/android_copying_backing_strategy.h
@@ -5,6 +5,8 @@
 #ifndef CONTENT_COMMON_GPU_MEDIA_ANDROID_COPYING_BACKING_STRATEGY_H_
 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_COPYING_BACKING_STRATEGY_H_
 
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
 #include "content/common/content_export.h"
 #include "content/common/gpu/media/android_video_decode_accelerator.h"
@@ -32,9 +34,9 @@
   // AndroidVideoDecodeAccelerator::BackingStrategy
   void Initialize(AVDAStateProvider*) override;
   void Cleanup(const AndroidVideoDecodeAccelerator::OutputBufferMap&) override;
-  uint32 GetTextureTarget() const override;
+  uint32_t GetTextureTarget() const override;
   scoped_refptr<gfx::SurfaceTexture> CreateSurfaceTexture() override;
-  void UseCodecBufferForPictureBuffer(int32 codec_buffer_index,
+  void UseCodecBufferForPictureBuffer(int32_t codec_buffer_index,
                                       const media::PictureBuffer&) override;
   void CodecChanged(
       media::VideoCodecBridge*,
@@ -50,7 +52,7 @@
   scoped_refptr<gfx::SurfaceTexture> surface_texture_;
 
   // The texture id which is set to |surface_texture_|.
-  uint32 surface_texture_id_;
+  uint32_t surface_texture_id_;
 
   media::VideoCodecBridge* media_codec_;
 };
diff --git a/content/common/gpu/media/android_deferred_rendering_backing_strategy.cc b/content/common/gpu/media/android_deferred_rendering_backing_strategy.cc
index 4075c969..b2fa8105 100644
--- a/content/common/gpu/media/android_deferred_rendering_backing_strategy.cc
+++ b/content/common/gpu/media/android_deferred_rendering_backing_strategy.cc
@@ -42,7 +42,7 @@
   }
 }
 
-uint32 AndroidDeferredRenderingBackingStrategy::GetTextureTarget() const {
+uint32_t AndroidDeferredRenderingBackingStrategy::GetTextureTarget() const {
   return GL_TEXTURE_EXTERNAL_OES;
 }
 
@@ -107,7 +107,7 @@
 }
 
 void AndroidDeferredRenderingBackingStrategy::UseCodecBufferForPictureBuffer(
-    int32 codec_buf_index,
+    int32_t codec_buf_index,
     const media::PictureBuffer& picture_buffer) {
   // Make sure that the decoder is available.
   RETURN_IF_NULL(state_provider_->GetGlDecoder());
@@ -138,7 +138,7 @@
   AVDACodecImage* avImage = GetImageForPicture(picture_buffer);
 
   // See if there is a media codec buffer still attached to this image.
-  const int32 codec_buffer = avImage->GetMediaCodecBufferIndex();
+  const int32_t codec_buffer = avImage->GetMediaCodecBufferIndex();
 
   if (codec_buffer >= 0) {
     // PictureBuffer wasn't displayed, so release the buffer.
diff --git a/content/common/gpu/media/android_deferred_rendering_backing_strategy.h b/content/common/gpu/media/android_deferred_rendering_backing_strategy.h
index 82198915..734d99e 100644
--- a/content/common/gpu/media/android_deferred_rendering_backing_strategy.h
+++ b/content/common/gpu/media/android_deferred_rendering_backing_strategy.h
@@ -5,6 +5,9 @@
 #ifndef CONTENT_COMMON_GPU_MEDIA_ANDROID_DEFERRED_RENDERING_BACKING_STRATEGY_H_
 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_DEFERRED_RENDERING_BACKING_STRATEGY_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "content/common/content_export.h"
 #include "content/common/gpu/media/android_video_decode_accelerator.h"
 
@@ -36,9 +39,9 @@
   // AndroidVideoDecodeAccelerator::BackingStrategy
   void Initialize(AVDAStateProvider*) override;
   void Cleanup(const AndroidVideoDecodeAccelerator::OutputBufferMap&) override;
-  uint32 GetTextureTarget() const override;
+  uint32_t GetTextureTarget() const override;
   scoped_refptr<gfx::SurfaceTexture> CreateSurfaceTexture() override;
-  void UseCodecBufferForPictureBuffer(int32 codec_buffer_index,
+  void UseCodecBufferForPictureBuffer(int32_t codec_buffer_index,
                                       const media::PictureBuffer&) override;
   void AssignOnePictureBuffer(const media::PictureBuffer&) override;
   void ReuseOnePictureBuffer(const media::PictureBuffer&) override;
diff --git a/content/common/gpu/media/android_video_decode_accelerator.cc b/content/common/gpu/media/android_video_decode_accelerator.cc
index b86c31d..2cc7c32 100644
--- a/content/common/gpu/media/android_video_decode_accelerator.cc
+++ b/content/common/gpu/media/android_video_decode_accelerator.cc
@@ -4,6 +4,8 @@
 
 #include "content/common/gpu/media/android_video_decode_accelerator.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/command_line.h"
 #include "base/logging.h"
@@ -292,7 +294,7 @@
 
   bool eos = false;
   base::TimeDelta presentation_timestamp;
-  int32 buf_index = 0;
+  int32_t buf_index = 0;
   bool should_try_again = false;
   do {
     size_t offset = 0;
@@ -316,7 +318,7 @@
         return false;
 
       case media::MEDIA_CODEC_OUTPUT_FORMAT_CHANGED: {
-        int32 width, height;
+        int32_t width, height;
         media_codec_->GetOutputFormat(&width, &height);
 
         if (!picturebuffers_requested_) {
@@ -372,7 +374,7 @@
         base::Bind(&AndroidVideoDecodeAccelerator::NotifyFlushDone,
                    weak_this_factory_.GetWeakPtr()));
   } else {
-    const int32 bitstream_buffer_id = it->second;
+    const int32_t bitstream_buffer_id = it->second;
     bitstream_buffers_in_decoder_.erase(bitstream_buffers_in_decoder_.begin(),
                                         ++it);
     SendCurrentSurfaceToClient(buf_index, bitstream_buffer_id);
@@ -399,8 +401,8 @@
 }
 
 void AndroidVideoDecodeAccelerator::SendCurrentSurfaceToClient(
-    int32 codec_buffer_index,
-    int32 bitstream_id) {
+    int32_t codec_buffer_index,
+    int32_t bitstream_id) {
   DCHECK(thread_checker_.CalledOnValidThread());
   DCHECK_NE(bitstream_id, -1);
   DCHECK(!free_picture_ids_.empty());
@@ -410,7 +412,7 @@
                     "Failed to make this decoder's GL context current.",
                     PLATFORM_FAILURE);
 
-  int32 picture_buffer_id = free_picture_ids_.front();
+  int32_t picture_buffer_id = free_picture_ids_.front();
   free_picture_ids_.pop();
   TRACE_COUNTER1("media", "AVDA::FreePictureIds", free_picture_ids_.size());
 
@@ -467,7 +469,7 @@
     RETURN_ON_FAILURE(this, buffers[i].size() == size_,
                       "Invalid picture buffer size was passed.",
                       INVALID_ARGUMENT);
-    int32 id = buffers[i].id();
+    int32_t id = buffers[i].id();
     output_picture_buffers_.insert(std::make_pair(id, buffers[i]));
     free_picture_ids_.push(id);
     // Since the client might be re-using |picture_buffer_id| values, forget
@@ -486,7 +488,7 @@
 }
 
 void AndroidVideoDecodeAccelerator::ReusePictureBuffer(
-    int32 picture_buffer_id) {
+    int32_t picture_buffer_id) {
   DCHECK(thread_checker_.CalledOnValidThread());
 
   // This ReusePictureBuffer() might have been in a pipe somewhere (queued in
@@ -540,7 +542,7 @@
   TRACE_EVENT0("media", "AVDA::Reset");
 
   while (!pending_bitstream_buffers_.empty()) {
-    int32 bitstream_buffer_id = pending_bitstream_buffers_.front().first.id();
+    int32_t bitstream_buffer_id = pending_bitstream_buffers_.front().first.id();
     pending_bitstream_buffers_.pop();
 
     if (bitstream_buffer_id != -1) {
@@ -561,7 +563,7 @@
     dismissed_picture_ids_.insert(it->first);
   }
   output_picture_buffers_.clear();
-  std::queue<int32> empty;
+  std::queue<int32_t> empty;
   std::swap(free_picture_ids_, empty);
   CHECK(free_picture_ids_.empty());
   picturebuffers_requested_ = false;
diff --git a/content/common/gpu/media/android_video_decode_accelerator.h b/content/common/gpu/media/android_video_decode_accelerator.h
index 1eefb6e..0d09062e 100644
--- a/content/common/gpu/media/android_video_decode_accelerator.h
+++ b/content/common/gpu/media/android_video_decode_accelerator.h
@@ -5,6 +5,8 @@
 #ifndef CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_
 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_
 
+#include <stdint.h>
+
 #include <list>
 #include <map>
 #include <queue>
@@ -35,7 +37,7 @@
     : public media::VideoDecodeAccelerator,
       public AVDAStateProvider {
  public:
-  typedef std::map<int32, media::PictureBuffer> OutputBufferMap;
+  typedef std::map<int32_t, media::PictureBuffer> OutputBufferMap;
 
   // A BackingStrategy is responsible for making a PictureBuffer's texture
   // contain the image that a MediaCodec decoder buffer tells it to.
@@ -52,7 +54,7 @@
     virtual void Cleanup(const OutputBufferMap& buffer_map) = 0;
 
     // Return the GL texture target that the PictureBuffer textures use.
-    virtual uint32 GetTextureTarget() const = 0;
+    virtual uint32_t GetTextureTarget() const = 0;
 
     // Create and return a surface texture for the MediaCodec to use.
     virtual scoped_refptr<gfx::SurfaceTexture> CreateSurfaceTexture() = 0;
@@ -60,7 +62,7 @@
     // Make the provided PictureBuffer draw the image that is represented by
     // the decoded output buffer at codec_buffer_index.
     virtual void UseCodecBufferForPictureBuffer(
-        int32 codec_buffer_index,
+        int32_t codec_buffer_index,
         const media::PictureBuffer& picture_buffer) = 0;
 
     // Notify strategy that a picture buffer has been assigned.
@@ -96,7 +98,7 @@
   void Decode(const media::BitstreamBuffer& bitstream_buffer) override;
   void AssignPictureBuffers(
       const std::vector<media::PictureBuffer>& buffers) override;
-  void ReusePictureBuffer(int32 picture_buffer_id) override;
+  void ReusePictureBuffer(int32_t picture_buffer_id) override;
   void Flush() override;
   void Reset() override;
   void Destroy() override;
@@ -123,7 +125,8 @@
   bool ConfigureMediaCodec();
 
   // Sends the current picture on the surface to the client.
-  void SendCurrentSurfaceToClient(int32 codec_buffer_index, int32 bitstream_id);
+  void SendCurrentSurfaceToClient(int32_t codec_buffer_index,
+                                  int32_t bitstream_id);
 
   // Does pending IO tasks if any. Once this is called, it polls |media_codec_|
   // until it finishes pending tasks. For the polling, |kDecodePollDelay| is
@@ -195,12 +198,12 @@
 
   // This keeps the free picture buffer ids which can be used for sending
   // decoded frames to the client.
-  std::queue<int32> free_picture_ids_;
+  std::queue<int32_t> free_picture_ids_;
 
   // Picture buffer ids which have been dismissed and not yet re-assigned.  Used
   // to ignore ReusePictureBuffer calls that were in flight when the
   // DismissPictureBuffer call was made.
-  std::set<int32> dismissed_picture_ids_;
+  std::set<int32_t> dismissed_picture_ids_;
 
   // The low-level decoder which Android SDK provides.
   scoped_ptr<media::VideoCodecBridge> media_codec_;
@@ -225,11 +228,11 @@
   // buffers that have been submitted to the decoder but haven't yet produced an
   // output frame with the same timestamp. Note: there will only be one entry
   // for multiple bitstream buffers that have the same presentation timestamp.
-  std::map<base::TimeDelta, int32> bitstream_buffers_in_decoder_;
+  std::map<base::TimeDelta, int32_t> bitstream_buffers_in_decoder_;
 
   // Keeps track of bitstream ids notified to the client with
   // NotifyEndOfBitstreamBuffer() before getting output from the bitstream.
-  std::list<int32> bitstreams_notified_in_advance_;
+  std::list<int32_t> bitstreams_notified_in_advance_;
 
   // Owner of the GL context. Used to restore the context state.
   base::WeakPtr<gpu::gles2::GLES2Decoder> gl_decoder_;
diff --git a/content/common/gpu/media/android_video_decode_accelerator_unittest.cc b/content/common/gpu/media/android_video_decode_accelerator_unittest.cc
index 400d7cc..3cd7915 100644
--- a/content/common/gpu/media/android_video_decode_accelerator_unittest.cc
+++ b/content/common/gpu/media/android_video_decode_accelerator_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "content/common/gpu/media/android_video_decode_accelerator.h"
 
+#include <stdint.h>
+
 #include "base/android/jni_android.h"
 #include "base/bind.h"
 #include "base/logging.h"
@@ -39,12 +41,12 @@
   ~MockVideoDecodeAcceleratorClient() override {}
 
   // VideoDecodeAccelerator::Client implementation.
-  void ProvidePictureBuffers(uint32 requested_num_of_buffers,
+  void ProvidePictureBuffers(uint32_t requested_num_of_buffers,
                              const gfx::Size& dimensions,
-                             uint32 texture_target) override {}
-  void DismissPictureBuffer(int32 picture_buffer_id) override {}
+                             uint32_t texture_target) override {}
+  void DismissPictureBuffer(int32_t picture_buffer_id) override {}
   void PictureReady(const media::Picture& picture) override {}
-  void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) override {}
+  void NotifyEndOfBitstreamBuffer(int32_t bitstream_buffer_id) override {}
   void NotifyFlushDone() override {}
   void NotifyResetDone() override {}
   void NotifyError(media::VideoDecodeAccelerator::Error error) override {}
diff --git a/content/common/gpu/media/android_video_encode_accelerator.cc b/content/common/gpu/media/android_video_encode_accelerator.cc
index a124448..eb38308 100644
--- a/content/common/gpu/media/android_video_encode_accelerator.cc
+++ b/content/common/gpu/media/android_video_encode_accelerator.cc
@@ -329,7 +329,7 @@
   }
   scoped_refptr<VideoFrame> frame = base::get<0>(input);
 
-  uint8* buffer = NULL;
+  uint8_t* buffer = NULL;
   size_t capacity = 0;
   media_codec_->GetInputBuffer(input_buf_index, &buffer, &capacity);
 
@@ -339,10 +339,11 @@
                     "Failed to get input buffer: " << input_buf_index,
                     kPlatformFailureError);
 
-  uint8* dst_y = buffer;
+  uint8_t* dst_y = buffer;
   int dst_stride_y = frame->stride(VideoFrame::kYPlane);
-  uint8* dst_uv = buffer + frame->stride(VideoFrame::kYPlane) *
-                               frame->rows(VideoFrame::kYPlane);
+  uint8_t* dst_uv =
+      buffer +
+      frame->stride(VideoFrame::kYPlane) * frame->rows(VideoFrame::kYPlane);
   int dst_stride_uv = frame->stride(VideoFrame::kUPlane) * 2;
   // Why NV12?  Because COLOR_FORMAT_YUV420_SEMIPLANAR.  See comment at other
   // mention of that constant.
diff --git a/content/common/gpu/media/android_video_encode_accelerator.h b/content/common/gpu/media/android_video_encode_accelerator.h
index 1528726..426360dc 100644
--- a/content/common/gpu/media/android_video_encode_accelerator.h
+++ b/content/common/gpu/media/android_video_encode_accelerator.h
@@ -5,12 +5,14 @@
 #ifndef CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_ENCODE_ACCELERATOR_H_
 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_ENCODE_ACCELERATOR_H_
 
+#include <stddef.h>
 #include <stdint.h>
 
 #include <list>
 #include <queue>
 #include <vector>
 
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "base/timer/timer.h"
diff --git a/content/common/gpu/media/avda_codec_image.h b/content/common/gpu/media/avda_codec_image.h
index 6919d89..000e5ebbb 100644
--- a/content/common/gpu/media/avda_codec_image.h
+++ b/content/common/gpu/media/avda_codec_image.h
@@ -5,6 +5,9 @@
 #ifndef CONTENT_COMMON_GPU_MEDIA_AVDA_CODEC_IMAGE_H_
 #define CONTENT_COMMON_GPU_MEDIA_AVDA_CODEC_IMAGE_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "content/common/gpu/media/avda_shared_state.h"
 #include "ui/gl/gl_image.h"
 
diff --git a/content/common/gpu/media/dxva_video_decode_accelerator_win.cc b/content/common/gpu/media/dxva_video_decode_accelerator_win.cc
index 283949f5..c6adb06 100644
--- a/content/common/gpu/media/dxva_video_decode_accelerator_win.cc
+++ b/content/common/gpu/media/dxva_video_decode_accelerator_win.cc
@@ -14,6 +14,7 @@
 #include <mfapi.h>
 #include <mferror.h>
 #include <ntverp.h>
+#include <stddef.h>
 #include <wmcodecdsp.h>
 
 #include "base/base_paths_win.h"
@@ -24,12 +25,14 @@
 #include "base/file_version_info.h"
 #include "base/files/file_path.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/shared_memory.h"
 #include "base/message_loop/message_loop.h"
 #include "base/path_service.h"
 #include "base/trace_event/trace_event.h"
 #include "base/win/windows_version.h"
+#include "build/build_config.h"
 #include "content/public/common/content_switches.h"
 #include "media/base/win/mf_initializer.h"
 #include "media/video/video_decode_accelerator.h"
@@ -204,8 +207,10 @@
 // If duration and sample time are not known, provide 0.
 // |min_size| specifies the minimum size of the buffer (might be required by
 // the decoder for input). If no alignment is required, provide 0.
-static IMFSample* CreateInputSample(const uint8* stream, int size,
-                                    int min_size, int alignment) {
+static IMFSample* CreateInputSample(const uint8_t* stream,
+                                    int size,
+                                    int min_size,
+                                    int alignment) {
   CHECK(stream);
   CHECK_GT(size, 0);
   base::win::ScopedComPtr<IMFSample> sample;
@@ -219,7 +224,7 @@
 
   DWORD max_length = 0;
   DWORD current_length = 0;
-  uint8* destination = NULL;
+  uint8_t* destination = NULL;
   hr = buffer->Lock(&destination, &max_length, &current_length);
   RETURN_ON_HR_FAILURE(hr, "Failed to lock buffer", NULL);
 
@@ -244,10 +249,8 @@
   RETURN_ON_FAILURE(shm.Map(bitstream_buffer.size()),
                     "Failed in base::SharedMemory::Map", NULL);
 
-  return CreateInputSample(reinterpret_cast<const uint8*>(shm.memory()),
-                           bitstream_buffer.size(),
-                           stream_size,
-                           alignment);
+  return CreateInputSample(reinterpret_cast<const uint8_t*>(shm.memory()),
+                           bitstream_buffer.size(), stream_size, alignment);
 }
 
 // Helper function to create a COM object instance from a DLL. The alternative
@@ -595,9 +598,9 @@
 }
 
 DXVAVideoDecodeAccelerator::PendingSampleInfo::PendingSampleInfo(
-    int32 buffer_id, IMFSample* sample)
-    : input_buffer_id(buffer_id),
-      picture_buffer_id(-1) {
+    int32_t buffer_id,
+    IMFSample* sample)
+    : input_buffer_id(buffer_id), picture_buffer_id(-1) {
   output_sample.Attach(sample);
 }
 
@@ -917,8 +920,7 @@
   }
 }
 
-void DXVAVideoDecodeAccelerator::ReusePictureBuffer(
-    int32 picture_buffer_id) {
+void DXVAVideoDecodeAccelerator::ReusePictureBuffer(int32_t picture_buffer_id) {
   DCHECK(main_thread_task_runner_->BelongsToCurrentThread());
 
   State state = GetState();
@@ -1267,9 +1269,8 @@
     const GUID& subtype) {
   base::win::ScopedComPtr<IMFMediaType> out_media_type;
 
-  for (uint32 i = 0;
-       SUCCEEDED(decoder_->GetOutputAvailableType(0, i,
-                                                  out_media_type.Receive()));
+  for (uint32_t i = 0; SUCCEEDED(
+           decoder_->GetOutputAvailableType(0, i, out_media_type.Receive()));
        ++i) {
     GUID out_subtype = {0};
     HRESULT hr = out_media_type->GetGUID(MF_MT_SUBTYPE, &out_subtype);
@@ -1286,7 +1287,7 @@
 }
 
 bool DXVAVideoDecodeAccelerator::SendMFTMessage(MFT_MESSAGE_TYPE msg,
-                                                int32 param) {
+                                                int32_t param) {
   HRESULT hr = decoder_->ProcessMessage(msg, param);
   return SUCCEEDED(hr);
 }
@@ -1817,7 +1818,7 @@
 }
 
 void DXVAVideoDecodeAccelerator::DeferredDismissStaleBuffer(
-    int32 picture_buffer_id) {
+    int32_t picture_buffer_id) {
   OutputBuffers::iterator it = stale_output_picture_buffers_.find(
       picture_buffer_id);
   DCHECK(it != stale_output_picture_buffers_.end());
@@ -2224,10 +2225,10 @@
 
   base::win::ScopedComPtr<IMFMediaType> out_media_type;
 
-  for (uint32 i = 0;
-        SUCCEEDED(video_format_converter_mft_->GetOutputAvailableType(0, i,
-                                                  out_media_type.Receive()));
-        ++i) {
+  for (uint32_t i = 0;
+       SUCCEEDED(video_format_converter_mft_->GetOutputAvailableType(
+           0, i, out_media_type.Receive()));
+       ++i) {
     GUID out_subtype = {0};
     hr = out_media_type->GetGUID(MF_MT_SUBTYPE, &out_subtype);
     RETURN_AND_NOTIFY_ON_HR_FAILURE(hr, "Failed to get output major type",
diff --git a/content/common/gpu/media/dxva_video_decode_accelerator_win.h b/content/common/gpu/media/dxva_video_decode_accelerator_win.h
index cbdc58ec..7ebd63ad 100644
--- a/content/common/gpu/media/dxva_video_decode_accelerator_win.h
+++ b/content/common/gpu/media/dxva_video_decode_accelerator_win.h
@@ -7,15 +7,17 @@
 
 #include <d3d11.h>
 #include <d3d9.h>
+#include <stdint.h>
 // Work around bug in this header by disabling the relevant warning for it.
 // https://connect.microsoft.com/VisualStudio/feedback/details/911260/dxva2api-h-in-win8-sdk-triggers-c4201-with-w4
 #pragma warning(push)
 #pragma warning(disable:4201)
 #include <dxva2api.h>
 #pragma warning(pop)
+#include <mfidl.h>
+
 #include <list>
 #include <map>
-#include <mfidl.h>
 #include <vector>
 
 #include "base/compiler_specific.h"
@@ -68,7 +70,7 @@
   void Decode(const media::BitstreamBuffer& bitstream_buffer) override;
   void AssignPictureBuffers(
       const std::vector<media::PictureBuffer>& buffers) override;
-  void ReusePictureBuffer(int32 picture_buffer_id) override;
+  void ReusePictureBuffer(int32_t picture_buffer_id) override;
   void Flush() override;
   void Reset() override;
   void Destroy() override;
@@ -117,7 +119,7 @@
 
   // Passes a command message to the decoder. This includes commands like
   // start of stream, end of stream, flush, drain the decoder, etc.
-  bool SendMFTMessage(MFT_MESSAGE_TYPE msg, int32 param);
+  bool SendMFTMessage(MFT_MESSAGE_TYPE msg, int32_t param);
 
   // The bulk of the decoding happens here. This function handles errors,
   // format changes and processes decoded output.
@@ -173,13 +175,13 @@
   void HandleResolutionChanged(int width, int height);
 
   struct DXVAPictureBuffer;
-  typedef std::map<int32, linked_ptr<DXVAPictureBuffer> > OutputBuffers;
+  typedef std::map<int32_t, linked_ptr<DXVAPictureBuffer>> OutputBuffers;
 
   // Tells the client to dismiss the stale picture buffers passed in.
   void DismissStaleBuffers();
 
   // Called after the client indicates we can recycle a stale picture buffer.
-  void DeferredDismissStaleBuffer(int32 picture_buffer_id);
+  void DeferredDismissStaleBuffer(int32_t picture_buffer_id);
 
   // Sets the state of the decoder. Called from the main thread and the decoder
   // thread. The state is changed on the main thread.
@@ -266,12 +268,12 @@
   // holds onto the token and attempts to access it if the underlying device
   // changes.
   // TODO(ananta): This needs to be verified.
-  uint32 dev_manager_reset_token_;
+  uint32_t dev_manager_reset_token_;
 
   // Reset token for the DX11 device manager.
-  uint32 dx11_dev_manager_reset_token_;
+  uint32_t dx11_dev_manager_reset_token_;
 
-  uint32 dx11_dev_manager_reset_token_format_conversion_;
+  uint32_t dx11_dev_manager_reset_token_format_conversion_;
 
   // The EGL config to use for decoded frames.
   EGLConfig egl_config_;
@@ -284,10 +286,10 @@
 
   // Contains information about a decoded sample.
   struct PendingSampleInfo {
-    PendingSampleInfo(int32 buffer_id, IMFSample* sample);
+    PendingSampleInfo(int32_t buffer_id, IMFSample* sample);
     ~PendingSampleInfo();
 
-    int32 input_buffer_id;
+    int32_t input_buffer_id;
 
     // The target picture buffer id where the frame would be copied to.
     // Defaults to -1.
diff --git a/content/common/gpu/media/fake_video_decode_accelerator.cc b/content/common/gpu/media/fake_video_decode_accelerator.cc
index 12aec65..94ae18c5 100644
--- a/content/common/gpu/media/fake_video_decode_accelerator.cc
+++ b/content/common/gpu/media/fake_video_decode_accelerator.cc
@@ -4,6 +4,8 @@
 
 #include "content/common/gpu/media/fake_video_decode_accelerator.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/location.h"
 #include "base/thread_task_runner_handle.h"
@@ -17,7 +19,7 @@
 
 namespace content {
 
-static const uint32 kDefaultTextureTarget = GL_TEXTURE_2D;
+static const uint32_t kDefaultTextureTarget = GL_TEXTURE_2D;
 // Must be at least 2 since the rendering helper will switch between textures
 // and if there is only one, it will wait for the next one that will never come.
 // Must also be an even number as otherwise there won't be the same amount of
@@ -78,13 +80,15 @@
   DCHECK(!(buffers.size()%2));
 
   // Save buffers and mark all buffers as ready for use.
-  scoped_ptr<uint8[]> white_data(
-      new uint8[frame_buffer_size_.width() * frame_buffer_size_.height() * 4]);
+  scoped_ptr<uint8_t[]> white_data(
+      new uint8_t[frame_buffer_size_.width() * frame_buffer_size_.height() *
+                  4]);
   memset(white_data.get(),
          UINT8_MAX,
          frame_buffer_size_.width() * frame_buffer_size_.height() * 4);
-  scoped_ptr<uint8[]> black_data(
-      new uint8[frame_buffer_size_.width() * frame_buffer_size_.height() * 4]);
+  scoped_ptr<uint8_t[]> black_data(
+      new uint8_t[frame_buffer_size_.width() * frame_buffer_size_.height() *
+                  4]);
   memset(black_data.get(),
          0,
          frame_buffer_size_.width() * frame_buffer_size_.height() * 4);
@@ -95,7 +99,7 @@
   for (size_t index = 0; index < buffers.size(); ++index) {
     glBindTexture(GL_TEXTURE_2D, buffers[index].texture_id());
     // Every other frame white and the rest black.
-    uint8* data = index%2 ? white_data.get():black_data.get();
+    uint8_t* data = index % 2 ? white_data.get() : black_data.get();
     glTexImage2D(GL_TEXTURE_2D,
                  0,
                  GL_RGBA,
@@ -117,7 +121,7 @@
                             weak_this_factory_.GetWeakPtr()));
 }
 
-void FakeVideoDecodeAccelerator::ReusePictureBuffer(int32 picture_buffer_id) {
+void FakeVideoDecodeAccelerator::ReusePictureBuffer(int32_t picture_buffer_id) {
   free_output_buffers_.push(picture_buffer_id);
   child_task_runner_->PostTask(
       FROM_HERE, base::Bind(&FakeVideoDecodeAccelerator::DoPictureReady,
diff --git a/content/common/gpu/media/fake_video_decode_accelerator.h b/content/common/gpu/media/fake_video_decode_accelerator.h
index bb88ff7..7dcbfda 100644
--- a/content/common/gpu/media/fake_video_decode_accelerator.h
+++ b/content/common/gpu/media/fake_video_decode_accelerator.h
@@ -5,9 +5,12 @@
 #ifndef CONTENT_COMMON_GPU_MEDIA_FAKE_VIDEO_DECODE_ACCELERATOR_H_
 #define CONTENT_COMMON_GPU_MEDIA_FAKE_VIDEO_DECODE_ACCELERATOR_H_
 
+#include <stdint.h>
+
 #include <queue>
 #include <vector>
 
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "content/common/content_export.h"
 #include "media/video/video_decode_accelerator.h"
@@ -29,7 +32,7 @@
   void Decode(const media::BitstreamBuffer& bitstream_buffer) override;
   void AssignPictureBuffers(
       const std::vector<media::PictureBuffer>& buffers) override;
-  void ReusePictureBuffer(int32 picture_buffer_id) override;
+  void ReusePictureBuffer(int32_t picture_buffer_id) override;
   void Flush() override;
   void Reset() override;
   void Destroy() override;
diff --git a/content/common/gpu/media/generic_v4l2_device.cc b/content/common/gpu/media/generic_v4l2_device.cc
index f795cb9..41379819 100644
--- a/content/common/gpu/media/generic_v4l2_device.cc
+++ b/content/common/gpu/media/generic_v4l2_device.cc
@@ -13,8 +13,10 @@
 #include <sys/mman.h>
 
 #include "base/files/scoped_file.h"
+#include "base/macros.h"
 #include "base/posix/eintr_wrapper.h"
 #include "base/trace_event/trace_event.h"
+#include "build/build_config.h"
 #include "content/common/gpu/media/generic_v4l2_device.h"
 #include "ui/gl/egl_util.h"
 #include "ui/gl/gl_bindings.h"
@@ -101,7 +103,7 @@
 bool GenericV4L2Device::SetDevicePollInterrupt() {
   DVLOG(3) << "SetDevicePollInterrupt()";
 
-  const uint64 buf = 1;
+  const uint64_t buf = 1;
   if (HANDLE_EINTR(write(device_poll_interrupt_fd_.get(), &buf, sizeof(buf))) ==
       -1) {
     DPLOG(ERROR) << "SetDevicePollInterrupt(): write() failed";
@@ -113,7 +115,7 @@
 bool GenericV4L2Device::ClearDevicePollInterrupt() {
   DVLOG(3) << "ClearDevicePollInterrupt()";
 
-  uint64 buf;
+  uint64_t buf;
   if (HANDLE_EINTR(read(device_poll_interrupt_fd_.get(), &buf, sizeof(buf))) ==
       -1) {
     if (errno == EAGAIN) {
@@ -283,7 +285,7 @@
 
 GLenum GenericV4L2Device::GetTextureTarget() { return GL_TEXTURE_EXTERNAL_OES; }
 
-uint32 GenericV4L2Device::PreferredInputFormat() {
+uint32_t GenericV4L2Device::PreferredInputFormat() {
   // TODO(posciak): We should support "dontcare" returns here once we
   // implement proper handling (fallback, negotiation) for this in users.
   CHECK_EQ(type_, kEncoder);
diff --git a/content/common/gpu/media/generic_v4l2_device.h b/content/common/gpu/media/generic_v4l2_device.h
index df5381f..3e52fa9 100644
--- a/content/common/gpu/media/generic_v4l2_device.h
+++ b/content/common/gpu/media/generic_v4l2_device.h
@@ -8,7 +8,11 @@
 #ifndef CONTENT_COMMON_GPU_MEDIA_GENERIC_V4L2_DEVICE_H_
 #define CONTENT_COMMON_GPU_MEDIA_GENERIC_V4L2_DEVICE_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/files/scoped_file.h"
+#include "base/macros.h"
 #include "content/common/gpu/media/v4l2_device.h"
 
 namespace content {
@@ -40,7 +44,7 @@
   EGLBoolean DestroyEGLImage(EGLDisplay egl_display,
                              EGLImageKHR egl_image) override;
   GLenum GetTextureTarget() override;
-  uint32 PreferredInputFormat() override;
+  uint32_t PreferredInputFormat() override;
 
  private:
   ~GenericV4L2Device() override;
diff --git a/content/common/gpu/media/gpu_jpeg_decode_accelerator.cc b/content/common/gpu/media/gpu_jpeg_decode_accelerator.cc
index de0f5872..bb6d6520 100644
--- a/content/common/gpu/media/gpu_jpeg_decode_accelerator.cc
+++ b/content/common/gpu/media/gpu_jpeg_decode_accelerator.cc
@@ -13,6 +13,7 @@
 #include "base/single_thread_task_runner.h"
 #include "base/stl_util.h"
 #include "base/trace_event/trace_event.h"
+#include "build/build_config.h"
 #include "content/common/gpu/gpu_channel.h"
 #include "content/common/gpu/gpu_messages.h"
 #include "ipc/ipc_message_macros.h"
@@ -82,7 +83,7 @@
     : public media::JpegDecodeAccelerator::Client,
       public base::NonThreadSafe {
  public:
-  Client(content::GpuJpegDecodeAccelerator* owner, int32 route_id)
+  Client(content::GpuJpegDecodeAccelerator* owner, int32_t route_id)
       : owner_(owner->AsWeakPtr()), route_id_(route_id) {}
 
   ~Client() override { DCHECK(CalledOnValidThread()); }
@@ -116,7 +117,7 @@
 
  private:
   base::WeakPtr<content::GpuJpegDecodeAccelerator> owner_;
-  int32 route_id_;
+  int32_t route_id_;
   scoped_ptr<media::JpegDecodeAccelerator> accelerator_;
 };
 
@@ -136,7 +137,7 @@
   void OnFilterAdded(IPC::Sender* sender) override { sender_ = sender; }
 
   bool OnMessageReceived(const IPC::Message& msg) override {
-    const int32 route_id = msg.routing_id();
+    const int32_t route_id = msg.routing_id();
     if (client_map_.find(route_id) == client_map_.end())
       return false;
 
@@ -159,7 +160,7 @@
     return sender_->Send(message);
   }
 
-  void AddClientOnIOThread(int32 route_id,
+  void AddClientOnIOThread(int32_t route_id,
                            Client* client,
                            IPC::Message* reply_msg) {
     DCHECK(io_task_runner_->BelongsToCurrentThread());
@@ -170,7 +171,7 @@
     SendOnIOThread(reply_msg);
   }
 
-  void OnDestroyOnIOThread(const int32* route_id) {
+  void OnDestroyOnIOThread(const int32_t* route_id) {
     DCHECK(io_task_runner_->BelongsToCurrentThread());
     const auto& it = client_map_.find(*route_id);
     DCHECK(it != client_map_.end());
@@ -189,7 +190,7 @@
       owner_->ClientRemoved();
   }
 
-  void NotifyDecodeStatusOnIOThread(int32 route_id,
+  void NotifyDecodeStatusOnIOThread(int32_t route_id,
                                     int32_t buffer_id,
                                     media::JpegDecodeAccelerator::Error error) {
     DCHECK(io_task_runner_->BelongsToCurrentThread());
@@ -198,7 +199,7 @@
   }
 
   void OnDecodeOnIOThread(
-      const int32* route_id,
+      const int32_t* route_id,
       const AcceleratedJpegDecoderMsg_Decode_Params& params) {
     DCHECK(io_task_runner_->BelongsToCurrentThread());
     DCHECK(route_id);
@@ -283,7 +284,7 @@
   }
 
  private:
-  using ClientMap = base::hash_map<int32, Client*>;
+  using ClientMap = base::hash_map<int32_t, Client*>;
 
   // Must be static because this method runs after destructor.
   static void DeleteClientMapOnChildThread(scoped_ptr<ClientMap> client_map) {
@@ -323,7 +324,7 @@
   }
 }
 
-void GpuJpegDecodeAccelerator::AddClient(int32 route_id,
+void GpuJpegDecodeAccelerator::AddClient(int32_t route_id,
                                          IPC::Message* reply_msg) {
   DCHECK(CalledOnValidThread());
 
@@ -375,7 +376,7 @@
 }
 
 void GpuJpegDecodeAccelerator::NotifyDecodeStatus(
-    int32 route_id,
+    int32_t route_id,
     int32_t buffer_id,
     media::JpegDecodeAccelerator::Error error) {
   DCHECK(CalledOnValidThread());
diff --git a/content/common/gpu/media/gpu_jpeg_decode_accelerator.h b/content/common/gpu/media/gpu_jpeg_decode_accelerator.h
index ed5c7c3..0fc316e0 100644
--- a/content/common/gpu/media/gpu_jpeg_decode_accelerator.h
+++ b/content/common/gpu/media/gpu_jpeg_decode_accelerator.h
@@ -5,6 +5,9 @@
 #ifndef CONTENT_COMMON_GPU_MEDIA_GPU_JPEG_DECODE_ACCELERATOR_H_
 #define CONTENT_COMMON_GPU_MEDIA_GPU_JPEG_DECODE_ACCELERATOR_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
 #include "base/synchronization/waitable_event.h"
@@ -31,9 +34,9 @@
       const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner);
   ~GpuJpegDecodeAccelerator() override;
 
-  void AddClient(int32 route_id, IPC::Message* reply_msg);
+  void AddClient(int32_t route_id, IPC::Message* reply_msg);
 
-  void NotifyDecodeStatus(int32 route_id,
+  void NotifyDecodeStatus(int32_t route_id,
                           int32_t bitstream_buffer_id,
                           media::JpegDecodeAccelerator::Error error);
 
diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.cc b/content/common/gpu/media/gpu_video_decode_accelerator.cc
index 23c19f1..14ad3625 100644
--- a/content/common/gpu/media/gpu_video_decode_accelerator.cc
+++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc
@@ -14,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 "content/common/gpu/gpu_channel.h"
 #include "content/common/gpu/gpu_messages.h"
@@ -81,7 +82,7 @@
 
 class GpuVideoDecodeAccelerator::MessageFilter : public IPC::MessageFilter {
  public:
-  MessageFilter(GpuVideoDecodeAccelerator* owner, int32 host_route_id)
+  MessageFilter(GpuVideoDecodeAccelerator* owner, int32_t host_route_id)
       : owner_(owner), host_route_id_(host_route_id) {}
 
   void OnChannelError() override { sender_ = NULL; }
@@ -121,13 +122,13 @@
 
  private:
   GpuVideoDecodeAccelerator* const owner_;
-  const int32 host_route_id_;
+  const int32_t host_route_id_;
   // The sender to which this filter was added.
   IPC::Sender* sender_;
 };
 
 GpuVideoDecodeAccelerator::GpuVideoDecodeAccelerator(
-    int32 host_route_id,
+    int32_t host_route_id,
     GpuCommandBufferStub* stub,
     const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner)
     : host_route_id_(host_route_id),
@@ -215,9 +216,9 @@
 }
 
 void GpuVideoDecodeAccelerator::ProvidePictureBuffers(
-    uint32 requested_num_of_buffers,
+    uint32_t requested_num_of_buffers,
     const gfx::Size& dimensions,
-    uint32 texture_target) {
+    uint32_t texture_target) {
   if (dimensions.width() > media::limits::kMaxDimension ||
       dimensions.height() > media::limits::kMaxDimension ||
       dimensions.GetArea() > media::limits::kMaxCanvas) {
@@ -237,7 +238,7 @@
 }
 
 void GpuVideoDecodeAccelerator::DismissPictureBuffer(
-    int32 picture_buffer_id) {
+    int32_t picture_buffer_id) {
   // Notify client that picture buffer is now unused.
   if (!Send(new AcceleratedVideoDecoderHostMsg_DismissPictureBuffer(
           host_route_id_, picture_buffer_id))) {
@@ -270,7 +271,7 @@
 }
 
 void GpuVideoDecodeAccelerator::NotifyEndOfBitstreamBuffer(
-    int32 bitstream_buffer_id) {
+    int32_t bitstream_buffer_id) {
   if (!Send(new AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed(
           host_route_id_, bitstream_buffer_id))) {
     DLOG(ERROR)
@@ -427,8 +428,8 @@
   return decoder.Pass();
 }
 
-void GpuVideoDecodeAccelerator::BindImage(uint32 client_texture_id,
-                                          uint32 texture_target,
+void GpuVideoDecodeAccelerator::BindImage(uint32_t client_texture_id,
+                                          uint32_t texture_target,
                                           scoped_refptr<gl::GLImage> image) {
   gpu::gles2::GLES2Decoder* command_decoder = stub_->decoder();
   gpu::gles2::TextureManager* texture_manager =
@@ -520,8 +521,8 @@
 }
 
 void GpuVideoDecodeAccelerator::OnAssignPictureBuffers(
-    const std::vector<int32>& buffer_ids,
-    const std::vector<uint32>& texture_ids) {
+    const std::vector<int32_t>& buffer_ids,
+    const std::vector<uint32_t>& texture_ids) {
   if (buffer_ids.size() != texture_ids.size()) {
     NotifyError(media::VideoDecodeAccelerator::INVALID_ARGUMENT);
     return;
@@ -533,7 +534,7 @@
 
   std::vector<media::PictureBuffer> buffers;
   std::vector<scoped_refptr<gpu::gles2::TextureRef> > textures;
-  for (uint32 i = 0; i < buffer_ids.size(); ++i) {
+  for (uint32_t i = 0; i < buffer_ids.size(); ++i) {
     if (buffer_ids[i] < 0) {
       DLOG(ERROR) << "Buffer id " << buffer_ids[i] << " out of range";
       NotifyError(media::VideoDecodeAccelerator::INVALID_ARGUMENT);
@@ -587,12 +588,12 @@
   }
   video_decode_accelerator_->AssignPictureBuffers(buffers);
   DebugAutoLock auto_lock(debug_uncleared_textures_lock_);
-  for (uint32 i = 0; i < buffer_ids.size(); ++i)
+  for (uint32_t i = 0; i < buffer_ids.size(); ++i)
     uncleared_textures_[buffer_ids[i]] = textures[i];
 }
 
 void GpuVideoDecodeAccelerator::OnReusePictureBuffer(
-    int32 picture_buffer_id) {
+    int32_t picture_buffer_id) {
   DCHECK(video_decode_accelerator_);
   video_decode_accelerator_->ReusePictureBuffer(picture_buffer_id);
 }
@@ -622,7 +623,7 @@
     const media::Picture& picture) {
   DCHECK(child_task_runner_->BelongsToCurrentThread());
   DebugAutoLock auto_lock(debug_uncleared_textures_lock_);
-  std::map<int32, scoped_refptr<gpu::gles2::TextureRef> >::iterator it;
+  std::map<int32_t, scoped_refptr<gpu::gles2::TextureRef>>::iterator it;
   it = uncleared_textures_.find(picture.picture_buffer_id());
   if (it == uncleared_textures_.end())
     return;  // the texture has been cleared
diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.h b/content/common/gpu/media/gpu_video_decode_accelerator.h
index ea599f7..eb6459b 100644
--- a/content/common/gpu/media/gpu_video_decode_accelerator.h
+++ b/content/common/gpu/media/gpu_video_decode_accelerator.h
@@ -5,10 +5,13 @@
 #ifndef CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_
 #define CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_
 
+#include <stdint.h>
+
 #include <map>
 #include <vector>
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/shared_memory.h"
 #include "base/synchronization/waitable_event.h"
@@ -34,7 +37,7 @@
   // |stub->decoder()| will be made current around any operation that touches
   // the underlying VDA so that it can make GL calls safely.
   GpuVideoDecodeAccelerator(
-      int32 host_route_id,
+      int32_t host_route_id,
       GpuCommandBufferStub* stub,
       const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner);
 
@@ -48,12 +51,12 @@
 
   // media::VideoDecodeAccelerator::Client implementation.
   void NotifyCdmAttached(bool success) override;
-  void ProvidePictureBuffers(uint32 requested_num_of_buffers,
+  void ProvidePictureBuffers(uint32_t requested_num_of_buffers,
                              const gfx::Size& dimensions,
-                             uint32 texture_target) override;
-  void DismissPictureBuffer(int32 picture_buffer_id) override;
+                             uint32_t texture_target) override;
+  void DismissPictureBuffer(int32_t picture_buffer_id) override;
   void PictureReady(const media::Picture& picture) override;
-  void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) override;
+  void NotifyEndOfBitstreamBuffer(int32_t bitstream_buffer_id) override;
   void NotifyFlushDone() override;
   void NotifyResetDone() override;
   void NotifyError(media::VideoDecodeAccelerator::Error error) override;
@@ -91,9 +94,9 @@
   // Handlers for IPC messages.
   void OnSetCdm(int cdm_id);
   void OnDecode(const AcceleratedVideoDecoderMsg_Decode_Params& params);
-  void OnAssignPictureBuffers(const std::vector<int32>& buffer_ids,
-                              const std::vector<uint32>& texture_ids);
-  void OnReusePictureBuffer(int32 picture_buffer_id);
+  void OnAssignPictureBuffers(const std::vector<int32_t>& buffer_ids,
+                              const std::vector<uint32_t>& texture_ids);
+  void OnReusePictureBuffer(int32_t picture_buffer_id);
   void OnFlush();
   void OnReset();
   void OnDestroy();
@@ -108,12 +111,12 @@
   void SendCreateDecoderReply(IPC::Message* message, bool succeeded);
 
   // Helper to bind |image| to the texture specified by |client_texture_id|.
-  void BindImage(uint32 client_texture_id,
-                 uint32 texture_target,
+  void BindImage(uint32_t client_texture_id,
+                 uint32_t texture_target,
                  scoped_refptr<gl::GLImage> image);
 
   // Route ID to communicate with the host.
-  const int32 host_route_id_;
+  const int32_t host_route_id_;
 
   // Unowned pointer to the underlying GpuCommandBufferStub.  |this| is
   // registered as a DestuctionObserver of |stub_| and will self-delete when
@@ -131,7 +134,7 @@
   gfx::Size texture_dimensions_;
 
   // The texture target as requested by ProvidePictureBuffers().
-  uint32 texture_target_;
+  uint32_t texture_target_;
 
   // The message filter to run VDA::Decode on IO thread if VDA supports it.
   scoped_refptr<MessageFilter> filter_;
@@ -155,7 +158,7 @@
   base::Lock debug_uncleared_textures_lock_;
 
   // A map from picture buffer ID to TextureRef that have not been cleared.
-  std::map<int32, scoped_refptr<gpu::gles2::TextureRef> > uncleared_textures_;
+  std::map<int32_t, scoped_refptr<gpu::gles2::TextureRef>> uncleared_textures_;
 
   DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator);
 };
diff --git a/content/common/gpu/media/gpu_video_encode_accelerator.cc b/content/common/gpu/media/gpu_video_encode_accelerator.cc
index a791cee..821fbd2 100644
--- a/content/common/gpu/media/gpu_video_encode_accelerator.cc
+++ b/content/common/gpu/media/gpu_video_encode_accelerator.cc
@@ -57,7 +57,7 @@
   return true;
 }
 
-GpuVideoEncodeAccelerator::GpuVideoEncodeAccelerator(int32 host_route_id,
+GpuVideoEncodeAccelerator::GpuVideoEncodeAccelerator(int32_t host_route_id,
                                                      GpuCommandBufferStub* stub)
     : host_route_id_(host_route_id),
       stub_(stub),
@@ -79,7 +79,7 @@
     media::VideoPixelFormat input_format,
     const gfx::Size& input_visible_size,
     media::VideoCodecProfile output_profile,
-    uint32 initial_bitrate,
+    uint32_t initial_bitrate,
     IPC::Message* init_done_msg) {
   DVLOG(2) << "GpuVideoEncodeAccelerator::Initialize(): "
               "input_format=" << input_format
@@ -153,9 +153,10 @@
   output_buffer_size_ = output_buffer_size;
 }
 
-void GpuVideoEncodeAccelerator::BitstreamBufferReady(int32 bitstream_buffer_id,
-                                                     size_t payload_size,
-                                                     bool key_frame) {
+void GpuVideoEncodeAccelerator::BitstreamBufferReady(
+    int32_t bitstream_buffer_id,
+    size_t payload_size,
+    bool key_frame) {
   Send(new AcceleratedVideoEncoderHostMsg_BitstreamBufferReady(
       host_route_id_, bitstream_buffer_id, payload_size, key_frame));
 }
@@ -259,7 +260,7 @@
     return;
   }
 
-  const uint32 aligned_offset =
+  const uint32_t aligned_offset =
       params.buffer_offset % base::SysInfo::VMAllocationGranularity();
   base::CheckedNumeric<off_t> map_offset = params.buffer_offset;
   map_offset -= aligned_offset;
@@ -280,7 +281,8 @@
     return;
   }
 
-  uint8* shm_memory = reinterpret_cast<uint8*>(shm->memory()) + aligned_offset;
+  uint8_t* shm_memory =
+      reinterpret_cast<uint8_t*>(shm->memory()) + aligned_offset;
   scoped_refptr<media::VideoFrame> frame =
       media::VideoFrame::WrapExternalSharedMemory(
           input_format_,
@@ -318,8 +320,8 @@
             params.gpu_memory_buffer_handles.size());
 
   bool map_result = true;
-  uint8* data[media::VideoFrame::kMaxPlanes];
-  int32 strides[media::VideoFrame::kMaxPlanes];
+  uint8_t* data[media::VideoFrame::kMaxPlanes];
+  int32_t strides[media::VideoFrame::kMaxPlanes];
   ScopedVector<gfx::GpuMemoryBuffer> buffers;
   const auto& handles = params.gpu_memory_buffer_handles;
   for (size_t i = 0; i < handles.size(); ++i) {
@@ -340,7 +342,7 @@
       continue;
     }
 
-    data[i] = reinterpret_cast<uint8*>(buffer->memory(0));
+    data[i] = reinterpret_cast<uint8_t*>(buffer->memory(0));
     strides[i] = buffer->stride(0);
     buffers.push_back(buffer.release());
   }
@@ -389,9 +391,9 @@
 }
 
 void GpuVideoEncodeAccelerator::OnUseOutputBitstreamBuffer(
-    int32 buffer_id,
+    int32_t buffer_id,
     base::SharedMemoryHandle buffer_handle,
-    uint32 buffer_size) {
+    uint32_t buffer_size) {
   DVLOG(3) << "GpuVideoEncodeAccelerator::OnUseOutputBitstreamBuffer(): "
               "buffer_id=" << buffer_id
            << ", buffer_size=" << buffer_size;
@@ -419,8 +421,8 @@
 }
 
 void GpuVideoEncodeAccelerator::OnRequestEncodingParametersChange(
-    uint32 bitrate,
-    uint32 framerate) {
+    uint32_t bitrate,
+    uint32_t framerate) {
   DVLOG(2) << "GpuVideoEncodeAccelerator::OnRequestEncodingParametersChange(): "
               "bitrate=" << bitrate
            << ", framerate=" << framerate;
@@ -430,7 +432,7 @@
 }
 
 void GpuVideoEncodeAccelerator::EncodeFrameFinished(
-    int32 frame_id,
+    int32_t frame_id,
     scoped_ptr<base::SharedMemory> shm) {
   Send(new AcceleratedVideoEncoderHostMsg_NotifyInputDone(host_route_id_,
                                                           frame_id));
@@ -438,7 +440,7 @@
 }
 
 void GpuVideoEncodeAccelerator::EncodeFrameFinished2(
-    int32 frame_id,
+    int32_t frame_id,
     ScopedVector<gfx::GpuMemoryBuffer> buffers) {
   // TODO(emircan): Consider calling Unmap() in dtor.
   for (const auto& buffer : buffers)
diff --git a/content/common/gpu/media/gpu_video_encode_accelerator.h b/content/common/gpu/media/gpu_video_encode_accelerator.h
index ae363d3..ecc14f2 100644
--- a/content/common/gpu/media/gpu_video_encode_accelerator.h
+++ b/content/common/gpu/media/gpu_video_encode_accelerator.h
@@ -5,8 +5,12 @@
 #ifndef CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_ENCODE_ACCELERATOR_H_
 #define CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_ENCODE_ACCELERATOR_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <vector>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "content/common/gpu/gpu_command_buffer_stub.h"
@@ -32,7 +36,7 @@
       public media::VideoEncodeAccelerator::Client,
       public GpuCommandBufferStub::DestructionObserver {
  public:
-  GpuVideoEncodeAccelerator(int32 host_route_id, GpuCommandBufferStub* stub);
+  GpuVideoEncodeAccelerator(int32_t host_route_id, GpuCommandBufferStub* stub);
   ~GpuVideoEncodeAccelerator() override;
 
   // Initialize this accelerator with the given parameters and send
@@ -40,7 +44,7 @@
   void Initialize(media::VideoPixelFormat input_format,
                   const gfx::Size& input_visible_size,
                   media::VideoCodecProfile output_profile,
-                  uint32 initial_bitrate,
+                  uint32_t initial_bitrate,
                   IPC::Message* init_done_msg);
 
   // IPC::Listener implementation
@@ -50,7 +54,7 @@
   void RequireBitstreamBuffers(unsigned int input_count,
                                const gfx::Size& input_coded_size,
                                size_t output_buffer_size) override;
-  void BitstreamBufferReady(int32 bitstream_buffer_id,
+  void BitstreamBufferReady(int32_t bitstream_buffer_id,
                             size_t payload_size,
                             bool key_frame) override;
   void NotifyError(media::VideoEncodeAccelerator::Error error) override;
@@ -77,15 +81,16 @@
   // process.
   void OnEncode(const AcceleratedVideoEncoderMsg_Encode_Params& params);
   void OnEncode2(const AcceleratedVideoEncoderMsg_Encode_Params2& params);
-  void OnUseOutputBitstreamBuffer(int32 buffer_id,
+  void OnUseOutputBitstreamBuffer(int32_t buffer_id,
                                   base::SharedMemoryHandle buffer_handle,
-                                  uint32 buffer_size);
-  void OnRequestEncodingParametersChange(uint32 bitrate, uint32 framerate);
+                                  uint32_t buffer_size);
+  void OnRequestEncodingParametersChange(uint32_t bitrate, uint32_t framerate);
 
   void OnDestroy();
 
-  void EncodeFrameFinished(int32 frame_id, scoped_ptr<base::SharedMemory> shm);
-  void EncodeFrameFinished2(int32 frame_id,
+  void EncodeFrameFinished(int32_t frame_id,
+                           scoped_ptr<base::SharedMemory> shm);
+  void EncodeFrameFinished2(int32_t frame_id,
                             ScopedVector<gfx::GpuMemoryBuffer> buffers);
   void Send(IPC::Message* message);
   // Helper for replying to the creation request.
diff --git a/content/common/gpu/media/h264_decoder.cc b/content/common/gpu/media/h264_decoder.cc
index 35e9681b..8d4d533 100644
--- a/content/common/gpu/media/h264_decoder.cc
+++ b/content/common/gpu/media/h264_decoder.cc
@@ -8,6 +8,7 @@
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/callback_helpers.h"
+#include "base/macros.h"
 #include "base/numerics/safe_conversions.h"
 #include "base/stl_util.h"
 #include "content/common/gpu/media/h264_decoder.h"
diff --git a/content/common/gpu/media/h264_decoder.h b/content/common/gpu/media/h264_decoder.h
index 532291b7..9d8b56f5 100644
--- a/content/common/gpu/media/h264_decoder.h
+++ b/content/common/gpu/media/h264_decoder.h
@@ -5,8 +5,12 @@
 #ifndef CONTENT_COMMON_GPU_MEDIA_H264_DECODER_H_
 #define CONTENT_COMMON_GPU_MEDIA_H264_DECODER_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <vector>
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
diff --git a/content/common/gpu/media/h264_dpb.h b/content/common/gpu/media/h264_dpb.h
index a1b4ba2..9c67538 100644
--- a/content/common/gpu/media/h264_dpb.h
+++ b/content/common/gpu/media/h264_dpb.h
@@ -8,9 +8,11 @@
 #ifndef CONTENT_COMMON_GPU_MEDIA_H264_DPB_H_
 #define CONTENT_COMMON_GPU_MEDIA_H264_DPB_H_
 
+#include <stddef.h>
+
 #include <vector>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "media/filters/h264_parser.h"
 
diff --git a/content/common/gpu/media/jpeg_decode_accelerator_unittest.cc b/content/common/gpu/media/jpeg_decode_accelerator_unittest.cc
index fa640b16..f7cb5f562 100644
--- a/content/common/gpu/media/jpeg_decode_accelerator_unittest.cc
+++ b/content/common/gpu/media/jpeg_decode_accelerator_unittest.cc
@@ -6,16 +6,21 @@
 // See http://code.google.com/p/googletest/issues/detail?id=371
 #include "testing/gtest/include/gtest/gtest.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/at_exit.h"
 #include "base/bind.h"
 #include "base/command_line.h"
 #include "base/files/file_util.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/scoped_vector.h"
 #include "base/path_service.h"
 #include "base/strings/string_piece.h"
 #include "base/strings/string_split.h"
 #include "base/thread_task_runner_handle.h"
+#include "build/build_config.h"
 #include "content/common/gpu/media/video_accelerator_unittest_helpers.h"
 #include "media/base/test_data_util.h"
 #include "media/filters/jpeg_parser.h"
diff --git a/content/common/gpu/media/rendering_helper.cc b/content/common/gpu/media/rendering_helper.cc
index 8984b10..646b9f4 100644
--- a/content/common/gpu/media/rendering_helper.cc
+++ b/content/common/gpu/media/rendering_helper.cc
@@ -12,11 +12,13 @@
 #include "base/callback_helpers.h"
 #include "base/command_line.h"
 #include "base/mac/scoped_nsautorelease_pool.h"
+#include "base/macros.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
 #include "base/strings/stringize_macros.h"
 #include "base/synchronization/waitable_event.h"
 #include "base/time/time.h"
+#include "build/build_config.h"
 #include "ui/gl/gl_context.h"
 #include "ui/gl/gl_implementation.h"
 #include "ui/gl/gl_surface.h"
@@ -158,8 +160,8 @@
 
 RenderingHelperParams::~RenderingHelperParams() {}
 
-VideoFrameTexture::VideoFrameTexture(uint32 texture_target,
-                                     uint32 texture_id,
+VideoFrameTexture::VideoFrameTexture(uint32_t texture_target,
+                                     uint32_t texture_id,
                                      const base::Closure& no_longer_needed_cb)
     : texture_target_(texture_target),
       texture_id_(texture_id),
@@ -552,8 +554,8 @@
   done->Signal();
 }
 
-void RenderingHelper::CreateTexture(uint32 texture_target,
-                                    uint32* texture_id,
+void RenderingHelper::CreateTexture(uint32_t texture_target,
+                                    uint32_t* texture_id,
                                     const gfx::Size& size,
                                     base::WaitableEvent* done) {
   if (base::MessageLoop::current() != message_loop_) {
@@ -594,8 +596,8 @@
   glScissor(area.x(), area.y(), area.width(), area.height());
 }
 
-void RenderingHelper::RenderThumbnail(uint32 texture_target,
-                                      uint32 texture_id) {
+void RenderingHelper::RenderThumbnail(uint32_t texture_target,
+                                      uint32_t texture_id) {
   CHECK_EQ(base::MessageLoop::current(), message_loop_);
   const int width = thumbnail_size_.width();
   const int height = thumbnail_size_.height();
@@ -640,7 +642,8 @@
   }
 }
 
-void RenderingHelper::RenderTexture(uint32 texture_target, uint32 texture_id) {
+void RenderingHelper::RenderTexture(uint32_t texture_target,
+                                    uint32_t texture_id) {
   // The ExternalOES sampler is bound to GL_TEXTURE1 and the Texture2D sampler
   // is bound to GL_TEXTURE0.
   if (texture_target == GL_TEXTURE_2D) {
@@ -654,7 +657,7 @@
   CHECK_EQ(static_cast<int>(glGetError()), GL_NO_ERROR);
 }
 
-void RenderingHelper::DeleteTexture(uint32 texture_id) {
+void RenderingHelper::DeleteTexture(uint32_t texture_id) {
   CHECK_EQ(base::MessageLoop::current(), message_loop_);
   glDeleteTextures(1, &texture_id);
   CHECK_EQ(static_cast<int>(glGetError()), GL_NO_ERROR);
@@ -875,7 +878,7 @@
     // |scheduled_render_time_|.
     target = std::max(now + vsync_interval_, scheduled_render_time_);
 
-    int64 intervals = (target - vsync_timebase_) / vsync_interval_;
+    int64_t intervals = (target - vsync_timebase_) / vsync_interval_;
     target = vsync_timebase_ + intervals * vsync_interval_;
   } else {
     target = std::max(now, scheduled_render_time_);
diff --git a/content/common/gpu/media/rendering_helper.h b/content/common/gpu/media/rendering_helper.h
index 31e5f7e..8a6c28bd 100644
--- a/content/common/gpu/media/rendering_helper.h
+++ b/content/common/gpu/media/rendering_helper.h
@@ -5,13 +5,17 @@
 #ifndef CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_
 #define CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <map>
 #include <queue>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/cancelable_callback.h"
+#include "base/macros.h"
 #include "base/time/time.h"
+#include "build/build_config.h"
 #include "ui/gfx/geometry/rect.h"
 #include "ui/gfx/geometry/size.h"
 #include "ui/gl/gl_bindings.h"
@@ -31,18 +35,18 @@
 
 class VideoFrameTexture : public base::RefCounted<VideoFrameTexture> {
  public:
-  uint32 texture_id() const { return texture_id_; }
-  uint32 texture_target() const { return texture_target_; }
+  uint32_t texture_id() const { return texture_id_; }
+  uint32_t texture_target() const { return texture_target_; }
 
-  VideoFrameTexture(uint32 texture_target,
-                    uint32 texture_id,
+  VideoFrameTexture(uint32_t texture_target,
+                    uint32_t texture_id,
                     const base::Closure& no_longer_needed_cb);
 
  private:
   friend class base::RefCounted<VideoFrameTexture>;
 
-  uint32 texture_target_;
-  uint32 texture_id_;
+  uint32_t texture_target_;
+  uint32_t texture_id_;
   base::Closure no_longer_needed_cb_;
 
   ~VideoFrameTexture();
@@ -107,14 +111,14 @@
 
   // Return a newly-created GLES2 texture id of the specified size, and
   // signal |*done|.
-  void CreateTexture(uint32 texture_target,
-                     uint32* texture_id,
+  void CreateTexture(uint32_t texture_target,
+                     uint32_t* texture_id,
                      const gfx::Size& size,
                      base::WaitableEvent* done);
 
   // Render thumbnail in the |texture_id| to the FBO buffer using target
   // |texture_target|.
-  void RenderThumbnail(uint32 texture_target, uint32 texture_id);
+  void RenderThumbnail(uint32_t texture_target, uint32_t texture_id);
 
   // Queues the |video_frame| for rendering.
   void QueueVideoFrame(size_t window_id,
@@ -125,7 +129,7 @@
   void Flush(size_t window_id);
 
   // Delete |texture_id|.
-  void DeleteTexture(uint32 texture_id);
+  void DeleteTexture(uint32_t texture_id);
 
   // Get the platform specific handle to the OpenGL display.
   void* GetGLDisplay();
@@ -181,7 +185,7 @@
 
   // Render |texture_id| to the current view port of the screen using target
   // |texture_target|.
-  void RenderTexture(uint32 texture_target, uint32 texture_id);
+  void RenderTexture(uint32_t texture_target, uint32_t texture_id);
 
   base::MessageLoop* message_loop_;
 
diff --git a/content/common/gpu/media/tegra_v4l2_device.cc b/content/common/gpu/media/tegra_v4l2_device.cc
index f16835d..003c142 100644
--- a/content/common/gpu/media/tegra_v4l2_device.cc
+++ b/content/common/gpu/media/tegra_v4l2_device.cc
@@ -19,22 +19,24 @@
 const char kEncoderDevice[] = "/dev/nvhost-msenc";
 }
 
-typedef int32 (*TegraV4L2Open)(const char* name, int32 flags);
-typedef int32 (*TegraV4L2Close)(int32 fd);
-typedef int32 (*TegraV4L2Ioctl)(int32 fd, unsigned long cmd, ...);
-typedef int32 (*TegraV4L2Poll)(int32 fd, bool poll_device, bool* event_pending);
-typedef int32 (*TegraV4L2SetDevicePollInterrupt)(int32 fd);
-typedef int32 (*TegraV4L2ClearDevicePollInterrupt)(int32 fd);
+typedef int32_t (*TegraV4L2Open)(const char* name, int32_t flags);
+typedef int32_t (*TegraV4L2Close)(int32_t fd);
+typedef int32_t (*TegraV4L2Ioctl)(int32_t fd, unsigned long cmd, ...);
+typedef int32_t (*TegraV4L2Poll)(int32_t fd,
+                                 bool poll_device,
+                                 bool* event_pending);
+typedef int32_t (*TegraV4L2SetDevicePollInterrupt)(int32_t fd);
+typedef int32_t (*TegraV4L2ClearDevicePollInterrupt)(int32_t fd);
 typedef void* (*TegraV4L2Mmap)(void* addr,
                                size_t length,
                                int prot,
                                int flags,
                                int fd,
                                unsigned int offset);
-typedef int32 (*TegraV4L2Munmap)(void* addr, size_t length);
-typedef int32 (*TegraV4L2UseEglImage)(int fd,
-                                      unsigned int buffer_index,
-                                      void* egl_image);
+typedef int32_t (*TegraV4L2Munmap)(void* addr, size_t length);
+typedef int32_t (*TegraV4L2UseEglImage)(int fd,
+                                        unsigned int buffer_index,
+                                        void* egl_image);
 
 #define TEGRAV4L2_SYM(name) TegraV4L2##name TegraV4L2_##name = NULL
 
@@ -213,7 +215,7 @@
 
 GLenum TegraV4L2Device::GetTextureTarget() { return GL_TEXTURE_2D; }
 
-uint32 TegraV4L2Device::PreferredInputFormat() {
+uint32_t TegraV4L2Device::PreferredInputFormat() {
   // TODO(posciak): We should support "dontcare" returns here once we
   // implement proper handling (fallback, negotiation) for this in users.
   CHECK_EQ(type_, kEncoder);
diff --git a/content/common/gpu/media/tegra_v4l2_device.h b/content/common/gpu/media/tegra_v4l2_device.h
index 4e05253..8b2320bd 100644
--- a/content/common/gpu/media/tegra_v4l2_device.h
+++ b/content/common/gpu/media/tegra_v4l2_device.h
@@ -8,6 +8,10 @@
 #ifndef CONTENT_COMMON_GPU_MEDIA_TEGRA_V4L2_DEVICE_H_
 #define CONTENT_COMMON_GPU_MEDIA_TEGRA_V4L2_DEVICE_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "content/common/gpu/media/v4l2_device.h"
 #include "ui/gl/gl_bindings.h"
 
@@ -42,7 +46,7 @@
   EGLBoolean DestroyEGLImage(EGLDisplay egl_display,
                              EGLImageKHR egl_image) override;
   GLenum GetTextureTarget() override;
-  uint32 PreferredInputFormat() override;
+  uint32_t PreferredInputFormat() override;
 
  private:
   ~TegraV4L2Device() override;
diff --git a/content/common/gpu/media/v4l2_device.cc b/content/common/gpu/media/v4l2_device.cc
index b62a8c40..33f96607 100644
--- a/content/common/gpu/media/v4l2_device.cc
+++ b/content/common/gpu/media/v4l2_device.cc
@@ -6,6 +6,7 @@
 #include <linux/videodev2.h>
 
 #include "base/numerics/safe_conversions.h"
+#include "build/build_config.h"
 #include "content/common/gpu/media/generic_v4l2_device.h"
 #if defined(ARCH_CPU_ARMEL)
 #include "content/common/gpu/media/tegra_v4l2_device.h"
@@ -39,7 +40,7 @@
 
 // static
 media::VideoPixelFormat V4L2Device::V4L2PixFmtToVideoPixelFormat(
-    uint32 pix_fmt) {
+    uint32_t pix_fmt) {
   switch (pix_fmt) {
     case V4L2_PIX_FMT_NV12:
     case V4L2_PIX_FMT_NV12M:
@@ -62,7 +63,7 @@
 }
 
 // static
-uint32 V4L2Device::VideoPixelFormatToV4L2PixFmt(
+uint32_t V4L2Device::VideoPixelFormatToV4L2PixFmt(
     media::VideoPixelFormat format) {
   switch (format) {
     case media::PIXEL_FORMAT_NV12:
@@ -78,7 +79,7 @@
 }
 
 // static
-uint32 V4L2Device::VideoCodecProfileToV4L2PixFmt(
+uint32_t V4L2Device::VideoCodecProfileToV4L2PixFmt(
     media::VideoCodecProfile profile,
     bool slice_based) {
   if (profile >= media::H264PROFILE_MIN &&
diff --git a/content/common/gpu/media/v4l2_device.h b/content/common/gpu/media/v4l2_device.h
index 4bba8904c..df6b5982 100644
--- a/content/common/gpu/media/v4l2_device.h
+++ b/content/common/gpu/media/v4l2_device.h
@@ -9,6 +9,9 @@
 #ifndef CONTENT_COMMON_GPU_MEDIA_V4L2_DEVICE_H_
 #define CONTENT_COMMON_GPU_MEDIA_V4L2_DEVICE_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/memory/ref_counted.h"
 #include "content/common/content_export.h"
 #include "media/base/video_decoder_config.h"
@@ -29,10 +32,11 @@
     : public base::RefCountedThreadSafe<V4L2Device> {
  public:
   // Utility format conversion functions
-  static media::VideoPixelFormat V4L2PixFmtToVideoPixelFormat(uint32 format);
-  static uint32 VideoPixelFormatToV4L2PixFmt(media::VideoPixelFormat format);
-  static uint32 VideoCodecProfileToV4L2PixFmt(media::VideoCodecProfile profile,
-                                              bool slice_based);
+  static media::VideoPixelFormat V4L2PixFmtToVideoPixelFormat(uint32_t format);
+  static uint32_t VideoPixelFormatToV4L2PixFmt(media::VideoPixelFormat format);
+  static uint32_t VideoCodecProfileToV4L2PixFmt(
+      media::VideoCodecProfile profile,
+      bool slice_based);
   static uint32_t V4L2PixFmtToDrmFormat(uint32_t format);
   // Convert format requirements requested by a V4L2 device to gfx::Size.
   static gfx::Size CodedSizeFromV4L2Format(struct v4l2_format format);
@@ -107,7 +111,7 @@
   virtual GLenum GetTextureTarget() = 0;
 
   // Returns the preferred V4L2 input format or 0 if don't care.
-  virtual uint32 PreferredInputFormat() = 0;
+  virtual uint32_t PreferredInputFormat() = 0;
 
   // Get minimum and maximum resolution for fourcc |pixelformat| and store to
   // |min_resolution| and |max_resolution|.
diff --git a/content/common/gpu/media/v4l2_image_processor.h b/content/common/gpu/media/v4l2_image_processor.h
index de29a51..6c36697 100644
--- a/content/common/gpu/media/v4l2_image_processor.h
+++ b/content/common/gpu/media/v4l2_image_processor.h
@@ -5,9 +5,13 @@
 #ifndef CONTENT_COMMON_GPU_MEDIA_V4L2_IMAGE_PROCESSOR_H_
 #define CONTENT_COMMON_GPU_MEDIA_V4L2_IMAGE_PROCESSOR_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <queue>
 #include <vector>
 
+#include "base/macros.h"
 #include "base/memory/linked_ptr.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
@@ -127,8 +131,8 @@
 
   media::VideoPixelFormat input_format_;
   media::VideoPixelFormat output_format_;
-  uint32 input_format_fourcc_;
-  uint32 output_format_fourcc_;
+  uint32_t input_format_fourcc_;
+  uint32_t output_format_fourcc_;
 
   size_t input_planes_count_;
   size_t output_planes_count_;
diff --git a/content/common/gpu/media/v4l2_jpeg_decode_accelerator.h b/content/common/gpu/media/v4l2_jpeg_decode_accelerator.h
index a05f21a..4358080 100644
--- a/content/common/gpu/media/v4l2_jpeg_decode_accelerator.h
+++ b/content/common/gpu/media/v4l2_jpeg_decode_accelerator.h
@@ -5,9 +5,13 @@
 #ifndef CONTENT_COMMON_GPU_MEDIA_V4L2_JPEG_DECODE_ACCELERATOR_H_
 #define CONTENT_COMMON_GPU_MEDIA_V4L2_JPEG_DECODE_ACCELERATOR_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <queue>
 #include <vector>
 
+#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/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc b/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc
index a6a50930..bb64235 100644
--- a/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc
+++ b/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc
@@ -15,6 +15,7 @@
 #include "base/callback.h"
 #include "base/callback_helpers.h"
 #include "base/command_line.h"
+#include "base/macros.h"
 #include "base/numerics/safe_conversions.h"
 #include "base/strings/stringprintf.h"
 #include "content/common/gpu/media/v4l2_slice_video_decode_accelerator.h"
@@ -58,7 +59,7 @@
  public:
   using ReleaseCB = base::Callback<void(int)>;
 
-  V4L2DecodeSurface(int32 bitstream_id,
+  V4L2DecodeSurface(int32_t bitstream_id,
                     int input_record,
                     int output_record,
                     const ReleaseCB& release_cb);
@@ -68,7 +69,7 @@
   void SetDecoded();
   bool decoded() const { return decoded_; }
 
-  int32 bitstream_id() const { return bitstream_id_; }
+  int32_t bitstream_id() const { return bitstream_id_; }
   int input_record() const { return input_record_; }
   int output_record() const { return output_record_; }
   uint32_t config_store() const { return config_store_; }
@@ -84,7 +85,7 @@
   friend class base::RefCounted<V4L2DecodeSurface>;
   ~V4L2DecodeSurface();
 
-  int32 bitstream_id_;
+  int32_t bitstream_id_;
   int input_record_;
   int output_record_;
   uint32_t config_store_;
@@ -98,7 +99,7 @@
 };
 
 V4L2SliceVideoDecodeAccelerator::V4L2DecodeSurface::V4L2DecodeSurface(
-    int32 bitstream_id,
+    int32_t bitstream_id,
     int input_record,
     int output_record,
     const ReleaseCB& release_cb)
@@ -107,8 +108,7 @@
       output_record_(output_record),
       config_store_(input_record + 1),
       decoded_(false),
-      release_cb_(release_cb) {
-}
+      release_cb_(release_cb) {}
 
 V4L2SliceVideoDecodeAccelerator::V4L2DecodeSurface::~V4L2DecodeSurface() {
   DVLOGF(5) << "Releasing output record id=" << output_record_;
@@ -165,14 +165,14 @@
       const scoped_refptr<base::SingleThreadTaskRunner>& client_task_runner,
       base::SharedMemory* shm,
       size_t size,
-      int32 input_id);
+      int32_t input_id);
   ~BitstreamBufferRef();
   const base::WeakPtr<VideoDecodeAccelerator::Client> client;
   const scoped_refptr<base::SingleThreadTaskRunner> client_task_runner;
   const scoped_ptr<base::SharedMemory> shm;
   const size_t size;
   off_t bytes_used;
-  const int32 input_id;
+  const int32_t input_id;
 };
 
 V4L2SliceVideoDecodeAccelerator::BitstreamBufferRef::BitstreamBufferRef(
@@ -180,14 +180,13 @@
     const scoped_refptr<base::SingleThreadTaskRunner>& client_task_runner,
     base::SharedMemory* shm,
     size_t size,
-    int32 input_id)
+    int32_t input_id)
     : client(client),
       client_task_runner(client_task_runner),
       shm(shm),
       size(size),
       bytes_used(0),
-      input_id(input_id) {
-}
+      input_id(input_id) {}
 
 V4L2SliceVideoDecodeAccelerator::BitstreamBufferRef::~BitstreamBufferRef() {
   if (input_id >= 0) {
@@ -776,7 +775,7 @@
 }
 
 void V4L2SliceVideoDecodeAccelerator::DismissPictures(
-    std::vector<int32> picture_buffer_ids,
+    std::vector<int32_t> picture_buffer_ids,
     base::WaitableEvent* done) {
   DVLOGF(3);
   DCHECK(child_task_runner_->BelongsToCurrentThread());
@@ -1340,7 +1339,7 @@
   DVLOGF(3);
   DCHECK(decoder_thread_task_runner_->BelongsToCurrentThread());
   std::vector<EGLImageKHR> egl_images_to_destroy;
-  std::vector<int32> picture_buffers_to_dismiss;
+  std::vector<int32_t> picture_buffers_to_dismiss;
 
   if (output_buffer_map_.empty())
     return true;
@@ -1498,7 +1497,7 @@
 }
 
 void V4L2SliceVideoDecodeAccelerator::ReusePictureBuffer(
-    int32 picture_buffer_id) {
+    int32_t picture_buffer_id) {
   DCHECK(child_task_runner_->BelongsToCurrentThread());
   DVLOGF(4) << "picture_buffer_id=" << picture_buffer_id;
 
@@ -1526,7 +1525,7 @@
 }
 
 void V4L2SliceVideoDecodeAccelerator::ReusePictureBufferTask(
-    int32 picture_buffer_id,
+    int32_t picture_buffer_id,
     scoped_ptr<EGLSyncKHRRef> egl_sync_ref) {
   DVLOGF(3) << "picture_buffer_id=" << picture_buffer_id;
   DCHECK(decoder_thread_task_runner_->BelongsToCurrentThread());
diff --git a/content/common/gpu/media/v4l2_slice_video_decode_accelerator.h b/content/common/gpu/media/v4l2_slice_video_decode_accelerator.h
index 4a7c9075..45b77e8 100644
--- a/content/common/gpu/media/v4l2_slice_video_decode_accelerator.h
+++ b/content/common/gpu/media/v4l2_slice_video_decode_accelerator.h
@@ -6,9 +6,12 @@
 #define CONTENT_COMMON_GPU_MEDIA_V4L2_SLICE_VIDEO_DECODE_ACCELERATOR_H_
 
 #include <linux/videodev2.h>
+#include <stddef.h>
+#include <stdint.h>
 #include <queue>
 #include <vector>
 
+#include "base/macros.h"
 #include "base/memory/linked_ptr.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
@@ -46,7 +49,7 @@
   void Decode(const media::BitstreamBuffer& bitstream_buffer) override;
   void AssignPictureBuffers(
       const std::vector<media::PictureBuffer>& buffers) override;
-  void ReusePictureBuffer(int32 picture_buffer_id) override;
+  void ReusePictureBuffer(int32_t picture_buffer_id) override;
   void Flush() override;
   void Reset() override;
   void Destroy() override;
@@ -62,7 +65,7 @@
   // Record for input buffers.
   struct InputRecord {
     InputRecord();
-    int32 input_id;
+    int32_t input_id;
     void* address;
     size_t length;
     size_t bytes_used;
@@ -74,7 +77,7 @@
     OutputRecord();
     bool at_device;
     bool at_client;
-    int32 picture_id;
+    int32_t picture_id;
     EGLImageKHR egl_image;
     EGLSyncKHR egl_sync;
     bool cleared;
@@ -149,7 +152,7 @@
 
   // Dismiss all |picture_buffer_ids| via Client::DismissPictureBuffer()
   // and signal |done| after finishing.
-  void DismissPictures(std::vector<int32> picture_buffer_ids,
+  void DismissPictures(std::vector<int32_t> picture_buffer_ids,
                        base::WaitableEvent* done);
 
   // Task to finish initialization on decoder_thread_.
@@ -250,7 +253,7 @@
 
   // Auto-destruction reference for EGLSync (for message-passing).
   struct EGLSyncKHRRef;
-  void ReusePictureBufferTask(int32 picture_buffer_id,
+  void ReusePictureBufferTask(int32_t picture_buffer_id,
                               scoped_ptr<EGLSyncKHRRef> egl_sync_ref);
 
   // Called to actually send |dec_surface| to the client, after it is decoded
@@ -360,7 +363,7 @@
 
   // Surfaces sent to client to keep references to them while displayed.
   using V4L2DecodeSurfaceByPictureBufferId =
-      std::map<int32, scoped_refptr<V4L2DecodeSurface>>;
+      std::map<int32_t, scoped_refptr<V4L2DecodeSurface>>;
   V4L2DecodeSurfaceByPictureBufferId surfaces_at_display_;
 
   // Record for decoded pictures that can be sent to PictureReady.
diff --git a/content/common/gpu/media/v4l2_video_decode_accelerator.cc b/content/common/gpu/media/v4l2_video_decode_accelerator.cc
index 64672fc..81437bb 100644
--- a/content/common/gpu/media/v4l2_video_decode_accelerator.cc
+++ b/content/common/gpu/media/v4l2_video_decode_accelerator.cc
@@ -13,11 +13,13 @@
 
 #include "base/bind.h"
 #include "base/command_line.h"
+#include "base/macros.h"
 #include "base/memory/shared_memory.h"
 #include "base/message_loop/message_loop.h"
 #include "base/numerics/safe_conversions.h"
 #include "base/thread_task_runner_handle.h"
 #include "base/trace_event/trace_event.h"
+#include "build/build_config.h"
 #include "content/common/gpu/media/v4l2_video_decode_accelerator.h"
 #include "media/base/media_switches.h"
 #include "media/filters/h264_parser.h"
@@ -59,14 +61,14 @@
       scoped_refptr<base::SingleThreadTaskRunner>& client_task_runner,
       base::SharedMemory* shm,
       size_t size,
-      int32 input_id);
+      int32_t input_id);
   ~BitstreamBufferRef();
   const base::WeakPtr<Client> client;
   const scoped_refptr<base::SingleThreadTaskRunner> client_task_runner;
   const scoped_ptr<base::SharedMemory> shm;
   const size_t size;
   size_t bytes_used;
-  const int32 input_id;
+  const int32_t input_id;
 };
 
 struct V4L2VideoDecodeAccelerator::EGLSyncKHRRef {
@@ -88,14 +90,13 @@
     scoped_refptr<base::SingleThreadTaskRunner>& client_task_runner,
     base::SharedMemory* shm,
     size_t size,
-    int32 input_id)
+    int32_t input_id)
     : client(client),
       client_task_runner(client_task_runner),
       shm(shm),
       size(size),
       bytes_used(0),
-      input_id(input_id) {
-}
+      input_id(input_id) {}
 
 V4L2VideoDecodeAccelerator::BitstreamBufferRef::~BitstreamBufferRef() {
   if (input_id >= 0) {
@@ -394,7 +395,7 @@
   pictures_assigned_.Signal();
 }
 
-void V4L2VideoDecodeAccelerator::ReusePictureBuffer(int32 picture_buffer_id) {
+void V4L2VideoDecodeAccelerator::ReusePictureBuffer(int32_t picture_buffer_id) {
   DVLOG(3) << "ReusePictureBuffer(): picture_buffer_id=" << picture_buffer_id;
   // Must be run on child thread, as we'll insert a sync in the EGL context.
   DCHECK(child_task_runner_->BelongsToCurrentThread());
@@ -557,7 +558,7 @@
   const size_t size = decoder_current_bitstream_buffer_->size;
   size_t decoded_size = 0;
   if (size == 0) {
-    const int32 input_id = decoder_current_bitstream_buffer_->input_id;
+    const int32_t input_id = decoder_current_bitstream_buffer_->input_id;
     if (input_id >= 0) {
       // This is a buffer queued from the client that has zero size.  Skip.
       schedule_task = true;
@@ -587,8 +588,8 @@
     }
   } else {
     // This is a buffer queued from the client, with actual contents.  Decode.
-    const uint8* const data =
-        reinterpret_cast<const uint8*>(
+    const uint8_t* const data =
+        reinterpret_cast<const uint8_t*>(
             decoder_current_bitstream_buffer_->shm->memory()) +
         decoder_current_bitstream_buffer_->bytes_used;
     const size_t data_size =
@@ -625,7 +626,7 @@
     if (decoder_current_bitstream_buffer_->bytes_used ==
         decoder_current_bitstream_buffer_->size) {
       // Our current bitstream buffer is done; return it.
-      int32 input_id = decoder_current_bitstream_buffer_->input_id;
+      int32_t input_id = decoder_current_bitstream_buffer_->input_id;
       DVLOG(3) << "DecodeBufferTask(): finished input_id=" << input_id;
       // BitstreamBufferRef destructor calls NotifyEndOfBitstreamBuffer().
       decoder_current_bitstream_buffer_.reset();
@@ -634,10 +635,9 @@
   }
 }
 
-bool V4L2VideoDecodeAccelerator::AdvanceFrameFragment(
-    const uint8* data,
-    size_t size,
-    size_t* endpos) {
+bool V4L2VideoDecodeAccelerator::AdvanceFrameFragment(const uint8_t* data,
+                                                      size_t size,
+                                                      size_t* endpos) {
   if (video_profile_ >= media::H264PROFILE_MIN &&
       video_profile_ <= media::H264PROFILE_MAX) {
     // For H264, we need to feed HW one frame at a time.  This is going to take
@@ -856,10 +856,9 @@
     NOTIFY_ERROR(UNREADABLE_INPUT);
     return false;
   }
-  memcpy(
-      reinterpret_cast<uint8*>(input_record.address) + input_record.bytes_used,
-      data,
-      size);
+  memcpy(reinterpret_cast<uint8_t*>(input_record.address) +
+             input_record.bytes_used,
+         data, size);
   input_record.bytes_used += size;
 
   return true;
@@ -1212,7 +1211,8 @@
 }
 
 void V4L2VideoDecodeAccelerator::ReusePictureBufferTask(
-    int32 picture_buffer_id, scoped_ptr<EGLSyncKHRRef> egl_sync_ref) {
+    int32_t picture_buffer_id,
+    scoped_ptr<EGLSyncKHRRef> egl_sync_ref) {
   DVLOG(3) << "ReusePictureBufferTask(): picture_buffer_id="
            << picture_buffer_id;
   DCHECK_EQ(decoder_thread_.message_loop(), base::MessageLoop::current());
diff --git a/content/common/gpu/media/v4l2_video_decode_accelerator.h b/content/common/gpu/media/v4l2_video_decode_accelerator.h
index 58fc6f4..5325e46 100644
--- a/content/common/gpu/media/v4l2_video_decode_accelerator.h
+++ b/content/common/gpu/media/v4l2_video_decode_accelerator.h
@@ -9,10 +9,14 @@
 #ifndef CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DECODE_ACCELERATOR_H_
 #define CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DECODE_ACCELERATOR_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <queue>
 #include <vector>
 
 #include "base/callback_forward.h"
+#include "base/macros.h"
 #include "base/memory/linked_ptr.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
@@ -87,7 +91,7 @@
   void Decode(const media::BitstreamBuffer& bitstream_buffer) override;
   void AssignPictureBuffers(
       const std::vector<media::PictureBuffer>& buffers) override;
-  void ReusePictureBuffer(int32 picture_buffer_id) override;
+  void ReusePictureBuffer(int32_t picture_buffer_id) override;
   void Flush() override;
   void Reset() override;
   void Destroy() override;
@@ -147,7 +151,7 @@
     void* address;          // mmap() address.
     size_t length;          // mmap() length.
     off_t bytes_used;       // bytes filled in the mmap() segment.
-    int32 input_id;         // triggering input_id as given to Decode().
+    int32_t input_id;       // triggering input_id as given to Decode().
   };
 
   // Record for output buffers.
@@ -158,7 +162,7 @@
     bool at_client;         // held by client.
     EGLImageKHR egl_image;  // EGLImageKHR for the output buffer.
     EGLSyncKHR egl_sync;    // sync the compositor's use of the EGLImage.
-    int32 picture_id;       // picture buffer id as returned to PictureReady().
+    int32_t picture_id;     // picture buffer id as returned to PictureReady().
     bool cleared;           // Whether the texture is cleared and safe to render
                             // from. See TextureManager for details.
   };
@@ -176,7 +180,7 @@
   // DecodeBufferInitial() or DecodeBufferContinue() as appropriate.
   void DecodeBufferTask();
   // Advance to the next fragment that begins a frame.
-  bool AdvanceFrameFragment(const uint8* data, size_t size, size_t* endpos);
+  bool AdvanceFrameFragment(const uint8_t* data, size_t size, size_t* endpos);
   // Schedule another DecodeBufferTask() if we're behind.
   void ScheduleDecodeBufferTaskIfNeeded();
 
@@ -210,7 +214,7 @@
   // Process a ReusePictureBuffer() API call.  The API call create an EGLSync
   // object on the main (GPU process) thread; we will record this object so we
   // can wait on it before reusing the buffer.
-  void ReusePictureBufferTask(int32 picture_buffer_id,
+  void ReusePictureBufferTask(int32_t picture_buffer_id,
                               scoped_ptr<EGLSyncKHRRef> egl_sync_ref);
 
   // Flush() task.  Child thread should not submit any more buffers until it
diff --git a/content/common/gpu/media/v4l2_video_encode_accelerator.cc b/content/common/gpu/media/v4l2_video_encode_accelerator.cc
index 88c6266..9d47df7 100644
--- a/content/common/gpu/media/v4l2_video_encode_accelerator.cc
+++ b/content/common/gpu/media/v4l2_video_encode_accelerator.cc
@@ -11,6 +11,7 @@
 
 #include "base/callback.h"
 #include "base/command_line.h"
+#include "base/macros.h"
 #include "base/numerics/safe_conversions.h"
 #include "base/thread_task_runner_handle.h"
 #include "base/trace_event/trace_event.h"
@@ -48,9 +49,11 @@
 namespace content {
 
 struct V4L2VideoEncodeAccelerator::BitstreamBufferRef {
-  BitstreamBufferRef(int32 id, scoped_ptr<base::SharedMemory> shm, size_t size)
+  BitstreamBufferRef(int32_t id,
+                     scoped_ptr<base::SharedMemory> shm,
+                     size_t size)
       : id(id), shm(shm.Pass()), size(size) {}
-  const int32 id;
+  const int32_t id;
   const scoped_ptr<base::SharedMemory> shm;
   const size_t size;
 };
@@ -102,7 +105,7 @@
     media::VideoPixelFormat input_format,
     const gfx::Size& input_visible_size,
     media::VideoCodecProfile output_profile,
-    uint32 initial_bitrate,
+    uint32_t initial_bitrate,
     Client* client) {
   DVLOG(3) << __func__
            << ": input_format=" << media::VideoPixelFormatToString(input_format)
@@ -237,8 +240,8 @@
 }
 
 void V4L2VideoEncodeAccelerator::RequestEncodingParametersChange(
-    uint32 bitrate,
-    uint32 framerate) {
+    uint32_t bitrate,
+    uint32_t framerate) {
   DVLOG(3) << "RequestEncodingParametersChange(): bitrate=" << bitrate
            << ", framerate=" << framerate;
   DCHECK(child_task_runner_->BelongsToCurrentThread());
@@ -557,13 +560,13 @@
     DCHECK_LE(output_size, output_buffer_byte_size_);
     if (output_size > output_buffer_byte_size_)
       output_size = output_buffer_byte_size_;
-    uint8* target_data =
-        reinterpret_cast<uint8*>(output_record.buffer_ref->shm->memory());
+    uint8_t* target_data =
+        reinterpret_cast<uint8_t*>(output_record.buffer_ref->shm->memory());
     if (output_format_fourcc_ == V4L2_PIX_FMT_H264) {
       if (stream_header_size_ == 0) {
         // Assume that the first buffer dequeued is the stream header.
         stream_header_size_ = output_size;
-        stream_header_.reset(new uint8[stream_header_size_]);
+        stream_header_.reset(new uint8_t[stream_header_size_]);
         memcpy(stream_header_.get(), output_data, stream_header_size_);
       }
       if (key_frame &&
@@ -802,8 +805,8 @@
 }
 
 void V4L2VideoEncodeAccelerator::RequestEncodingParametersChangeTask(
-    uint32 bitrate,
-    uint32 framerate) {
+    uint32_t bitrate,
+    uint32_t framerate) {
   DVLOG(3) << "RequestEncodingParametersChangeTask(): bitrate=" << bitrate
            << ", framerate=" << framerate;
   DCHECK_EQ(encoder_thread_.message_loop(), base::MessageLoop::current());
@@ -879,7 +882,7 @@
   device_input_format_ = media::PIXEL_FORMAT_UNKNOWN;
   input_planes_count_ = 0;
 
-  uint32 input_format_fourcc =
+  uint32_t input_format_fourcc =
       V4L2Device::VideoPixelFormatToV4L2PixFmt(input_format);
   if (!input_format_fourcc) {
     LOG(ERROR) << "Unsupported input format";
diff --git a/content/common/gpu/media/v4l2_video_encode_accelerator.h b/content/common/gpu/media/v4l2_video_encode_accelerator.h
index 9f3720da..a3821af3 100644
--- a/content/common/gpu/media/v4l2_video_encode_accelerator.h
+++ b/content/common/gpu/media/v4l2_video_encode_accelerator.h
@@ -6,9 +6,12 @@
 #define CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_ENCODE_ACCELERATOR_H_
 
 #include <linux/videodev2.h>
+#include <stddef.h>
+#include <stdint.h>
 #include <list>
 #include <vector>
 
+#include "base/macros.h"
 #include "base/memory/linked_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/threading/thread.h"
@@ -45,14 +48,14 @@
   bool Initialize(media::VideoPixelFormat format,
                   const gfx::Size& input_visible_size,
                   media::VideoCodecProfile output_profile,
-                  uint32 initial_bitrate,
+                  uint32_t initial_bitrate,
                   Client* client) override;
   void Encode(const scoped_refptr<media::VideoFrame>& frame,
               bool force_keyframe) override;
   void UseOutputBitstreamBuffer(const media::BitstreamBuffer& buffer)
       override;
-  void RequestEncodingParametersChange(uint32 bitrate,
-                                       uint32 framerate) override;
+  void RequestEncodingParametersChange(uint32_t bitrate,
+                                       uint32_t framerate) override;
   void Destroy() override;
 
  private:
@@ -158,7 +161,8 @@
   //
 
   // Change encoding parameters.
-  void RequestEncodingParametersChangeTask(uint32 bitrate, uint32 framerate);
+  void RequestEncodingParametersChangeTask(uint32_t bitrate,
+                                           uint32_t framerate);
 
   // Set up formats and initialize the device for them.
   bool SetFormats(media::VideoPixelFormat input_format,
@@ -197,7 +201,7 @@
   // Formats for input frames and the output stream.
   media::VideoPixelFormat device_input_format_;
   size_t input_planes_count_;
-  uint32 output_format_fourcc_;
+  uint32_t output_format_fourcc_;
 
   //
   // Encoder state, owned and operated by encoder_thread_.
@@ -211,7 +215,7 @@
 
   // We need to provide the stream header with every keyframe, to allow
   // midstream decoding restarts.  Store it here.
-  scoped_ptr<uint8[]> stream_header_;
+  scoped_ptr<uint8_t[]> stream_header_;
   size_t stream_header_size_;
 
   // Video frames ready to be encoded.
diff --git a/content/common/gpu/media/va_surface.h b/content/common/gpu/media/va_surface.h
index 8901fa6..41c7880 100644
--- a/content/common/gpu/media/va_surface.h
+++ b/content/common/gpu/media/va_surface.h
@@ -9,6 +9,7 @@
 #define CONTENT_COMMON_GPU_MEDIA_VA_SURFACE_H_
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "content/common/content_export.h"
 #include "third_party/libva/va/va.h"
diff --git a/content/common/gpu/media/vaapi_drm_picture.cc b/content/common/gpu/media/vaapi_drm_picture.cc
index 59cf4fd..f207164 100644
--- a/content/common/gpu/media/vaapi_drm_picture.cc
+++ b/content/common/gpu/media/vaapi_drm_picture.cc
@@ -28,8 +28,8 @@
 VaapiDrmPicture::VaapiDrmPicture(
     const scoped_refptr<VaapiWrapper>& vaapi_wrapper,
     const base::Callback<bool(void)>& make_context_current,
-    int32 picture_buffer_id,
-    uint32 texture_id,
+    int32_t picture_buffer_id,
+    uint32_t texture_id,
     const gfx::Size& size)
     : VaapiPicture(picture_buffer_id, texture_id, size),
       vaapi_wrapper_(vaapi_wrapper),
diff --git a/content/common/gpu/media/vaapi_drm_picture.h b/content/common/gpu/media/vaapi_drm_picture.h
index 0e7ab71..066192b 100644
--- a/content/common/gpu/media/vaapi_drm_picture.h
+++ b/content/common/gpu/media/vaapi_drm_picture.h
@@ -9,7 +9,10 @@
 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_DRM_PICTURE_H_
 #define CONTENT_COMMON_GPU_MEDIA_VAAPI_DRM_PICTURE_H_
 
+#include <stdint.h>
+
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
 #include "content/common/gpu/media/vaapi_picture.h"
@@ -33,8 +36,8 @@
  public:
   VaapiDrmPicture(const scoped_refptr<VaapiWrapper>& vaapi_wrapper,
                   const base::Callback<bool(void)>& make_context_current,
-                  int32 picture_buffer_id,
-                  uint32 texture_id,
+                  int32_t picture_buffer_id,
+                  uint32_t texture_id,
                   const gfx::Size& size);
 
   ~VaapiDrmPicture() override;
diff --git a/content/common/gpu/media/vaapi_jpeg_decode_accelerator.cc b/content/common/gpu/media/vaapi_jpeg_decode_accelerator.cc
index 11ff91a9..7e8f8507 100644
--- a/content/common/gpu/media/vaapi_jpeg_decode_accelerator.cc
+++ b/content/common/gpu/media/vaapi_jpeg_decode_accelerator.cc
@@ -4,6 +4,8 @@
 
 #include "content/common/gpu/media/vaapi_jpeg_decode_accelerator.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/logging.h"
 #include "base/metrics/histogram.h"
diff --git a/content/common/gpu/media/vaapi_jpeg_decode_accelerator.h b/content/common/gpu/media/vaapi_jpeg_decode_accelerator.h
index ae1d8e2..7d78a55 100644
--- a/content/common/gpu/media/vaapi_jpeg_decode_accelerator.h
+++ b/content/common/gpu/media/vaapi_jpeg_decode_accelerator.h
@@ -5,6 +5,9 @@
 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_JPEG_DECODE_ACCELERATOR_H_
 #define CONTENT_COMMON_GPU_MEDIA_VAAPI_JPEG_DECODE_ACCELERATOR_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/memory/linked_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/single_thread_task_runner.h"
diff --git a/content/common/gpu/media/vaapi_jpeg_decoder.cc b/content/common/gpu/media/vaapi_jpeg_decoder.cc
index 416bb09..02bf297 100644
--- a/content/common/gpu/media/vaapi_jpeg_decoder.cc
+++ b/content/common/gpu/media/vaapi_jpeg_decoder.cc
@@ -4,7 +4,10 @@
 
 #include "content/common/gpu/media/vaapi_jpeg_decoder.h"
 
+#include <stddef.h>
+
 #include "base/logging.h"
+#include "base/macros.h"
 #include "media/filters/jpeg_parser.h"
 
 namespace {
diff --git a/content/common/gpu/media/vaapi_jpeg_decoder_unittest.cc b/content/common/gpu/media/vaapi_jpeg_decoder_unittest.cc
index b704348..bf8cb13 100644
--- a/content/common/gpu/media/vaapi_jpeg_decoder_unittest.cc
+++ b/content/common/gpu/media/vaapi_jpeg_decoder_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>
 
 // This has to be included first.
diff --git a/content/common/gpu/media/vaapi_picture.cc b/content/common/gpu/media/vaapi_picture.cc
index 5620edf3..5222bd23 100644
--- a/content/common/gpu/media/vaapi_picture.cc
+++ b/content/common/gpu/media/vaapi_picture.cc
@@ -19,8 +19,8 @@
 linked_ptr<VaapiPicture> VaapiPicture::CreatePicture(
     const scoped_refptr<VaapiWrapper>& vaapi_wrapper,
     const base::Callback<bool(void)> make_context_current,
-    int32 picture_buffer_id,
-    uint32 texture_id,
+    int32_t picture_buffer_id,
+    uint32_t texture_id,
     const gfx::Size& size) {
   linked_ptr<VaapiPicture> picture;
 #if defined(USE_X11)
@@ -42,7 +42,7 @@
 }
 
 // static
-uint32 VaapiPicture::GetGLTextureTarget() {
+uint32_t VaapiPicture::GetGLTextureTarget() {
 #if defined(USE_OZONE)
   return GL_TEXTURE_EXTERNAL_OES;
 #else
diff --git a/content/common/gpu/media/vaapi_picture.h b/content/common/gpu/media/vaapi_picture.h
index fb62ba01..921f8034 100644
--- a/content/common/gpu/media/vaapi_picture.h
+++ b/content/common/gpu/media/vaapi_picture.h
@@ -10,7 +10,10 @@
 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_PICTURE_H_
 #define CONTENT_COMMON_GPU_MEDIA_VAAPI_PICTURE_H_
 
+#include <stdint.h>
+
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/linked_ptr.h"
 #include "base/memory/ref_counted.h"
 #include "base/threading/non_thread_safe.h"
@@ -33,8 +36,8 @@
   // Try to allocate the underlying resources for the picture.
   virtual bool Initialize() = 0;
 
-  int32 picture_buffer_id() const { return picture_buffer_id_; }
-  uint32 texture_id() const { return texture_id_; }
+  int32_t picture_buffer_id() const { return picture_buffer_id_; }
+  uint32_t texture_id() const { return texture_id_; }
   const gfx::Size& size() const { return size_; }
 
   virtual bool AllowOverlay() const;
@@ -53,25 +56,25 @@
   static linked_ptr<VaapiPicture> CreatePicture(
       const scoped_refptr<VaapiWrapper>& vaapi_wrapper,
       const base::Callback<bool(void)> make_context_current,
-      int32 picture_buffer_id,
-      uint32 texture_id,
+      int32_t picture_buffer_id,
+      uint32_t texture_id,
       const gfx::Size& size);
 
   // Get the texture target used to bind EGLImages (either
   // GL_TEXTURE_2D on X11 or GL_TEXTURE_EXTERNAL_OES on DRM).
-  static uint32 GetGLTextureTarget();
+  static uint32_t GetGLTextureTarget();
 
  protected:
-  VaapiPicture(int32 picture_buffer_id,
-               uint32 texture_id,
+  VaapiPicture(int32_t picture_buffer_id,
+               uint32_t texture_id,
                const gfx::Size& size)
       : picture_buffer_id_(picture_buffer_id),
         texture_id_(texture_id),
         size_(size) {}
 
  private:
-  int32 picture_buffer_id_;
-  uint32 texture_id_;
+  int32_t picture_buffer_id_;
+  uint32_t texture_id_;
   gfx::Size size_;
 
   DISALLOW_COPY_AND_ASSIGN(VaapiPicture);
diff --git a/content/common/gpu/media/vaapi_tfp_picture.cc b/content/common/gpu/media/vaapi_tfp_picture.cc
index 211317bd..3de593b 100644
--- a/content/common/gpu/media/vaapi_tfp_picture.cc
+++ b/content/common/gpu/media/vaapi_tfp_picture.cc
@@ -15,8 +15,8 @@
 VaapiTFPPicture::VaapiTFPPicture(
     const scoped_refptr<VaapiWrapper>& vaapi_wrapper,
     const base::Callback<bool(void)> make_context_current,
-    int32 picture_buffer_id,
-    uint32 texture_id,
+    int32_t picture_buffer_id,
+    uint32_t texture_id,
     const gfx::Size& size)
     : VaapiPicture(picture_buffer_id, texture_id, size),
       vaapi_wrapper_(vaapi_wrapper),
diff --git a/content/common/gpu/media/vaapi_tfp_picture.h b/content/common/gpu/media/vaapi_tfp_picture.h
index bc7f2e3..3b66e10 100644
--- a/content/common/gpu/media/vaapi_tfp_picture.h
+++ b/content/common/gpu/media/vaapi_tfp_picture.h
@@ -9,7 +9,10 @@
 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_TFP_PICTURE_H_
 #define CONTENT_COMMON_GPU_MEDIA_VAAPI_TFP_PICTURE_H_
 
+#include <stdint.h>
+
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "content/common/gpu/media/vaapi_picture.h"
 #include "ui/gfx/geometry/size.h"
@@ -32,8 +35,8 @@
  public:
   VaapiTFPPicture(const scoped_refptr<VaapiWrapper>& vaapi_wrapper,
                   const base::Callback<bool(void)> make_context_current,
-                  int32 picture_buffer_id,
-                  uint32 texture_id,
+                  int32_t picture_buffer_id,
+                  uint32_t texture_id,
                   const gfx::Size& size);
 
   ~VaapiTFPPicture() override;
diff --git a/content/common/gpu/media/vaapi_video_decode_accelerator.cc b/content/common/gpu/media/vaapi_video_decode_accelerator.cc
index fab601ed..0bbe572 100644
--- a/content/common/gpu/media/vaapi_video_decode_accelerator.cc
+++ b/content/common/gpu/media/vaapi_video_decode_accelerator.cc
@@ -6,6 +6,7 @@
 
 #include "base/bind.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/metrics/histogram.h"
 #include "base/stl_util.h"
 #include "base/strings/string_util.h"
@@ -51,25 +52,24 @@
 class VaapiVideoDecodeAccelerator::VaapiDecodeSurface
     : public base::RefCountedThreadSafe<VaapiDecodeSurface> {
  public:
-  VaapiDecodeSurface(int32 bitstream_id,
+  VaapiDecodeSurface(int32_t bitstream_id,
                      const scoped_refptr<VASurface>& va_surface);
 
-  int32 bitstream_id() const { return bitstream_id_; }
+  int32_t bitstream_id() const { return bitstream_id_; }
   scoped_refptr<VASurface> va_surface() { return va_surface_; }
 
  private:
   friend class base::RefCountedThreadSafe<VaapiDecodeSurface>;
   ~VaapiDecodeSurface();
 
-  int32 bitstream_id_;
+  int32_t bitstream_id_;
   scoped_refptr<VASurface> va_surface_;
 };
 
 VaapiVideoDecodeAccelerator::VaapiDecodeSurface::VaapiDecodeSurface(
-    int32 bitstream_id,
+    int32_t bitstream_id,
     const scoped_refptr<VASurface>& va_surface)
-    : bitstream_id_(bitstream_id), va_surface_(va_surface) {
-}
+    : bitstream_id_(bitstream_id), va_surface_(va_surface) {}
 
 VaapiVideoDecodeAccelerator::VaapiDecodeSurface::~VaapiDecodeSurface() {
 }
@@ -280,7 +280,7 @@
 }
 
 VaapiPicture* VaapiVideoDecodeAccelerator::PictureById(
-    int32 picture_buffer_id) {
+    int32_t picture_buffer_id) {
   Pictures::iterator it = pictures_.find(picture_buffer_id);
   if (it == pictures_.end()) {
     LOG(ERROR) << "Picture id " << picture_buffer_id << " does not exist";
@@ -292,7 +292,7 @@
 
 VaapiVideoDecodeAccelerator::VaapiVideoDecodeAccelerator(
     const base::Callback<bool(void)>& make_context_current,
-    const base::Callback<void(uint32, uint32, scoped_refptr<gl::GLImage>)>&
+    const base::Callback<void(uint32_t, uint32_t, scoped_refptr<gl::GLImage>)>&
         bind_image)
     : make_context_current_(make_context_current),
       state_(kUninitialized),
@@ -382,11 +382,11 @@
 
 void VaapiVideoDecodeAccelerator::OutputPicture(
     const scoped_refptr<VASurface>& va_surface,
-    int32 input_id,
+    int32_t input_id,
     VaapiPicture* picture) {
   DCHECK_EQ(message_loop_, base::MessageLoop::current());
 
-  int32 output_id = picture->picture_buffer_id();
+  int32_t output_id = picture->picture_buffer_id();
 
   TRACE_EVENT2("Video Decoder", "VAVDA::OutputSurface",
                "input_id", input_id,
@@ -500,7 +500,7 @@
                << " size: " << curr_input_buffer_->size;
 
       decoder_->SetStream(
-          static_cast<uint8*>(curr_input_buffer_->shm->memory()),
+          static_cast<uint8_t*>(curr_input_buffer_->shm->memory()),
           curr_input_buffer_->size);
       return true;
 
@@ -516,7 +516,7 @@
   DCHECK(decoder_thread_task_runner_->BelongsToCurrentThread());
   DCHECK(curr_input_buffer_.get());
 
-  int32 id = curr_input_buffer_->id;
+  int32_t id = curr_input_buffer_->id;
   curr_input_buffer_.reset();
   DVLOG(4) << "End of input buffer " << id;
   message_loop_->PostTask(FROM_HERE, base::Bind(
@@ -765,7 +765,8 @@
                             base::Unretained(this)));
 }
 
-void VaapiVideoDecodeAccelerator::ReusePictureBuffer(int32 picture_buffer_id) {
+void VaapiVideoDecodeAccelerator::ReusePictureBuffer(
+    int32_t picture_buffer_id) {
   DCHECK_EQ(message_loop_, base::MessageLoop::current());
   TRACE_EVENT1("Video Decoder", "VAVDA::ReusePictureBuffer", "Picture id",
                picture_buffer_id);
@@ -1261,7 +1262,7 @@
     return false;
 
   // Can't help it, blame libva...
-  void* non_const_ptr = const_cast<uint8*>(data);
+  void* non_const_ptr = const_cast<uint8_t*>(data);
   return vaapi_wrapper_->SubmitBuffer(VASliceDataBufferType, size,
                                       non_const_ptr);
 }
@@ -1554,7 +1555,7 @@
                                     &slice_param))
     return false;
 
-  void* non_const_ptr = const_cast<uint8*>(frame_hdr->data);
+  void* non_const_ptr = const_cast<uint8_t*>(frame_hdr->data);
   if (!vaapi_wrapper_->SubmitBuffer(VASliceDataBufferType,
                                     frame_hdr->frame_size,
                                     non_const_ptr))
@@ -1711,7 +1712,7 @@
                                     sizeof(slice_param), &slice_param))
     return false;
 
-  void* non_const_ptr = const_cast<uint8*>(frame_hdr->data);
+  void* non_const_ptr = const_cast<uint8_t*>(frame_hdr->data);
   if (!vaapi_wrapper_->SubmitBuffer(VASliceDataBufferType,
                                     frame_hdr->frame_size, non_const_ptr))
     return false;
diff --git a/content/common/gpu/media/vaapi_video_decode_accelerator.h b/content/common/gpu/media/vaapi_video_decode_accelerator.h
index 1244893..11cc082 100644
--- a/content/common/gpu/media/vaapi_video_decode_accelerator.h
+++ b/content/common/gpu/media/vaapi_video_decode_accelerator.h
@@ -8,6 +8,9 @@
 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_DECODE_ACCELERATOR_H_
 #define CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_DECODE_ACCELERATOR_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <list>
 #include <map>
 #include <queue>
@@ -15,6 +18,7 @@
 #include <vector>
 
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/linked_ptr.h"
 #include "base/memory/shared_memory.h"
 #include "base/memory/weak_ptr.h"
@@ -52,8 +56,8 @@
 
   VaapiVideoDecodeAccelerator(
       const base::Callback<bool(void)>& make_context_current,
-      const base::Callback<void(uint32, uint32, scoped_refptr<gl::GLImage>)>&
-          bind_image);
+      const base::Callback<
+          void(uint32_t, uint32_t, scoped_refptr<gl::GLImage>)>& bind_image);
   ~VaapiVideoDecodeAccelerator() override;
 
   // media::VideoDecodeAccelerator implementation.
@@ -61,7 +65,7 @@
   void Decode(const media::BitstreamBuffer& bitstream_buffer) override;
   void AssignPictureBuffers(
       const std::vector<media::PictureBuffer>& buffers) override;
-  void ReusePictureBuffer(int32 picture_buffer_id) override;
+  void ReusePictureBuffer(int32_t picture_buffer_id) override;
   void Flush() override;
   void Reset() override;
   void Destroy() override;
@@ -137,7 +141,7 @@
   // Puts contents of |va_surface| into given |picture|, releases the
   // surface and passes the resulting picture to client for output.
   void OutputPicture(const scoped_refptr<VASurface>& va_surface,
-                     int32 input_id,
+                     int32_t input_id,
                      VaapiPicture* picture);
 
   // Try to OutputPicture() if we have both a ready surface and picture.
@@ -205,7 +209,7 @@
     InputBuffer();
     ~InputBuffer();
 
-    int32 id;
+    int32_t id;
     size_t size;
     scoped_ptr<base::SharedMemory> shm;
   };
@@ -220,12 +224,12 @@
   linked_ptr<InputBuffer> curr_input_buffer_;
 
   // Queue for incoming output buffers (texture ids).
-  typedef std::queue<int32> OutputBuffers;
+  typedef std::queue<int32_t> OutputBuffers;
   OutputBuffers output_buffers_;
 
   scoped_refptr<VaapiWrapper> vaapi_wrapper_;
 
-  typedef std::map<int32, linked_ptr<VaapiPicture>> Pictures;
+  typedef std::map<int32_t, linked_ptr<VaapiPicture>> Pictures;
   // All allocated Pictures, regardless of their current state.
   // Pictures are allocated once and destroyed at the end of decode.
   // Comes after vaapi_wrapper_ to ensure all pictures are destroyed
@@ -233,7 +237,7 @@
   Pictures pictures_;
 
   // Return a VaapiPicture associated with given client-provided id.
-  VaapiPicture* PictureById(int32 picture_buffer_id);
+  VaapiPicture* PictureById(int32_t picture_buffer_id);
 
   // VA Surfaces no longer in use that can be passed back to the decoder for
   // reuse, once it requests them.
@@ -303,7 +307,8 @@
 
   // Binds the provided GLImage to a givenr client texture ID & texture target
   // combination in GLES.
-  base::Callback<void(uint32, uint32, scoped_refptr<gl::GLImage>)> bind_image_;
+  base::Callback<void(uint32_t, uint32_t, scoped_refptr<gl::GLImage>)>
+      bind_image_;
 
   // The WeakPtrFactory for |weak_this_|.
   base::WeakPtrFactory<VaapiVideoDecodeAccelerator> weak_this_factory_;
diff --git a/content/common/gpu/media/vaapi_video_encode_accelerator.cc b/content/common/gpu/media/vaapi_video_encode_accelerator.cc
index 495f2f1..fa8e9d4b 100644
--- a/content/common/gpu/media/vaapi_video_encode_accelerator.cc
+++ b/content/common/gpu/media/vaapi_video_encode_accelerator.cc
@@ -6,6 +6,7 @@
 
 #include "base/bind.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/metrics/histogram.h"
 #include "base/numerics/safe_conversions.h"
 #include "content/common/gpu/media/h264_dpb.h"
@@ -96,9 +97,11 @@
 };
 
 struct VaapiVideoEncodeAccelerator::BitstreamBufferRef {
-  BitstreamBufferRef(int32 id, scoped_ptr<base::SharedMemory> shm, size_t size)
+  BitstreamBufferRef(int32_t id,
+                     scoped_ptr<base::SharedMemory> shm,
+                     size_t size)
       : id(id), shm(shm.Pass()), size(size) {}
-  const int32 id;
+  const int32_t id;
   const scoped_ptr<base::SharedMemory> shm;
   const size_t size;
 };
@@ -155,7 +158,7 @@
     media::VideoPixelFormat format,
     const gfx::Size& input_visible_size,
     media::VideoCodecProfile output_profile,
-    uint32 initial_bitrate,
+    uint32_t initial_bitrate,
     Client* client) {
   DCHECK(child_task_runner_->BelongsToCurrentThread());
   DCHECK(!encoder_thread_.IsRunning());
@@ -533,7 +536,7 @@
   linked_ptr<BitstreamBufferRef> buffer = available_bitstream_buffers_.front();
   available_bitstream_buffers_.pop();
 
-  uint8* target_data = reinterpret_cast<uint8*>(buffer->shm->memory());
+  uint8_t* target_data = reinterpret_cast<uint8_t*>(buffer->shm->memory());
 
   linked_ptr<EncodeJob> encode_job = submitted_encode_jobs_.front();
   submitted_encode_jobs_.pop();
@@ -689,8 +692,8 @@
 }
 
 void VaapiVideoEncodeAccelerator::RequestEncodingParametersChange(
-    uint32 bitrate,
-    uint32 framerate) {
+    uint32_t bitrate,
+    uint32_t framerate) {
   DVLOGF(2) << "bitrate: " << bitrate << " framerate: " << framerate;
   DCHECK(child_task_runner_->BelongsToCurrentThread());
 
@@ -701,8 +704,8 @@
           base::Unretained(this), bitrate, framerate));
 }
 
-void VaapiVideoEncodeAccelerator::UpdateRates(uint32 bitrate,
-                                              uint32 framerate) {
+void VaapiVideoEncodeAccelerator::UpdateRates(uint32_t bitrate,
+                                              uint32_t framerate) {
   if (encoder_thread_.IsRunning())
     DCHECK(encoder_thread_task_runner_->BelongsToCurrentThread());
   DCHECK_NE(bitrate, 0u);
@@ -713,8 +716,8 @@
 }
 
 void VaapiVideoEncodeAccelerator::RequestEncodingParametersChangeTask(
-    uint32 bitrate,
-    uint32 framerate) {
+    uint32_t bitrate,
+    uint32_t framerate) {
   DVLOGF(2) << "bitrate: " << bitrate << " framerate: " << framerate;
   DCHECK(encoder_thread_task_runner_->BelongsToCurrentThread());
   DCHECK_NE(state_, kUninitialized);
diff --git a/content/common/gpu/media/vaapi_video_encode_accelerator.h b/content/common/gpu/media/vaapi_video_encode_accelerator.h
index 695c87e..9e6f39f 100644
--- a/content/common/gpu/media/vaapi_video_encode_accelerator.h
+++ b/content/common/gpu/media/vaapi_video_encode_accelerator.h
@@ -5,9 +5,13 @@
 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_ENCODE_ACCELERATOR_H_
 #define CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_ENCODE_ACCELERATOR_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <list>
 #include <queue>
 
+#include "base/macros.h"
 #include "base/memory/linked_ptr.h"
 #include "base/threading/thread.h"
 #include "content/common/content_export.h"
@@ -34,13 +38,13 @@
   bool Initialize(media::VideoPixelFormat format,
                   const gfx::Size& input_visible_size,
                   media::VideoCodecProfile output_profile,
-                  uint32 initial_bitrate,
+                  uint32_t initial_bitrate,
                   Client* client) override;
   void Encode(const scoped_refptr<media::VideoFrame>& frame,
               bool force_keyframe) override;
   void UseOutputBitstreamBuffer(const media::BitstreamBuffer& buffer) override;
-  void RequestEncodingParametersChange(uint32 bitrate,
-                                       uint32 framerate) override;
+  void RequestEncodingParametersChange(uint32_t bitrate,
+                                       uint32_t framerate) override;
   void Destroy() override;
 
  private:
@@ -91,7 +95,8 @@
   void EncodeTask(const scoped_refptr<media::VideoFrame>& frame,
                   bool force_keyframe);
   void UseOutputBitstreamBufferTask(scoped_ptr<BitstreamBufferRef> buffer_ref);
-  void RequestEncodingParametersChangeTask(uint32 bitrate, uint32 framerate);
+  void RequestEncodingParametersChangeTask(uint32_t bitrate,
+                                           uint32_t framerate);
   void DestroyTask();
 
   // Prepare and schedule an encode job if we have an input to encode
@@ -101,7 +106,7 @@
   // Fill current_sps_/current_pps_ with current values.
   void UpdateSPS();
   void UpdatePPS();
-  void UpdateRates(uint32 bitrate, uint32 framerate);
+  void UpdateRates(uint32_t bitrate, uint32_t framerate);
 
   // Generate packed SPS and PPS in packed_sps_/packed_pps_, using
   // values in current_sps_/current_pps_.
diff --git a/content/common/gpu/media/vaapi_wrapper.cc b/content/common/gpu/media/vaapi_wrapper.cc
index 1c91bc0e5..a893b9e 100644
--- a/content/common/gpu/media/vaapi_wrapper.cc
+++ b/content/common/gpu/media/vaapi_wrapper.cc
@@ -10,8 +10,10 @@
 #include "base/callback_helpers.h"
 #include "base/command_line.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/numerics/safe_conversions.h"
 #include "base/sys_info.h"
+#include "build/build_config.h"
 // Auto-generated for dlopen libva libraries
 #include "content/common/gpu/media/va_stubs.h"
 #include "content/common/gpu/media/vaapi_picture.h"
@@ -985,18 +987,16 @@
   int ret = 0;
   {
     base::AutoUnlock auto_unlock(*va_lock_);
-    ret = libyuv::I420ToNV12(frame->data(media::VideoFrame::kYPlane),
-                             frame->stride(media::VideoFrame::kYPlane),
-                             frame->data(media::VideoFrame::kUPlane),
-                             frame->stride(media::VideoFrame::kUPlane),
-                             frame->data(media::VideoFrame::kVPlane),
-                             frame->stride(media::VideoFrame::kVPlane),
-                             static_cast<uint8*>(image_ptr) + image.offsets[0],
-                             image.pitches[0],
-                             static_cast<uint8*>(image_ptr) + image.offsets[1],
-                             image.pitches[1],
-                             image.width,
-                             image.height);
+    ret = libyuv::I420ToNV12(
+        frame->data(media::VideoFrame::kYPlane),
+        frame->stride(media::VideoFrame::kYPlane),
+        frame->data(media::VideoFrame::kUPlane),
+        frame->stride(media::VideoFrame::kUPlane),
+        frame->data(media::VideoFrame::kVPlane),
+        frame->stride(media::VideoFrame::kVPlane),
+        static_cast<uint8_t*>(image_ptr) + image.offsets[0], image.pitches[0],
+        static_cast<uint8_t*>(image_ptr) + image.offsets[1], image.pitches[1],
+        image.width, image.height);
   }
 
   va_res = vaUnmapBuffer(va_display_, image.buf);
@@ -1007,7 +1007,7 @@
 
 bool VaapiWrapper::DownloadAndDestroyCodedBuffer(VABufferID buffer_id,
                                                  VASurfaceID sync_surface_id,
-                                                 uint8* target_ptr,
+                                                 uint8_t* target_ptr,
                                                  size_t target_size,
                                                  size_t* coded_data_size) {
   base::AutoLock auto_lock(*va_lock_);
diff --git a/content/common/gpu/media/vaapi_wrapper.h b/content/common/gpu/media/vaapi_wrapper.h
index bab43838..7f14b49 100644
--- a/content/common/gpu/media/vaapi_wrapper.h
+++ b/content/common/gpu/media/vaapi_wrapper.h
@@ -10,11 +10,15 @@
 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_WRAPPER_H_
 #define CONTENT_COMMON_GPU_MEDIA_VAAPI_WRAPPER_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <set>
 #include <vector>
 
 #include "base/files/file.h"
 #include "base/lazy_instance.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/synchronization/lock.h"
 #include "content/common/content_export.h"
@@ -198,7 +202,7 @@
   // to the encode job.
   bool DownloadAndDestroyCodedBuffer(VABufferID buffer_id,
                                      VASurfaceID sync_surface_id,
-                                     uint8* target_ptr,
+                                     uint8_t* target_ptr,
                                      size_t target_size,
                                      size_t* coded_data_size);
 
diff --git a/content/common/gpu/media/video_decode_accelerator_unittest.cc b/content/common/gpu/media/video_decode_accelerator_unittest.cc
index 82c5b692..21e852c 100644
--- a/content/common/gpu/media/video_decode_accelerator_unittest.cc
+++ b/content/common/gpu/media/video_decode_accelerator_unittest.cc
@@ -15,6 +15,8 @@
 //   infrastructure.
 
 #include <fcntl.h>
+#include <stddef.h>
+#include <stdint.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <algorithm>
@@ -34,6 +36,7 @@
 #include "base/files/file.h"
 #include "base/files/file_util.h"
 #include "base/format_macros.h"
+#include "base/macros.h"
 #include "base/md5.h"
 #include "base/process/process_handle.h"
 #include "base/stl_util.h"
@@ -47,6 +50,7 @@
 #include "base/synchronization/waitable_event.h"
 #include "base/thread_task_runner_handle.h"
 #include "base/threading/thread.h"
+#include "build/build_config.h"
 #include "content/common/gpu/media/fake_video_decode_accelerator.h"
 #include "content/common/gpu/media/rendering_helper.h"
 #include "content/common/gpu/media/video_accelerator_unittest_helpers.h"
@@ -271,16 +275,16 @@
 // A helper class used to manage the lifetime of a Texture.
 class TextureRef : public base::RefCounted<TextureRef> {
  public:
-  TextureRef(uint32 texture_id, const base::Closure& no_longer_needed_cb)
+  TextureRef(uint32_t texture_id, const base::Closure& no_longer_needed_cb)
       : texture_id_(texture_id), no_longer_needed_cb_(no_longer_needed_cb) {}
 
-  int32 texture_id() const { return texture_id_; }
+  int32_t texture_id() const { return texture_id_; }
 
  private:
   friend class base::RefCounted<TextureRef>;
   ~TextureRef();
 
-  uint32 texture_id_;
+  uint32_t texture_id_;
   base::Closure no_longer_needed_cb_;
 };
 
@@ -333,13 +337,13 @@
 
   // VideoDecodeAccelerator::Client implementation.
   // The heart of the Client.
-  void ProvidePictureBuffers(uint32 requested_num_of_buffers,
+  void ProvidePictureBuffers(uint32_t requested_num_of_buffers,
                              const gfx::Size& dimensions,
-                             uint32 texture_target) override;
-  void DismissPictureBuffer(int32 picture_buffer_id) override;
+                             uint32_t texture_target) override;
+  void DismissPictureBuffer(int32_t picture_buffer_id) override;
   void PictureReady(const media::Picture& picture) override;
   // Simple state changes.
-  void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) override;
+  void NotifyEndOfBitstreamBuffer(int32_t bitstream_buffer_id) override;
   void NotifyFlushDone() override;
   void NotifyResetDone() override;
   void NotifyError(VideoDecodeAccelerator::Error error) override;
@@ -357,7 +361,7 @@
   bool decoder_deleted() { return !decoder_.get(); }
 
  private:
-  typedef std::map<int32, scoped_refptr<TextureRef>> TextureRefMap;
+  typedef std::map<int32_t, scoped_refptr<TextureRef>> TextureRefMap;
 
   scoped_ptr<media::VideoDecodeAccelerator> CreateFakeVDA();
   scoped_ptr<media::VideoDecodeAccelerator> CreateDXVAVDA();
@@ -365,13 +369,13 @@
   scoped_ptr<media::VideoDecodeAccelerator> CreateV4L2SliceVDA();
   scoped_ptr<media::VideoDecodeAccelerator> CreateVaapiVDA();
 
-  void BindImage(uint32 client_texture_id,
-                 uint32 texture_target,
+  void BindImage(uint32_t client_texture_id,
+                 uint32_t texture_target,
                  scoped_refptr<gl::GLImage> image);
 
   void SetState(ClientState new_state);
   void FinishInitialization();
-  void ReturnPicture(int32 picture_buffer_id);
+  void ReturnPicture(int32_t picture_buffer_id);
 
   // Delete the associated decoder helper.
   void DeleteDecoder();
@@ -438,7 +442,7 @@
   // CS_RESET_State.
   TextureRefMap pending_textures_;
 
-  int32 next_picture_buffer_id_;
+  int32_t next_picture_buffer_id_;
 
   DISALLOW_IMPLICIT_CONSTRUCTORS(GLRenderingVDAClient);
 };
@@ -574,8 +578,8 @@
   return decoder.Pass();
 }
 
-void GLRenderingVDAClient::BindImage(uint32 client_texture_id,
-                                     uint32 texture_target,
+void GLRenderingVDAClient::BindImage(uint32_t client_texture_id,
+                                     uint32_t texture_target,
                                      scoped_refptr<gl::GLImage> image) {}
 
 void GLRenderingVDAClient::CreateAndStartDecoder() {
@@ -610,9 +614,9 @@
 }
 
 void GLRenderingVDAClient::ProvidePictureBuffers(
-    uint32 requested_num_of_buffers,
+    uint32_t requested_num_of_buffers,
     const gfx::Size& dimensions,
-    uint32 texture_target) {
+    uint32_t texture_target) {
   if (decoder_deleted())
     return;
   std::vector<media::PictureBuffer> buffers;
@@ -620,14 +624,14 @@
   requested_num_of_buffers += kExtraPictureBuffers;
 
   texture_target_ = texture_target;
-  for (uint32 i = 0; i < requested_num_of_buffers; ++i) {
-    uint32 texture_id;
+  for (uint32_t i = 0; i < requested_num_of_buffers; ++i) {
+    uint32_t texture_id;
     base::WaitableEvent done(false, false);
     rendering_helper_->CreateTexture(
         texture_target_, &texture_id, dimensions, &done);
     done.Wait();
 
-    int32 picture_buffer_id = next_picture_buffer_id_++;
+    int32_t picture_buffer_id = next_picture_buffer_id_++;
     LOG_ASSERT(active_textures_
               .insert(std::make_pair(
                   picture_buffer_id,
@@ -643,7 +647,7 @@
   decoder_->AssignPictureBuffers(buffers);
 }
 
-void GLRenderingVDAClient::DismissPictureBuffer(int32 picture_buffer_id) {
+void GLRenderingVDAClient::DismissPictureBuffer(int32_t picture_buffer_id) {
   LOG_ASSERT(1U == active_textures_.erase(picture_buffer_id));
 }
 
@@ -697,7 +701,7 @@
   }
 }
 
-void GLRenderingVDAClient::ReturnPicture(int32 picture_buffer_id) {
+void GLRenderingVDAClient::ReturnPicture(int32_t picture_buffer_id) {
   if (decoder_deleted())
     return;
   LOG_ASSERT(1U == pending_textures_.erase(picture_buffer_id));
@@ -721,7 +725,7 @@
 }
 
 void GLRenderingVDAClient::NotifyEndOfBitstreamBuffer(
-    int32 bitstream_buffer_id) {
+    int32_t bitstream_buffer_id) {
   // TODO(fischman): this test currently relies on this notification to make
   // forward progress during a Reset().  But the VDA::Reset() API doesn't
   // guarantee this, so stop relying on it (and remove the notifications from
@@ -898,7 +902,7 @@
   if (start_pos == 0)
     start_pos = 32;  // Skip IVF header.
   *end_pos = start_pos;
-  uint32 frame_size = *reinterpret_cast<uint32*>(&encoded_data_[*end_pos]);
+  uint32_t frame_size = *reinterpret_cast<uint32_t*>(&encoded_data_[*end_pos]);
   *end_pos += 12;  // Skip frame header.
   bytes.append(encoded_data_.substr(*end_pos, frame_size));
   *end_pos += frame_size;
@@ -906,7 +910,8 @@
   return bytes;
 }
 
-static bool FragmentHasConfigInfo(const uint8* data, size_t size,
+static bool FragmentHasConfigInfo(const uint8_t* data,
+                                  size_t size,
                                   media::VideoCodecProfile profile) {
   if (profile >= media::H264PROFILE_MIN &&
       profile <= media::H264PROFILE_MAX) {
@@ -950,9 +955,8 @@
   bool reset_here = false;
   if (reset_after_frame_num_ == RESET_AFTER_FIRST_CONFIG_INFO) {
     reset_here = FragmentHasConfigInfo(
-        reinterpret_cast<const uint8*>(next_fragment_bytes.data()),
-        next_fragment_size,
-        profile_);
+        reinterpret_cast<const uint8_t*>(next_fragment_bytes.data()),
+        next_fragment_size, profile_);
     if (reset_here)
       reset_after_frame_num_ = END_OF_STREAM_RESET;
   }
diff --git a/content/common/gpu/media/video_encode_accelerator_unittest.cc b/content/common/gpu/media/video_encode_accelerator_unittest.cc
index d1f68000..d5c882e 100644
--- a/content/common/gpu/media/video_encode_accelerator_unittest.cc
+++ b/content/common/gpu/media/video_encode_accelerator_unittest.cc
@@ -3,6 +3,8 @@
 // found in the LICENSE file.
 
 #include <inttypes.h>
+#include <stddef.h>
+#include <stdint.h>
 
 #include <algorithm>
 #include <queue>
@@ -13,6 +15,7 @@
 #include "base/command_line.h"
 #include "base/files/file_util.h"
 #include "base/files/memory_mapped_file.h"
+#include "base/macros.h"
 #include "base/memory/scoped_vector.h"
 #include "base/message_loop/message_loop.h"
 #include "base/numerics/safe_conversions.h"
@@ -24,6 +27,7 @@
 #include "base/threading/thread_checker.h"
 #include "base/time/time.h"
 #include "base/timer/timer.h"
+#include "build/build_config.h"
 #include "content/common/gpu/media/video_accelerator_unittest_helpers.h"
 #include "media/base/bind_to_current_loop.h"
 #include "media/base/bitstream_buffer.h"
@@ -74,19 +78,19 @@
 // Arbitrarily chosen as a reasonable requirement.
 const unsigned int kMaxKeyframeDelay = 4;
 // Default initial bitrate.
-const uint32 kDefaultBitrate = 2000000;
+const uint32_t kDefaultBitrate = 2000000;
 // Default ratio of requested_subsequent_bitrate to initial_bitrate
 // (see test parameters below) if one is not provided.
 const double kDefaultSubsequentBitrateRatio = 2.0;
 // Default initial framerate.
-const uint32 kDefaultFramerate = 30;
+const uint32_t kDefaultFramerate = 30;
 // Default ratio of requested_subsequent_framerate to initial_framerate
 // (see test parameters below) if one is not provided.
 const double kDefaultSubsequentFramerateRatio = 0.1;
 // Tolerance factor for how encoded bitrate can differ from requested bitrate.
 const double kBitrateTolerance = 0.1;
 // Minimum required FPS throughput for the basic performance test.
-const uint32 kMinPerfFPS = 30;
+const uint32_t kMinPerfFPS = 30;
 // Minimum (arbitrary) number of frames required to enforce bitrate requirements
 // over. Streams shorter than this may be too short to realistically require
 // an encoder to be able to converge to the requested bitrate over.
@@ -182,7 +186,7 @@
 // Write |data| of |size| bytes at |offset| bytes into |file|.
 static bool WriteFile(base::File* file,
                       const off_t offset,
-                      const uint8* data,
+                      const uint8_t* data,
                       size_t size) {
   size_t written_bytes = 0;
   while (written_bytes < size) {
@@ -239,7 +243,7 @@
   test_stream->coded_size = coded_size;
 
   size_t num_planes = media::VideoFrame::NumPlanes(kInputFormat);
-  std::vector<std::vector<uint8>> padding(num_planes);
+  std::vector<std::vector<uint8_t>> padding(num_planes);
   std::vector<size_t> coded_bpl(num_planes);
   std::vector<size_t> visible_bpl(num_planes);
   std::vector<size_t> visible_plane_rows(num_planes);
@@ -278,8 +282,8 @@
       << "Stream byte size is not a product of calculated frame byte size";
 
   test_stream->num_frames = src_file.length() / visible_buffer_size;
-  uint32 flags = base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE |
-                 base::File::FLAG_READ;
+  uint32_t flags = base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE |
+                   base::File::FLAG_READ;
 
   // Create a temporary file with coded_size length.
   base::File dest_file(test_stream->aligned_in_file, flags);
@@ -287,7 +291,7 @@
   dest_file.SetLength(test_stream->aligned_buffer_size *
                       test_stream->num_frames);
 
-  const uint8* src = src_file.data();
+  const uint8_t* src = src_file.data();
   off_t dest_offset = 0;
   for (size_t frame = 0; frame < test_stream->num_frames; frame++) {
     for (size_t i = 0; i < num_planes; i++) {
@@ -483,7 +487,7 @@
                                             const FrameFoundCallback& frame_cb);
 
   // Process and verify contents of a bitstream buffer.
-  virtual void ProcessStreamBuffer(const uint8* stream, size_t size) = 0;
+  virtual void ProcessStreamBuffer(const uint8_t* stream, size_t size) = 0;
 
  protected:
   explicit StreamValidator(const FrameFoundCallback& frame_cb)
@@ -500,7 +504,7 @@
         seen_pps_(false),
         seen_idr_(false) {}
 
-  void ProcessStreamBuffer(const uint8* stream, size_t size) override;
+  void ProcessStreamBuffer(const uint8_t* stream, size_t size) override;
 
  private:
   // Set to true when encoder provides us with the corresponding NALU type.
@@ -511,7 +515,7 @@
   media::H264Parser h264_parser_;
 };
 
-void H264Validator::ProcessStreamBuffer(const uint8* stream, size_t size) {
+void H264Validator::ProcessStreamBuffer(const uint8_t* stream, size_t size) {
   h264_parser_.SetStream(stream, size);
 
   while (1) {
@@ -567,14 +571,14 @@
       : StreamValidator(frame_cb),
         seen_keyframe_(false) {}
 
-  void ProcessStreamBuffer(const uint8* stream, size_t size) override;
+  void ProcessStreamBuffer(const uint8_t* stream, size_t size) override;
 
  private:
   // Have we already got a keyframe in the stream?
   bool seen_keyframe_;
 };
 
-void VP8Validator::ProcessStreamBuffer(const uint8* stream, size_t size) {
+void VP8Validator::ProcessStreamBuffer(const uint8_t* stream, size_t size) {
   bool keyframe = !(stream[0] & 0x01);
   if (keyframe)
     seen_keyframe_ = true;
@@ -791,7 +795,7 @@
   void RequireBitstreamBuffers(unsigned int input_count,
                                const gfx::Size& input_coded_size,
                                size_t output_buffer_size) override;
-  void BitstreamBufferReady(int32 bitstream_buffer_id,
+  void BitstreamBufferReady(int32_t bitstream_buffer_id,
                             size_t payload_size,
                             bool key_frame) override;
   void NotifyError(VideoEncodeAccelerator::Error error) override;
@@ -812,7 +816,7 @@
   void SetStreamParameters(unsigned int bitrate, unsigned int framerate);
 
   // Called when encoder is done with a VideoFrame.
-  void InputNoLongerNeededCallback(int32 input_id);
+  void InputNoLongerNeededCallback(int32_t input_id);
 
   // Feed the encoder with one input frame.
   void FeedEncoderWithOneInput();
@@ -851,7 +855,7 @@
   // input stream, ready to be sent to encoder.
   // The input frame id is returned in |input_id|.
   scoped_refptr<media::VideoFrame> PrepareInputFrame(off_t position,
-                                                     int32* input_id);
+                                                     int32_t* input_id);
 
   // Update the parameters according to |mid_stream_bitrate_switch| and
   // |mid_stream_framerate_switch|.
@@ -876,8 +880,8 @@
   ClientStateNotification<ClientState>* note_;
 
   // Ids assigned to VideoFrames.
-  std::set<int32> inputs_at_client_;
-  int32 next_input_id_;
+  std::set<int32_t> inputs_at_client_;
+  int32_t next_input_id_;
 
   // Encode start time of all encoded frames. The position in the vector is the
   // frame input id.
@@ -888,10 +892,10 @@
   std::vector<base::TimeDelta> encode_latencies_;
 
   // Ids for output BitstreamBuffers.
-  typedef std::map<int32, base::SharedMemory*> IdToSHM;
+  typedef std::map<int32_t, base::SharedMemory*> IdToSHM;
   ScopedVector<base::SharedMemory> output_shms_;
   IdToSHM output_buffers_at_client_;
-  int32 next_output_buffer_id_;
+  int32_t next_output_buffer_id_;
 
   // Current offset into input stream.
   off_t pos_in_input_stream_;
@@ -1227,7 +1231,7 @@
   }
 }
 
-void VEAClient::BitstreamBufferReady(int32 bitstream_buffer_id,
+void VEAClient::BitstreamBufferReady(int32_t bitstream_buffer_id,
                                      size_t payload_size,
                                      bool key_frame) {
   DCHECK(thread_checker_.CalledOnValidThread());
@@ -1243,7 +1247,7 @@
 
   encoded_stream_size_since_last_check_ += payload_size;
 
-  const uint8* stream_ptr = static_cast<const uint8*>(shm->memory());
+  const uint8_t* stream_ptr = static_cast<const uint8_t*>(shm->memory());
   if (payload_size > 0) {
     if (stream_validator_) {
       stream_validator_->ProcessStreamBuffer(stream_ptr, payload_size);
@@ -1253,7 +1257,7 @@
 
     if (quality_validator_) {
       scoped_refptr<media::DecoderBuffer> buffer(media::DecoderBuffer::CopyFrom(
-          reinterpret_cast<const uint8*>(shm->memory()),
+          reinterpret_cast<const uint8_t*>(shm->memory()),
           static_cast<int>(payload_size)));
       quality_validator_->AddDecodeBuffer(buffer);
       // Insert EOS buffer to flush the decoder.
@@ -1301,8 +1305,8 @@
            << " bps @ " << current_framerate_ << " FPS";
 }
 
-void VEAClient::InputNoLongerNeededCallback(int32 input_id) {
-  std::set<int32>::iterator it = inputs_at_client_.find(input_id);
+void VEAClient::InputNoLongerNeededCallback(int32_t input_id) {
+  std::set<int32_t>::iterator it = inputs_at_client_.find(input_id);
   ASSERT_NE(it, inputs_at_client_.end());
   inputs_at_client_.erase(it);
   if (!g_env->run_at_fps())
@@ -1310,10 +1314,10 @@
 }
 
 scoped_refptr<media::VideoFrame> VEAClient::CreateFrame(off_t position) {
-  uint8* frame_data_y = const_cast<uint8*>(
+  uint8_t* frame_data_y = const_cast<uint8_t*>(
       test_stream_->mapped_aligned_in_file.data() + position);
-  uint8* frame_data_u = frame_data_y + test_stream_->aligned_plane_size[0];
-  uint8* frame_data_v = frame_data_u + test_stream_->aligned_plane_size[1];
+  uint8_t* frame_data_u = frame_data_y + test_stream_->aligned_plane_size[0];
+  uint8_t* frame_data_v = frame_data_u + test_stream_->aligned_plane_size[1];
   CHECK_GT(current_framerate_, 0U);
 
   return media::VideoFrame::WrapExternalYuvData(
@@ -1326,8 +1330,9 @@
                                          current_framerate_));
 }
 
-scoped_refptr<media::VideoFrame> VEAClient::PrepareInputFrame(off_t position,
-                                                              int32* input_id) {
+scoped_refptr<media::VideoFrame> VEAClient::PrepareInputFrame(
+    off_t position,
+    int32_t* input_id) {
   CHECK_LE(position + test_stream_->aligned_buffer_size,
            test_stream_->mapped_aligned_in_file.length());
 
@@ -1372,7 +1377,7 @@
   if (quality_validator_)
     quality_validator_->AddOriginalFrame(CreateFrame(pos_in_input_stream_));
 
-  int32 input_id;
+  int32_t input_id;
   scoped_refptr<media::VideoFrame> video_frame =
       PrepareInputFrame(pos_in_input_stream_, &input_id);
   pos_in_input_stream_ += test_stream_->aligned_buffer_size;
@@ -1388,7 +1393,7 @@
   }
 
   if (g_env->needs_encode_latency()) {
-    LOG_ASSERT(input_id == static_cast<int32>(encode_start_time_.size()));
+    LOG_ASSERT(input_id == static_cast<int32_t>(encode_start_time_.size()));
     encode_start_time_.push_back(base::TimeTicks::Now());
   }
   encoder_->Encode(video_frame, force_keyframe);
diff --git a/content/common/gpu/media/vp8_decoder.h b/content/common/gpu/media/vp8_decoder.h
index e05ab51..79d115c6 100644
--- a/content/common/gpu/media/vp8_decoder.h
+++ b/content/common/gpu/media/vp8_decoder.h
@@ -5,6 +5,10 @@
 #ifndef CONTENT_COMMON_GPU_MEDIA_VP8_DECODER_H_
 #define CONTENT_COMMON_GPU_MEDIA_VP8_DECODER_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "content/common/gpu/media/accelerated_video_decoder.h"
diff --git a/content/common/gpu/media/vp8_picture.h b/content/common/gpu/media/vp8_picture.h
index eb8307f..602357f 100644
--- a/content/common/gpu/media/vp8_picture.h
+++ b/content/common/gpu/media/vp8_picture.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_COMMON_GPU_MEDIA_VP8_PICTURE_H_
 #define CONTENT_COMMON_GPU_MEDIA_VP8_PICTURE_H_
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 
 namespace content {
diff --git a/content/common/gpu/media/vp9_decoder.h b/content/common/gpu/media/vp9_decoder.h
index c2540d0..55625e73 100644
--- a/content/common/gpu/media/vp9_decoder.h
+++ b/content/common/gpu/media/vp9_decoder.h
@@ -5,8 +5,12 @@
 #ifndef CONTENT_COMMON_GPU_MEDIA_VP9_DECODER_H_
 #define CONTENT_COMMON_GPU_MEDIA_VP9_DECODER_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <vector>
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "content/common/gpu/media/accelerated_video_decoder.h"
diff --git a/content/common/gpu/media/vp9_picture.h b/content/common/gpu/media/vp9_picture.h
index 2738821f..b6b1443 100644
--- a/content/common/gpu/media/vp9_picture.h
+++ b/content/common/gpu/media/vp9_picture.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_COMMON_GPU_MEDIA_VP9_PICTURE_H_
 #define CONTENT_COMMON_GPU_MEDIA_VP9_PICTURE_H_
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "media/filters/vp9_parser.h"
diff --git a/content/common/gpu/media/vt_stubs_header.fragment b/content/common/gpu/media/vt_stubs_header.fragment
index eabcd26..16c17d3 100644
--- a/content/common/gpu/media/vt_stubs_header.fragment
+++ b/content/common/gpu/media/vt_stubs_header.fragment
@@ -3,6 +3,8 @@
 // found in the LICENSE file.
 
 #include <CoreFoundation/CoreFoundation.h>
+#include <stddef.h>
+#include <stdint.h>
 
 extern "C" {
 
diff --git a/content/common/gpu/media/vt_video_decode_accelerator_mac.cc b/content/common/gpu/media/vt_video_decode_accelerator_mac.cc
index 6b3e0dc7..19b65c5 100644
--- a/content/common/gpu/media/vt_video_decode_accelerator_mac.cc
+++ b/content/common/gpu/media/vt_video_decode_accelerator_mac.cc
@@ -7,11 +7,13 @@
 #include <CoreVideo/CoreVideo.h>
 #include <OpenGL/CGLIOSurface.h>
 #include <OpenGL/gl.h>
+#include <stddef.h>
 
 #include "base/bind.h"
 #include "base/command_line.h"
 #include "base/logging.h"
 #include "base/mac/mac_logging.h"
+#include "base/macros.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/sys_byteorder.h"
 #include "base/sys_info.h"
@@ -290,7 +292,7 @@
 
 VTVideoDecodeAccelerator::VTVideoDecodeAccelerator(
     const base::Callback<bool(void)>& make_context_current,
-    const base::Callback<void(uint32, uint32, scoped_refptr<gl::GLImage>)>&
+    const base::Callback<void(uint32_t, uint32_t, scoped_refptr<gl::GLImage>)>&
         bind_image)
     : make_context_current_(make_context_current),
       bind_image_(bind_image),
diff --git a/content/common/gpu/media/vt_video_decode_accelerator_mac.h b/content/common/gpu/media/vt_video_decode_accelerator_mac.h
index 27a8190..f8e3736 100644
--- a/content/common/gpu/media/vt_video_decode_accelerator_mac.h
+++ b/content/common/gpu/media/vt_video_decode_accelerator_mac.h
@@ -36,8 +36,8 @@
  public:
   explicit VTVideoDecodeAccelerator(
       const base::Callback<bool(void)>& make_context_current,
-      const base::Callback<void(uint32, uint32, scoped_refptr<gl::GLImage>)>&
-          bind_image);
+      const base::Callback<
+          void(uint32_t, uint32_t, scoped_refptr<gl::GLImage>)>& bind_image);
   ~VTVideoDecodeAccelerator() override;
 
   // VideoDecodeAccelerator implementation.
@@ -190,7 +190,8 @@
   // GPU thread state.
   //
   base::Callback<bool(void)> make_context_current_;
-  base::Callback<void(uint32, uint32, scoped_refptr<gl::GLImage>)> bind_image_;
+  base::Callback<void(uint32_t, uint32_t, scoped_refptr<gl::GLImage>)>
+      bind_image_;
   media::VideoDecodeAccelerator::Client* client_;
   State state_;
 
diff --git a/content/common/gpu/stream_texture_android.cc b/content/common/gpu/stream_texture_android.cc
index 84a0d1fa..6d27a7a 100644
--- a/content/common/gpu/stream_texture_android.cc
+++ b/content/common/gpu/stream_texture_android.cc
@@ -24,10 +24,9 @@
 using gpu::gles2::TextureRef;
 
 // static
-bool StreamTexture::Create(
-    GpuCommandBufferStub* owner_stub,
-    uint32 client_texture_id,
-    int stream_id) {
+bool StreamTexture::Create(GpuCommandBufferStub* owner_stub,
+                           uint32_t client_texture_id,
+                           int stream_id) {
   GLES2Decoder* decoder = owner_stub->decoder();
   TextureManager* texture_manager =
       decoder->GetContextGroup()->texture_manager();
@@ -55,8 +54,8 @@
 }
 
 StreamTexture::StreamTexture(GpuCommandBufferStub* owner_stub,
-                             int32 route_id,
-                             uint32 texture_id)
+                             int32_t route_id,
+                             uint32_t texture_id)
     : surface_texture_(gfx::SurfaceTexture::Create(texture_id)),
       size_(0, 0),
       has_valid_frame_(false),
@@ -208,7 +207,7 @@
   has_listener_ = true;
 }
 
-void StreamTexture::OnEstablishPeer(int32 primary_id, int32 secondary_id) {
+void StreamTexture::OnEstablishPeer(int32_t primary_id, int32_t secondary_id) {
   if (!owner_stub_)
     return;
 
diff --git a/content/common/gpu/stream_texture_android.h b/content/common/gpu/stream_texture_android.h
index a761206..a5afb8eac 100644
--- a/content/common/gpu/stream_texture_android.h
+++ b/content/common/gpu/stream_texture_android.h
@@ -5,7 +5,9 @@
 #ifndef CONTENT_COMMON_GPU_STREAM_TEXTURE_ANDROID_H_
 #define CONTENT_COMMON_GPU_STREAM_TEXTURE_ANDROID_H_
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "content/common/gpu/gpu_command_buffer_stub.h"
 #include "ipc/ipc_listener.h"
@@ -23,13 +25,13 @@
                       public GpuCommandBufferStub::DestructionObserver {
  public:
   static bool Create(GpuCommandBufferStub* owner_stub,
-                     uint32 client_texture_id,
+                     uint32_t client_texture_id,
                      int stream_id);
 
  private:
   StreamTexture(GpuCommandBufferStub* owner_stub,
-                int32 route_id,
-                uint32 texture_id);
+                int32_t route_id,
+                uint32_t texture_id);
   ~StreamTexture() override;
 
   // gl::GLImage implementation:
@@ -62,7 +64,7 @@
 
   // IPC message handlers:
   void OnStartListening();
-  void OnEstablishPeer(int32 primary_id, int32 secondary_id);
+  void OnEstablishPeer(int32_t primary_id, int32_t secondary_id);
   void OnSetSize(const gfx::Size& size) { size_ = size; }
 
   scoped_refptr<gfx::SurfaceTexture> surface_texture_;
@@ -80,9 +82,9 @@
   bool has_pending_frame_;
 
   GpuCommandBufferStub* owner_stub_;
-  int32 route_id_;
+  int32_t route_id_;
   bool has_listener_;
-  uint32 texture_id_;
+  uint32_t texture_id_;
 
   base::WeakPtrFactory<StreamTexture> weak_factory_;
   DISALLOW_COPY_AND_ASSIGN(StreamTexture);
diff --git a/content/common/host_discardable_shared_memory_manager.cc b/content/common/host_discardable_shared_memory_manager.cc
index 5b07a17..d897b71 100644
--- a/content/common/host_discardable_shared_memory_manager.cc
+++ b/content/common/host_discardable_shared_memory_manager.cc
@@ -11,6 +11,7 @@
 #include "base/callback.h"
 #include "base/debug/crash_logging.h"
 #include "base/lazy_instance.h"
+#include "base/macros.h"
 #include "base/memory/discardable_memory.h"
 #include "base/numerics/safe_math.h"
 #include "base/strings/string_number_conversions.h"
@@ -21,6 +22,7 @@
 #include "base/trace_event/memory_dump_manager.h"
 #include "base/trace_event/process_memory_dump.h"
 #include "base/trace_event/trace_event.h"
+#include "build/build_config.h"
 #include "content/common/child_process_host_impl.h"
 #include "content/common/discardable_shared_memory_heap.h"
 #include "content/public/common/child_process_host.h"
@@ -204,7 +206,7 @@
       // corresponding dump for the same segment, this will avoid to
       // double-count them in tracing. If, instead, no other process will emit a
       // dump with the same guid, the segment will be accounted to the browser.
-      const uint64 child_tracing_process_id =
+      const uint64_t child_tracing_process_id =
           ChildProcessHostImpl::ChildProcessUniqueIdToTracingProcessId(
               child_process_id);
       base::trace_event::MemoryAllocatorDumpGuid shared_segment_guid =
@@ -225,7 +227,7 @@
         pmd->GetSharedGlobalAllocatorDump(shared_segment_guid)
             ->AddScalar("resident_size",
                         base::trace_event::MemoryAllocatorDump::kUnitsBytes,
-                        static_cast<uint64>(resident_size));
+                        static_cast<uint64_t>(resident_size));
       }
 #endif  // defined(COUNT_RESIDENT_BYTES_SUPPORTED)
     }
diff --git a/content/common/host_discardable_shared_memory_manager.h b/content/common/host_discardable_shared_memory_manager.h
index aa5349a..3965f1d4 100644
--- a/content/common/host_discardable_shared_memory_manager.h
+++ b/content/common/host_discardable_shared_memory_manager.h
@@ -5,11 +5,15 @@
 #ifndef CONTENT_COMMON_HOST_DISCARDABLE_SHARED_MEMORY_MANAGER_H_
 #define CONTENT_COMMON_HOST_DISCARDABLE_SHARED_MEMORY_MANAGER_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <vector>
 
 #include "base/callback.h"
 #include "base/containers/hash_tables.h"
 #include "base/format_macros.h"
+#include "base/macros.h"
 #include "base/memory/discardable_memory_allocator.h"
 #include "base/memory/discardable_shared_memory.h"
 #include "base/memory/memory_pressure_listener.h"
diff --git a/content/common/host_discardable_shared_memory_manager_unittest.cc b/content/common/host_discardable_shared_memory_manager_unittest.cc
index 12fb87b..45ff34d3 100644
--- a/content/common/host_discardable_shared_memory_manager_unittest.cc
+++ b/content/common/host_discardable_shared_memory_manager_unittest.cc
@@ -4,6 +4,9 @@
 
 #include "content/common/host_discardable_shared_memory_manager.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/threading/simple_thread.h"
 #include "content/public/common/child_process_host.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -67,7 +70,7 @@
 
 TEST_F(HostDiscardableSharedMemoryManagerTest, AllocateForChild) {
   const int kDataSize = 1024;
-  uint8 data[kDataSize];
+  uint8_t data[kDataSize];
   memset(data, 0x80, kDataSize);
 
   base::SharedMemoryHandle shared_handle;
diff --git a/content/common/host_shared_bitmap_manager.cc b/content/common/host_shared_bitmap_manager.cc
index 6a9595e..03b389a 100644
--- a/content/common/host_shared_bitmap_manager.cc
+++ b/content/common/host_shared_bitmap_manager.cc
@@ -4,10 +4,14 @@
 
 #include "content/common/host_shared_bitmap_manager.h"
 
+#include <stdint.h>
+
 #include "base/lazy_instance.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/trace_event/process_memory_dump.h"
+#include "build/build_config.h"
 #include "content/common/view_messages.h"
 #include "ui/gfx/geometry/size.h"
 
@@ -21,7 +25,7 @@
         buffer_size(buffer_size) {}
   base::ProcessHandle process_handle;
   scoped_ptr<base::SharedMemory> memory;
-  scoped_ptr<uint8[]> pixels;
+  scoped_ptr<uint8_t[]> pixels;
   size_t buffer_size;
 
  private:
@@ -34,7 +38,7 @@
 
 class HostSharedBitmap : public cc::SharedBitmap {
  public:
-  HostSharedBitmap(uint8* pixels,
+  HostSharedBitmap(uint8_t* pixels,
                    scoped_refptr<BitmapData> bitmap_data,
                    const cc::SharedBitmapId& id,
                    HostSharedBitmapManager* manager)
@@ -122,7 +126,7 @@
                      bitmap_size));
   // Bitmaps allocated in host don't need to be shared to other processes, so
   // allocate them with new instead.
-  data->pixels = scoped_ptr<uint8[]>(new uint8[bitmap_size]);
+  data->pixels = scoped_ptr<uint8_t[]>(new uint8_t[bitmap_size]);
 
   cc::SharedBitmapId id = cc::SharedBitmap::GenerateId();
   handle_map_[id] = data;
@@ -154,7 +158,7 @@
   }
 
   return make_scoped_ptr(new HostSharedBitmap(
-      static_cast<uint8*>(data->memory->memory()), data, id, nullptr));
+      static_cast<uint8_t*>(data->memory->memory()), data, id, nullptr));
 }
 
 bool HostSharedBitmapManager::OnMemoryDump(
diff --git a/content/common/host_shared_bitmap_manager.h b/content/common/host_shared_bitmap_manager.h
index 5ff8212a..6bfb42e 100644
--- a/content/common/host_shared_bitmap_manager.h
+++ b/content/common/host_shared_bitmap_manager.h
@@ -5,12 +5,14 @@
 #ifndef CONTENT_COMMON_HOST_SHARED_BITMAP_MANAGER_H_
 #define CONTENT_COMMON_HOST_SHARED_BITMAP_MANAGER_H_
 
+#include <stddef.h>
+
 #include <map>
 #include <set>
 
-#include "base/basictypes.h"
 #include "base/containers/hash_tables.h"
 #include "base/hash.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/shared_memory.h"
diff --git a/content/common/host_shared_bitmap_manager_unittest.cc b/content/common/host_shared_bitmap_manager_unittest.cc
index 308402e3..0a3cdef 100644
--- a/content/common/host_shared_bitmap_manager_unittest.cc
+++ b/content/common/host_shared_bitmap_manager_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 "content/common/host_shared_bitmap_manager.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
diff --git a/content/common/indexed_db/indexed_db_constants.h b/content/common/indexed_db/indexed_db_constants.h
index 4cb4c7e1..024a18b 100644
--- a/content/common/indexed_db/indexed_db_constants.h
+++ b/content/common/indexed_db/indexed_db_constants.h
@@ -5,11 +5,14 @@
 #ifndef CONTENT_COMMON_INDEXED_DB_INDEXED_DB_CONSTANTS_H_
 #define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_CONSTANTS_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "ipc/ipc_channel.h"
 
 namespace content {
 
-const int32 kNoDatabase = -1;
+const int32_t kNoDatabase = -1;
 
 const size_t kMaxIDBMessageOverhead = 1024 * 1024;  // 1MB; arbitrarily chosen.
 
diff --git a/content/common/indexed_db/indexed_db_key.h b/content/common/indexed_db/indexed_db_key.h
index f961878..85ff6e9 100644
--- a/content/common/indexed_db/indexed_db_key.h
+++ b/content/common/indexed_db/indexed_db_key.h
@@ -5,10 +5,11 @@
 #ifndef CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_H_
 #define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_H_
 
+#include <stddef.h>
+
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/logging.h"
 #include "base/strings/string16.h"
 #include "content/common/content_export.h"
diff --git a/content/common/indexed_db/indexed_db_key_range.h b/content/common/indexed_db/indexed_db_key_range.h
index 8bf6fb3..4a02491 100644
--- a/content/common/indexed_db/indexed_db_key_range.h
+++ b/content/common/indexed_db/indexed_db_key_range.h
@@ -5,7 +5,6 @@
 #ifndef CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_RANGE_H_
 #define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_KEY_RANGE_H_
 
-#include "base/basictypes.h"
 #include "content/common/content_export.h"
 #include "content/common/indexed_db/indexed_db_key.h"
 
diff --git a/content/common/indexed_db/indexed_db_key_unittest.cc b/content/common/indexed_db/indexed_db_key_unittest.cc
index f908f603..c7a566ba 100644
--- a/content/common/indexed_db/indexed_db_key_unittest.cc
+++ b/content/common/indexed_db/indexed_db_key_unittest.cc
@@ -2,9 +2,10 @@
 // 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/basictypes.h"
 #include "base/strings/string16.h"
 #include "content/common/indexed_db/indexed_db_key.h"
 #include "testing/gtest/include/gtest/gtest.h"
diff --git a/content/common/indexed_db/indexed_db_messages.h b/content/common/indexed_db/indexed_db_messages.h
index df5c27e4..d360454 100644
--- a/content/common/indexed_db/indexed_db_messages.h
+++ b/content/common/indexed_db/indexed_db_messages.h
@@ -4,6 +4,8 @@
 
 // Message definition file, included multiple times, hence no include guard.
 
+#include <stdint.h>
+
 #include <string>
 #include <utility>
 #include <vector>
@@ -21,7 +23,7 @@
 #define CONTENT_COMMON_INDEXED_DB_INDEXED_DB_MESSAGES_H_
 
 // An index id, and corresponding set of keys to insert.
-typedef std::pair<int64, std::vector<content::IndexedDBKey> > IndexKeys;
+typedef std::pair<int64_t, std::vector<content::IndexedDBKey>> IndexKeys;
 
 #endif  // CONTENT_COMMON_INDEXED_DB_INDEXED_DB_MESSAGES_H_
 
@@ -43,8 +45,8 @@
 // Used to enumerate indexed databases.
 IPC_STRUCT_BEGIN(IndexedDBHostMsg_FactoryGetDatabaseNames_Params)
   // The response should have these ids.
-  IPC_STRUCT_MEMBER(int32, ipc_thread_id)
-  IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_thread_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id)
   // The string id of the origin doing the initiating.
   IPC_STRUCT_MEMBER(std::string, database_identifier)
 IPC_STRUCT_END()
@@ -52,26 +54,26 @@
 // Used to open an indexed database.
 IPC_STRUCT_BEGIN(IndexedDBHostMsg_FactoryOpen_Params)
   // The response should have these ids.
-  IPC_STRUCT_MEMBER(int32, ipc_thread_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_thread_id)
   // Identifier of the request
-  IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id)
   // Identifier for database callbacks
-  IPC_STRUCT_MEMBER(int32, ipc_database_callbacks_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_database_callbacks_id)
   // The string id of the origin doing the initiating.
   IPC_STRUCT_MEMBER(std::string, database_identifier)
   // The name of the database.
   IPC_STRUCT_MEMBER(base::string16, name)
   // The transaction id used if a database upgrade is needed.
-  IPC_STRUCT_MEMBER(int64, transaction_id)
+  IPC_STRUCT_MEMBER(int64_t, transaction_id)
   // The requested version of the database.
-  IPC_STRUCT_MEMBER(int64, version)
+  IPC_STRUCT_MEMBER(int64_t, version)
 IPC_STRUCT_END()
 
 // Used to delete an indexed database.
 IPC_STRUCT_BEGIN(IndexedDBHostMsg_FactoryDeleteDatabase_Params)
   // The response should have these ids.
-  IPC_STRUCT_MEMBER(int32, ipc_thread_id)
-  IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_thread_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id)
   // The string id of the origin doing the initiating.
   IPC_STRUCT_MEMBER(std::string, database_identifier)
   // The name of the database.
@@ -79,15 +81,15 @@
 IPC_STRUCT_END()
 
 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCreateTransaction_Params)
-  IPC_STRUCT_MEMBER(int32, ipc_thread_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_thread_id)
   // The database the object store belongs to.
-  IPC_STRUCT_MEMBER(int32, ipc_database_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_database_id)
   // The transaction id as minted by the frontend.
-  IPC_STRUCT_MEMBER(int64, transaction_id)
+  IPC_STRUCT_MEMBER(int64_t, transaction_id)
   // To get to WebIDBDatabaseCallbacks.
-  IPC_STRUCT_MEMBER(int32, ipc_database_callbacks_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_database_callbacks_id)
   // The scope of the transaction.
-  IPC_STRUCT_MEMBER(std::vector<int64>, object_store_ids)
+  IPC_STRUCT_MEMBER(std::vector<int64_t>, object_store_ids)
   // The transaction mode.
   IPC_STRUCT_MEMBER(blink::WebIDBTransactionMode, mode)
 IPC_STRUCT_END()
@@ -95,11 +97,11 @@
 // Used to create an object store.
 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCreateObjectStore_Params)
   // The database the object store belongs to.
-  IPC_STRUCT_MEMBER(int32, ipc_database_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_database_id)
   // The transaction its associated with.
-  IPC_STRUCT_MEMBER(int64, transaction_id)
+  IPC_STRUCT_MEMBER(int64_t, transaction_id)
   // The storage id of the object store.
-  IPC_STRUCT_MEMBER(int64, object_store_id)
+  IPC_STRUCT_MEMBER(int64_t, object_store_id)
   // The name of the object store.
   IPC_STRUCT_MEMBER(base::string16, name)
   // The keyPath of the object store.
@@ -109,17 +111,17 @@
 IPC_STRUCT_END()
 
 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseGet_Params)
-  IPC_STRUCT_MEMBER(int32, ipc_thread_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_thread_id)
   // The id any response should contain.
-  IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id)
   // The database the object store belongs to.
-  IPC_STRUCT_MEMBER(int32, ipc_database_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_database_id)
   // The transaction its associated with.
-  IPC_STRUCT_MEMBER(int64, transaction_id)
+  IPC_STRUCT_MEMBER(int64_t, transaction_id)
   // The object store's id.
-  IPC_STRUCT_MEMBER(int64, object_store_id)
+  IPC_STRUCT_MEMBER(int64_t, object_store_id)
   // The index's id.
-  IPC_STRUCT_MEMBER(int64, index_id)
+  IPC_STRUCT_MEMBER(int64_t, index_id)
   // The serialized key range.
   IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range)
   // If this is just retrieving the key
@@ -127,30 +129,30 @@
 IPC_STRUCT_END()
 
 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseGetAll_Params)
-  IPC_STRUCT_MEMBER(int32, ipc_thread_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_thread_id)
   // The id any response should contain.
-  IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id)
   // The database the object store belongs to.
-  IPC_STRUCT_MEMBER(int32, ipc_database_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_database_id)
   // The transaction its associated with.
-  IPC_STRUCT_MEMBER(int64, transaction_id)
+  IPC_STRUCT_MEMBER(int64_t, transaction_id)
   // The object store's id.
-  IPC_STRUCT_MEMBER(int64, object_store_id)
+  IPC_STRUCT_MEMBER(int64_t, object_store_id)
   // The index id.
-  IPC_STRUCT_MEMBER(int64, index_id)
+  IPC_STRUCT_MEMBER(int64_t, index_id)
   // The serialized key range.
   IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range)
   // If this is just retrieving the key
   IPC_STRUCT_MEMBER(bool, key_only)
   // The max number of values to retrieve.
-  IPC_STRUCT_MEMBER(int64, max_count)
+  IPC_STRUCT_MEMBER(int64_t, max_count)
 IPC_STRUCT_END()
 
 IPC_STRUCT_BEGIN(IndexedDBMsg_BlobOrFileInfo)
 IPC_STRUCT_MEMBER(bool, is_file)
 IPC_STRUCT_MEMBER(std::string, uuid)
 IPC_STRUCT_MEMBER(base::string16, mime_type)
-IPC_STRUCT_MEMBER(uint64, size)
+IPC_STRUCT_MEMBER(uint64_t, size)
 IPC_STRUCT_MEMBER(base::string16, file_path)
 IPC_STRUCT_MEMBER(base::string16, file_name)
 IPC_STRUCT_MEMBER(double, last_modified)
@@ -173,16 +175,16 @@
 // Used to set a value in an object store.
 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabasePut_Params)
   // The id any response should contain.
-  IPC_STRUCT_MEMBER(int32, ipc_thread_id)
-  IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_thread_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id)
   // The database the object store belongs to.
-  IPC_STRUCT_MEMBER(int32, ipc_database_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_database_id)
   // The transaction it's associated with.
-  IPC_STRUCT_MEMBER(int64, transaction_id)
+  IPC_STRUCT_MEMBER(int64_t, transaction_id)
   // The object store's id.
-  IPC_STRUCT_MEMBER(int64, object_store_id)
+  IPC_STRUCT_MEMBER(int64_t, object_store_id)
   // The index's id.
-  IPC_STRUCT_MEMBER(int64, index_id)
+  IPC_STRUCT_MEMBER(int64_t, index_id)
   // The value to set.
   IPC_STRUCT_MEMBER(IndexedDBMsg_Value, value)
   // The key to set it on (may not be "valid"/set in some cases).
@@ -196,16 +198,16 @@
 // Used to open both cursors and object cursors in IndexedDB.
 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseOpenCursor_Params)
   // The response should have these ids.
-  IPC_STRUCT_MEMBER(int32, ipc_thread_id)
-  IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_thread_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id)
   // The database the object store belongs to.
-  IPC_STRUCT_MEMBER(int32, ipc_database_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_database_id)
   // The transaction this request belongs to.
-  IPC_STRUCT_MEMBER(int64, transaction_id)
+  IPC_STRUCT_MEMBER(int64_t, transaction_id)
   // The object store.
-  IPC_STRUCT_MEMBER(int64, object_store_id)
+  IPC_STRUCT_MEMBER(int64_t, object_store_id)
   // The index if any.
-  IPC_STRUCT_MEMBER(int64, index_id)
+  IPC_STRUCT_MEMBER(int64_t, index_id)
   // The serialized key range.
   IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range)
   // The direction of this cursor.
@@ -219,41 +221,41 @@
 // Used to open both cursors and object cursors in IndexedDB.
 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCount_Params)
   // The response should have these ids.
-  IPC_STRUCT_MEMBER(int32, ipc_thread_id)
-  IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_thread_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id)
   // The transaction this request belongs to.
-  IPC_STRUCT_MEMBER(int64, transaction_id)
+  IPC_STRUCT_MEMBER(int64_t, transaction_id)
   // The IPC id of the database.
-  IPC_STRUCT_MEMBER(int32, ipc_database_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_database_id)
   // The object store.
-  IPC_STRUCT_MEMBER(int64, object_store_id)
+  IPC_STRUCT_MEMBER(int64_t, object_store_id)
   // The index if any.
-  IPC_STRUCT_MEMBER(int64, index_id)
+  IPC_STRUCT_MEMBER(int64_t, index_id)
   // The serialized key range.
   IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range)
 IPC_STRUCT_END()
 
 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseDeleteRange_Params)
   // The response should have these ids.
-  IPC_STRUCT_MEMBER(int32, ipc_thread_id)
-  IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_thread_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id)
   // The IPC id of the database.
-  IPC_STRUCT_MEMBER(int32, ipc_database_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_database_id)
   // The transaction this request belongs to.
-  IPC_STRUCT_MEMBER(int64, transaction_id)
+  IPC_STRUCT_MEMBER(int64_t, transaction_id)
   // The object store.
-  IPC_STRUCT_MEMBER(int64, object_store_id)
+  IPC_STRUCT_MEMBER(int64_t, object_store_id)
   // The serialized key range.
   IPC_STRUCT_MEMBER(content::IndexedDBKeyRange, key_range)
 IPC_STRUCT_END()
 
 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseSetIndexKeys_Params)
   // The IPC id of the database.
-  IPC_STRUCT_MEMBER(int32, ipc_database_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_database_id)
   // The transaction this request belongs to.
-  IPC_STRUCT_MEMBER(int64, transaction_id)
+  IPC_STRUCT_MEMBER(int64_t, transaction_id)
   // The object store's id.
-  IPC_STRUCT_MEMBER(int64, object_store_id)
+  IPC_STRUCT_MEMBER(int64_t, object_store_id)
   // The object store key that we're setting index keys for.
   IPC_STRUCT_MEMBER(content::IndexedDBKey, primary_key)
   // The index ids and the list of keys for each index.
@@ -263,13 +265,13 @@
 // Used to create an index.
 IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseCreateIndex_Params)
   // The transaction this is associated with.
-  IPC_STRUCT_MEMBER(int64, transaction_id)
+  IPC_STRUCT_MEMBER(int64_t, transaction_id)
   // The database being used.
-  IPC_STRUCT_MEMBER(int32, ipc_database_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_database_id)
   // The object store the index belongs to.
-  IPC_STRUCT_MEMBER(int64, object_store_id)
+  IPC_STRUCT_MEMBER(int64_t, object_store_id)
   // The storage id of the index.
-  IPC_STRUCT_MEMBER(int64, index_id)
+  IPC_STRUCT_MEMBER(int64_t, index_id)
   // The name of the index.
   IPC_STRUCT_MEMBER(base::string16, name)
   // The keyPath of the index.
@@ -281,46 +283,46 @@
 IPC_STRUCT_END()
 
 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessIDBCursor_Params)
-  IPC_STRUCT_MEMBER(int32, ipc_thread_id)
-  IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
-  IPC_STRUCT_MEMBER(int32, ipc_cursor_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_thread_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_cursor_id)
   IPC_STRUCT_MEMBER(content::IndexedDBKey, key)
   IPC_STRUCT_MEMBER(content::IndexedDBKey, primary_key)
   IPC_STRUCT_MEMBER(IndexedDBMsg_Value, value)
 IPC_STRUCT_END()
 
 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessCursorContinue_Params)
-  IPC_STRUCT_MEMBER(int32, ipc_thread_id)
-  IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
-  IPC_STRUCT_MEMBER(int32, ipc_cursor_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_thread_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_cursor_id)
   IPC_STRUCT_MEMBER(content::IndexedDBKey, key)
   IPC_STRUCT_MEMBER(content::IndexedDBKey, primary_key)
   IPC_STRUCT_MEMBER(IndexedDBMsg_Value, value)
 IPC_STRUCT_END()
 
 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params)
-  IPC_STRUCT_MEMBER(int32, ipc_thread_id)
-  IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
-  IPC_STRUCT_MEMBER(int32, ipc_cursor_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_thread_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_cursor_id)
   IPC_STRUCT_MEMBER(std::vector<content::IndexedDBKey>, keys)
   IPC_STRUCT_MEMBER(std::vector<content::IndexedDBKey>, primary_keys)
   IPC_STRUCT_MEMBER(std::vector<IndexedDBMsg_Value>, values)
 IPC_STRUCT_END()
 
 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessArray_Params)
-  IPC_STRUCT_MEMBER(int32, ipc_thread_id)
-  IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_thread_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id)
   IPC_STRUCT_MEMBER(std::vector<IndexedDBMsg_ReturnValue>, values)
 IPC_STRUCT_END()
 
 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksSuccessValue_Params)
-  IPC_STRUCT_MEMBER(int32, ipc_thread_id)
-  IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_thread_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id)
   IPC_STRUCT_MEMBER(IndexedDBMsg_ReturnValue, value)
 IPC_STRUCT_END()
 
 IPC_STRUCT_BEGIN(IndexedDBIndexMetadata)
-  IPC_STRUCT_MEMBER(int64, id)
+  IPC_STRUCT_MEMBER(int64_t, id)
   IPC_STRUCT_MEMBER(base::string16, name)
   IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, key_path)
   IPC_STRUCT_MEMBER(bool, unique)
@@ -328,29 +330,29 @@
 IPC_STRUCT_END()
 
 IPC_STRUCT_BEGIN(IndexedDBObjectStoreMetadata)
-  IPC_STRUCT_MEMBER(int64, id)
+  IPC_STRUCT_MEMBER(int64_t, id)
   IPC_STRUCT_MEMBER(base::string16, name)
   IPC_STRUCT_MEMBER(content::IndexedDBKeyPath, key_path)
   IPC_STRUCT_MEMBER(bool, auto_increment)
-  IPC_STRUCT_MEMBER(int64, max_index_id)
+  IPC_STRUCT_MEMBER(int64_t, max_index_id)
   IPC_STRUCT_MEMBER(std::vector<IndexedDBIndexMetadata>, indexes)
 IPC_STRUCT_END()
 
 IPC_STRUCT_BEGIN(IndexedDBDatabaseMetadata)
-  IPC_STRUCT_MEMBER(int64, id)
+  IPC_STRUCT_MEMBER(int64_t, id)
   IPC_STRUCT_MEMBER(base::string16, name)
   IPC_STRUCT_MEMBER(base::string16, version)
-  IPC_STRUCT_MEMBER(int64, int_version)
-  IPC_STRUCT_MEMBER(int64, max_object_store_id)
+  IPC_STRUCT_MEMBER(int64_t, int_version)
+  IPC_STRUCT_MEMBER(int64_t, max_object_store_id)
   IPC_STRUCT_MEMBER(std::vector<IndexedDBObjectStoreMetadata>, object_stores)
 IPC_STRUCT_END()
 
 IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksUpgradeNeeded_Params)
-  IPC_STRUCT_MEMBER(int32, ipc_thread_id)
-  IPC_STRUCT_MEMBER(int32, ipc_callbacks_id)
-  IPC_STRUCT_MEMBER(int32, ipc_database_callbacks_id)
-  IPC_STRUCT_MEMBER(int32, ipc_database_id)
-  IPC_STRUCT_MEMBER(int64, old_version)
+  IPC_STRUCT_MEMBER(int32_t, ipc_thread_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_callbacks_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_database_callbacks_id)
+  IPC_STRUCT_MEMBER(int32_t, ipc_database_id)
+  IPC_STRUCT_MEMBER(int64_t, old_version)
   IPC_STRUCT_MEMBER(blink::WebIDBDataLoss, data_loss)
   IPC_STRUCT_MEMBER(std::string, data_loss_message)
   IPC_STRUCT_MEMBER(IndexedDBDatabaseMetadata, idb_metadata)
@@ -379,94 +381,94 @@
                      IndexedDBMsg_CallbacksSuccessArray_Params)
 
 IPC_MESSAGE_CONTROL5(IndexedDBMsg_CallbacksSuccessIDBDatabase,
-                     int32 /* ipc_thread_id */,
-                     int32 /* ipc_callbacks_id */,
-                     int32 /* ipc_database_callbacks_id */,
-                     int32 /* ipc_database_id */,
+                     int32_t /* ipc_thread_id */,
+                     int32_t /* ipc_callbacks_id */,
+                     int32_t /* ipc_database_callbacks_id */,
+                     int32_t /* ipc_database_id */,
                      IndexedDBDatabaseMetadata)
 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessIndexedDBKey,
-                     int32 /* ipc_thread_id */,
-                     int32 /* ipc_callbacks_id */,
+                     int32_t /* ipc_thread_id */,
+                     int32_t /* ipc_callbacks_id */,
                      content::IndexedDBKey /* indexed_db_key */)
 
 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksSuccessValue,
                      IndexedDBMsg_CallbacksSuccessValue_Params)
 
 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessInteger,
-                     int32 /* ipc_thread_id */,
-                     int32 /* ipc_callbacks_id */,
-                     int64 /* value */)
+                     int32_t /* ipc_thread_id */,
+                     int32_t /* ipc_callbacks_id */,
+                     int64_t /* value */)
 IPC_MESSAGE_CONTROL2(IndexedDBMsg_CallbacksSuccessUndefined,
-                     int32 /* ipc_thread_id */,
-                     int32 /* ipc_callbacks_id */)
+                     int32_t /* ipc_thread_id */,
+                     int32_t /* ipc_callbacks_id */)
 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksSuccessStringList,
-                     int32 /* ipc_thread_id */,
-                     int32 /* ipc_callbacks_id */,
+                     int32_t /* ipc_thread_id */,
+                     int32_t /* ipc_callbacks_id */,
                      std::vector<base::string16> /* dom_string_list */)
 IPC_MESSAGE_CONTROL4(IndexedDBMsg_CallbacksError,
-                     int32 /* ipc_thread_id */,
-                     int32 /* ipc_callbacks_id */,
+                     int32_t /* ipc_thread_id */,
+                     int32_t /* ipc_callbacks_id */,
                      int /* code */,
                      base::string16 /* message */)
 IPC_MESSAGE_CONTROL2(IndexedDBMsg_CallbacksBlocked,
-                     int32 /* ipc_thread_id */,
-                     int32 /* ipc_callbacks_id */)
+                     int32_t /* ipc_thread_id */,
+                     int32_t /* ipc_callbacks_id */)
 IPC_MESSAGE_CONTROL3(IndexedDBMsg_CallbacksIntBlocked,
-                     int32 /* ipc_thread_id */,
-                     int32 /* ipc_callbacks_id */,
-                     int64 /* existing_version */)
+                     int32_t /* ipc_thread_id */,
+                     int32_t /* ipc_callbacks_id */,
+                     int64_t /* existing_version */)
 IPC_MESSAGE_CONTROL1(IndexedDBMsg_CallbacksUpgradeNeeded,
                      IndexedDBMsg_CallbacksUpgradeNeeded_Params)
 
 // IDBDatabaseCallback message handlers
 IPC_MESSAGE_CONTROL2(IndexedDBMsg_DatabaseCallbacksForcedClose,
-                     int32, /* ipc_thread_id */
-                     int32) /* ipc_database_callbacks_id */
+                     int32_t, /* ipc_thread_id */
+                     int32_t) /* ipc_database_callbacks_id */
 IPC_MESSAGE_CONTROL4(IndexedDBMsg_DatabaseCallbacksIntVersionChange,
-                     int32, /* ipc_thread_id */
-                     int32, /* ipc_database_callbacks_id */
-                     int64, /* old_version */
-                     int64) /* new_version */
+                     int32_t, /* ipc_thread_id */
+                     int32_t, /* ipc_database_callbacks_id */
+                     int64_t, /* old_version */
+                     int64_t) /* new_version */
 IPC_MESSAGE_CONTROL5(IndexedDBMsg_DatabaseCallbacksAbort,
-                     int32, /* ipc_thread_id */
-                     int32, /* ipc_database_callbacks_id */
-                     int64, /* transaction_id */
-                     int, /* code */
+                     int32_t,        /* ipc_thread_id */
+                     int32_t,        /* ipc_database_callbacks_id */
+                     int64_t,        /* transaction_id */
+                     int,            /* code */
                      base::string16) /* message */
 IPC_MESSAGE_CONTROL3(IndexedDBMsg_DatabaseCallbacksComplete,
-                     int32, /* ipc_thread_id */
-                     int32, /* ipc_database_callbacks_id */
-                     int64) /* transaction_id */
+                     int32_t, /* ipc_thread_id */
+                     int32_t, /* ipc_database_callbacks_id */
+                     int64_t) /* transaction_id */
 
 // Indexed DB messages sent from the renderer to the browser.
 
 // WebIDBCursor::advance() message.
 IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_CursorAdvance,
-                     int32,  /* ipc_cursor_id */
-                     int32,  /* ipc_thread_id */
-                     int32,  /* ipc_callbacks_id */
-                     uint32) /* count */
+                     int32_t,  /* ipc_cursor_id */
+                     int32_t,  /* ipc_thread_id */
+                     int32_t,  /* ipc_callbacks_id */
+                     uint32_t) /* count */
 
 // WebIDBCursor::continue() message.
 IPC_MESSAGE_CONTROL5(IndexedDBHostMsg_CursorContinue,
-                     int32, /* ipc_cursor_id */
-                     int32, /* ipc_thread_id */
-                     int32, /* ipc_callbacks_id */
+                     int32_t,               /* ipc_cursor_id */
+                     int32_t,               /* ipc_thread_id */
+                     int32_t,               /* ipc_callbacks_id */
                      content::IndexedDBKey, /* key */
                      content::IndexedDBKey) /* primary_key */
 
 // WebIDBCursor::prefetchContinue() message.
 IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_CursorPrefetch,
-                     int32, /* ipc_cursor_id */
-                     int32, /* ipc_thread_id */
-                     int32, /* ipc_callbacks_id */
-                     int32) /* n */
+                     int32_t, /* ipc_cursor_id */
+                     int32_t, /* ipc_thread_id */
+                     int32_t, /* ipc_callbacks_id */
+                     int32_t) /* n */
 
 // WebIDBCursor::prefetchReset() message.
 IPC_MESSAGE_CONTROL3(IndexedDBHostMsg_CursorPrefetchReset,
-                     int32, /* ipc_cursor_id */
-                     int32, /* used_prefetches */
-                     int32)  /* used_prefetches */
+                     int32_t, /* ipc_cursor_id */
+                     int32_t, /* used_prefetches */
+                     int32_t) /* used_prefetches */
 
 // WebIDBFactory::getDatabaseNames() message.
 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_FactoryGetDatabaseNames,
@@ -489,9 +491,9 @@
 
 // WebIDBDatabase::deleteObjectStore() message.
 IPC_MESSAGE_CONTROL3(IndexedDBHostMsg_DatabaseDeleteObjectStore,
-                     int32, /* ipc_database_id */
-                     int64, /* transaction_id */
-                     int64) /* object_store_id */
+                     int32_t, /* ipc_database_id */
+                     int64_t, /* transaction_id */
+                     int64_t) /* object_store_id */
 
 // WebIDBDatabase::createTransaction() message.
 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseCreateTransaction,
@@ -499,15 +501,15 @@
 
 // WebIDBDatabase::close() message.
 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseClose,
-                     int32 /* ipc_database_id */)
+                     int32_t /* ipc_database_id */)
 
 // WebIDBDatabase::versionChangeIgnored() message.
 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseVersionChangeIgnored,
-                     int32 /* ipc_database_id */)
+                     int32_t /* ipc_database_id */)
 
 // WebIDBDatabase::~WebIDBDatabase() message.
 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseDestroyed,
-                     int32 /* ipc_database_id */)
+                     int32_t /* ipc_database_id */)
 
 // WebIDBDatabase::get() message.
 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseGet,
@@ -527,10 +529,10 @@
 
 // WebIDBDatabase::setIndexesReady() message.
 IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_DatabaseSetIndexesReady,
-                     int32, /* ipc_database_id */
-                     int64, /* transaction_id */
-                     int64, /* object_store_id */
-                     std::vector<int64>) /* index_ids */
+                     int32_t,              /* ipc_database_id */
+                     int64_t,              /* transaction_id */
+                     int64_t,              /* object_store_id */
+                     std::vector<int64_t>) /* index_ids */
 
 // WebIDBDatabase::openCursor() message.
 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseOpenCursor,
@@ -546,11 +548,11 @@
 
 // WebIDBDatabase::clear() message.
 IPC_MESSAGE_CONTROL5(IndexedDBHostMsg_DatabaseClear,
-                     int32, /* ipc_thread_id */
-                     int32, /* ipc_callbacks_id */
-                     int32, /* ipc_database_id */
-                     int64, /* transaction_id */
-                     int64) /* object_store_id */
+                     int32_t, /* ipc_thread_id */
+                     int32_t, /* ipc_callbacks_id */
+                     int32_t, /* ipc_database_id */
+                     int64_t, /* transaction_id */
+                     int64_t) /* object_store_id */
 
 // WebIDBDatabase::createIndex() message.
 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_DatabaseCreateIndex,
@@ -558,21 +560,21 @@
 
 // WebIDBDatabase::deleteIndex() message.
 IPC_MESSAGE_CONTROL4(IndexedDBHostMsg_DatabaseDeleteIndex,
-                     int32, /* ipc_database_id */
-                     int64, /* transaction_id */
-                     int64, /* object_store_id */
-                     int64) /* index_id */
+                     int32_t, /* ipc_database_id */
+                     int64_t, /* transaction_id */
+                     int64_t, /* object_store_id */
+                     int64_t) /* index_id */
 
 // WebIDBDatabase::abort() message.
 IPC_MESSAGE_CONTROL2(IndexedDBHostMsg_DatabaseAbort,
-                     int32, /* ipc_database_id */
-                     int64) /* transaction_id */
+                     int32_t, /* ipc_database_id */
+                     int64_t) /* transaction_id */
 
 // WebIDBDatabase::commit() message.
 IPC_MESSAGE_CONTROL2(IndexedDBHostMsg_DatabaseCommit,
-                     int32, /* ipc_database_id */
-                     int64) /* transaction_id */
+                     int32_t, /* ipc_database_id */
+                     int64_t) /* transaction_id */
 
 // WebIDBDatabase::~WebIDBCursor() message.
 IPC_MESSAGE_CONTROL1(IndexedDBHostMsg_CursorDestroyed,
-                     int32 /* ipc_cursor_id */)
+                     int32_t /* ipc_cursor_id */)
diff --git a/content/common/input/gesture_event_stream_validator.h b/content/common/input/gesture_event_stream_validator.h
index f5d536f..5d8ae8f3 100644
--- a/content/common/input/gesture_event_stream_validator.h
+++ b/content/common/input/gesture_event_stream_validator.h
@@ -7,7 +7,7 @@
 
 #include <string>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "content/common/content_export.h"
 
 namespace blink {
diff --git a/content/common/input/input_event.h b/content/common/input/input_event.h
index 71a3f2b..ec04a12d 100644
--- a/content/common/input/input_event.h
+++ b/content/common/input/input_event.h
@@ -5,7 +5,7 @@
 #ifndef CONTENT_COMMON_INPUT_INPUT_EVENT_H_
 #define CONTENT_COMMON_INPUT_INPUT_EVENT_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
 #include "content/common/input/scoped_web_input_event.h"
diff --git a/content/common/input/input_event_ack.cc b/content/common/input/input_event_ack.cc
index 5b619113..76ec577 100644
--- a/content/common/input/input_event_ack.cc
+++ b/content/common/input/input_event_ack.cc
@@ -11,26 +11,23 @@
     InputEventAckState state,
     const ui::LatencyInfo& latency,
     scoped_ptr<content::DidOverscrollParams> overscroll,
-    uint32 unique_touch_event_id)
+    uint32_t unique_touch_event_id)
     : type(type),
       state(state),
       latency(latency),
       overscroll(overscroll.Pass()),
-      unique_touch_event_id(unique_touch_event_id) {
-}
+      unique_touch_event_id(unique_touch_event_id) {}
 
 InputEventAck::InputEventAck(blink::WebInputEvent::Type type,
                              InputEventAckState state,
                              const ui::LatencyInfo& latency,
-                             uint32 unique_touch_event_id)
-    : InputEventAck(type, state, latency, nullptr, unique_touch_event_id) {
-}
+                             uint32_t unique_touch_event_id)
+    : InputEventAck(type, state, latency, nullptr, unique_touch_event_id) {}
 
 InputEventAck::InputEventAck(blink::WebInputEvent::Type type,
                              InputEventAckState state,
-                             uint32 unique_touch_event_id)
-    : InputEventAck(type, state, ui::LatencyInfo(), unique_touch_event_id) {
-}
+                             uint32_t unique_touch_event_id)
+    : InputEventAck(type, state, ui::LatencyInfo(), unique_touch_event_id) {}
 
 InputEventAck::InputEventAck(blink::WebInputEvent::Type type,
                              InputEventAckState state)
diff --git a/content/common/input/input_event_ack.h b/content/common/input/input_event_ack.h
index fe80946a..abe9a9539 100644
--- a/content/common/input/input_event_ack.h
+++ b/content/common/input/input_event_ack.h
@@ -5,7 +5,8 @@
 #ifndef CONTENT_COMMON_INPUT_INPUT_EVENT_ACK_H_
 #define CONTENT_COMMON_INPUT_INPUT_EVENT_ACK_H_
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
 #include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
 #include "content/common/input/did_overscroll_params.h"
@@ -21,14 +22,14 @@
                 InputEventAckState state,
                 const ui::LatencyInfo& latency,
                 scoped_ptr<content::DidOverscrollParams> overscroll,
-                uint32 unique_touch_event_id);
+                uint32_t unique_touch_event_id);
   InputEventAck(blink::WebInputEvent::Type type,
                 InputEventAckState state,
                 const ui::LatencyInfo& latency,
-                uint32 unique_touch_event_id);
+                uint32_t unique_touch_event_id);
   InputEventAck(blink::WebInputEvent::Type type,
                 InputEventAckState state,
-                uint32 unique_touch_event_id);
+                uint32_t unique_touch_event_id);
   InputEventAck(blink::WebInputEvent::Type type, InputEventAckState state);
   InputEventAck();
   ~InputEventAck();
@@ -37,7 +38,7 @@
   InputEventAckState state;
   ui::LatencyInfo latency;
   scoped_ptr<content::DidOverscrollParams> overscroll;
-  uint32 unique_touch_event_id;
+  uint32_t unique_touch_event_id;
 };
 
 }  // namespace content
diff --git a/content/common/input/input_event_stream_validator.h b/content/common/input/input_event_stream_validator.h
index 60435b7..e2d726e 100644
--- a/content/common/input/input_event_stream_validator.h
+++ b/content/common/input/input_event_stream_validator.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "content/common/input/gesture_event_stream_validator.h"
 #include "content/common/input/touch_event_stream_validator.h"
 
diff --git a/content/common/input/input_param_traits_unittest.cc b/content/common/input/input_param_traits_unittest.cc
index 238aff7c..11c397e 100644
--- a/content/common/input/input_param_traits_unittest.cc
+++ b/content/common/input/input_param_traits_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "content/common/input/input_param_traits.h"
 
+#include <stddef.h>
+
 #include "content/common/input/input_event.h"
 #include "content/common/input/synthetic_gesture_params.h"
 #include "content/common/input/synthetic_pinch_gesture_params.h"
diff --git a/content/common/input/scoped_web_input_event.h b/content/common/input/scoped_web_input_event.h
index e25cc0c8..d12b1a7d 100644
--- a/content/common/input/scoped_web_input_event.h
+++ b/content/common/input/scoped_web_input_event.h
@@ -5,7 +5,6 @@
 #ifndef CONTENT_COMMON_INPUT_SCOPED_WEB_INPUT_EVENT_H_
 #define CONTENT_COMMON_INPUT_SCOPED_WEB_INPUT_EVENT_H_
 
-#include "base/basictypes.h"
 #include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
 
diff --git a/content/common/input/synthetic_gesture_packet.h b/content/common/input/synthetic_gesture_packet.h
index e87205c8..f1dd35b 100644
--- a/content/common/input/synthetic_gesture_packet.h
+++ b/content/common/input/synthetic_gesture_packet.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_COMMON_INPUT_SYNTHETIC_GESTURE_PACKET_H_
 #define CONTENT_COMMON_INPUT_SYNTHETIC_GESTURE_PACKET_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "content/common/content_export.h"
 #include "content/common/input/synthetic_gesture_params.h"
diff --git a/content/common/input/synthetic_gesture_params.cc b/content/common/input/synthetic_gesture_params.cc
index aff9e96..2123bde 100644
--- a/content/common/input/synthetic_gesture_params.cc
+++ b/content/common/input/synthetic_gesture_params.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 "content/common/input/synthetic_gesture_params.h"
 
 namespace content {
diff --git a/content/common/input/touch_event_stream_validator.h b/content/common/input/touch_event_stream_validator.h
index 95bc1062..7cd6aa02 100644
--- a/content/common/input/touch_event_stream_validator.h
+++ b/content/common/input/touch_event_stream_validator.h
@@ -7,7 +7,7 @@
 
 #include <string>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "content/common/content_export.h"
 #include "third_party/WebKit/public/web/WebInputEvent.h"
 
diff --git a/content/common/input/touch_event_stream_validator_unittest.cc b/content/common/input/touch_event_stream_validator_unittest.cc
index 5e3b767..b366d20 100644
--- a/content/common/input/touch_event_stream_validator_unittest.cc
+++ b/content/common/input/touch_event_stream_validator_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "content/common/input/touch_event_stream_validator.h"
 
+#include <stddef.h>
+
 #include "content/common/input/synthetic_web_input_event_builders.h"
 #include "content/common/input/web_touch_event_traits.h"
 #include "testing/gtest/include/gtest/gtest.h"
diff --git a/content/common/input/web_input_event_traits.cc b/content/common/input/web_input_event_traits.cc
index 2d98dcdb..89db9339 100644
--- a/content/common/input/web_input_event_traits.cc
+++ b/content/common/input/web_input_event_traits.cc
@@ -492,7 +492,8 @@
   }
 }
 
-uint32 WebInputEventTraits::GetUniqueTouchEventId(const WebInputEvent& event) {
+uint32_t WebInputEventTraits::GetUniqueTouchEventId(
+    const WebInputEvent& event) {
   if (WebInputEvent::isTouchEventType(event.type)) {
     return static_cast<const WebTouchEvent&>(event).uniqueTouchEventId;
   }
diff --git a/content/common/input/web_input_event_traits.h b/content/common/input/web_input_event_traits.h
index c6fa837d..008439c 100644
--- a/content/common/input/web_input_event_traits.h
+++ b/content/common/input/web_input_event_traits.h
@@ -5,9 +5,11 @@
 #ifndef CONTENT_COMMON_INPUT_WEB_INPUT_EVENT_TRAITS_H_
 #define CONTENT_COMMON_INPUT_WEB_INPUT_EVENT_TRAITS_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <string>
 
-#include "base/basictypes.h"
 #include "content/common/input/scoped_web_input_event.h"
 #include "third_party/WebKit/public/web/WebInputEvent.h"
 
@@ -28,7 +30,7 @@
   static bool WillReceiveAckFromRenderer(const blink::WebInputEvent& event);
 
   // Return uniqueTouchEventId for WebTouchEvent, otherwise return 0.
-  static uint32 GetUniqueTouchEventId(const blink::WebInputEvent& event);
+  static uint32_t GetUniqueTouchEventId(const blink::WebInputEvent& event);
 };
 
 }  // namespace content
diff --git a/content/common/input/web_touch_event_traits.cc b/content/common/input/web_touch_event_traits.cc
index 1a16106..175bf78 100644
--- a/content/common/input/web_touch_event_traits.cc
+++ b/content/common/input/web_touch_event_traits.cc
@@ -4,6 +4,8 @@
 
 #include "content/common/input/web_touch_event_traits.h"
 
+#include <stddef.h>
+
 #include "base/logging.h"
 
 using blink::WebInputEvent;
diff --git a/content/common/input/web_touch_event_traits.h b/content/common/input/web_touch_event_traits.h
index a29c070..33ac8c7f 100644
--- a/content/common/input/web_touch_event_traits.h
+++ b/content/common/input/web_touch_event_traits.h
@@ -5,7 +5,6 @@
 #ifndef CONTENT_COMMON_INPUT_WEB_TOUCH_EVENT_TRAITS_H_
 #define CONTENT_COMMON_INPUT_WEB_TOUCH_EVENT_TRAITS_H_
 
-#include "base/basictypes.h"
 #include "content/common/input/scoped_web_input_event.h"
 #include "third_party/WebKit/public/web/WebInputEvent.h"
 
diff --git a/content/common/input_messages.h b/content/common/input_messages.h
index 4baf8a864..a511d018 100644
--- a/content/common/input_messages.h
+++ b/content/common/input_messages.h
@@ -7,6 +7,7 @@
 // Multiply-included message file, hence no include guard.
 
 #include "base/strings/string16.h"
+#include "build/build_config.h"
 #include "content/common/content_export.h"
 #include "content/common/content_param_traits.h"
 #include "content/common/edit_command.h"
diff --git a/content/common/inter_process_time_ticks_converter.cc b/content/common/inter_process_time_ticks_converter.cc
index e0c12e2..d963ead 100644
--- a/content/common/inter_process_time_ticks_converter.cc
+++ b/content/common/inter_process_time_ticks_converter.cc
@@ -16,8 +16,8 @@
     const RemoteTimeTicks& remote_upper_bound)
     : remote_lower_bound_(remote_lower_bound.value_),
       remote_upper_bound_(remote_upper_bound.value_) {
-  int64 target_range = local_upper_bound.value_ - local_lower_bound.value_;
-  int64 source_range = remote_upper_bound.value_ - remote_lower_bound.value_;
+  int64_t target_range = local_upper_bound.value_ - local_lower_bound.value_;
+  int64_t source_range = remote_upper_bound.value_ - remote_lower_bound.value_;
   DCHECK_GE(target_range, 0);
   DCHECK_GE(source_range, 0);
   if (source_range <= target_range) {
@@ -65,7 +65,7 @@
   return LocalTimeDelta(Convert(remote_delta.value_));
 }
 
-int64 InterProcessTimeTicksConverter::Convert(int64 value) const {
+int64_t InterProcessTimeTicksConverter::Convert(int64_t value) const {
   if (value <= 0) {
     return value;
   }
diff --git a/content/common/inter_process_time_ticks_converter.h b/content/common/inter_process_time_ticks_converter.h
index 8b00540..f21ddc8 100644
--- a/content/common/inter_process_time_ticks_converter.h
+++ b/content/common/inter_process_time_ticks_converter.h
@@ -5,6 +5,8 @@
 #ifndef CONTENT_COMMON_INTER_PROCESS_TIME_TICKS_CONVERTER_H_
 #define CONTENT_COMMON_INTER_PROCESS_TIME_TICKS_CONVERTER_H_
 
+#include <stdint.h>
+
 #include "base/time/time.h"
 #include "content/common/content_export.h"
 
@@ -72,16 +74,16 @@
   base::TimeDelta GetSkewForMetrics() const;
 
  private:
-  int64 Convert(int64 value) const;
+  int64_t Convert(int64_t value) const;
 
   // The local time which |remote_lower_bound_| is mapped to.
-  int64 local_base_time_;
+  int64_t local_base_time_;
 
-  int64 numerator_;
-  int64 denominator_;
+  int64_t numerator_;
+  int64_t denominator_;
 
-  int64 remote_lower_bound_;
-  int64 remote_upper_bound_;
+  int64_t remote_lower_bound_;
+  int64_t remote_upper_bound_;
 };
 
 class CONTENT_EXPORT LocalTimeDelta {
@@ -114,9 +116,9 @@
  private:
   friend class InterProcessTimeTicksConverter;
 
-  LocalTimeTicks(int64 value) : value_(value) {}
+  LocalTimeTicks(int64_t value) : value_(value) {}
 
-  int64 value_;
+  int64_t value_;
 };
 
 class CONTENT_EXPORT RemoteTimeDelta {
@@ -147,9 +149,9 @@
  private:
   friend class InterProcessTimeTicksConverter;
 
-  RemoteTimeTicks(int64 value) : value_(value) {}
+  RemoteTimeTicks(int64_t value) : value_(value) {}
 
-  int64 value_;
+  int64_t value_;
 };
 
 }  // namespace content
diff --git a/content/common/inter_process_time_ticks_converter_unittest.cc b/content/common/inter_process_time_ticks_converter_unittest.cc
index ed2791b..e098bda 100644
--- a/content/common/inter_process_time_ticks_converter_unittest.cc
+++ b/content/common/inter_process_time_ticks_converter_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "content/common/inter_process_time_ticks_converter.h"
 
+#include <stdint.h>
+
 #include "base/time/time.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
@@ -14,19 +16,19 @@
 namespace {
 
 struct TestParams {
-  int64 local_lower_bound;
-  int64 remote_lower_bound;
-  int64 remote_upper_bound;
-  int64 local_upper_bound;
-  int64 test_time;
-  int64 test_delta;
+  int64_t local_lower_bound;
+  int64_t remote_lower_bound;
+  int64_t remote_upper_bound;
+  int64_t local_upper_bound;
+  int64_t test_time;
+  int64_t test_delta;
 };
 
 struct TestResults {
-  int64 result_time;
-  int32 result_delta;
+  int64_t result_time;
+  int32_t result_delta;
   bool is_skew_additive;
-  int64 skew;
+  int64_t skew;
 };
 
 TestResults RunTest(const TestParams& params) {
diff --git a/content/common/mac/font_loader.mm b/content/common/mac/font_loader.mm
index a533cf2..4ce63597 100644
--- a/content/common/mac/font_loader.mm
+++ b/content/common/mac/font_loader.mm
@@ -8,7 +8,6 @@
 
 #include <limits>
 
-#include "base/basictypes.h"
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
 #include "base/logging.h"
diff --git a/content/common/media/audio_messages.h b/content/common/media/audio_messages.h
index 7ce1167..35e159c 100644
--- a/content/common/media/audio_messages.h
+++ b/content/common/media/audio_messages.h
@@ -5,9 +5,10 @@
 // IPC messages for the audio.
 // Multiply-included message file, hence no include guard.
 
+#include <stdint.h>
+
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/memory/shared_memory.h"
 #include "base/sync_socket.h"
 #include "content/common/content_export.h"
@@ -39,7 +40,7 @@
 IPC_STRUCT_BEGIN(AudioInputHostMsg_CreateStream_Config)
   IPC_STRUCT_MEMBER(media::AudioParameters, params)
   IPC_STRUCT_MEMBER(bool, automatic_gain_control)
-  IPC_STRUCT_MEMBER(uint32, shared_memory_count)
+  IPC_STRUCT_MEMBER(uint32_t, shared_memory_count)
 IPC_STRUCT_END()
 
 // Messages sent from the browser to the renderer.
@@ -58,22 +59,22 @@
 // it uses to communicate with the browser process about the state of the
 // buffered audio data.
 IPC_MESSAGE_CONTROL4(
-   AudioMsg_NotifyStreamCreated,
-   int /* stream id */,
-   base::SharedMemoryHandle /* handle */,
-   base::SyncSocket::TransitDescriptor /* socket descriptor */,
-   uint32 /* length */)
+    AudioMsg_NotifyStreamCreated,
+    int /* stream id */,
+    base::SharedMemoryHandle /* handle */,
+    base::SyncSocket::TransitDescriptor /* socket descriptor */,
+    uint32_t /* length */)
 
 // Tell the renderer process that an audio input stream has been created.
 // The renderer process would be given a SyncSocket that it should read
 // from from then on. It is also given number of segments in shared memory.
 IPC_MESSAGE_CONTROL5(
-   AudioInputMsg_NotifyStreamCreated,
-   int /* stream id */,
-   base::SharedMemoryHandle /* handle */,
-   base::SyncSocket::TransitDescriptor /* socket descriptor */,
-   uint32 /* length */,
-   uint32 /* segment count */)
+    AudioInputMsg_NotifyStreamCreated,
+    int /* stream id */,
+    base::SharedMemoryHandle /* handle */,
+    base::SyncSocket::TransitDescriptor /* socket descriptor */,
+    uint32_t /* length */,
+    uint32_t /* segment count */)
 
 // Notification message sent from AudioRendererHost to renderer for state
 // update after the renderer has requested a Create/Start/Close.
diff --git a/content/common/media/cdm_messages.h b/content/common/media/cdm_messages.h
index ed43bee..97841fe 100644
--- a/content/common/media/cdm_messages.h
+++ b/content/common/media/cdm_messages.h
@@ -5,10 +5,11 @@
 // IPC messages for content decryption module (CDM) implementation.
 // Multiply-included message file, hence no include guard.
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "content/common/content_export.h"
 #include "content/common/media/cdm_messages_enums.h"
 #include "ipc/ipc_message_macros.h"
diff --git a/content/common/media/media_player_messages_android.h b/content/common/media/media_player_messages_android.h
index 3d140f5..7482670 100644
--- a/content/common/media/media_player_messages_android.h
+++ b/content/common/media/media_player_messages_android.h
@@ -5,7 +5,6 @@
 // IPC messages for android media player.
 // Multiply-included message file, hence no include guard.
 
-#include "base/basictypes.h"
 #include "base/time/time.h"
 #include "content/common/content_export.h"
 #include "content/common/media/media_player_messages_enums_android.h"
diff --git a/content/common/media/media_session_messages_android.h b/content/common/media/media_session_messages_android.h
index 3ea4a7e..18a63844 100644
--- a/content/common/media/media_session_messages_android.h
+++ b/content/common/media/media_session_messages_android.h
@@ -5,7 +5,6 @@
 // IPC messages for the Media Session API.
 // Multiply-included message file, hence no include guard.
 
-#include "base/basictypes.h"
 #include "content/common/android/gin_java_bridge_errors.h"
 #include "content/common/content_export.h"
 #include "ipc/ipc_message_macros.h"
diff --git a/content/common/media/media_stream_track_metrics_host_messages.h b/content/common/media/media_stream_track_metrics_host_messages.h
index a7ec075..cfee0419 100644
--- a/content/common/media/media_stream_track_metrics_host_messages.h
+++ b/content/common/media/media_stream_track_metrics_host_messages.h
@@ -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/values.h"
 #include "content/common/content_export.h"
 #include "ipc/ipc_message_macros.h"
@@ -12,8 +14,7 @@
 
 // Messages sent to MediaStreamTrackMetricsHost.
 IPC_MESSAGE_CONTROL3(MediaStreamTrackMetricsHost_AddTrack,
-                     uint64 /* id */,
+                     uint64_t /* id */,
                      bool /* is_audio */,
                      bool /* is_remote */)
-IPC_MESSAGE_CONTROL1(MediaStreamTrackMetricsHost_RemoveTrack,
-                     uint64 /* id */)
+IPC_MESSAGE_CONTROL1(MediaStreamTrackMetricsHost_RemoveTrack, uint64_t /* id */)
diff --git a/content/common/media/midi_messages.h b/content/common/media/midi_messages.h
index 14ac45d7..504b3956 100644
--- a/content/common/media/midi_messages.h
+++ b/content/common/media/midi_messages.h
@@ -5,7 +5,8 @@
 // IPC messages for access to MIDI hardware.
 // Multiply-included message file, hence no include guard.
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
 #include "content/common/content_export.h"
 #include "ipc/ipc_message_macros.h"
 #include "ipc/param_traits_macros.h"
@@ -36,8 +37,8 @@
 IPC_MESSAGE_CONTROL0(MidiHostMsg_StartSession)
 
 IPC_MESSAGE_CONTROL3(MidiHostMsg_SendData,
-                     uint32 /* port */,
-                     std::vector<uint8> /* data */,
+                     uint32_t /* port */,
+                     std::vector<uint8_t> /* data */,
                      double /* timestamp */)
 
 IPC_MESSAGE_CONTROL0(MidiHostMsg_EndSession)
@@ -51,19 +52,18 @@
                      media::midi::MidiPortInfo /* output port */)
 
 IPC_MESSAGE_CONTROL2(MidiMsg_SetInputPortState,
-                     uint32 /* port */,
+                     uint32_t /* port */,
                      media::midi::MidiPortState /* state */)
 
 IPC_MESSAGE_CONTROL2(MidiMsg_SetOutputPortState,
-                     uint32 /* port */,
+                     uint32_t /* port */,
                      media::midi::MidiPortState /* state */)
 
 IPC_MESSAGE_CONTROL1(MidiMsg_SessionStarted, media::midi::Result /* result */)
 
 IPC_MESSAGE_CONTROL3(MidiMsg_DataReceived,
-                     uint32 /* port */,
-                     std::vector<uint8> /* data */,
+                     uint32_t /* port */,
+                     std::vector<uint8_t> /* data */,
                      double /* timestamp */)
 
-IPC_MESSAGE_CONTROL1(MidiMsg_AcknowledgeSentData,
-                     uint32 /* bytes sent */)
+IPC_MESSAGE_CONTROL1(MidiMsg_AcknowledgeSentData, uint32_t /* bytes sent */)
diff --git a/content/common/message_port_messages.h b/content/common/message_port_messages.h
index d2c6fb8e..fc5e95e1 100644
--- a/content/common/message_port_messages.h
+++ b/content/common/message_port_messages.h
@@ -11,7 +11,6 @@
 #include <utility>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/strings/string16.h"
 #include "content/common/content_export.h"
 #include "content/public/common/message_port_types.h"
diff --git a/content/common/message_router.cc b/content/common/message_router.cc
index aeef5bc..ac6361e 100644
--- a/content/common/message_router.cc
+++ b/content/common/message_router.cc
@@ -26,7 +26,7 @@
   return false;
 }
 
-bool MessageRouter::AddRoute(int32 routing_id, IPC::Listener* listener) {
+bool MessageRouter::AddRoute(int32_t routing_id, IPC::Listener* listener) {
   if (routes_.Lookup(routing_id)) {
     DLOG(ERROR) << "duplicate routing ID";
     return false;
@@ -35,7 +35,7 @@
   return true;
 }
 
-void MessageRouter::RemoveRoute(int32 routing_id) {
+void MessageRouter::RemoveRoute(int32_t routing_id) {
   routes_.Remove(routing_id);
 }
 
diff --git a/content/common/message_router.h b/content/common/message_router.h
index 3df9bd5..fea7325 100644
--- a/content/common/message_router.h
+++ b/content/common/message_router.h
@@ -5,7 +5,10 @@
 #ifndef CONTENT_COMMON_MESSAGE_ROUTER_H_
 #define CONTENT_COMMON_MESSAGE_ROUTER_H_
 
+#include <stdint.h>
+
 #include "base/id_map.h"
+#include "base/macros.h"
 #include "content/common/content_export.h"
 #include "ipc/ipc_listener.h"
 #include "ipc/ipc_sender.h"
@@ -51,10 +54,10 @@
 
   // Called to add a listener for a particular message routing ID.
   // Returns true if succeeded.
-  bool AddRoute(int32 routing_id, IPC::Listener* listener);
+  bool AddRoute(int32_t routing_id, IPC::Listener* listener);
 
   // Called to remove a listener for a particular message routing ID.
-  void RemoveRoute(int32 routing_id);
+  void RemoveRoute(int32_t routing_id);
 
  private:
   // A list of all listeners with assigned routing IDs.
diff --git a/content/common/mojo/channel_init.h b/content/common/mojo/channel_init.h
index 5ce96db..acdc575 100644
--- a/content/common/mojo/channel_init.h
+++ b/content/common/mojo/channel_init.h
@@ -6,6 +6,7 @@
 #define CONTENT_COMMON_MOJO_CHANNEL_INIT_H_
 
 #include "base/files/file.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
 #include "content/common/content_export.h"
diff --git a/content/common/mojo/mojo_messages.h b/content/common/mojo/mojo_messages.h
index c7fab2b1..4ed55364 100644
--- a/content/common/mojo/mojo_messages.h
+++ b/content/common/mojo/mojo_messages.h
@@ -5,7 +5,6 @@
 // IPC messages for mojo.
 // Multiply-included message file, hence no include guard.
 
-#include "base/basictypes.h"
 #include "content/common/content_export.h"
 #include "content/public/common/common_param_traits.h"
 #include "ipc/ipc_message_macros.h"
diff --git a/content/common/navigation_params.cc b/content/common/navigation_params.cc
index a9c6219eb..da6f5901 100644
--- a/content/common/navigation_params.cc
+++ b/content/common/navigation_params.cc
@@ -4,6 +4,7 @@
 
 #include "content/common/navigation_params.h"
 
+#include "build/build_config.h"
 #include "content/common/service_worker/service_worker_types.h"
 #include "content/public/common/browser_side_navigation_policy.h"
 
@@ -135,7 +136,7 @@
     bool can_load_local_resources,
     base::Time request_time,
     const PageState& page_state,
-    int32 page_id,
+    int32_t page_id,
     int nav_entry_id,
     bool is_same_document_history_load,
     bool has_committed_real_load,
diff --git a/content/common/navigation_params.h b/content/common/navigation_params.h
index f43bbd4..414319d 100644
--- a/content/common/navigation_params.h
+++ b/content/common/navigation_params.h
@@ -5,10 +5,12 @@
 #ifndef CONTENT_COMMON_NAVIGATION_PARAMS_H_
 #define CONTENT_COMMON_NAVIGATION_PARAMS_H_
 
+#include <stdint.h>
+
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/time/time.h"
+#include "build/build_config.h"
 #include "content/common/content_export.h"
 #include "content/common/frame_message_enums.h"
 #include "content/public/common/page_state.h"
@@ -212,7 +214,7 @@
                           bool can_load_local_resources,
                           base::Time request_time,
                           const PageState& page_state,
-                          int32 page_id,
+                          int32_t page_id,
                           int nav_entry_id,
                           bool is_same_document_history_load,
                           bool has_committed_real_load,
@@ -247,7 +249,7 @@
   // Forward, and Reload navigations should have a valid page_id.  If the load
   // succeeds, then this page_id will be reflected in the resultant
   // FrameHostMsg_DidCommitProvisionalLoad message.
-  int32 page_id;
+  int32_t page_id;
 
   // For browser-initiated navigations, this is the unique id of the
   // NavigationEntry being navigated to. (For renderer-initiated navigations it
diff --git a/content/common/notification_constants.h b/content/common/notification_constants.h
index 7b3f4f1a..6ca8ad62 100644
--- a/content/common/notification_constants.h
+++ b/content/common/notification_constants.h
@@ -5,6 +5,8 @@
 #ifndef CONTENT_COMMON_NOTIFICATION_CONSTANTS_H_
 #define CONTENT_COMMON_NOTIFICATION_CONSTANTS_H_
 
+#include <stddef.h>
+
 namespace content {
 
 // Maximum number of actions on a Platform Notification.
diff --git a/content/common/one_writer_seqlock.h b/content/common/one_writer_seqlock.h
index af476efe..e301e84 100644
--- a/content/common/one_writer_seqlock.h
+++ b/content/common/one_writer_seqlock.h
@@ -6,6 +6,7 @@
 #define CONTENT_COMMON_ONE_WRITER_SEQLOCK_H_
 
 #include "base/atomicops.h"
+#include "base/macros.h"
 #include "base/threading/platform_thread.h"
 #include "content/common/content_export.h"
 
diff --git a/content/common/one_writer_seqlock_unittest.cc b/content/common/one_writer_seqlock_unittest.cc
index a72ab5d..8e69812c 100644
--- a/content/common/one_writer_seqlock_unittest.cc
+++ b/content/common/one_writer_seqlock_unittest.cc
@@ -7,6 +7,7 @@
 #include <stdlib.h>
 
 #include "base/atomic_ref_count.h"
+#include "base/macros.h"
 #include "base/third_party/dynamic_annotations/dynamic_annotations.h"
 #include "base/threading/platform_thread.h"
 #include "testing/gtest/include/gtest/gtest.h"
diff --git a/content/common/origin_util.cc b/content/common/origin_util.cc
index d1e5bf0c..9c6b631 100644
--- a/content/common/origin_util.cc
+++ b/content/common/origin_util.cc
@@ -5,6 +5,7 @@
 #include "content/public/common/origin_util.h"
 
 #include "base/lazy_instance.h"
+#include "base/macros.h"
 #include "base/stl_util.h"
 #include "content/public/common/content_client.h"
 #include "net/base/net_util.h"
diff --git a/content/common/origin_util_unittest.cc b/content/common/origin_util_unittest.cc
index 49598f65..3c2328b 100644
--- a/content/common/origin_util_unittest.cc
+++ b/content/common/origin_util_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 "content/public/common/origin_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "url/gurl.h"
diff --git a/content/common/p2p_messages.h b/content/common/p2p_messages.h
index d5ee30e..24daee5 100644
--- a/content/common/p2p_messages.h
+++ b/content/common/p2p_messages.h
@@ -5,6 +5,8 @@
 // IPC messages for the P2P Transport API.
 // Multiply-included message file, hence no include guard.
 
+#include <stdint.h>
+
 #include "base/time/time.h"
 #include "content/common/content_export.h"
 #include "content/common/p2p_socket_type.h"
@@ -64,7 +66,7 @@
                      net::IPAddressNumber /* default_ipv6_local_address */)
 
 IPC_MESSAGE_CONTROL2(P2PMsg_GetHostAddressResult,
-                     int32 /* request_id */,
+                     int32_t /* request_id */,
                      net::IPAddressList /* address list*/)
 
 IPC_MESSAGE_CONTROL3(P2PMsg_OnSocketCreated,
@@ -98,8 +100,8 @@
 IPC_MESSAGE_CONTROL0(P2PHostMsg_StopNetworkNotifications)
 
 IPC_MESSAGE_CONTROL2(P2PHostMsg_GetHostAddress,
-                    std::string /* host_name */,
-                    int32 /* request_id */)
+                     std::string /* host_name */,
+                     int32_t /* request_id */)
 
 IPC_MESSAGE_CONTROL4(P2PHostMsg_CreateSocket,
                      content::P2PSocketType /* type */,
@@ -118,7 +120,7 @@
                      net::IPEndPoint /* socket_address */,
                      std::vector<char> /* data */,
                      rtc::PacketOptions /* packet options */,
-                     uint64 /* packet_id */)
+                     uint64_t /* packet_id */)
 
 IPC_MESSAGE_CONTROL1(P2PHostMsg_DestroySocket,
                      int /* socket_id */)
diff --git a/content/common/p2p_socket_type.h b/content/common/p2p_socket_type.h
index 06c879a..0de0e20a 100644
--- a/content/common/p2p_socket_type.h
+++ b/content/common/p2p_socket_type.h
@@ -8,6 +8,8 @@
 #ifndef CONTENT_COMMON_P2P_SOCKET_TYPE_H_
 #define CONTENT_COMMON_P2P_SOCKET_TYPE_H_
 
+#include <stdint.h>
+
 #include <string>
 
 #include "base/time/time.h"
diff --git a/content/common/page_state_serialization.cc b/content/common/page_state_serialization.cc
index 73743f78..53ddf09 100644
--- a/content/common/page_state_serialization.cc
+++ b/content/common/page_state_serialization.cc
@@ -4,6 +4,8 @@
 
 #include "content/common/page_state_serialization.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 #include <limits>
 
@@ -11,6 +13,7 @@
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "ui/gfx/screen.h"
 
 namespace content {
@@ -234,12 +237,12 @@
   return 0;
 }
 
-void WriteInteger64(int64 data, SerializeObject* obj) {
+void WriteInteger64(int64_t data, SerializeObject* obj) {
   obj->pickle.WriteInt64(data);
 }
 
-int64 ReadInteger64(SerializeObject* obj) {
-  int64 tmp = 0;
+int64_t ReadInteger64(SerializeObject* obj) {
+  int64_t tmp = 0;
   if (obj->iter.ReadInt64(&tmp))
     return tmp;
   obj->parse_error = true;
@@ -446,15 +449,15 @@
       }
     } else if (type == blink::WebHTTPBody::Element::TypeFile) {
       base::NullableString16 file_path = ReadString(obj);
-      int64 file_start = ReadInteger64(obj);
-      int64 file_length = ReadInteger64(obj);
+      int64_t file_start = ReadInteger64(obj);
+      int64_t file_length = ReadInteger64(obj);
       double file_modification_time = ReadReal(obj);
       AppendFileRangeToHttpBody(http_body, file_path, file_start, file_length,
                                 file_modification_time);
     } else if (type == blink::WebHTTPBody::Element::TypeFileSystemURL) {
       GURL url = ReadGURL(obj);
-      int64 file_start = ReadInteger64(obj);
-      int64 file_length = ReadInteger64(obj);
+      int64_t file_start = ReadInteger64(obj);
+      int64_t file_length = ReadInteger64(obj);
       double file_modification_time = ReadReal(obj);
       AppendURLRangeToHttpBody(http_body, url, file_start, file_length,
                                file_modification_time);
diff --git a/content/common/page_state_serialization.h b/content/common/page_state_serialization.h
index 226aa04..9b6773c 100644
--- a/content/common/page_state_serialization.h
+++ b/content/common/page_state_serialization.h
@@ -5,9 +5,12 @@
 #ifndef CONTENT_COMMON_PAGE_STATE_SERIALIZATION_H_
 #define CONTENT_COMMON_PAGE_STATE_SERIALIZATION_H_
 
+#include <stdint.h>
+
 #include <vector>
 
 #include "base/strings/nullable_string16.h"
+#include "build/build_config.h"
 #include "content/common/content_export.h"
 #include "third_party/WebKit/public/platform/WebHTTPBody.h"
 #include "third_party/WebKit/public/platform/WebHistoryScrollRestorationType.h"
@@ -23,8 +26,8 @@
   std::string data;
   base::NullableString16 file_path;
   GURL filesystem_url;
-  int64 file_start;
-  int64 file_length;
+  int64_t file_start;
+  int64_t file_length;
   double file_modification_time;
   std::string blob_uuid;
 
@@ -35,7 +38,7 @@
 struct CONTENT_EXPORT ExplodedHttpBody {
   base::NullableString16 http_content_type;
   std::vector<ExplodedHttpBodyElement> elements;
-  int64 identifier;
+  int64_t identifier;
   bool contains_passwords;
   bool is_null;
 
@@ -52,8 +55,8 @@
   blink::WebHistoryScrollRestorationType scroll_restoration_type;
   gfx::PointF visual_viewport_scroll_offset;
   gfx::Point scroll_offset;
-  int64 item_sequence_number;
-  int64 document_sequence_number;
+  int64_t item_sequence_number;
+  int64_t document_sequence_number;
   double page_scale_factor;
   blink::WebReferrerPolicy referrer_policy;
   ExplodedHttpBody http_body;
diff --git a/content/common/page_state_serialization_unittest.cc b/content/common/page_state_serialization_unittest.cc
index f660fc2..dbf845b 100644
--- a/content/common/page_state_serialization_unittest.cc
+++ b/content/common/page_state_serialization_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 <cmath>
 
 #include "base/base64.h"
@@ -11,6 +13,7 @@
 #include "base/strings/string_util.h"
 #include "base/strings/stringprintf.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "content/common/page_state_serialization.h"
 #include "content/public/common/content_paths.h"
 #include "testing/gtest/include/gtest/gtest.h"
diff --git a/content/common/pepper_plugin_list.cc b/content/common/pepper_plugin_list.cc
index 02fbaee..ea24ff7 100644
--- a/content/common/pepper_plugin_list.cc
+++ b/content/common/pepper_plugin_list.cc
@@ -4,12 +4,15 @@
 
 #include "content/common/pepper_plugin_list.h"
 
-#include "base/basictypes.h"
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/command_line.h"
 #include "base/files/file_util.h"
 #include "base/strings/string_split.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "content/public/common/content_client.h"
 #include "content/public/common/content_switches.h"
 #include "content/public/common/pepper_plugin_info.h"
@@ -30,7 +33,7 @@
   // existence in subsequent calls if the flag is set.
   // NOTE: In theory we could have unlimited number of plugins registered in
   // command line. But in practice, 64 plugins should be more than enough.
-  static uint64 skip_file_check_flags = 0;
+  static uint64_t skip_file_check_flags = 0;
   static_assert(
       kMaxPluginsToRegisterFromCommandLine <= sizeof(skip_file_check_flags) * 8,
       "max plugins to register from command line exceeds limit");
@@ -85,7 +88,7 @@
     plugin.path = base::FilePath(name_parts[0]);
 #endif
 
-    uint64 index_mask = 1ULL << i;
+    uint64_t index_mask = 1ULL << i;
     if (!(skip_file_check_flags & index_mask)) {
       if (base::PathExists(plugin.path)) {
         skip_file_check_flags |= index_mask;
diff --git a/content/common/plugin_constants_win.h b/content/common/plugin_constants_win.h
index 49920f4..2269592 100644
--- a/content/common/plugin_constants_win.h
+++ b/content/common/plugin_constants_win.h
@@ -6,6 +6,7 @@
 #define CONTENT_COMMON_PLUGIN_CONSTANTS_WIN_H_
 
 #include "base/strings/string16.h"
+#include "build/build_config.h"
 
 #if !defined(OS_WIN)
 #error "Windows-only header"
diff --git a/content/common/plugin_list.cc b/content/common/plugin_list.cc
index c162727..8043881 100644
--- a/content/common/plugin_list.cc
+++ b/content/common/plugin_list.cc
@@ -4,6 +4,8 @@
 
 #include "content/common/plugin_list.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 
 #include "base/command_line.h"
@@ -13,6 +15,7 @@
 #include "base/strings/string_util.h"
 #include "base/strings/sys_string_conversions.h"
 #include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
 #include "content/public/common/content_switches.h"
 #include "net/base/mime_util.h"
 #include "url/gurl.h"
diff --git a/content/common/plugin_list.h b/content/common/plugin_list.h
index 26a2aa64..0b31ab0d 100644
--- a/content/common/plugin_list.h
+++ b/content/common/plugin_list.h
@@ -10,11 +10,12 @@
 #include <utility>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
 #include "base/files/file_path.h"
 #include "base/lazy_instance.h"
+#include "base/macros.h"
 #include "base/synchronization/lock.h"
+#include "build/build_config.h"
 #include "content/common/content_export.h"
 #include "content/public/common/webplugininfo.h"
 
diff --git a/content/common/plugin_list_win.cc b/content/common/plugin_list_win.cc
index 4b20953..e96cc056 100644
--- a/content/common/plugin_list_win.cc
+++ b/content/common/plugin_list_win.cc
@@ -4,9 +4,10 @@
 
 #include "content/common/plugin_list.h"
 
+#include <stddef.h>
+
 #include <set>
 
-#include "base/basictypes.h"
 #include "base/file_version_info.h"
 #include "base/file_version_info_win.h"
 #include "base/files/file_util.h"
@@ -21,6 +22,7 @@
 #include "base/win/registry.h"
 #include "base/win/scoped_handle.h"
 #include "base/win/windows_version.h"
+#include "build/build_config.h"
 #include "content/common/plugin_constants_win.h"
 
 namespace content {
diff --git a/content/common/plugin_process_messages.h b/content/common/plugin_process_messages.h
index c21186b..a815b55 100644
--- a/content/common/plugin_process_messages.h
+++ b/content/common/plugin_process_messages.h
@@ -4,6 +4,8 @@
 //
 // Multiply-included message file, hence no include guard.
 
+#include <stdint.h>
+
 #include "build/build_config.h"
 #include "content/common/content_export.h"
 #include "content/common/content_param_traits.h"
@@ -38,9 +40,8 @@
 
 IPC_MESSAGE_CONTROL3(PluginProcessMsg_ClearSiteData,
                      std::string /* site */,
-                     uint64 /* flags */,
-                     uint64 /* max_age */)
-
+                     uint64_t /* flags */,
+                     uint64_t /* max_age */)
 
 //-----------------------------------------------------------------------------
 // PluginProcessHost messages
@@ -70,13 +71,13 @@
 
 // Notifies the browser that the plugin has shown a window.
 IPC_MESSAGE_CONTROL3(PluginProcessHostMsg_PluginShowWindow,
-                     uint32 /* window ID */,
+                     uint32_t /* window ID */,
                      gfx::Rect /* window rect */,
                      bool /* modal */)
 
 // Notifies the browser that the plugin has hidden a window.
 IPC_MESSAGE_CONTROL2(PluginProcessHostMsg_PluginHideWindow,
-                     uint32 /* window ID */,
+                     uint32_t /* window ID */,
                      gfx::Rect /* window rect */)
 
 // Notifies the browser that a plugin instance has requested a cursor
diff --git a/content/common/quota_messages.h b/content/common/quota_messages.h
index 06ec3d36..ae0ded4 100644
--- a/content/common/quota_messages.h
+++ b/content/common/quota_messages.h
@@ -4,7 +4,8 @@
 
 // Multiply-included message file, hence no include guard.
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
 #include "content/public/common/storage_quota_params.h"
 #include "ipc/ipc_message_macros.h"
 #include "storage/common/quota/quota_types.h"
@@ -28,13 +29,13 @@
 
 IPC_MESSAGE_CONTROL3(QuotaMsg_DidGrantStorageQuota,
                      int /* request_id */,
-                     int64 /* current_usage */,
-                     int64 /* granted_quota */)
+                     int64_t /* current_usage */,
+                     int64_t /* granted_quota */)
 
 IPC_MESSAGE_CONTROL3(QuotaMsg_DidQueryStorageUsageAndQuota,
                      int /* request_id */,
-                     int64 /* current_usage */,
-                     int64 /* current_quota */)
+                     int64_t /* current_usage */,
+                     int64_t /* current_quota */)
 
 IPC_MESSAGE_CONTROL2(QuotaMsg_DidFail,
                      int /* request_id */,
diff --git a/content/common/render_process_messages.h b/content/common/render_process_messages.h
index 2778a3b..5ff6255e 100644
--- a/content/common/render_process_messages.h
+++ b/content/common/render_process_messages.h
@@ -5,9 +5,12 @@
 // Common IPC messages used for render processes.
 // Multiply-included message file, hence no include guard.
 
+#include <stdint.h>
+
 #include <string>
 
 #include "base/memory/shared_memory.h"
+#include "build/build_config.h"
 #include "ipc/ipc_message_macros.h"
 #include "ipc/ipc_message_utils.h"
 #include "url/gurl.h"
@@ -38,7 +41,7 @@
 // certificate from a CA (<keygen> tag), and returns the signed public
 // key and challenge string.
 IPC_SYNC_MESSAGE_CONTROL3_1(RenderProcessHostMsg_Keygen,
-                            uint32 /* key size index */,
+                            uint32_t /* key size index */,
                             std::string /* challenge string */,
                             GURL /* URL of requestor */,
                             std::string /* signed public key and challenge */)
@@ -59,9 +62,9 @@
 // Request that the browser load a font into shared memory for us.
 IPC_SYNC_MESSAGE_CONTROL1_3(RenderProcessHostMsg_LoadFont,
                             FontDescriptor /* font to load */,
-                            uint32 /* buffer size */,
+                            uint32_t /* buffer size */,
                             base::SharedMemoryHandle /* font data */,
-                            uint32 /* font id */)
+                            uint32_t /* font id */)
 #elif defined(OS_WIN)
 // Request that the given font characters be loaded by the browser so it's
 // cached by the OS. Please see RenderMessageFilter::OnPreCacheFontCharacters
diff --git a/content/common/resource_messages.cc b/content/common/resource_messages.cc
index 5ce7bda..a432e9d 100644
--- a/content/common/resource_messages.cc
+++ b/content/common/resource_messages.cc
@@ -109,7 +109,7 @@
       break;
     }
     case storage::DataElement::TYPE_BYTES_DESCRIPTION: {
-      uint64 length;
+      uint64_t length;
       if (!ReadParam(m, iter, &length))
         return false;
       r->SetToBytesDescription(length);
@@ -117,7 +117,7 @@
     }
     case storage::DataElement::TYPE_FILE: {
       base::FilePath file_path;
-      uint64 offset, length;
+      uint64_t offset, length;
       base::Time expected_modification_time;
       if (!ReadParam(m, iter, &file_path))
         return false;
@@ -133,7 +133,7 @@
     }
     case storage::DataElement::TYPE_FILE_FILESYSTEM: {
       GURL file_system_url;
-      uint64 offset, length;
+      uint64_t offset, length;
       base::Time expected_modification_time;
       if (!ReadParam(m, iter, &file_system_url))
         return false;
@@ -149,7 +149,7 @@
     }
     case storage::DataElement::TYPE_BLOB: {
       std::string blob_uuid;
-      uint64 offset, length;
+      uint64_t offset, length;
       if (!ReadParam(m, iter, &blob_uuid))
         return false;
       if (!ReadParam(m, iter, &offset))
@@ -326,7 +326,7 @@
   std::vector<storage::DataElement> elements;
   if (!ReadParam(m, iter, &elements))
     return false;
-  int64 identifier;
+  int64_t identifier;
   if (!ReadParam(m, iter, &identifier))
     return false;
   *r = new content::ResourceRequestBody;
diff --git a/content/common/resource_messages.h b/content/common/resource_messages.h
index 65e7f00..cc0b3d0 100644
--- a/content/common/resource_messages.h
+++ b/content/common/resource_messages.h
@@ -7,6 +7,9 @@
 // NOTE: All messages must send an |int request_id| as their first parameter.
 
 // Multiply-included message file, hence no include guard.
+
+#include <stdint.h>
+
 #include "base/memory/shared_memory.h"
 #include "base/process/process.h"
 #include "content/common/content_param_traits_macros.h"
@@ -197,7 +200,7 @@
   IPC_STRUCT_MEMBER(net::RequestPriority, priority)
 
   // Used by plugin->browser requests to get the correct net::URLRequestContext.
-  IPC_STRUCT_MEMBER(uint32, request_context)
+  IPC_STRUCT_MEMBER(uint32_t, request_context)
 
   // Indicates which frame (or worker context) the request is being loaded into,
   // or kAppCacheNoHostId.
@@ -301,7 +304,7 @@
   IPC_STRUCT_MEMBER(base::TimeTicks, completion_time)
 
   // Total amount of data received from the network.
-  IPC_STRUCT_MEMBER(int64, encoded_data_length)
+  IPC_STRUCT_MEMBER(int64_t, encoded_data_length)
 IPC_STRUCT_END()
 
 // Resource messages sent from the browser to the renderer.
@@ -319,8 +322,8 @@
 // Sent as upload progress is being made.
 IPC_MESSAGE_CONTROL3(ResourceMsg_UploadProgress,
                      int /* request_id */,
-                     int64 /* position */,
-                     int64 /* size */)
+                     int64_t /* position */,
+                     int64_t /* size */)
 
 // Sent when the request has been redirected.  The receiver is expected to
 // respond with either a FollowRedirect message (if the redirect is to be
diff --git a/content/common/resource_request_body.cc b/content/common/resource_request_body.cc
index 1de7f9e8..2aa3f7ec 100644
--- a/content/common/resource_request_body.cc
+++ b/content/common/resource_request_body.cc
@@ -19,7 +19,8 @@
 
 void ResourceRequestBody::AppendFileRange(
     const base::FilePath& file_path,
-    uint64 offset, uint64 length,
+    uint64_t offset,
+    uint64_t length,
     const base::Time& expected_modification_time) {
   elements_.push_back(Element());
   elements_.back().SetToFilePathRange(file_path, offset, length,
@@ -32,7 +33,9 @@
 }
 
 void ResourceRequestBody::AppendFileSystemFileRange(
-    const GURL& url, uint64 offset, uint64 length,
+    const GURL& url,
+    uint64_t offset,
+    uint64_t length,
     const base::Time& expected_modification_time) {
   elements_.push_back(Element());
   elements_.back().SetToFileSystemUrlRange(url, offset, length,
diff --git a/content/common/resource_request_body.h b/content/common/resource_request_body.h
index 60dcb291..9c87e57 100644
--- a/content/common/resource_request_body.h
+++ b/content/common/resource_request_body.h
@@ -5,9 +5,11 @@
 #ifndef CONTENT_COMMON_RESOURCE_REQUEST_BODY_H_
 #define CONTENT_COMMON_RESOURCE_REQUEST_BODY_H_
 
+#include <stdint.h>
+
 #include <vector>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/supports_user_data.h"
 #include "content/common/content_export.h"
@@ -32,10 +34,13 @@
 
   void AppendBytes(const char* bytes, int bytes_len);
   void AppendFileRange(const base::FilePath& file_path,
-                       uint64 offset, uint64 length,
+                       uint64_t offset,
+                       uint64_t length,
                        const base::Time& expected_modification_time);
   void AppendBlob(const std::string& uuid);
-  void AppendFileSystemFileRange(const GURL& url, uint64 offset, uint64 length,
+  void AppendFileSystemFileRange(const GURL& url,
+                                 uint64_t offset,
+                                 uint64_t length,
                                  const base::Time& expected_modification_time);
 
   const std::vector<Element>* elements() const { return &elements_; }
@@ -47,15 +52,15 @@
   // Identifies a particular upload instance, which is used by the cache to
   // formulate a cache key.  This value should be unique across browser
   // sessions.  A value of 0 is used to indicate an unspecified identifier.
-  void set_identifier(int64 id) { identifier_ = id; }
-  int64 identifier() const { return identifier_; }
+  void set_identifier(int64_t id) { identifier_ = id; }
+  int64_t identifier() const { return identifier_; }
 
  private:
   friend class base::RefCountedThreadSafe<ResourceRequestBody>;
   ~ResourceRequestBody() override;
 
   std::vector<Element> elements_;
-  int64 identifier_;
+  int64_t identifier_;
 
   DISALLOW_COPY_AND_ASSIGN(ResourceRequestBody);
 };
diff --git a/content/common/sandbox_linux/android/sandbox_bpf_base_policy_android.cc b/content/common/sandbox_linux/android/sandbox_bpf_base_policy_android.cc
index c831390..c3b1605f 100644
--- a/content/common/sandbox_linux/android/sandbox_bpf_base_policy_android.cc
+++ b/content/common/sandbox_linux/android/sandbox_bpf_base_policy_android.cc
@@ -7,6 +7,7 @@
 #include <sys/syscall.h>
 #include <sys/types.h>
 
+#include "build/build_config.h"
 #include "sandbox/linux/bpf_dsl/bpf_dsl.h"
 
 using sandbox::bpf_dsl::Allow;
diff --git a/content/common/sandbox_linux/android/sandbox_bpf_base_policy_android.h b/content/common/sandbox_linux/android/sandbox_bpf_base_policy_android.h
index f8693d9..a18c7d4 100644
--- a/content/common/sandbox_linux/android/sandbox_bpf_base_policy_android.h
+++ b/content/common/sandbox_linux/android/sandbox_bpf_base_policy_android.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_COMMON_SANDBOX_LINUX_ANDROID_SANDBOX_BPF_BASE_POLICY_ANDROID_H_
 #define CONTENT_COMMON_SANDBOX_LINUX_ANDROID_SANDBOX_BPF_BASE_POLICY_ANDROID_H_
 
+#include "base/macros.h"
 #include "content/common/sandbox_linux/sandbox_bpf_base_policy_linux.h"
 
 namespace content {
diff --git a/content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc b/content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc
index 31339ac1..dc625517 100644
--- a/content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc
+++ b/content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc
@@ -18,6 +18,7 @@
 #include "base/bind.h"
 #include "base/compiler_specific.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "build/build_config.h"
 #include "content/common/sandbox_linux/sandbox_bpf_base_policy_linux.h"
diff --git a/content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.h b/content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.h
index ed5c2055..a9c1e2df 100644
--- a/content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.h
+++ b/content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_COMMON_SANDBOX_LINUX_BPF_CROS_ARM_GPU_POLICY_LINUX_H_
 #define CONTENT_COMMON_SANDBOX_LINUX_BPF_CROS_ARM_GPU_POLICY_LINUX_H_
 
+#include "base/macros.h"
 #include "content/common/sandbox_linux/bpf_gpu_policy_linux.h"
 
 namespace content {
diff --git a/content/common/sandbox_linux/bpf_gpu_policy_linux.cc b/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
index e8c31279..d0aefb3 100644
--- a/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
+++ b/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
@@ -19,6 +19,7 @@
 #include "base/command_line.h"
 #include "base/compiler_specific.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "build/build_config.h"
 #include "content/common/sandbox_linux/sandbox_bpf_base_policy_linux.h"
diff --git a/content/common/sandbox_linux/bpf_gpu_policy_linux.h b/content/common/sandbox_linux/bpf_gpu_policy_linux.h
index cc66c5bc..e7f4008 100644
--- a/content/common/sandbox_linux/bpf_gpu_policy_linux.h
+++ b/content/common/sandbox_linux/bpf_gpu_policy_linux.h
@@ -9,6 +9,7 @@
 #include <vector>
 
 #include "base/callback_forward.h"
+#include "base/macros.h"
 #include "content/common/sandbox_linux/sandbox_bpf_base_policy_linux.h"
 
 namespace sandbox {
diff --git a/content/common/sandbox_linux/bpf_ppapi_policy_linux.cc b/content/common/sandbox_linux/bpf_ppapi_policy_linux.cc
index b4837dcc..e6ee6a8 100644
--- a/content/common/sandbox_linux/bpf_ppapi_policy_linux.cc
+++ b/content/common/sandbox_linux/bpf_ppapi_policy_linux.cc
@@ -6,7 +6,6 @@
 
 #include <errno.h>
 
-#include "base/basictypes.h"
 #include "build/build_config.h"
 #include "content/common/sandbox_linux/sandbox_linux.h"
 #include "sandbox/linux/bpf_dsl/bpf_dsl.h"
diff --git a/content/common/sandbox_linux/bpf_ppapi_policy_linux.h b/content/common/sandbox_linux/bpf_ppapi_policy_linux.h
index 172ceefa..62133ac 100644
--- a/content/common/sandbox_linux/bpf_ppapi_policy_linux.h
+++ b/content/common/sandbox_linux/bpf_ppapi_policy_linux.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_COMMON_SANDBOX_LINUX_BPF_PPAPI_POLICY_LINUX_H_
 #define CONTENT_COMMON_SANDBOX_LINUX_BPF_PPAPI_POLICY_LINUX_H_
 
+#include "base/macros.h"
 #include "content/common/sandbox_linux/sandbox_bpf_base_policy_linux.h"
 
 namespace content {
diff --git a/content/common/sandbox_linux/bpf_renderer_policy_linux.cc b/content/common/sandbox_linux/bpf_renderer_policy_linux.cc
index 3f23041..e799273 100644
--- a/content/common/sandbox_linux/bpf_renderer_policy_linux.cc
+++ b/content/common/sandbox_linux/bpf_renderer_policy_linux.cc
@@ -7,7 +7,6 @@
 #include <errno.h>
 #include <sys/ioctl.h>
 
-#include "base/basictypes.h"
 #include "build/build_config.h"
 #include "content/common/sandbox_linux/sandbox_linux.h"
 #include "sandbox/linux/bpf_dsl/bpf_dsl.h"
diff --git a/content/common/sandbox_linux/bpf_renderer_policy_linux.h b/content/common/sandbox_linux/bpf_renderer_policy_linux.h
index 0dffa00a..e5a0b40 100644
--- a/content/common/sandbox_linux/bpf_renderer_policy_linux.h
+++ b/content/common/sandbox_linux/bpf_renderer_policy_linux.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_COMMON_SANDBOX_LINUX_BPF_RENDERER_POLICY_LINUX_H_
 #define CONTENT_COMMON_SANDBOX_LINUX_BPF_RENDERER_POLICY_LINUX_H_
 
+#include "base/macros.h"
 #include "content/common/sandbox_linux/sandbox_bpf_base_policy_linux.h"
 
 namespace content {
diff --git a/content/common/sandbox_linux/bpf_utility_policy_linux.cc b/content/common/sandbox_linux/bpf_utility_policy_linux.cc
index 736aef1..3ead1c8 100644
--- a/content/common/sandbox_linux/bpf_utility_policy_linux.cc
+++ b/content/common/sandbox_linux/bpf_utility_policy_linux.cc
@@ -6,7 +6,6 @@
 
 #include <errno.h>
 
-#include "base/basictypes.h"
 #include "build/build_config.h"
 #include "content/common/sandbox_linux/sandbox_linux.h"
 #include "sandbox/linux/bpf_dsl/bpf_dsl.h"
diff --git a/content/common/sandbox_linux/bpf_utility_policy_linux.h b/content/common/sandbox_linux/bpf_utility_policy_linux.h
index bf65f33..b11dbcc 100644
--- a/content/common/sandbox_linux/bpf_utility_policy_linux.h
+++ b/content/common/sandbox_linux/bpf_utility_policy_linux.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_COMMON_SANDBOX_LINUX_BPF_UTILITY_POLICY_LINUX_H_
 #define CONTENT_COMMON_SANDBOX_LINUX_BPF_UTILITY_POLICY_LINUX_H_
 
+#include "base/macros.h"
 #include "content/common/sandbox_linux/sandbox_bpf_base_policy_linux.h"
 
 namespace content {
diff --git a/content/common/sandbox_linux/sandbox_bpf_base_policy_linux.h b/content/common/sandbox_linux/sandbox_bpf_base_policy_linux.h
index 86c203d..fab25bbd 100644
--- a/content/common/sandbox_linux/sandbox_bpf_base_policy_linux.h
+++ b/content/common/sandbox_linux/sandbox_bpf_base_policy_linux.h
@@ -5,7 +5,7 @@
 #ifndef CONTENT_COMMON_SANDBOX_LINUX_SANDBOX_BPF_BASE_POLICY_LINUX_H_
 #define CONTENT_COMMON_SANDBOX_LINUX_SANDBOX_BPF_BASE_POLICY_LINUX_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "sandbox/linux/bpf_dsl/bpf_dsl_forward.h"
 #include "sandbox/linux/bpf_dsl/policy.h"
diff --git a/content/common/sandbox_linux/sandbox_debug_handling_linux.cc b/content/common/sandbox_linux/sandbox_debug_handling_linux.cc
index 0bf8799..65da474 100644
--- a/content/common/sandbox_linux/sandbox_debug_handling_linux.cc
+++ b/content/common/sandbox_linux/sandbox_debug_handling_linux.cc
@@ -6,6 +6,7 @@
 
 #include <errno.h>
 #include <signal.h>
+#include <stddef.h>
 #include <sys/prctl.h>
 #include <unistd.h>
 
diff --git a/content/common/sandbox_linux/sandbox_init_linux.cc b/content/common/sandbox_linux/sandbox_init_linux.cc
index 9ffeb5d..f834f90 100644
--- a/content/common/sandbox_linux/sandbox_init_linux.cc
+++ b/content/common/sandbox_linux/sandbox_init_linux.cc
@@ -8,6 +8,7 @@
 
 #include "base/files/scoped_file.h"
 #include "base/memory/scoped_ptr.h"
+#include "build/build_config.h"
 #include "content/common/sandbox_linux/sandbox_seccomp_bpf_linux.h"
 #include "sandbox/linux/bpf_dsl/policy.h"
 
diff --git a/content/common/sandbox_linux/sandbox_linux.cc b/content/common/sandbox_linux/sandbox_linux.cc
index 59ef176..2c639c1f 100644
--- a/content/common/sandbox_linux/sandbox_linux.cc
+++ b/content/common/sandbox_linux/sandbox_linux.cc
@@ -4,6 +4,7 @@
 
 #include <dirent.h>
 #include <fcntl.h>
+#include <stdint.h>
 #include <sys/resource.h>
 #include <sys/stat.h>
 #include <sys/time.h>
diff --git a/content/common/sandbox_linux/sandbox_linux.h b/content/common/sandbox_linux/sandbox_linux.h
index 2bbc67c..0a80479 100644
--- a/content/common/sandbox_linux/sandbox_linux.h
+++ b/content/common/sandbox_linux/sandbox_linux.h
@@ -8,8 +8,8 @@
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "content/public/common/sandbox_linux.h"
 
diff --git a/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc b/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc
index 0b8db74be..7dec1db 100644
--- a/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc
+++ b/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc
@@ -10,9 +10,9 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 
-#include "base/basictypes.h"
 #include "base/command_line.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "build/build_config.h"
 #include "content/public/common/content_switches.h"
 #include "sandbox/linux/bpf_dsl/bpf_dsl.h"
diff --git a/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.h b/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.h
index 6761a1a..5549ef6 100644
--- a/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.h
+++ b/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.h
@@ -7,8 +7,8 @@
 
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/files/scoped_file.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "sandbox/linux/bpf_dsl/policy.h"
 
diff --git a/content/common/sandbox_mac.h b/content/common/sandbox_mac.h
index 5296851..bac23f0d 100644
--- a/content/common/sandbox_mac.h
+++ b/content/common/sandbox_mac.h
@@ -8,9 +8,9 @@
 #include <map>
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/containers/hash_tables.h"
 #include "base/gtest_prod_util.h"
+#include "base/macros.h"
 #include "content/common/content_export.h"
 #include "content/public/common/sandbox_type.h"
 
diff --git a/content/common/sandbox_mac.mm b/content/common/sandbox_mac.mm
index 8d28ffb0..ca915a7 100644
--- a/content/common/sandbox_mac.mm
+++ b/content/common/sandbox_mac.mm
@@ -5,6 +5,8 @@
 #include "content/common/sandbox_mac.h"
 
 #import <Cocoa/Cocoa.h>
+#include <stddef.h>
+#include <stdint.h>
 
 #include <CoreFoundation/CFTimeZone.h>
 extern "C" {
@@ -13,7 +15,6 @@
 #include <signal.h>
 #include <sys/param.h>
 
-#include "base/basictypes.h"
 #include "base/command_line.h"
 #include "base/compiler_specific.h"
 #include "base/files/file_util.h"
@@ -24,6 +25,7 @@
 #include "base/mac/scoped_cftyperef.h"
 #include "base/mac/scoped_nsautorelease_pool.h"
 #include "base/mac/scoped_nsobject.h"
+#include "base/macros.h"
 #include "base/rand_util.h"
 #include "base/strings/string16.h"
 #include "base/strings/string_piece.h"
@@ -346,7 +348,7 @@
 
   { // Gestalt() tries to read /System/Library/CoreServices/SystemVersion.plist
     // on 10.5.6
-    int32 tmp;
+    int32_t tmp;
     base::SysInfo::OperatingSystemVersionNumbers(&tmp, &tmp, &tmp);
   }
 
diff --git a/content/common/sandbox_mac_compiler_unittest.mm b/content/common/sandbox_mac_compiler_unittest.mm
index 08fba20..34684dd 100644
--- a/content/common/sandbox_mac_compiler_unittest.mm
+++ b/content/common/sandbox_mac_compiler_unittest.mm
@@ -5,8 +5,9 @@
 #include "content/common/sandbox_mac.h"
 
 #include <fcntl.h>
-#include <unistd.h>
+#include <stdint.h>
 #include <sys/stat.h>
+#include <unistd.h>
 
 #include "base/process/kill.h"
 #include "base/test/multiprocess_test.h"
diff --git a/content/common/sandbox_mac_diraccess_unittest.mm b/content/common/sandbox_mac_diraccess_unittest.mm
index 8d12567..17be671 100644
--- a/content/common/sandbox_mac_diraccess_unittest.mm
+++ b/content/common/sandbox_mac_diraccess_unittest.mm
@@ -4,6 +4,7 @@
 
 #import <Cocoa/Cocoa.h>
 #include <dirent.h>
+#include <stddef.h>
 
 extern "C" {
 #include <sandbox.h>
@@ -11,6 +12,7 @@
 
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
+#include "base/macros.h"
 #include "base/process/kill.h"
 #include "base/strings/sys_string_conversions.h"
 #include "base/strings/utf_string_conversions.h"
diff --git a/content/common/sandbox_mac_fontloading_unittest.mm b/content/common/sandbox_mac_fontloading_unittest.mm
index 645a7f6..4a0fb0d 100644
--- a/content/common/sandbox_mac_fontloading_unittest.mm
+++ b/content/common/sandbox_mac_fontloading_unittest.mm
@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 
 #import <Cocoa/Cocoa.h>
+#include <stddef.h>
 
 #include "base/files/file_util.h"
 #include "base/files/scoped_file.h"
diff --git a/content/common/sandbox_mac_system_access_unittest.mm b/content/common/sandbox_mac_system_access_unittest.mm
index 00e21b06..0298071 100644
--- a/content/common/sandbox_mac_system_access_unittest.mm
+++ b/content/common/sandbox_mac_system_access_unittest.mm
@@ -4,6 +4,7 @@
 
 #import <Cocoa/Cocoa.h>
 #include <openssl/rand.h>
+#include <stdint.h>
 
 #include "base/files/file_util.h"
 #include "base/files/scoped_file.h"
diff --git a/content/common/sandbox_util.cc b/content/common/sandbox_util.cc
index 3fe98b4..4b1dcef4 100644
--- a/content/common/sandbox_util.cc
+++ b/content/common/sandbox_util.cc
@@ -4,12 +4,13 @@
 
 #include "content/common/sandbox_util.h"
 
+#include "build/build_config.h"
+#include "content/public/common/sandbox_init.h"
+
 #if defined(OS_POSIX)
 #include <unistd.h>
 #endif
 
-#include "content/public/common/sandbox_init.h"
-
 namespace content {
 
 IPC::PlatformFileForTransit BrokerGetFileHandleForProcess(
diff --git a/content/common/sandbox_win.cc b/content/common/sandbox_win.cc
index 295473d..9833544 100644
--- a/content/common/sandbox_win.cc
+++ b/content/common/sandbox_win.cc
@@ -4,6 +4,8 @@
 
 #include "content/common/sandbox_win.h"
 
+#include <stddef.h>
+
 #include <string>
 
 #include "base/base_switches.h"
@@ -12,6 +14,7 @@
 #include "base/files/file_util.h"
 #include "base/hash.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/shared_memory.h"
 #include "base/metrics/field_trial.h"
 #include "base/metrics/sparse_histogram.h"
diff --git a/content/common/sandbox_win.h b/content/common/sandbox_win.h
index 70d2e4f..f2800fd 100644
--- a/content/common/sandbox_win.h
+++ b/content/common/sandbox_win.h
@@ -5,6 +5,8 @@
 #ifndef CONTENT_COMMON_SANDBOX_WIN_H_
 #define CONTENT_COMMON_SANDBOX_WIN_H_
 
+#include <stdint.h>
+
 #include "content/common/content_export.h"
 #include "sandbox/win/src/security_level.h"
 
diff --git a/content/common/service_worker/embedded_worker_messages.h b/content/common/service_worker/embedded_worker_messages.h
index be4f8b33..fc9f02e 100644
--- a/content/common/service_worker/embedded_worker_messages.h
+++ b/content/common/service_worker/embedded_worker_messages.h
@@ -4,6 +4,8 @@
 
 // Message definition file, included multiple times, hence no include guard.
 
+#include <stdint.h>
+
 #include <string>
 
 #include "content/public/common/web_preferences.h"
@@ -20,7 +22,7 @@
 // Parameters structure for EmbeddedWorkerMsg_StartWorker.
 IPC_STRUCT_BEGIN(EmbeddedWorkerMsg_StartWorker_Params)
   IPC_STRUCT_MEMBER(int, embedded_worker_id)
-  IPC_STRUCT_MEMBER(int64, service_worker_version_id)
+  IPC_STRUCT_MEMBER(int64_t, service_worker_version_id)
   IPC_STRUCT_MEMBER(GURL, scope)
   IPC_STRUCT_MEMBER(GURL, script_url)
   IPC_STRUCT_MEMBER(int, worker_devtools_agent_route_id)
diff --git a/content/common/service_worker/service_worker_messages.h b/content/common/service_worker/service_worker_messages.h
index eb37c4f..d99c06c6 100644
--- a/content/common/service_worker/service_worker_messages.h
+++ b/content/common/service_worker/service_worker_messages.h
@@ -4,6 +4,8 @@
 
 // Message definition file, included multiple times, hence no include guard.
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
@@ -143,13 +145,13 @@
                      int /* thread_id */,
                      int /* request_id */,
                      int /* provider_id */,
-                     int64 /* registration_id */)
+                     int64_t /* registration_id */)
 
 IPC_MESSAGE_CONTROL4(ServiceWorkerHostMsg_UnregisterServiceWorker,
                      int /* thread_id */,
                      int /* request_id */,
                      int /* provider_id */,
-                     int64 /* registration_id */)
+                     int64_t /* registration_id */)
 
 IPC_MESSAGE_CONTROL4(ServiceWorkerHostMsg_GetRegistration,
                      int /* thread_id */,
@@ -217,7 +219,7 @@
 // |version_id| identifies which ServiceWorkerVersion.
 IPC_MESSAGE_CONTROL2(ServiceWorkerHostMsg_SetVersionId,
                      int /* provider_id */,
-                     int64 /* version_id */)
+                     int64_t /* version_id */)
 
 // Informs the browser that event handling has finished.
 // Routed to the target ServiceWorkerVersion.
diff --git a/content/common/service_worker/service_worker_types.cc b/content/common/service_worker/service_worker_types.cc
index 456ef67..8ab0fec 100644
--- a/content/common/service_worker/service_worker_types.cc
+++ b/content/common/service_worker/service_worker_types.cc
@@ -62,7 +62,7 @@
     blink::WebServiceWorkerResponseType response_type,
     const ServiceWorkerHeaderMap& headers,
     const std::string& blob_uuid,
-    uint64 blob_size,
+    uint64_t blob_size,
     const GURL& stream_url,
     blink::WebServiceWorkerResponseError error)
     : url(url),
@@ -73,8 +73,7 @@
       blob_uuid(blob_uuid),
       blob_size(blob_size),
       stream_url(stream_url),
-      error(error) {
-}
+      error(error) {}
 
 ServiceWorkerResponse::~ServiceWorkerResponse() {}
 
diff --git a/content/common/service_worker/service_worker_types.h b/content/common/service_worker/service_worker_types.h
index aff102a..3f9c546 100644
--- a/content/common/service_worker/service_worker_types.h
+++ b/content/common/service_worker/service_worker_types.h
@@ -5,10 +5,11 @@
 #ifndef CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_TYPES_H_
 #define CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_TYPES_H_
 
+#include <stdint.h>
+
 #include <map>
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/strings/string_util.h"
 #include "content/common/content_export.h"
 #include "content/public/common/referrer.h"
@@ -42,9 +43,9 @@
 static const int kInvalidServiceWorkerHandleId = -1;
 static const int kInvalidServiceWorkerRegistrationHandleId = -1;
 static const int kInvalidServiceWorkerProviderId = -1;
-static const int64 kInvalidServiceWorkerRegistrationId = -1;
-static const int64 kInvalidServiceWorkerVersionId = -1;
-static const int64 kInvalidServiceWorkerResourceId = -1;
+static const int64_t kInvalidServiceWorkerRegistrationId = -1;
+static const int64_t kInvalidServiceWorkerVersionId = -1;
+static const int64_t kInvalidServiceWorkerResourceId = -1;
 static const int kInvalidEmbeddedWorkerThreadId = -1;
 
 // The HTTP cache is bypassed for Service Worker scripts if the last network
@@ -131,7 +132,7 @@
   std::string method;
   ServiceWorkerHeaderMap headers;
   std::string blob_uuid;
-  uint64 blob_size;
+  uint64_t blob_size;
   Referrer referrer;
   FetchCredentialsMode credentials_mode;
   FetchRedirectMode redirect_mode;
@@ -147,7 +148,7 @@
                         blink::WebServiceWorkerResponseType response_type,
                         const ServiceWorkerHeaderMap& headers,
                         const std::string& blob_uuid,
-                        uint64 blob_size,
+                        uint64_t blob_size,
                         const GURL& stream_url,
                         blink::WebServiceWorkerResponseError error);
   ~ServiceWorkerResponse();
@@ -158,7 +159,7 @@
   blink::WebServiceWorkerResponseType response_type;
   ServiceWorkerHeaderMap headers;
   std::string blob_uuid;
-  uint64 blob_size;
+  uint64_t blob_size;
   GURL stream_url;
   blink::WebServiceWorkerResponseError error;
 };
@@ -169,14 +170,14 @@
   int handle_id;
   GURL url;
   blink::WebServiceWorkerState state;
-  int64 version_id;
+  int64_t version_id;
 };
 
 struct CONTENT_EXPORT ServiceWorkerRegistrationObjectInfo {
   ServiceWorkerRegistrationObjectInfo();
   int handle_id;
   GURL scope;
-  int64 registration_id;
+  int64_t registration_id;
 };
 
 struct ServiceWorkerVersionAttributes {
diff --git a/content/common/set_process_title.cc b/content/common/set_process_title.cc
index d74af96..2118598 100644
--- a/content/common/set_process_title.cc
+++ b/content/common/set_process_title.cc
@@ -4,6 +4,8 @@
 
 #include "content/common/set_process_title.h"
 
+#include <stddef.h>
+
 #include "build/build_config.h"
 
 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_SOLARIS)
diff --git a/content/common/set_process_title_linux.cc b/content/common/set_process_title_linux.cc
index c504380..0c90826 100644
--- a/content/common/set_process_title_linux.cc
+++ b/content/common/set_process_title_linux.cc
@@ -40,6 +40,7 @@
 #include "content/common/set_process_title_linux.h"
 
 #include <stdarg.h>
+#include <stddef.h>
 #include <stdint.h>
 #include <stdio.h>
 #include <string.h>
diff --git a/content/common/site_isolation_policy.h b/content/common/site_isolation_policy.h
index 68d1e44..69b6c5e 100644
--- a/content/common/site_isolation_policy.h
+++ b/content/common/site_isolation_policy.h
@@ -5,7 +5,7 @@
 #ifndef CONTENT_COMMON_SITE_ISOLATION_POLICY_H_
 #define CONTENT_COMMON_SITE_ISOLATION_POLICY_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "content/common/content_export.h"
 #include "url/gurl.h"
 
diff --git a/content/common/speech_recognition_messages.h b/content/common/speech_recognition_messages.h
index 7ad6aee..ee83637 100644
--- a/content/common/speech_recognition_messages.h
+++ b/content/common/speech_recognition_messages.h
@@ -4,6 +4,8 @@
 
 // Multiply-included message file, hence no include guard.
 
+#include <stdint.h>
+
 #include <string>
 
 #include "base/memory/shared_memory.h"
@@ -60,7 +62,7 @@
   // URL of the page (or iframe if applicable).
   IPC_STRUCT_MEMBER(std::string, origin_url)
   // Maximum number of hypotheses allowed for each results.
-  IPC_STRUCT_MEMBER(uint32, max_hypotheses)
+  IPC_STRUCT_MEMBER(uint32_t, max_hypotheses)
   // Whether the user requested continuous recognition or not.
   IPC_STRUCT_MEMBER(bool, continuous)
   // Whether the user requested interim results or not.
diff --git a/content/common/ssl_status_serialization.cc b/content/common/ssl_status_serialization.cc
index 5800f26..5f1b924 100644
--- a/content/common/ssl_status_serialization.cc
+++ b/content/common/ssl_status_serialization.cc
@@ -4,6 +4,8 @@
 
 #include "content/common/ssl_status_serialization.h"
 
+#include <stdint.h>
+
 #include "base/logging.h"
 #include "base/pickle.h"
 
@@ -88,7 +90,7 @@
 
   for (; num_scts_to_read > 0; --num_scts_to_read) {
     int id;
-    uint16 status;
+    uint16_t status;
     if (!iter.ReadInt(&id) || !iter.ReadUInt16(&status)) {
       *ssl_status = SSLStatus();
       return false;
diff --git a/content/common/text_input_client_messages.h b/content/common/text_input_client_messages.h
index 8bd0db2..70da1d8 100644
--- a/content/common/text_input_client_messages.h
+++ b/content/common/text_input_client_messages.h
@@ -4,6 +4,9 @@
 
 // Multiply-included message file, hence no include guard
 
+#include <stddef.h>
+
+#include "build/build_config.h"
 #include "ipc/ipc_message_macros.h"
 #include "ui/gfx/geometry/rect.h"
 #include "ui/gfx/range/range.h"
diff --git a/content/common/url_schemes.cc b/content/common/url_schemes.cc
index 26fee93..6d4c58c6 100644
--- a/content/common/url_schemes.cc
+++ b/content/common/url_schemes.cc
@@ -10,7 +10,6 @@
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/strings/string_util.h"
 #include "content/common/savable_url_schemes.h"
 #include "content/public/common/content_client.h"
diff --git a/content/common/user_agent.cc b/content/common/user_agent.cc
index d6f3aaa..ad9c001 100644
--- a/content/common/user_agent.cc
+++ b/content/common/user_agent.cc
@@ -4,6 +4,8 @@
 
 #include "content/public/common/user_agent.h"
 
+#include <stdint.h>
+
 #include "base/logging.h"
 #include "base/strings/string_util.h"
 #include "base/strings/stringprintf.h"
@@ -45,9 +47,9 @@
 
 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) ||\
     defined(OS_ANDROID)
-  int32 os_major_version = 0;
-  int32 os_minor_version = 0;
-  int32 os_bugfix_version = 0;
+  int32_t os_major_version = 0;
+  int32_t os_minor_version = 0;
+  int32_t os_bugfix_version = 0;
   base::SysInfo::OperatingSystemVersionNumbers(&os_major_version,
                                                &os_minor_version,
                                                &os_bugfix_version);
@@ -61,7 +63,7 @@
   std::string cputype;
   // special case for biarch systems
   if (strcmp(unixinfo.machine, "x86_64") == 0 &&
-      sizeof(void*) == sizeof(int32)) {  // NOLINT
+      sizeof(void*) == sizeof(int32_t)) {  // NOLINT
     cputype.assign("i686 (x86_64)");
   } else {
     cputype.assign(unixinfo.machine);
diff --git a/content/common/utility_messages.h b/content/common/utility_messages.h
index c12032b..a76986ed 100644
--- a/content/common/utility_messages.h
+++ b/content/common/utility_messages.h
@@ -4,10 +4,12 @@
 
 // Multiply-included message file, so no include guard.
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
+#include "build/build_config.h"
 #include "content/common/content_export.h"
 #include "content/public/common/common_param_traits.h"
 #include "content/public/common/webplugininfo.h"
diff --git a/content/common/view_messages.h b/content/common/view_messages.h
index 860c1981..1d0cb0c 100644
--- a/content/common/view_messages.h
+++ b/content/common/view_messages.h
@@ -5,9 +5,13 @@
 // IPC messages for page rendering.
 // Multiply-included message file, hence no include guard.
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/memory/shared_memory.h"
 #include "base/process/process.h"
 #include "base/strings/string16.h"
+#include "build/build_config.h"
 #include "cc/output/begin_frame_args.h"
 #include "cc/output/compositor_frame.h"
 #include "cc/output/compositor_frame_ack.h"
@@ -302,7 +306,7 @@
   IPC_STRUCT_MEMBER(WindowContainerType, window_container_type)
 
   // The session storage namespace ID this view should use.
-  IPC_STRUCT_MEMBER(int64, session_storage_namespace_id)
+  IPC_STRUCT_MEMBER(int64_t, session_storage_namespace_id)
 
   // The name of the resulting frame that should be created (empty if none
   // has been specified). UTF8 encoded string.
@@ -356,7 +360,7 @@
   IPC_STRUCT_MEMBER(int32_t, main_frame_widget_route_id, MSG_ROUTING_NONE)
 
   // TODO(dcheng): No clue. This is kind of duplicated from ViewMsg_New_Params.
-  IPC_STRUCT_MEMBER(int64, cloned_session_storage_namespace_id)
+  IPC_STRUCT_MEMBER(int64_t, cloned_session_storage_namespace_id)
 IPC_STRUCT_END()
 
 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWorker_Params)
@@ -520,7 +524,7 @@
   IPC_STRUCT_MEMBER(int32_t, main_frame_widget_routing_id, MSG_ROUTING_NONE)
 
   // The session storage namespace ID this view should use.
-  IPC_STRUCT_MEMBER(int64, session_storage_namespace_id)
+  IPC_STRUCT_MEMBER(int64_t, session_storage_namespace_id)
 
   // The route ID of the opener RenderFrame or RenderFrameProxy, if we need to
   // set one (MSG_ROUTING_NONE otherwise).
@@ -551,7 +555,7 @@
   // The initial page ID to use for this view, which must be larger than any
   // existing navigation that might be loaded in the view.  Page IDs are unique
   // to a view and are only updated by the renderer after this initial value.
-  IPC_STRUCT_MEMBER(int32, next_page_id)
+  IPC_STRUCT_MEMBER(int32_t, next_page_id)
 
   // The initial renderer size.
   IPC_STRUCT_MEMBER(ViewMsg_Resize_Params, initial_size)
@@ -960,13 +964,13 @@
 
 // Sent by the browser as a reply to ViewHostMsg_SwapCompositorFrame.
 IPC_MESSAGE_ROUTED2(ViewMsg_SwapCompositorFrameAck,
-                    uint32 /* output_surface_id */,
+                    uint32_t /* output_surface_id */,
                     cc::CompositorFrameAck /* ack */)
 
 // Sent by browser to tell renderer compositor that some resources that were
 // given to the browser in a swap are not being used anymore.
 IPC_MESSAGE_ROUTED2(ViewMsg_ReclaimCompositorResources,
-                    uint32 /* output_surface_id */,
+                    uint32_t /* output_surface_id */,
                     cc::CompositorFrameAck /* ack */)
 
 // Sent by browser to give renderer compositor a new namespace ID for any
@@ -1092,7 +1096,7 @@
 // Notifies the browser that we have session history information.
 // page_id: unique ID that allows us to distinguish between history entries.
 IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateState,
-                    int32 /* page_id */,
+                    int32_t /* page_id */,
                     content::PageState /* state */)
 
 // Notifies the browser that we want to show a destination url for a potential
@@ -1150,8 +1154,7 @@
 // detached. The browser will use this to constrain the lifecycle of worker
 // processes (SharedWorkers are shut down when their last associated document
 // is detached).
-IPC_MESSAGE_CONTROL1(ViewHostMsg_DocumentDetached,
-                     uint64 /* document_id */)
+IPC_MESSAGE_CONTROL1(ViewHostMsg_DocumentDetached, uint64_t /* document_id */)
 
 // Wraps an IPC message that's destined to the worker on the renderer->browser
 // hop.
@@ -1281,7 +1284,7 @@
 
 IPC_MESSAGE_ROUTED3(
     ViewHostMsg_SwapCompositorFrame,
-    uint32 /* output_surface_id */,
+    uint32_t /* output_surface_id */,
     cc::CompositorFrame /* frame */,
     std::vector<IPC::Message> /* messages_to_deliver_with_frame */)
 
diff --git a/content/common/webplugin_geometry.h b/content/common/webplugin_geometry.h
index f6cf700..7f727a1 100644
--- a/content/common/webplugin_geometry.h
+++ b/content/common/webplugin_geometry.h
@@ -7,7 +7,6 @@
 
 #include <vector>
 
-#include "base/basictypes.h"
 #include "ui/gfx/geometry/rect.h"
 #include "ui/gfx/native_widget_types.h"
 
diff --git a/content/common/webplugininfo_unittest.cc b/content/common/webplugininfo_unittest.cc
index 1d659c3..dc1d30fb 100644
--- a/content/common/webplugininfo_unittest.cc
+++ b/content/common/webplugininfo_unittest.cc
@@ -4,9 +4,12 @@
 
 #include "content/public/common/webplugininfo.h"
 
+#include <stddef.h>
+
 #include <string>
 #include <vector>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/version.h"
diff --git a/content/common/websocket_messages.h b/content/common/websocket_messages.h
index 657b44e..e0af254 100644
--- a/content/common/websocket_messages.h
+++ b/content/common/websocket_messages.h
@@ -28,10 +28,11 @@
 // The channel ID value is stored in the routing ID member which is available
 // when we use the IPC_MESSAGE_ROUTED macro though it's unintended use.
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "content/common/content_export.h"
 #include "content/common/websocket.h"
 #include "ipc/ipc_message_macros.h"
@@ -135,8 +136,7 @@
 // Both sides start a new channel with a quota of 0, and must wait for a
 // FlowControl message before calling SendFrame. The total available quota on
 // one side must never exceed 0x7FFFFFFFFFFFFFFF tokens.
-IPC_MESSAGE_ROUTED1(WebSocketMsg_FlowControl,
-                    int64 /* quota */)
+IPC_MESSAGE_ROUTED1(WebSocketMsg_FlowControl, int64_t /* quota */)
 
 // Drop the channel.
 //
diff --git a/content/common/worker_messages.h b/content/common/worker_messages.h
index 9f57b20..60f1a4a 100644
--- a/content/common/worker_messages.h
+++ b/content/common/worker_messages.h
@@ -11,7 +11,6 @@
 #include <utility>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/strings/string16.h"
 #include "content/common/content_export.h"
 #include "content/common/content_param_traits.h"
diff --git a/content/common/zygote_commands_linux.h b/content/common/zygote_commands_linux.h
index ca5a1d5..0fed210 100644
--- a/content/common/zygote_commands_linux.h
+++ b/content/common/zygote_commands_linux.h
@@ -5,6 +5,8 @@
 #ifndef CONTENT_COMMON_ZYGOTE_COMMANDS_LINUX_H_
 #define CONTENT_COMMON_ZYGOTE_COMMANDS_LINUX_H_
 
+#include <stddef.h>
+
 #include "base/posix/global_descriptors.h"
 #include "ipc/ipc_descriptors.h"
 
diff --git a/content/renderer/renderer_clipboard_delegate.h b/content/renderer/renderer_clipboard_delegate.h
index 28d509b..f1ac0fd 100644
--- a/content/renderer/renderer_clipboard_delegate.h
+++ b/content/renderer/renderer_clipboard_delegate.h
@@ -6,10 +6,12 @@
 #define CONTENT_RENDERER_RENDERER_CLIPBOARD_DELEGATE_H_
 
 #include <stdint.h>
+
 #include <map>
 #include <string>
 #include <vector>
 
+#include "base/basictypes.h"
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/strings/string16.h"
diff --git a/content/shell/app/shell_crash_reporter_client.h b/content/shell/app/shell_crash_reporter_client.h
index 89e5773..06e1d9bf 100644
--- a/content/shell/app/shell_crash_reporter_client.h
+++ b/content/shell/app/shell_crash_reporter_client.h
@@ -6,6 +6,8 @@
 #define CONTENT_SHELL_APP_SHELL_CRASH_REPORTER_CLIENT_H_
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
+#include "build/build_config.h"
 #include "components/crash/content/app/crash_reporter_client.h"
 
 namespace content {
diff --git a/net/base/zap.cc b/net/base/zap.cc
index 331d696..6bc2d350 100644
--- a/net/base/zap.cc
+++ b/net/base/zap.cc
@@ -4,6 +4,8 @@
 
 #include "net/base/zap.h"
 
+#include <string.h>
+
 namespace net {
 
 void ZapBuf(void* buf, size_t buf_len) {
diff --git a/ppapi/shared_impl/ppb_gamepad_shared.cc b/ppapi/shared_impl/ppb_gamepad_shared.cc
index 80082d0..a707926 100644
--- a/ppapi/shared_impl/ppb_gamepad_shared.cc
+++ b/ppapi/shared_impl/ppb_gamepad_shared.cc
@@ -4,8 +4,9 @@
 
 #include "ppapi/shared_impl/ppb_gamepad_shared.h"
 
-#include <algorithm>
+#include <string.h>
 
+#include <algorithm>
 
 namespace ppapi {
 
diff --git a/ppapi/shared_impl/private/ppb_char_set_shared.cc b/ppapi/shared_impl/private/ppb_char_set_shared.cc
index c45c1ba..9761c38 100644
--- a/ppapi/shared_impl/private/ppb_char_set_shared.cc
+++ b/ppapi/shared_impl/private/ppb_char_set_shared.cc
@@ -4,6 +4,8 @@
 
 #include "ppapi/shared_impl/private/ppb_char_set_shared.h"
 
+#include <string.h>
+
 #include <algorithm>
 
 #include "base/i18n/icu_string_conversions.h"
diff --git a/third_party/WebKit/LayoutTests/editing/spelling/mixed-paste-long-expected.txt b/third_party/WebKit/LayoutTests/editing/spelling/mixed-paste-long-expected.txt
new file mode 100644
index 0000000..21a18b255
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/spelling/mixed-paste-long-expected.txt
@@ -0,0 +1,10 @@
+For bug cr571988: Spell checking for pasted mixed content.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS verifyMarker(destination) became true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/third_party/WebKit/LayoutTests/editing/spelling/mixed-paste-long.html b/third_party/WebKit/LayoutTests/editing/spelling/mixed-paste-long.html
new file mode 100644
index 0000000..bef1746
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/spelling/mixed-paste-long.html
@@ -0,0 +1,80 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+
+description('For bug cr571988: Spell checking for pasted mixed content.');
+
+jsTestIsAsync = true;
+
+var testRoot = document.createElement("div");
+document.body.insertBefore(testRoot, document.body.firstChild);
+
+var testEditable = document.createElement("div");
+testEditable.setAttribute("contentEditable", "true");
+testRoot.appendChild(testEditable);
+
+var testSourceDecorated = document.createElement("div");
+testSourceDecorated.innerHTML = "<img src='../resources/abe.png'> zz ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah ah.";
+testRoot.appendChild(testSourceDecorated);
+
+var sel = window.getSelection();
+
+var tests = [];
+
+function done()
+{
+    var next = tests.shift();
+    if (next)
+        return window.setTimeout(next, 0);
+    testRoot.style.display = "none";
+    finishJSTest();
+}
+
+function verifyMarker(node)
+{
+    if (node instanceof HTMLInputElement || node instanceof HTMLTextAreaElement) {
+        node.focus();
+    } else {
+        sel.selectAllChildren(node);
+    }
+
+    for (var i = 0; i < node.childNodes.length; ++i)
+        if (internals.markerCountForNode(node.childNodes[i], 'spelling'))
+            return true;
+
+    return false;
+}
+
+var destination = null;
+function pasteAndVerify(source, dest)
+{
+    sel.selectAllChildren(source);
+    document.execCommand("Copy");
+    if (dest instanceof HTMLInputElement || dest instanceof HTMLTextAreaElement) {
+        dest.value = "";
+        dest.focus();
+    } else {
+        dest.innerHTML = "";
+        sel.selectAllChildren(dest);
+    }
+    document.execCommand("Paste");
+
+    if (window.internals) {
+        destination = dest;
+        shouldBecomeEqual('verifyMarker(destination)', 'true', done);
+    }
+};
+
+tests.push(function() { pasteAndVerify(testSourceDecorated, testEditable); });
+done();
+
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/editing/spelling/mixed-paste-short-expected.txt b/third_party/WebKit/LayoutTests/editing/spelling/mixed-paste-short-expected.txt
new file mode 100644
index 0000000..a8a0f6e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/spelling/mixed-paste-short-expected.txt
@@ -0,0 +1,11 @@
+For bug cr571988: Spell checking for pasted mixed content.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS DIV has 2 markers on '<img src="../resources/abe.png">&nbsp;zz zz.'
+PASS verifyMarker(destination, misspelledCount) became true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/third_party/WebKit/LayoutTests/editing/spelling/mixed-paste-short.html b/third_party/WebKit/LayoutTests/editing/spelling/mixed-paste-short.html
new file mode 100644
index 0000000..c7cd79e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/spelling/mixed-paste-short.html
@@ -0,0 +1,87 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+
+description('For bug cr571988: Spell checking for pasted mixed content.');
+
+jsTestIsAsync = true;
+
+var testRoot = document.createElement("div");
+document.body.insertBefore(testRoot, document.body.firstChild);
+
+var testEditable = document.createElement("div");
+testEditable.setAttribute("contentEditable", "true");
+testRoot.appendChild(testEditable);
+
+var testSourceDecorated = document.createElement("div");
+testSourceDecorated.innerHTML = "<img src='../resources/abe.png'> zz zz.";
+testRoot.appendChild(testSourceDecorated);
+
+var sel = window.getSelection();
+
+var tests = [];
+
+function done()
+{
+    var next = tests.shift();
+    if (next)
+        return window.setTimeout(next, 0);
+    testRoot.style.display = "none";
+    finishJSTest();
+}
+
+function verifyMarker(node, expectedMarked)
+{
+    if (node instanceof HTMLInputElement || node instanceof HTMLTextAreaElement) {
+        node.focus();
+    } else {
+        sel.selectAllChildren(node);
+    }
+
+    var count = 0;
+    for (var i = 0; i < node.childNodes.length; ++i)
+        count += internals.markerCountForNode(node.childNodes[i], 'spelling');
+
+    if (count == expectedMarked) {
+        var nodeContent = node instanceof HTMLInputElement || node instanceof HTMLTextAreaElement ? node.value : node.innerHTML;
+        testPassed(node.tagName + " has " + expectedMarked + " markers on '" + nodeContent + "'");
+    }
+
+    return count == expectedMarked;
+}
+
+var destination = null;
+var misspelledCount = null;
+function pasteAndVerify(source, dest, expectedMarked)
+{
+    sel.selectAllChildren(source);
+    document.execCommand("Copy");
+    if (dest instanceof HTMLInputElement || dest instanceof HTMLTextAreaElement) {
+        dest.value = "";
+        dest.focus();
+    } else {
+        dest.innerHTML = "";
+        sel.selectAllChildren(dest);
+    }
+    document.execCommand("Paste");
+
+    if (window.internals) {
+        destination = dest;
+        misspelledCount = expectedMarked;
+        shouldBecomeEqual('verifyMarker(destination, misspelledCount)', 'true', done);
+    }
+};
+
+tests.push(function() { pasteAndVerify(testSourceDecorated, testEditable, testSourceDecorated.innerHTML.match(/zz/g).length); });
+done();
+
+var successfullyParsed = true;
+</script>
+</body>
+</html>
diff --git a/third_party/WebKit/Source/bindings/core/v8/WorkerScriptController.cpp b/third_party/WebKit/Source/bindings/core/v8/WorkerScriptController.cpp
index 24f0e6337..ac0fe08 100644
--- a/third_party/WebKit/Source/bindings/core/v8/WorkerScriptController.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/WorkerScriptController.cpp
@@ -54,22 +54,22 @@
 
 namespace blink {
 
-class WorkerScriptController::WorkerGlobalScopeExecutionState final {
+class WorkerScriptController::ExecutionState final {
     STACK_ALLOCATED();
 public:
-    explicit WorkerGlobalScopeExecutionState(WorkerScriptController* controller)
+    explicit ExecutionState(WorkerScriptController* controller)
         : hadException(false)
         , lineNumber(0)
         , columnNumber(0)
         , m_controller(controller)
-        , m_outerState(controller->m_globalScopeExecutionState)
+        , m_outerState(controller->m_executionState)
     {
-        m_controller->m_globalScopeExecutionState = this;
+        m_controller->m_executionState = this;
     }
 
-    ~WorkerGlobalScopeExecutionState()
+    ~ExecutionState()
     {
-        m_controller->m_globalScopeExecutionState = m_outerState;
+        m_controller->m_executionState = m_outerState;
     }
 
     DEFINE_INLINE_TRACE()
@@ -86,19 +86,19 @@
     ScriptValue exception;
     RefPtrWillBeMember<ErrorEvent> m_errorEventFromImportedScript;
 
-    // A WorkerGlobalScopeExecutionState context is stack allocated by
+    // A ExecutionState context is stack allocated by
     // WorkerScriptController::evaluate(), with the contoller using it
     // during script evaluation. To handle nested evaluate() uses,
-    // WorkerGlobalScopeExecutionStates are chained together;
+    // ExecutionStates are chained together;
     // |m_outerState| keeps a pointer to the context object one level out
     // (or 0, if outermost.) Upon return from evaluate(), the
-    // WorkerScriptController's WorkerGlobalScopeExecutionState is popped
-    // and the previous one restored (see above dtor.)
+    // WorkerScriptController's ExecutionState is popped and the previous one
+    // restored (see above dtor.)
     //
     // With Oilpan, |m_outerState| isn't traced. It'll be "up the stack"
     // and its fields will be traced when scanning the stack.
     RawPtrWillBeMember<WorkerScriptController> m_controller;
-    WorkerGlobalScopeExecutionState* m_outerState;
+    ExecutionState* m_outerState;
 };
 
 PassOwnPtrWillBeRawPtr<WorkerScriptController> WorkerScriptController::create(WorkerGlobalScope* workerGlobalScope, v8::Isolate* isolate)
@@ -111,7 +111,7 @@
     , m_executionForbidden(false)
     , m_executionScheduledToTerminate(false)
     , m_rejectedPromises(RejectedPromises::create())
-    , m_globalScopeExecutionState(0)
+    , m_executionState(0)
 {
     ASSERT(isolate);
     m_world = DOMWrapperWorld::create(isolate, WorkerWorldId);
@@ -205,22 +205,22 @@
 
     if (block.HasCaught()) {
         v8::Local<v8::Message> message = block.Message();
-        m_globalScopeExecutionState->hadException = true;
-        m_globalScopeExecutionState->errorMessage = toCoreString(message->Get());
-        if (v8Call(message->GetLineNumber(m_scriptState->context()), m_globalScopeExecutionState->lineNumber)
-            && v8Call(message->GetStartColumn(m_scriptState->context()), m_globalScopeExecutionState->columnNumber)) {
-            ++m_globalScopeExecutionState->columnNumber;
+        m_executionState->hadException = true;
+        m_executionState->errorMessage = toCoreString(message->Get());
+        if (v8Call(message->GetLineNumber(m_scriptState->context()), m_executionState->lineNumber)
+            && v8Call(message->GetStartColumn(m_scriptState->context()), m_executionState->columnNumber)) {
+            ++m_executionState->columnNumber;
         } else {
-            m_globalScopeExecutionState->lineNumber = 0;
-            m_globalScopeExecutionState->columnNumber = 0;
+            m_executionState->lineNumber = 0;
+            m_executionState->columnNumber = 0;
         }
 
         TOSTRING_DEFAULT(V8StringResource<>, sourceURL, message->GetScriptOrigin().ResourceName(), ScriptValue());
-        m_globalScopeExecutionState->sourceURL = sourceURL;
-        m_globalScopeExecutionState->exception = ScriptValue(m_scriptState.get(), block.Exception());
+        m_executionState->sourceURL = sourceURL;
+        m_executionState->exception = ScriptValue(m_scriptState.get(), block.Exception());
         block.Reset();
     } else {
-        m_globalScopeExecutionState->hadException = false;
+        m_executionState->hadException = false;
     }
 
     v8::Local<v8::Value> result;
@@ -235,7 +235,7 @@
     if (isExecutionForbidden())
         return false;
 
-    WorkerGlobalScopeExecutionState state(this);
+    ExecutionState state(this);
     evaluate(sourceCode.source(), sourceCode.url().string(), sourceCode.startPosition(), cacheHandler, v8CacheOptions);
     if (isExecutionForbidden())
         return false;
@@ -301,8 +301,8 @@
 void WorkerScriptController::rethrowExceptionFromImportedScript(PassRefPtrWillBeRawPtr<ErrorEvent> errorEvent, ExceptionState& exceptionState)
 {
     const String& errorMessage = errorEvent->message();
-    if (m_globalScopeExecutionState)
-        m_globalScopeExecutionState->m_errorEventFromImportedScript = errorEvent;
+    if (m_executionState)
+        m_executionState->m_errorEventFromImportedScript = errorEvent;
     exceptionState.rethrowV8Exception(V8ThrowException::createGeneralError(isolate(), errorMessage));
 }
 
diff --git a/third_party/WebKit/Source/bindings/core/v8/WorkerScriptController.h b/third_party/WebKit/Source/bindings/core/v8/WorkerScriptController.h
index 8213766f..f4e53bf 100644
--- a/third_party/WebKit/Source/bindings/core/v8/WorkerScriptController.h
+++ b/third_party/WebKit/Source/bindings/core/v8/WorkerScriptController.h
@@ -96,7 +96,7 @@
 
 private:
     WorkerScriptController(WorkerGlobalScope*, v8::Isolate*);
-    class WorkerGlobalScopeExecutionState;
+    class ExecutionState;
 
     v8::Isolate* isolate() const;
 
@@ -113,14 +113,13 @@
 
     RefPtrWillBeMember<RejectedPromises> m_rejectedPromises;
 
-    // |m_globalScopeExecutionState| refers to a stack object
-    // that evaluate() allocates; evaluate() ensuring that the
-    // pointer reference to it is removed upon returning. Hence
-    // kept as a bare pointer here, and not a Persistent with
+    // |m_executionState| refers to a stack object that evaluate() allocates;
+    // evaluate() ensuring that the pointer reference to it is removed upon
+    // returning. Hence kept as a bare pointer here, and not a Persistent with
     // Oilpan enabled; stack scanning will visit the object and
     // trace its on-heap fields.
     GC_PLUGIN_IGNORE("394615")
-    WorkerGlobalScopeExecutionState* m_globalScopeExecutionState;
+    ExecutionState* m_executionState;
 };
 
 } // namespace blink
diff --git a/third_party/WebKit/Source/core/dom/CompositorProxy.cpp b/third_party/WebKit/Source/core/dom/CompositorProxy.cpp
index 3a5676c..c50fe8c6 100644
--- a/third_party/WebKit/Source/core/dom/CompositorProxy.cpp
+++ b/third_party/WebKit/Source/core/dom/CompositorProxy.cpp
@@ -110,7 +110,7 @@
 {
     // Ensures that we only have bits set for valid mutable properties.
     uint32_t sanityCheckProperties = properties;
-    for (unsigned i = 0; i < arraysize(allowedProperties); ++i) {
+    for (unsigned i = 0; i < WTF_ARRAY_LENGTH(allowedProperties); ++i) {
         sanityCheckProperties &= ~static_cast<uint32_t>(allowedProperties[i].property);
     }
     return !sanityCheckProperties;
diff --git a/third_party/WebKit/Source/core/editing/EditingBehavior.cpp b/third_party/WebKit/Source/core/editing/EditingBehavior.cpp
index ef462e6..8e9fe09 100644
--- a/third_party/WebKit/Source/core/editing/EditingBehavior.cpp
+++ b/third_party/WebKit/Source/core/editing/EditingBehavior.cpp
@@ -192,11 +192,11 @@
         keyDownCommandsMap = new HashMap<int, const char*>;
         keyPressCommandsMap = new HashMap<int, const char*>;
 
-        for (unsigned i = 0; i < arraysize(keyDownEntries); i++) {
+        for (unsigned i = 0; i < WTF_ARRAY_LENGTH(keyDownEntries); i++) {
             keyDownCommandsMap->set(keyDownEntries[i].modifiers << 16 | keyDownEntries[i].virtualKey, keyDownEntries[i].name);
         }
 
-        for (unsigned i = 0; i < arraysize(keyPressEntries); i++) {
+        for (unsigned i = 0; i < WTF_ARRAY_LENGTH(keyPressEntries); i++) {
             keyPressCommandsMap->set(keyPressEntries[i].modifiers << 16 | keyPressEntries[i].charCode, keyPressEntries[i].name);
         }
     }
diff --git a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
index 972d1a10..150081b 100644
--- a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
+++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
@@ -510,8 +510,6 @@
 
     for (int iter = 0; iter < kNumChunksToCheck; ++iter) {
         EphemeralRange checkRange = expandRangeToSentenceBoundary(fullParagraphToCheck.subrange(currentChunkStart, kChunkSize));
-        if (checkRange.isNull())
-            continue;
         int checkingLength = 0;
         markAllMisspellingsAndBadGrammarInRanges(textCheckingOptions, checkRange, checkRange, iter, &checkingLength);
         currentChunkStart += checkingLength;
diff --git a/third_party/WebKit/Source/core/editing/spellcheck/TextCheckingHelper.cpp b/third_party/WebKit/Source/core/editing/spellcheck/TextCheckingHelper.cpp
index 720266816..719b31a 100644
--- a/third_party/WebKit/Source/core/editing/spellcheck/TextCheckingHelper.cpp
+++ b/third_party/WebKit/Source/core/editing/spellcheck/TextCheckingHelper.cpp
@@ -104,14 +104,10 @@
     const VisiblePosition& visibleStart = createVisiblePosition(range.startPosition());
     ASSERT(visibleStart.isNotNull());
     const Position& sentenceStart = startOfSentence(visibleStart).deepEquivalent();
-    if (sentenceStart.isNull())
-        return EphemeralRange();
     const VisiblePosition& visibleEnd = createVisiblePosition(range.endPosition());
     ASSERT(visibleEnd.isNotNull());
     const Position& sentenceEnd = endOfSentence(visibleEnd).deepEquivalent();
-    if (sentenceEnd.isNull())
-        return EphemeralRange();
-    return EphemeralRange(sentenceStart, sentenceEnd);
+    return EphemeralRange(sentenceStart.isNull() ? range.startPosition() : sentenceStart, sentenceEnd.isNull() ? range.endPosition() : sentenceEnd);
 }
 
 static EphemeralRange expandToParagraphBoundary(const EphemeralRange& range)
diff --git a/third_party/WebKit/Source/core/events/UIEventWithKeyState.cpp b/third_party/WebKit/Source/core/events/UIEventWithKeyState.cpp
index 3e92c29..0449cf84 100644
--- a/third_party/WebKit/Source/core/events/UIEventWithKeyState.cpp
+++ b/third_party/WebKit/Source/core/events/UIEventWithKeyState.cpp
@@ -121,7 +121,7 @@
         { "NumLock", PlatformEvent::NumLockOn },
         { "Symbol", PlatformEvent::SymbolKey },
     };
-    for (size_t i = 0; i < arraysize(kIdentifiers); ++i) {
+    for (size_t i = 0; i < WTF_ARRAY_LENGTH(kIdentifiers); ++i) {
         if (keyIdentifier == kIdentifiers[i].identifier)
             return m_modifiers & kIdentifiers[i].mask;
     }
diff --git a/third_party/WebKit/Source/core/fetch/ResourceTest.cpp b/third_party/WebKit/Source/core/fetch/ResourceTest.cpp
index 64e93ed..ae04c9b7 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceTest.cpp
+++ b/third_party/WebKit/Source/core/fetch/ResourceTest.cpp
@@ -23,7 +23,7 @@
     ~MockPlatform() override { }
 
     // From blink::Platform:
-    void cacheMetadata(const WebURL& url, int64, const char*, size_t) override
+    void cacheMetadata(const WebURL& url, int64_t, const char*, size_t) override
     {
         m_cachedURLs.append(url);
     }
diff --git a/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp b/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp
index 0cce623..3f7e8c3 100644
--- a/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp
+++ b/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp
@@ -87,7 +87,7 @@
 
     if (m_cachedOffsetsEnabled && layoutObject.isSVGRoot()) {
         const LayoutSVGRoot& svgRoot = toLayoutSVGRoot(layoutObject);
-        m_svgTransform = adoptPtr(new AffineTransform(svgRoot.localToBorderBoxTransform()));
+        m_svgTransform = AffineTransform(svgRoot.localToBorderBoxTransform());
         if (svgRoot.shouldApplyViewportClip())
             addClipRectRelativeToPaintOffset(LayoutSize(svgRoot.pixelSnappedSize()));
     }
@@ -111,7 +111,7 @@
     ASSERT(layoutObject != m_paintInvalidationContainer);
 
     if (m_cachedOffsetsEnabled)
-        m_svgTransform = adoptPtr(new AffineTransform(next.svgTransform() * layoutObject.localToParentTransform()));
+        m_svgTransform = AffineTransform(next.svgTransform() * layoutObject.localToParentTransform());
 }
 
 void PaintInvalidationState::addClipRectRelativeToPaintOffset(const LayoutSize& clipSize)
diff --git a/third_party/WebKit/Source/core/layout/PaintInvalidationState.h b/third_party/WebKit/Source/core/layout/PaintInvalidationState.h
index 7667d4e..22962f2a 100644
--- a/third_party/WebKit/Source/core/layout/PaintInvalidationState.h
+++ b/third_party/WebKit/Source/core/layout/PaintInvalidationState.h
@@ -31,7 +31,7 @@
 
     const LayoutRect& clipRect() const { return m_clipRect; }
     const LayoutSize& paintOffset() const { return m_paintOffset; }
-    const AffineTransform& svgTransform() const { ASSERT(m_svgTransform); return *m_svgTransform; }
+    const AffineTransform& svgTransform() const { return m_svgTransform; }
 
     bool cachedOffsetsEnabled() const { return m_cachedOffsetsEnabled; }
     bool isClipped() const { return m_clipped; }
@@ -82,7 +82,7 @@
     // Transform from the initial viewport coordinate system of an outermost
     // SVG root to the userspace _before_ the relevant element. Combining this
     // with |m_paintOffset| yields the "final" offset.
-    OwnPtr<AffineTransform> m_svgTransform;
+    AffineTransform m_svgTransform;
 
     Vector<LayoutObject*>& m_pendingDelayedPaintInvalidations;
 };
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.cpp
index 90aefcf..bb8201d 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.cpp
@@ -139,12 +139,9 @@
 {
     SVGGraphicsElement* graphicsElement = toSVGGraphicsElement(element());
     if (graphicsElement->hasAnimatedLocalTransform()) {
-        if (m_localTransform)
-            m_localTransform->setTransform(graphicsElement->calculateAnimatedLocalTransform());
-        else
-            m_localTransform = adoptPtr(new AffineTransform(graphicsElement->calculateAnimatedLocalTransform()));
+        m_localTransform.setTransform(graphicsElement->calculateAnimatedLocalTransform());
     } else {
-        m_localTransform = 0;
+        m_localTransform = AffineTransform();
     }
 }
 
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.h b/third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.h
index 678b2a2e..dde44074 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.h
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.h
@@ -77,7 +77,7 @@
     bool hasNonScalingStroke() const { return style()->svgStyle().vectorEffect() == VE_NON_SCALING_STROKE; }
     Path* nonScalingStrokePath(const Path*, const AffineTransform&) const;
     AffineTransform nonScalingStrokeTransform() const;
-    AffineTransform localTransform() const final { return m_localTransform ? *m_localTransform : LayoutSVGModelObject::localTransform(); }
+    AffineTransform localTransform() const final { return m_localTransform; }
 
     virtual const Vector<MarkerPosition>* markerPositions() const { return nullptr; }
 
@@ -111,7 +111,7 @@
     bool fillContains(const FloatPoint&, bool requiresFill = true, const WindRule fillRule = RULE_NONZERO);
     bool strokeContains(const FloatPoint&, bool requiresStroke = true);
 
-    const AffineTransform& localToParentTransform() const final { return m_localTransform ? *m_localTransform : LayoutSVGModelObject::localToParentTransform(); }
+    const AffineTransform& localToParentTransform() const final { return m_localTransform; }
     LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutBoxModelObject*,
         const PaintInvalidationState* = nullptr) const override;
 
@@ -129,7 +129,7 @@
     void updateLocalTransform();
 
 private:
-    OwnPtr<AffineTransform> m_localTransform;
+    AffineTransform m_localTransform;
     // TODO(fmalita): the Path is now cached in SVGPath; while this additional cache is just a
     // shallow copy, it certainly has a complexity/state management cost (plus allocation & storage
     // overhead) - so we should look into removing it.
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp b/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp
index e0c2386..bddf227 100644
--- a/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp
@@ -418,22 +418,18 @@
     return willIsolateBlendingDescendantsForObject(object) && object->hasNonIsolatedBlendingDescendants();
 }
 
-static AffineTransform& currentContentTransformation()
-{
-    DEFINE_STATIC_LOCAL(AffineTransform, s_currentContentTransformation, ());
-    return s_currentContentTransformation;
-}
+AffineTransform::Transform SubtreeContentTransformScope::s_currentContentTransformation = IDENTITY_TRANSFORM;
 
 SubtreeContentTransformScope::SubtreeContentTransformScope(const AffineTransform& subtreeContentTransformation)
+    : m_savedContentTransformation(s_currentContentTransformation)
 {
-    AffineTransform& contentTransformation = currentContentTransformation();
-    m_savedContentTransformation = contentTransformation;
-    contentTransformation = subtreeContentTransformation * contentTransformation;
+    AffineTransform contentTransformation = subtreeContentTransformation * AffineTransform(s_currentContentTransformation);
+    contentTransformation.copyTransformTo(s_currentContentTransformation);
 }
 
 SubtreeContentTransformScope::~SubtreeContentTransformScope()
 {
-    currentContentTransformation() = m_savedContentTransformation;
+    m_savedContentTransformation.copyTransformTo(s_currentContentTransformation);
 }
 
 AffineTransform SVGLayoutSupport::deprecatedCalculateTransformToLayer(const LayoutObject* layoutObject)
@@ -474,7 +470,7 @@
 
     // FIXME: trying to compute a device space transform at record time is wrong. All clients
     // should be updated to avoid relying on this information, and the method should be removed.
-    AffineTransform ctm = deprecatedCalculateTransformToLayer(layoutObject) * currentContentTransformation();
+    AffineTransform ctm = deprecatedCalculateTransformToLayer(layoutObject) * SubtreeContentTransformScope::currentContentTransformation();
     ctm.scale(layoutObject->document().frameHost()->deviceScaleFactor());
 
     return narrowPrecisionToFloat(sqrt((pow(ctm.xScale(), 2) + pow(ctm.yScale(), 2)) / 2));
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.h b/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.h
index 50ac5b4e..e553fd70 100644
--- a/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.h
+++ b/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.h
@@ -27,6 +27,7 @@
 #include "core/layout/LayoutObject.h"
 #include "core/style/SVGComputedStyleDefs.h"
 #include "platform/graphics/DashArray.h"
+#include "platform/transforms/AffineTransform.h"
 #include "wtf/Allocator.h"
 
 namespace blink {
@@ -118,7 +119,10 @@
     SubtreeContentTransformScope(const AffineTransform&);
     ~SubtreeContentTransformScope();
 
+    static AffineTransform currentContentTransformation() { return AffineTransform(s_currentContentTransformation); }
+
 private:
+    static AffineTransform::Transform s_currentContentTransformation;
     AffineTransform m_savedContentTransformation;
 };
 
diff --git a/third_party/WebKit/Source/core/loader/MixedContentCheckerTest.cpp b/third_party/WebKit/Source/core/loader/MixedContentCheckerTest.cpp
index bee64e1..50c595e 100644
--- a/third_party/WebKit/Source/core/loader/MixedContentCheckerTest.cpp
+++ b/third_party/WebKit/Source/core/loader/MixedContentCheckerTest.cpp
@@ -33,7 +33,7 @@
         {"https://example.com/foo", "ws://google.com/foo", true},
     };
 
-    for (size_t i = 0; i < arraysize(cases); ++i) {
+    for (size_t i = 0; i < WTF_ARRAY_LENGTH(cases); ++i) {
         const char* origin = cases[i].origin;
         const char* target = cases[i].target;
         bool expectation = cases[i].expectation;
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h
index 2e1b0ea..48725314 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -1725,7 +1725,7 @@
     static unsigned short initialColumnCount() { return 1; }
     static ColumnFill initialColumnFill() { return ColumnFillBalance; }
     static ColumnSpan initialColumnSpan() { return ColumnSpanNone; }
-    static const TransformOperations& initialTransform() { DEFINE_STATIC_LOCAL(TransformOperations, ops, ()); return ops; }
+    static EmptyTransformOperations initialTransform() { return EmptyTransformOperations(); }
     static PassRefPtr<TranslateTransformOperation> initialTranslate() { return TranslateTransformOperation::create(Length(0, Fixed), Length(0, Fixed), 0, TransformOperation::Translate3D); }
     static PassRefPtr<RotateTransformOperation> initialRotate() { return RotateTransformOperation::create(0, 0, 1, 0, TransformOperation::Rotate3D); }
     static PassRefPtr<ScaleTransformOperation> initialScale() { return ScaleTransformOperation::create(1, 1, 1, TransformOperation::Scale3D); }
diff --git a/third_party/WebKit/Source/core/svg/SVGElementRareData.cpp b/third_party/WebKit/Source/core/svg/SVGElementRareData.cpp
index 35b9b7c..45f7796 100644
--- a/third_party/WebKit/Source/core/svg/SVGElementRareData.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGElementRareData.cpp
@@ -8,7 +8,6 @@
 #include "core/css/resolver/StyleResolver.h"
 #include "core/dom/Document.h"
 #include "core/svg/SVGCursorElement.h"
-#include "platform/transforms/AffineTransform.h"
 
 namespace blink {
 
@@ -69,9 +68,7 @@
 
 AffineTransform* SVGElementRareData::animateMotionTransform()
 {
-    if (!m_animateMotionTransform)
-        m_animateMotionTransform = adoptPtr(new AffineTransform);
-    return m_animateMotionTransform.get();
+    return &m_animateMotionTransform;
 }
 
 }
diff --git a/third_party/WebKit/Source/core/svg/SVGElementRareData.h b/third_party/WebKit/Source/core/svg/SVGElementRareData.h
index bdb6b613..f2c53151 100644
--- a/third_party/WebKit/Source/core/svg/SVGElementRareData.h
+++ b/third_party/WebKit/Source/core/svg/SVGElementRareData.h
@@ -22,6 +22,7 @@
 
 #include "core/svg/SVGElement.h"
 #include "platform/heap/Handle.h"
+#include "platform/transforms/AffineTransform.h"
 #include "wtf/HashSet.h"
 #include "wtf/Noncopyable.h"
 #include "wtf/StdLibExtras.h"
@@ -107,7 +108,7 @@
     RefPtrWillBeMember<MutableStylePropertySet> m_animatedSMILStyleProperties;
     RefPtr<ComputedStyle> m_overrideComputedStyle;
     // Used by <animateMotion>
-    OwnPtr<AffineTransform> m_animateMotionTransform;
+    AffineTransform m_animateMotionTransform;
 };
 
 }
diff --git a/third_party/WebKit/Source/modules/notifications/NotificationDataTest.cpp b/third_party/WebKit/Source/modules/notifications/NotificationDataTest.cpp
index e4408be2..45a7feb 100644
--- a/third_party/WebKit/Source/modules/notifications/NotificationDataTest.cpp
+++ b/third_party/WebKit/Source/modules/notifications/NotificationDataTest.cpp
@@ -49,7 +49,7 @@
 TEST_F(NotificationDataTest, ReflectProperties)
 {
     Vector<unsigned> vibrationPattern;
-    for (size_t i = 0; i < arraysize(kNotificationVibration); ++i)
+    for (size_t i = 0; i < WTF_ARRAY_LENGTH(kNotificationVibration); ++i)
         vibrationPattern.append(kNotificationVibration[i]);
 
     UnsignedLongOrUnsignedLongSequence vibrationSequence;
@@ -102,7 +102,7 @@
 TEST_F(NotificationDataTest, SilentNotificationWithVibration)
 {
     Vector<unsigned> vibrationPattern;
-    for (size_t i = 0; i < arraysize(kNotificationVibration); ++i)
+    for (size_t i = 0; i < WTF_ARRAY_LENGTH(kNotificationVibration); ++i)
         vibrationPattern.append(kNotificationVibration[i]);
 
     UnsignedLongOrUnsignedLongSequence vibrationSequence;
@@ -134,7 +134,7 @@
 TEST_F(NotificationDataTest, VibrationNormalization)
 {
     Vector<unsigned> unnormalizedPattern;
-    for (size_t i = 0; i < arraysize(kNotificationVibrationUnnormalized); ++i)
+    for (size_t i = 0; i < WTF_ARRAY_LENGTH(kNotificationVibrationUnnormalized); ++i)
         unnormalizedPattern.append(kNotificationVibrationUnnormalized[i]);
 
     UnsignedLongOrUnsignedLongSequence vibrationSequence;
@@ -148,7 +148,7 @@
     EXPECT_FALSE(exceptionState.hadException());
 
     Vector<int> normalizedPattern;
-    for (size_t i = 0; i < arraysize(kNotificationVibrationNormalized); ++i)
+    for (size_t i = 0; i < WTF_ARRAY_LENGTH(kNotificationVibrationNormalized); ++i)
         normalizedPattern.append(kNotificationVibrationNormalized[i]);
 
     ASSERT_EQ(normalizedPattern.size(), notificationData.vibrate.size());
diff --git a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
index ba21cf9..459901c 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
@@ -112,10 +112,10 @@
 WebGL2RenderingContextBase::WebGL2RenderingContextBase(HTMLCanvasElement* passedCanvas, PassOwnPtr<WebGraphicsContext3D> context, const WebGLContextAttributes& requestedAttributes)
     : WebGLRenderingContextBase(passedCanvas, context, requestedAttributes)
 {
-    m_supportedInternalFormatsStorage.insert(kSupportedInternalFormatsStorage, kSupportedInternalFormatsStorage + arraysize(kSupportedInternalFormatsStorage));
-    m_supportedInternalFormatsStorage.insert(kCompressedTextureFormatsETC2EAC, kCompressedTextureFormatsETC2EAC + arraysize(kCompressedTextureFormatsETC2EAC));
-    m_compressedTextureFormatsETC2EAC.insert(kCompressedTextureFormatsETC2EAC, kCompressedTextureFormatsETC2EAC + arraysize(kCompressedTextureFormatsETC2EAC));
-    m_compressedTextureFormats.append(kCompressedTextureFormatsETC2EAC, arraysize(kCompressedTextureFormatsETC2EAC));
+    m_supportedInternalFormatsStorage.insert(kSupportedInternalFormatsStorage, kSupportedInternalFormatsStorage + WTF_ARRAY_LENGTH(kSupportedInternalFormatsStorage));
+    m_supportedInternalFormatsStorage.insert(kCompressedTextureFormatsETC2EAC, kCompressedTextureFormatsETC2EAC + WTF_ARRAY_LENGTH(kCompressedTextureFormatsETC2EAC));
+    m_compressedTextureFormatsETC2EAC.insert(kCompressedTextureFormatsETC2EAC, kCompressedTextureFormatsETC2EAC + WTF_ARRAY_LENGTH(kCompressedTextureFormatsETC2EAC));
+    m_compressedTextureFormats.append(kCompressedTextureFormatsETC2EAC, WTF_ARRAY_LENGTH(kCompressedTextureFormatsETC2EAC));
 }
 
 WebGL2RenderingContextBase::~WebGL2RenderingContextBase()
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureASTC.cpp b/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureASTC.cpp
index d0f105a..8d2e5450 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureASTC.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLCompressedTextureASTC.cpp
@@ -31,7 +31,7 @@
     const int kAlphaFormatGap =
         GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR - GL_COMPRESSED_RGBA_ASTC_4x4_KHR;
 
-    for (size_t i = 0; i < arraysize(WebGLCompressedTextureASTC::kBlockSizeCompressASTC); i++) {
+    for (size_t i = 0; i < WTF_ARRAY_LENGTH(WebGLCompressedTextureASTC::kBlockSizeCompressASTC); i++) {
         /* GL_COMPRESSED_RGBA_ASTC(0x93B0 ~ 0x93BD) */
         context->addCompressedTextureFormat(
             WebGLCompressedTextureASTC::kBlockSizeCompressASTC[i].CompressType);
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
index 794b00e4..50debb0a 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
@@ -975,7 +975,7 @@
     setupFlags();
 
 #define ADD_VALUES_TO_SET(set, values) \
-    for (size_t i = 0; i < arraysize(values); ++i) {   \
+    for (size_t i = 0; i < WTF_ARRAY_LENGTH(values); ++i) {   \
         set.insert(values[i]);                         \
     }
 
diff --git a/third_party/WebKit/Source/platform/ThreadSafeFunctional.h b/third_party/WebKit/Source/platform/ThreadSafeFunctional.h
index 9b8efdba..b8f9c1e 100644
--- a/third_party/WebKit/Source/platform/ThreadSafeFunctional.h
+++ b/third_party/WebKit/Source/platform/ThreadSafeFunctional.h
@@ -26,80 +26,13 @@
 //     bind(func1, 42, str);
 //     bind(func1, 42, str.isolatedCopy());
 
-template<typename... FreeVariableTypes, typename FunctionType>
-PassOwnPtr<Function<typename WTF::FunctionWrapper<FunctionType>::ResultType(FreeVariableTypes...)>> threadSafeBind(
-    FunctionType function)
-{
-    return bind<FreeVariableTypes...>(function);
-}
-
-template<typename... FreeVariableTypes, typename FunctionType, typename P1>
+template<typename... FreeVariableTypes, typename FunctionType, typename... Ps>
 PassOwnPtr<Function<typename WTF::FunctionWrapper<FunctionType>::ResultType(FreeVariableTypes...)>> threadSafeBind(
     FunctionType function,
-    const P1& parameter1)
+    const Ps&... parameters)
 {
     return bind<FreeVariableTypes...>(function,
-        CrossThreadCopier<P1>::copy(parameter1));
-}
-
-template<typename... FreeVariableTypes, typename FunctionType, typename P1, typename P2>
-PassOwnPtr<Function<typename WTF::FunctionWrapper<FunctionType>::ResultType(FreeVariableTypes...)>> threadSafeBind(
-    FunctionType function,
-    const P1& parameter1, const P2& parameter2)
-{
-    return bind<FreeVariableTypes...>(function,
-        CrossThreadCopier<P1>::copy(parameter1),
-        CrossThreadCopier<P2>::copy(parameter2));
-}
-
-template<typename... FreeVariableTypes, typename FunctionType, typename P1, typename P2, typename P3>
-PassOwnPtr<Function<typename WTF::FunctionWrapper<FunctionType>::ResultType(FreeVariableTypes...)>> threadSafeBind(
-    FunctionType function,
-    const P1& parameter1, const P2& parameter2, const P3& parameter3)
-{
-    return bind<FreeVariableTypes...>(function,
-        CrossThreadCopier<P1>::copy(parameter1),
-        CrossThreadCopier<P2>::copy(parameter2),
-        CrossThreadCopier<P3>::copy(parameter3));
-}
-
-template<typename... FreeVariableTypes, typename FunctionType, typename P1, typename P2, typename P3, typename P4>
-PassOwnPtr<Function<typename WTF::FunctionWrapper<FunctionType>::ResultType(FreeVariableTypes...)>> threadSafeBind(
-    FunctionType function,
-    const P1& parameter1, const P2& parameter2, const P3& parameter3, const P4& parameter4)
-{
-    return bind<FreeVariableTypes...>(function,
-        CrossThreadCopier<P1>::copy(parameter1),
-        CrossThreadCopier<P2>::copy(parameter2),
-        CrossThreadCopier<P3>::copy(parameter3),
-        CrossThreadCopier<P4>::copy(parameter4));
-}
-
-template<typename... FreeVariableTypes, typename FunctionType, typename P1, typename P2, typename P3, typename P4, typename P5>
-PassOwnPtr<Function<typename WTF::FunctionWrapper<FunctionType>::ResultType(FreeVariableTypes...)>> threadSafeBind(
-    FunctionType function,
-    const P1& parameter1, const P2& parameter2, const P3& parameter3, const P4& parameter4, const P5& parameter5)
-{
-    return bind<FreeVariableTypes...>(function,
-        CrossThreadCopier<P1>::copy(parameter1),
-        CrossThreadCopier<P2>::copy(parameter2),
-        CrossThreadCopier<P3>::copy(parameter3),
-        CrossThreadCopier<P4>::copy(parameter4),
-        CrossThreadCopier<P5>::copy(parameter5));
-}
-
-template<typename... FreeVariableTypes, typename FunctionType, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
-PassOwnPtr<Function<typename WTF::FunctionWrapper<FunctionType>::ResultType(FreeVariableTypes...)>> threadSafeBind(
-    FunctionType function,
-    const P1& parameter1, const P2& parameter2, const P3& parameter3, const P4& parameter4, const P5& parameter5, const P6& parameter6)
-{
-    return bind<FreeVariableTypes...>(function,
-        CrossThreadCopier<P1>::copy(parameter1),
-        CrossThreadCopier<P2>::copy(parameter2),
-        CrossThreadCopier<P3>::copy(parameter3),
-        CrossThreadCopier<P4>::copy(parameter4),
-        CrossThreadCopier<P5>::copy(parameter5),
-        CrossThreadCopier<P6>::copy(parameter6));
+        CrossThreadCopier<Ps>::copy(parameters)...);
 }
 
 } // namespace blink
diff --git a/third_party/WebKit/Source/platform/UserGestureIndicator.h b/third_party/WebKit/Source/platform/UserGestureIndicator.h
index 7e81bf9..62206019 100644
--- a/third_party/WebKit/Source/platform/UserGestureIndicator.h
+++ b/third_party/WebKit/Source/platform/UserGestureIndicator.h
@@ -43,7 +43,9 @@
 };
 
 class PLATFORM_EXPORT UserGestureToken : public RefCounted<UserGestureToken> {
+    WTF_MAKE_NONCOPYABLE(UserGestureToken);
 public:
+    UserGestureToken() { }
     virtual ~UserGestureToken() { }
     virtual bool hasGestures() const = 0;
     virtual void setOutOfProcess() = 0;
@@ -51,7 +53,8 @@
     virtual void setPauseInDebugger() = 0;
 };
 
-class PLATFORM_EXPORT UserGestureIndicator {
+class PLATFORM_EXPORT UserGestureIndicator final {
+    USING_FAST_MALLOC(UserGestureIndicator);
     WTF_MAKE_NONCOPYABLE(UserGestureIndicator);
 public:
     static bool processingUserGesture();
diff --git a/third_party/WebKit/Source/platform/exported/WebURLResponse.cpp b/third_party/WebKit/Source/platform/exported/WebURLResponse.cpp
index c856dd7..8d95476 100644
--- a/third_party/WebKit/Source/platform/exported/WebURLResponse.cpp
+++ b/third_party/WebKit/Source/platform/exported/WebURLResponse.cpp
@@ -160,7 +160,7 @@
 
 void WebURLResponse::setResponseTime(long long responseTime)
 {
-    m_private->m_resourceResponse->setResponseTime(static_cast<int64>(responseTime));
+    m_private->m_resourceResponse->setResponseTime(static_cast<int64_t>(responseTime));
 }
 
 WebString WebURLResponse::mimeType() const
diff --git a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp
index 8b55c2e..46b33fb1 100644
--- a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp
+++ b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp
@@ -128,7 +128,7 @@
     {
     }
 
-    uint8* pixels() override
+    uint8_t* pixels() override
     {
         return nullptr;
     }
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
index 85baf065..0a1fac0b 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
@@ -948,12 +948,12 @@
 void DrawingBuffer::flipVertically(uint8_t* framebuffer, int width, int height)
 {
     m_scanline.resize(width * 4);
-    uint8* scanline = &m_scanline[0];
+    uint8_t* scanline = &m_scanline[0];
     unsigned rowBytes = width * 4;
     unsigned count = height / 2;
     for (unsigned i = 0; i < count; i++) {
-        uint8* rowA = framebuffer + i * rowBytes;
-        uint8* rowB = framebuffer + (height - i - 1) * rowBytes;
+        uint8_t* rowA = framebuffer + i * rowBytes;
+        uint8_t* rowB = framebuffer + (height - i - 1) * rowBytes;
         memcpy(scanline, rowB, rowBytes);
         memcpy(rowB, rowA, rowBytes);
         memcpy(rowA, scanline, rowBytes);
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTest.cpp b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTest.cpp
index fe8d37ad..67a7abe 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTest.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTest.cpp
@@ -609,7 +609,7 @@
         DepthStencilTestCase(true, true, true, 1, "both"),
     };
 
-    for (size_t i = 0; i < arraysize(cases); i++) {
+    for (size_t i = 0; i < WTF_ARRAY_LENGTH(cases); i++) {
         SCOPED_TRACE(cases[i].testCaseName);
         OwnPtr<DepthStencilTrackingContext> context = adoptPtr(new DepthStencilTrackingContext);
         DepthStencilTrackingContext* trackingContext = context.get();
diff --git a/third_party/WebKit/Source/platform/network/ResourceResponse.h b/third_party/WebKit/Source/platform/network/ResourceResponse.h
index 22553194..bc3e67c 100644
--- a/third_party/WebKit/Source/platform/network/ResourceResponse.h
+++ b/third_party/WebKit/Source/platform/network/ResourceResponse.h
@@ -208,8 +208,8 @@
     bool isMultipartPayload() const { return m_isMultipartPayload; }
     void setIsMultipartPayload(bool value) { m_isMultipartPayload = value; }
 
-    int64 responseTime() const { return m_responseTime; }
-    void setResponseTime(int64 responseTime) { m_responseTime = responseTime; }
+    int64_t responseTime() const { return m_responseTime; }
+    void setResponseTime(int64_t responseTime) { m_responseTime = responseTime; }
 
     const AtomicString& remoteIPAddress() const { return m_remoteIPAddress; }
     void setRemoteIPAddress(const AtomicString& value) { m_remoteIPAddress = value; }
@@ -327,7 +327,7 @@
 
     // The time at which the response headers were received.  For cached
     // responses, this time could be "far" in the past.
-    int64 m_responseTime;
+    int64_t m_responseTime;
 
     // Remote IP address of the socket which fetched this resource.
     AtomicString m_remoteIPAddress;
@@ -379,7 +379,7 @@
     bool m_wasFallbackRequiredByServiceWorker;
     WebServiceWorkerResponseType m_serviceWorkerResponseType;
     KURL m_originalURLViaServiceWorker;
-    int64 m_responseTime;
+    int64_t m_responseTime;
     String m_remoteIPAddress;
     unsigned short m_remotePort;
     String m_downloadedFilePath;
diff --git a/third_party/WebKit/Source/platform/plugins/PluginData.h b/third_party/WebKit/Source/platform/plugins/PluginData.h
index 6c350bf..2670ab3 100644
--- a/third_party/WebKit/Source/platform/plugins/PluginData.h
+++ b/third_party/WebKit/Source/platform/plugins/PluginData.h
@@ -21,6 +21,7 @@
 #define PluginData_h
 
 #include "platform/PlatformExport.h"
+#include "wtf/Noncopyable.h"
 #include "wtf/RefCounted.h"
 #include "wtf/Vector.h"
 #include "wtf/text/WTFString.h"
@@ -49,6 +50,7 @@
 };
 
 class PLATFORM_EXPORT PluginData : public RefCounted<PluginData> {
+    WTF_MAKE_NONCOPYABLE(PluginData);
 public:
     static PassRefPtr<PluginData> create(const Page* page) { return adoptRef(new PluginData(page)); }
 
diff --git a/third_party/WebKit/Source/platform/plugins/PluginListBuilder.h b/third_party/WebKit/Source/platform/plugins/PluginListBuilder.h
index 9550cf7..ece23a9b 100644
--- a/third_party/WebKit/Source/platform/plugins/PluginListBuilder.h
+++ b/third_party/WebKit/Source/platform/plugins/PluginListBuilder.h
@@ -33,11 +33,13 @@
 
 #include "platform/plugins/PluginData.h"
 #include "public/platform/WebPluginListBuilder.h"
+#include "wtf/Allocator.h"
 #include "wtf/Vector.h"
 
 namespace blink {
 
 class PluginListBuilder final : public WebPluginListBuilder {
+    DISALLOW_NEW();
 public:
     PluginListBuilder(Vector<PluginInfo>* results) : m_results(results) { }
 
diff --git a/third_party/WebKit/Source/platform/scheduler/CancellableTaskFactory.h b/third_party/WebKit/Source/platform/scheduler/CancellableTaskFactory.h
index 4a5075e5..935ddad 100644
--- a/third_party/WebKit/Source/platform/scheduler/CancellableTaskFactory.h
+++ b/third_party/WebKit/Source/platform/scheduler/CancellableTaskFactory.h
@@ -8,6 +8,7 @@
 #include "platform/PlatformExport.h"
 #include "platform/heap/Handle.h"
 #include "public/platform/WebScheduler.h"
+#include "wtf/Allocator.h"
 #include "wtf/Functional.h"
 #include "wtf/Noncopyable.h"
 #include "wtf/OwnPtr.h"
@@ -70,6 +71,7 @@
 
 private:
     class CancellableTask : public WebTaskRunner::Task {
+        USING_FAST_MALLOC(CancellableTask);
         WTF_MAKE_NONCOPYABLE(CancellableTask);
 
     public:
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.h b/third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.h
index 440aa7e..e0d41a8 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.h
+++ b/third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.h
@@ -9,6 +9,8 @@
 #include "platform/heap/Handle.h"
 #include "public/platform/WebCompositorAnimationDelegate.h"
 #include "public/platform/WebCompositorAnimationPlayerClient.h"
+#include "wtf/Allocator.h"
+#include "wtf/Noncopyable.h"
 #include "wtf/OwnPtr.h"
 
 namespace blink {
@@ -18,6 +20,8 @@
 class WebCompositorAnimationTimeline;
 
 class PLATFORM_EXPORT ScrollAnimatorCompositorCoordinator : public NoBaseWillBeGarbageCollectedFinalized<ScrollAnimatorCompositorCoordinator>, private WebCompositorAnimationPlayerClient, WebCompositorAnimationDelegate {
+    USING_FAST_MALLOC_WILL_BE_REMOVED(ScrollAnimatorCompositorCoordinator);
+    WTF_MAKE_NONCOPYABLE(ScrollAnimatorCompositorCoordinator);
 public:
     virtual ~ScrollAnimatorCompositorCoordinator();
 
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollTypes.h b/third_party/WebKit/Source/platform/scroll/ScrollTypes.h
index 88647ae0..df4acf2b6 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollTypes.h
+++ b/third_party/WebKit/Source/platform/scroll/ScrollTypes.h
@@ -179,6 +179,7 @@
 // the amount of the scroll delta that was not consumed by scrolling. If didScroll is false
 // then unusedScrollDelta is zero.
 struct ScrollResultOneDimensional {
+    STACK_ALLOCATED();
     explicit ScrollResultOneDimensional(bool didScroll)
         : didScroll(didScroll)
         , unusedScrollDelta(0) { }
@@ -191,6 +192,7 @@
 };
 
 struct ScrollResult {
+    STACK_ALLOCATED();
     explicit ScrollResult()
         : didScrollX(false)
         , didScrollY(false)
diff --git a/third_party/WebKit/Source/platform/transforms/AffineTransform.cpp b/third_party/WebKit/Source/platform/transforms/AffineTransform.cpp
index 54d144d..d40fbab 100644
--- a/third_party/WebKit/Source/platform/transforms/AffineTransform.cpp
+++ b/third_party/WebKit/Source/platform/transforms/AffineTransform.cpp
@@ -37,7 +37,8 @@
 
 AffineTransform::AffineTransform()
 {
-    setMatrix(1, 0, 0, 1, 0, 0);
+    const Transform identity = IDENTITY_TRANSFORM;
+    setMatrix(identity);
 }
 
 AffineTransform::AffineTransform(double a, double b, double c, double d, double e, double f)
diff --git a/third_party/WebKit/Source/platform/transforms/AffineTransform.h b/third_party/WebKit/Source/platform/transforms/AffineTransform.h
index 942ae1f..5d1186c4 100644
--- a/third_party/WebKit/Source/platform/transforms/AffineTransform.h
+++ b/third_party/WebKit/Source/platform/transforms/AffineTransform.h
@@ -41,13 +41,16 @@
 class IntRect;
 class TransformationMatrix;
 
+#define IDENTITY_TRANSFORM { 1, 0, 0, 1, 0, 0 }
+
 class PLATFORM_EXPORT AffineTransform {
-    USING_FAST_MALLOC(AffineTransform);
+    DISALLOW_NEW();
 public:
     typedef double Transform[6];
 
     AffineTransform();
     AffineTransform(double a, double b, double c, double d, double e, double f);
+    AffineTransform(const Transform transform) { setMatrix(transform); }
 
     void setMatrix(double a, double b, double c, double d, double e, double f);
 
@@ -173,6 +176,11 @@
     bool decompose(DecomposedType&) const;
     void recompose(const DecomposedType&);
 
+    void copyTransformTo(Transform m)
+    {
+        memcpy(m, m_transform, sizeof(Transform));
+    }
+
 private:
     void setMatrix(const Transform m)
     {
diff --git a/third_party/WebKit/Source/platform/transforms/IdentityTransformOperation.h b/third_party/WebKit/Source/platform/transforms/IdentityTransformOperation.h
index fa8a1e0c..7226df4 100644
--- a/third_party/WebKit/Source/platform/transforms/IdentityTransformOperation.h
+++ b/third_party/WebKit/Source/platform/transforms/IdentityTransformOperation.h
@@ -29,7 +29,7 @@
 
 namespace blink {
 
-class PLATFORM_EXPORT IdentityTransformOperation : public TransformOperation {
+class PLATFORM_EXPORT IdentityTransformOperation final : public TransformOperation {
 public:
     static PassRefPtr<IdentityTransformOperation> create()
     {
diff --git a/third_party/WebKit/Source/platform/transforms/InterpolatedTransformOperation.h b/third_party/WebKit/Source/platform/transforms/InterpolatedTransformOperation.h
index 82b8ce1..1341ea30 100644
--- a/third_party/WebKit/Source/platform/transforms/InterpolatedTransformOperation.h
+++ b/third_party/WebKit/Source/platform/transforms/InterpolatedTransformOperation.h
@@ -37,7 +37,7 @@
 namespace blink {
 
 // This class is an implementation detail for deferred interpolations.
-class PLATFORM_EXPORT InterpolatedTransformOperation : public TransformOperation {
+class PLATFORM_EXPORT InterpolatedTransformOperation final : public TransformOperation {
 public:
     static PassRefPtr<InterpolatedTransformOperation> create(const TransformOperations& from, const TransformOperations& to, double progress)
     {
diff --git a/third_party/WebKit/Source/platform/transforms/Matrix3DTransformOperation.h b/third_party/WebKit/Source/platform/transforms/Matrix3DTransformOperation.h
index 6a768ea..3b0e5dd5 100644
--- a/third_party/WebKit/Source/platform/transforms/Matrix3DTransformOperation.h
+++ b/third_party/WebKit/Source/platform/transforms/Matrix3DTransformOperation.h
@@ -30,7 +30,7 @@
 
 namespace blink {
 
-class PLATFORM_EXPORT Matrix3DTransformOperation : public TransformOperation {
+class PLATFORM_EXPORT Matrix3DTransformOperation final : public TransformOperation {
 public:
     static PassRefPtr<Matrix3DTransformOperation> create(const TransformationMatrix& matrix)
     {
diff --git a/third_party/WebKit/Source/platform/transforms/MatrixTransformOperation.h b/third_party/WebKit/Source/platform/transforms/MatrixTransformOperation.h
index 2cb18bf7..22adfed 100644
--- a/third_party/WebKit/Source/platform/transforms/MatrixTransformOperation.h
+++ b/third_party/WebKit/Source/platform/transforms/MatrixTransformOperation.h
@@ -30,7 +30,7 @@
 
 namespace blink {
 
-class PLATFORM_EXPORT MatrixTransformOperation : public TransformOperation {
+class PLATFORM_EXPORT MatrixTransformOperation final : public TransformOperation {
 public:
     static PassRefPtr<MatrixTransformOperation> create(double a, double b, double c, double d, double e, double f)
     {
diff --git a/third_party/WebKit/Source/platform/transforms/PerspectiveTransformOperation.h b/third_party/WebKit/Source/platform/transforms/PerspectiveTransformOperation.h
index 6ef2556..4e3b008 100644
--- a/third_party/WebKit/Source/platform/transforms/PerspectiveTransformOperation.h
+++ b/third_party/WebKit/Source/platform/transforms/PerspectiveTransformOperation.h
@@ -30,7 +30,7 @@
 
 namespace blink {
 
-class PLATFORM_EXPORT PerspectiveTransformOperation : public TransformOperation {
+class PLATFORM_EXPORT PerspectiveTransformOperation final : public TransformOperation {
 public:
     static PassRefPtr<PerspectiveTransformOperation> create(double p)
     {
diff --git a/third_party/WebKit/Source/platform/transforms/RotateTransformOperation.h b/third_party/WebKit/Source/platform/transforms/RotateTransformOperation.h
index 0e16004..559d19be 100644
--- a/third_party/WebKit/Source/platform/transforms/RotateTransformOperation.h
+++ b/third_party/WebKit/Source/platform/transforms/RotateTransformOperation.h
@@ -29,7 +29,7 @@
 
 namespace blink {
 
-class PLATFORM_EXPORT RotateTransformOperation : public TransformOperation {
+class PLATFORM_EXPORT RotateTransformOperation final : public TransformOperation {
 public:
     static PassRefPtr<RotateTransformOperation> create(double angle, OperationType type)
     {
diff --git a/third_party/WebKit/Source/platform/transforms/ScaleTransformOperation.h b/third_party/WebKit/Source/platform/transforms/ScaleTransformOperation.h
index de4362c..546e5bc 100644
--- a/third_party/WebKit/Source/platform/transforms/ScaleTransformOperation.h
+++ b/third_party/WebKit/Source/platform/transforms/ScaleTransformOperation.h
@@ -29,7 +29,7 @@
 
 namespace blink {
 
-class PLATFORM_EXPORT ScaleTransformOperation : public TransformOperation {
+class PLATFORM_EXPORT ScaleTransformOperation final : public TransformOperation {
 public:
     static PassRefPtr<ScaleTransformOperation> create(double sx, double sy, OperationType type)
     {
diff --git a/third_party/WebKit/Source/platform/transforms/SkewTransformOperation.h b/third_party/WebKit/Source/platform/transforms/SkewTransformOperation.h
index 80107b7..de3b683e 100644
--- a/third_party/WebKit/Source/platform/transforms/SkewTransformOperation.h
+++ b/third_party/WebKit/Source/platform/transforms/SkewTransformOperation.h
@@ -29,7 +29,7 @@
 
 namespace blink {
 
-class PLATFORM_EXPORT SkewTransformOperation : public TransformOperation {
+class PLATFORM_EXPORT SkewTransformOperation final : public TransformOperation {
 public:
     static PassRefPtr<SkewTransformOperation> create(double angleX, double angleY, OperationType type)
     {
diff --git a/third_party/WebKit/Source/platform/transforms/TransformOperation.h b/third_party/WebKit/Source/platform/transforms/TransformOperation.h
index b6dd9ca..d4fe334 100644
--- a/third_party/WebKit/Source/platform/transforms/TransformOperation.h
+++ b/third_party/WebKit/Source/platform/transforms/TransformOperation.h
@@ -35,6 +35,7 @@
 // CSS Transforms (may become part of CSS3)
 
 class PLATFORM_EXPORT TransformOperation : public RefCounted<TransformOperation> {
+    WTF_MAKE_NONCOPYABLE(TransformOperation);
 public:
     enum OperationType {
         ScaleX, ScaleY, Scale,
@@ -52,6 +53,7 @@
         Identity, None
     };
 
+    TransformOperation() { }
     virtual ~TransformOperation() { }
 
     virtual bool operator==(const TransformOperation&) const = 0;
diff --git a/third_party/WebKit/Source/platform/transforms/TransformOperations.h b/third_party/WebKit/Source/platform/transforms/TransformOperations.h
index 1f173d8c..c7ec2fd 100644
--- a/third_party/WebKit/Source/platform/transforms/TransformOperations.h
+++ b/third_party/WebKit/Source/platform/transforms/TransformOperations.h
@@ -27,15 +27,22 @@
 
 #include "platform/geometry/LayoutSize.h"
 #include "platform/transforms/TransformOperation.h"
+#include "wtf/Allocator.h"
 #include "wtf/RefPtr.h"
 #include "wtf/Vector.h"
 
 namespace blink {
 class FloatBox;
+
+class PLATFORM_EXPORT EmptyTransformOperations final {
+    DISALLOW_NEW();
+};
+
 class PLATFORM_EXPORT TransformOperations {
-    USING_FAST_MALLOC(TransformOperations);
+    DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
 public:
     explicit TransformOperations(bool makeIdentity = false);
+    TransformOperations(const EmptyTransformOperations&) { }
 
     bool operator==(const TransformOperations& o) const;
     bool operator!=(const TransformOperations& o) const
diff --git a/third_party/WebKit/Source/platform/weborigin/DatabaseIdentifierTest.cpp b/third_party/WebKit/Source/platform/weborigin/DatabaseIdentifierTest.cpp
index b82b096..01bc1cf 100644
--- a/third_party/WebKit/Source/platform/weborigin/DatabaseIdentifierTest.cpp
+++ b/third_party/WebKit/Source/platform/weborigin/DatabaseIdentifierTest.cpp
@@ -59,7 +59,7 @@
         {"non-standard", "foobar.com", 0, "non-standard__0"},
     };
 
-    for (size_t i = 0; i < arraysize(cases); ++i) {
+    for (size_t i = 0; i < WTF_ARRAY_LENGTH(cases); ++i) {
         RefPtr<SecurityOrigin> origin = SecurityOrigin::create(cases[i].protocol, cases[i].host, cases[i].port);
         String identifier = createDatabaseIdentifierFromSecurityOrigin(origin.get());
         EXPECT_EQ(cases[i].expectedIdentifier, identifier) << "test case " << origin->toString();
@@ -181,7 +181,7 @@
         {"x\x80x", "__0", false},
     };
 
-    for (size_t i = 0; i < arraysize(cases); ++i) {
+    for (size_t i = 0; i < WTF_ARRAY_LENGTH(cases); ++i) {
         RefPtr<SecurityOrigin> origin = SecurityOrigin::create("http", cases[i].hostname, 80);
         String identifier = createDatabaseIdentifierFromSecurityOrigin(origin.get());
         EXPECT_EQ(cases[i].expected, identifier) << "test case " << i << ": \"" << cases[i].hostname << "\"";
@@ -218,7 +218,7 @@
         {"http_escaped%3Dfun.com_0", "http", "escaped%3dfun.com", 0, "http://escaped%3dfun.com", false},
     };
 
-    for (size_t i = 0; i < arraysize(validCases); ++i) {
+    for (size_t i = 0; i < WTF_ARRAY_LENGTH(validCases); ++i) {
         RefPtr<SecurityOrigin> origin = createSecurityOriginFromDatabaseIdentifier(validCases[i].identifier);
         EXPECT_EQ(validCases[i].expectedProtocol, origin->protocol()) << "test case " << i;
         EXPECT_EQ(validCases[i].expectedHost, origin->host()) << "test case " << i;
@@ -244,7 +244,7 @@
         "http_not_canonical_escape%3d_0",
     };
 
-    for (size_t i = 0; i < arraysize(bogusIdentifiers); ++i) {
+    for (size_t i = 0; i < WTF_ARRAY_LENGTH(bogusIdentifiers); ++i) {
         RefPtr<SecurityOrigin> origin = createSecurityOriginFromDatabaseIdentifier(bogusIdentifiers[i]);
         EXPECT_EQ("null", origin->toString()) << "test case " << i;
         EXPECT_EQ(true, origin->isUnique()) << "test case " << i;
diff --git a/third_party/WebKit/Source/platform/weborigin/KURLTest.cpp b/third_party/WebKit/Source/platform/weborigin/KURLTest.cpp
index 7359fcc..277b4a20 100644
--- a/third_party/WebKit/Source/platform/weborigin/KURLTest.cpp
+++ b/third_party/WebKit/Source/platform/weborigin/KURLTest.cpp
@@ -73,7 +73,7 @@
         {"javascript:hello!//world", "javascript", "", 0, "", 0, "world", 0, 0, false},
     };
 
-    for (size_t i = 0; i < arraysize(cases); i++) {
+    for (size_t i = 0; i < WTF_ARRAY_LENGTH(cases); i++) {
         // UTF-8
         KURL kurl(ParsedURLString, cases[i].url);
 
@@ -125,7 +125,7 @@
         {"http://www.google.com/foo/blah?bar=baz#\xce\xb1\xce\xb2", "http", "www.google.com", 0, "", 0,  "blah", "bar=baz", "\xce\xb1\xce\xb2"},
     };
 
-    for (size_t i = 0; i < arraysize(cases); i++) {
+    for (size_t i = 0; i < WTF_ARRAY_LENGTH(cases); i++) {
         KURL kurl(ParsedURLString, cases[i].url);
 
         EXPECT_EQ(cases[i].protocol, kurl.protocol());
@@ -236,7 +236,7 @@
         },
     };
 
-    for (size_t i = 0; i < arraysize(cases); i++) {
+    for (size_t i = 0; i < WTF_ARRAY_LENGTH(cases); i++) {
         KURL kurl(ParsedURLString, cases[i].url);
 
         kurl.setProtocol(cases[i].protocol);
@@ -285,7 +285,7 @@
         {"%e4%bd%a0%e5%a5%bd", "\xe4\xbd\xa0\xe5\xa5\xbd"},
     };
 
-    for (size_t i = 0; i < arraysize(decodeCases); i++) {
+    for (size_t i = 0; i < WTF_ARRAY_LENGTH(decodeCases); i++) {
         String input(decodeCases[i].input);
         String str = decodeURLEscapeSequences(input);
         EXPECT_STREQ(decodeCases[i].output, str.utf8().data());
@@ -328,7 +328,7 @@
           "pqrstuvwxyz%7B%7C%7D~%7F"},
     };
 
-    for (size_t i = 0; i < arraysize(encode_cases); i++) {
+    for (size_t i = 0; i < WTF_ARRAY_LENGTH(encode_cases); i++) {
         String input(encode_cases[i].input);
         String expectedOutput(encode_cases[i].output);
         String output = encodeWithURLEscapeSequences(input);
@@ -755,7 +755,7 @@
         {"https://www.google.com/#", "https://www.google.com/"},
     };
 
-    for (size_t i = 0; i < arraysize(referrerCases); i++) {
+    for (size_t i = 0; i < WTF_ARRAY_LENGTH(referrerCases); i++) {
         KURL kurl(ParsedURLString, referrerCases[i].input);
         String referrer = kurl.strippedForUseAsReferrer();
         EXPECT_STREQ(referrerCases[i].output, referrer.utf8().data());
diff --git a/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp b/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp
index 21659398..81e51aa5 100644
--- a/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp
+++ b/third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp
@@ -410,7 +410,7 @@
     // Test if m_host matches 127.0.0.1/8
     ASSERT(m_host.containsOnlyASCII());
     CString hostAscii = m_host.ascii();
-    Vector<uint8, 4> ipNumber;
+    Vector<uint8_t, 4> ipNumber;
     ipNumber.resize(4);
 
     int numComponents;
diff --git a/third_party/WebKit/Source/platform/weborigin/SecurityOriginTest.cpp b/third_party/WebKit/Source/platform/weborigin/SecurityOriginTest.cpp
index 37e62118..3c46272 100644
--- a/third_party/WebKit/Source/platform/weborigin/SecurityOriginTest.cpp
+++ b/third_party/WebKit/Source/platform/weborigin/SecurityOriginTest.cpp
@@ -48,7 +48,7 @@
 {
     int ports[] = { -100, -1, MaxAllowedPort + 1, 1000000 };
 
-    for (size_t i = 0; i < arraysize(ports); ++i) {
+    for (size_t i = 0; i < WTF_ARRAY_LENGTH(ports); ++i) {
         RefPtr<SecurityOrigin> origin = SecurityOrigin::create("http", "example.com", ports[i]);
         EXPECT_TRUE(origin->isUnique()) << "Port " << ports[i] << " should have generated a unique origin.";
     }
@@ -58,7 +58,7 @@
 {
     int ports[] = { 0, 80, 443, 5000, MaxAllowedPort };
 
-    for (size_t i = 0; i < arraysize(ports); ++i) {
+    for (size_t i = 0; i < WTF_ARRAY_LENGTH(ports); ++i) {
         RefPtr<SecurityOrigin> origin = SecurityOrigin::create("http", "example.com", ports[i]);
         EXPECT_FALSE(origin->isUnique()) << "Port " << ports[i] << " should not have generated a unique origin.";
     }
@@ -153,7 +153,7 @@
         { false, "filesystem:ftp://evil:99/foo" },
     };
 
-    for (size_t i = 0; i < arraysize(inputs); ++i) {
+    for (size_t i = 0; i < WTF_ARRAY_LENGTH(inputs); ++i) {
         SCOPED_TRACE(i);
         RefPtr<SecurityOrigin> origin = SecurityOrigin::createFromString(inputs[i].url);
         String errorMessage;
@@ -306,7 +306,7 @@
         { true, true, "https://name_foobar.com", "https://name_foobar.com" },
     };
 
-    for (size_t i = 0; i < arraysize(tests); ++i) {
+    for (size_t i = 0; i < WTF_ARRAY_LENGTH(tests); ++i) {
         RefPtr<SecurityOrigin> origin1 = SecurityOrigin::createFromString(tests[i].origin1);
         RefPtr<SecurityOrigin> origin2 = SecurityOrigin::createFromString(tests[i].origin2);
         EXPECT_EQ(tests[i].canAccess, origin1->canAccess(origin2.get()));
@@ -332,7 +332,7 @@
         { false, false, "https://name_foobar.com", "https://bazbar.com" },
     };
 
-    for (size_t i = 0; i < arraysize(tests); ++i) {
+    for (size_t i = 0; i < WTF_ARRAY_LENGTH(tests); ++i) {
         RefPtr<SecurityOrigin> origin = SecurityOrigin::createFromString(tests[i].origin);
         blink::KURL url(blink::ParsedURLString, tests[i].url);
         EXPECT_EQ(tests[i].canRequest, origin->canRequest(url));
diff --git a/third_party/WebKit/Source/web/AssociatedURLLoaderTest.cpp b/third_party/WebKit/Source/web/AssociatedURLLoaderTest.cpp
index ebc5a6bb..30fc465f 100644
--- a/third_party/WebKit/Source/web/AssociatedURLLoaderTest.cpp
+++ b/third_party/WebKit/Source/web/AssociatedURLLoaderTest.cpp
@@ -94,7 +94,7 @@
             "visible_iframe.html",
             "zero_sized_iframe.html",
         };
-        for (size_t i = 0; i < arraysize(iframeSupportFiles); ++i) {
+        for (size_t i = 0; i < WTF_ARRAY_LENGTH(iframeSupportFiles); ++i) {
             RegisterMockedUrl(urlRoot, iframeSupportFiles[i]);
         }
 
diff --git a/third_party/WebKit/Source/web/ChromeClientImpl.cpp b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
index 1eab243d..5f458736 100644
--- a/third_party/WebKit/Source/web/ChromeClientImpl.cpp
+++ b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
@@ -856,14 +856,14 @@
     const char* kDialogs[] = {"alert", "confirm", "prompt"};
     int dialog = static_cast<int>(dialogType);
     ASSERT_WITH_SECURITY_IMPLICATION(0 <= dialog);
-    ASSERT_WITH_SECURITY_IMPLICATION(dialog < static_cast<int>(arraysize(kDialogs)));
+    ASSERT_WITH_SECURITY_IMPLICATION(dialog < static_cast<int>(WTF_ARRAY_LENGTH(kDialogs)));
 
     const char* kDismissals[] = {"beforeunload", "pagehide", "unload"};
     int dismissal = static_cast<int>(dismissalType) - 1; // Exclude NoDismissal.
     ASSERT_WITH_SECURITY_IMPLICATION(0 <= dismissal);
-    ASSERT_WITH_SECURITY_IMPLICATION(dismissal < static_cast<int>(arraysize(kDismissals)));
+    ASSERT_WITH_SECURITY_IMPLICATION(dismissal < static_cast<int>(WTF_ARRAY_LENGTH(kDismissals)));
 
-    Platform::current()->histogramEnumeration("Renderer.ModalDialogsDuringPageDismissal", dismissal * arraysize(kDialogs) + dialog, arraysize(kDialogs) * arraysize(kDismissals));
+    Platform::current()->histogramEnumeration("Renderer.ModalDialogsDuringPageDismissal", dismissal * WTF_ARRAY_LENGTH(kDialogs) + dialog, WTF_ARRAY_LENGTH(kDialogs) * WTF_ARRAY_LENGTH(kDismissals));
 
     String message = String("Blocked ") + kDialogs[dialog] + "('" + dialogMessage + "') during " + kDismissals[dismissal] + ".";
     m_webView->mainFrame()->addMessageToConsole(WebConsoleMessage(WebConsoleMessage::LevelError, message));
diff --git a/third_party/WebKit/public/platform/Platform.h b/third_party/WebKit/public/platform/Platform.h
index 95cfc028..b92cc9f1 100644
--- a/third_party/WebKit/public/platform/Platform.h
+++ b/third_party/WebKit/public/platform/Platform.h
@@ -320,7 +320,7 @@
     virtual WebString userAgent() { return WebString(); }
 
     // A suggestion to cache this metadata in association with this URL.
-    virtual void cacheMetadata(const WebURL&, int64 responseTime, const char* data, size_t dataSize) { }
+    virtual void cacheMetadata(const WebURL&, int64_t responseTime, const char* data, size_t dataSize) { }
 
     // Returns the decoded data url if url had a supported mimetype and parsing was successful.
     virtual WebData parseDataURL(const WebURL&, WebString& mimetype, WebString& charset) { return WebData(); }
diff --git a/third_party/WebKit/public/platform/WebExternalBitmap.h b/third_party/WebKit/public/platform/WebExternalBitmap.h
index 25d0a2e..c25ee6de 100644
--- a/third_party/WebKit/public/platform/WebExternalBitmap.h
+++ b/third_party/WebKit/public/platform/WebExternalBitmap.h
@@ -46,7 +46,7 @@
     // Returns the pixels for the bitmap. The buffer that's returned will
     // contain size().width * size().height * 4 bytes and will use Skia's byte
     // order.
-    virtual uint8* pixels() = 0;
+    virtual uint8_t* pixels() = 0;
 };
 
 } // namespace blink