diff --git a/AUTHORS b/AUTHORS
index deb5684..2fac08e 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -87,6 +87,7 @@
 Brian Konzman, SJ <b.g.konzman@gmail.com>
 Brian Luft <brian@electroly.com>
 Brian Merrell, Novell Inc. <bgmerrell@gmail.com>
+Brian Yip <itsbriany@gmail.com>
 Bruno Calvignac <bruno@flock.com>
 Bruno de Oliveira Abinader <brunoabinader@gmail.com>
 Bryan Donlan <bdonlan@gmail.com>
diff --git a/BUILD.gn b/BUILD.gn
index 4f8d5c0..6e94646 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -715,6 +715,7 @@
     # these are needed only for gn to discover build files.
     deps += [
       "//testing/libfuzzer:libfuzzer_main",
+      "//testing/libfuzzer/tests:libfuzzer_tests",
       "//testing/libfuzzer/fuzzers:string_to_int_fuzzer",
     ]
   }
diff --git a/DEPS b/DEPS
index 13cc4dc..e93d334 100644
--- a/DEPS
+++ b/DEPS
@@ -39,11 +39,11 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling Skia
   # and whatever else without interference from each other.
-  'skia_revision': '77991de60c30211a29a946d321abd3b4d42b3d75',
+  'skia_revision': '2d6ba6690f8951e152d8e793191b14afd52f5506',
   # 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': '79e36cf1361330c9f011bbba4b808b03f5939ded',
+  'v8_revision': '87bcc07fd1c772a033ced39a0eaa77246bfc4877',
   # 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.
diff --git a/WATCHLISTS b/WATCHLISTS
index 013e12f..2dee4f4 100644
--- a/WATCHLISTS
+++ b/WATCHLISTS
@@ -1040,6 +1040,9 @@
                   '|third_party/WebKit/Source/modules/push_messaging' \
                   '|third_party/WebKit/public/platform/modules/push_messaging'
     },
+    'blink_platform': {
+      'filepath': 'third_party/WebKit/Source/platform'
+    },
     'blink_platform_graphics': {
       'filepath': 'third_party/WebKit/Source/platform/fonts' \
                   '|third_party/WebKit/Source/platform/geometry' \
@@ -1584,6 +1587,7 @@
                       'tyoshino+watch@chromium.org',
                       'loading-reviews@chromium.org' ],
     'blink_owners': [ 'abarth@chromium.org'],
+    'blink_platform': [ 'kinuko+watch@chromium.org' ],
     'blink_platform_graphics': [ 'schenney@chromium.org',
                                  'danakj@chromium.org',
                                  'pdr+graphicswatchlist@chromium.org',
diff --git a/base/debug/close_handle_hook_win.cc b/base/debug/close_handle_hook_win.cc
index 70d40b2..359b758 100644
--- a/base/debug/close_handle_hook_win.cc
+++ b/base/debug/close_handle_hook_win.cc
@@ -203,14 +203,15 @@
   base::win::IATPatchFunction* patch = NULL;
   patch = IATPatch(module, "CloseHandle", &CloseHandleHook,
                    reinterpret_cast<void**>(&g_close_function));
-  if (patch)
-    hooks_.push_back(patch);
+  if (!patch)
+    return false;
+  hooks_.push_back(patch);
 
   patch = IATPatch(module, "DuplicateHandle", &DuplicateHandleHook,
                    reinterpret_cast<void**>(&g_duplicate_function));
-  if (patch)
-    hooks_.push_back(patch);
-
+  if (!patch)
+    return false;
+  hooks_.push_back(patch);
   return true;
 }
 
@@ -248,12 +249,15 @@
   returned /= sizeof(HMODULE);
   returned = std::min(kSize, returned);
 
+  bool success = false;
+
   for (DWORD current = 0; current < returned; current++) {
-    if (!hooks->AddIATPatch(modules[current]))
-      return false;
+    success = hooks->AddIATPatch(modules[current]);
+    if (!success)
+      break;
   }
 
-  return true;
+  return success;
 }
 
 }  // namespace
diff --git a/base/test/run_all_unittests.cc b/base/test/run_all_unittests.cc
index f3fb3d1..84e6d3f 100644
--- a/base/test/run_all_unittests.cc
+++ b/base/test/run_all_unittests.cc
@@ -22,7 +22,7 @@
 #endif
   base::TestSuite test_suite(argc, argv);
 #if defined(OS_WIN)
-  CHECK(base::debug::InstallHandleHooks());
+  base::debug::InstallHandleHooks();
 #endif
   int ret = base::LaunchUnitTests(
       argc, argv,
diff --git a/cc/animation/animation.h b/cc/animation/animation.h
index 153e4ef..fb8f8d8 100644
--- a/cc/animation/animation.h
+++ b/cc/animation/animation.h
@@ -5,7 +5,7 @@
 #ifndef CC_ANIMATION_ANIMATION_H_
 #define CC_ANIMATION_ANIMATION_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "cc/base/cc_export.h"
diff --git a/cc/animation/animation_host.cc b/cc/animation/animation_host.cc
index 53027e2..512f877 100644
--- a/cc/animation/animation_host.cc
+++ b/cc/animation/animation_host.cc
@@ -6,6 +6,7 @@
 
 #include <algorithm>
 
+#include "base/macros.h"
 #include "cc/animation/animation_delegate.h"
 #include "cc/animation/animation_id_provider.h"
 #include "cc/animation/animation_player.h"
diff --git a/cc/animation/animation_host.h b/cc/animation/animation_host.h
index 05f2ba3..ad5117c 100644
--- a/cc/animation/animation_host.h
+++ b/cc/animation/animation_host.h
@@ -8,6 +8,7 @@
 #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/time/time.h"
diff --git a/cc/animation/animation_id_provider.h b/cc/animation/animation_id_provider.h
index 3b14801..22f62d2 100644
--- a/cc/animation/animation_id_provider.h
+++ b/cc/animation/animation_id_provider.h
@@ -5,7 +5,7 @@
 #ifndef CC_ANIMATION_ANIMATION_ID_PROVIDER_H_
 #define CC_ANIMATION_ANIMATION_ID_PROVIDER_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 
 namespace cc {
diff --git a/cc/animation/animation_player.cc b/cc/animation/animation_player.cc
index c237aa7..dee19ea 100644
--- a/cc/animation/animation_player.cc
+++ b/cc/animation/animation_player.cc
@@ -154,15 +154,12 @@
 }
 
 void AnimationPlayer::PushPropertiesTo(AnimationPlayer* player_impl) {
-  if (!element_animations_) {
-    if (player_impl->element_animations())
+  if (layer_id_ != player_impl->layer_id()) {
+    if (player_impl->layer_id())
       player_impl->DetachLayer();
-    return;
+    if (layer_id_)
+      player_impl->AttachLayer(layer_id_);
   }
-
-  DCHECK(layer_id_);
-  if (!player_impl->element_animations())
-    player_impl->AttachLayer(layer_id_);
 }
 
 void AnimationPlayer::NotifyAnimationStarted(
diff --git a/cc/animation/animation_player.h b/cc/animation/animation_player.h
index 3665a23..d028930 100644
--- a/cc/animation/animation_player.h
+++ b/cc/animation/animation_player.h
@@ -8,6 +8,7 @@
 #include <vector>
 
 #include "base/containers/linked_list.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/time/time.h"
 #include "cc/animation/animation.h"
diff --git a/cc/animation/animation_player_unittest.cc b/cc/animation/animation_player_unittest.cc
index 466964f..d8030b3 100644
--- a/cc/animation/animation_player_unittest.cc
+++ b/cc/animation/animation_player_unittest.cc
@@ -332,5 +332,39 @@
   client_.set_mutators_need_commit(false);
 }
 
+// If main-thread player switches to another layer within one frame then
+// impl-thread player must be switched as well.
+TEST_F(AnimationPlayerTest, SwitchToLayer) {
+  host_->AddAnimationTimeline(timeline_);
+  timeline_->AttachPlayer(player_);
+  player_->AttachLayer(layer_id_);
+
+  host_->PushPropertiesTo(host_impl_);
+
+  GetImplTimelineAndPlayerByID();
+
+  EXPECT_EQ(player_, GetPlayerForLayerId(layer_id_));
+  EXPECT_TRUE(player_->element_animations());
+  EXPECT_EQ(player_->layer_id(), layer_id_);
+
+  EXPECT_EQ(player_impl_, GetImplPlayerForLayerId(layer_id_));
+  EXPECT_TRUE(player_impl_->element_animations());
+  EXPECT_EQ(player_impl_->layer_id(), layer_id_);
+
+  const int new_layer_id = NextTestLayerId();
+  player_->DetachLayer();
+  player_->AttachLayer(new_layer_id);
+
+  EXPECT_EQ(player_, GetPlayerForLayerId(new_layer_id));
+  EXPECT_TRUE(player_->element_animations());
+  EXPECT_EQ(player_->layer_id(), new_layer_id);
+
+  host_->PushPropertiesTo(host_impl_);
+
+  EXPECT_EQ(player_impl_, GetImplPlayerForLayerId(new_layer_id));
+  EXPECT_TRUE(player_impl_->element_animations());
+  EXPECT_EQ(player_impl_->layer_id(), new_layer_id);
+}
+
 }  // namespace
 }  // namespace cc
diff --git a/cc/animation/animation_registrar.cc b/cc/animation/animation_registrar.cc
index a3edd74a..c300026 100644
--- a/cc/animation/animation_registrar.cc
+++ b/cc/animation/animation_registrar.cc
@@ -4,6 +4,8 @@
 
 #include "cc/animation/animation_registrar.h"
 
+#include <stddef.h>
+
 #include "base/trace_event/trace_event.h"
 #include "base/trace_event/trace_event_argument.h"
 #include "cc/animation/layer_animation_controller.h"
diff --git a/cc/animation/animation_registrar.h b/cc/animation/animation_registrar.h
index 5302390..5cb21e9 100644
--- a/cc/animation/animation_registrar.h
+++ b/cc/animation/animation_registrar.h
@@ -6,6 +6,7 @@
 #define CC_ANIMATION_ANIMATION_REGISTRAR_H_
 
 #include "base/containers/hash_tables.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/animation/animation_events.h"
diff --git a/cc/animation/animation_timeline.h b/cc/animation/animation_timeline.h
index 4cb31f5c..6100b44 100644
--- a/cc/animation/animation_timeline.h
+++ b/cc/animation/animation_timeline.h
@@ -8,6 +8,7 @@
 #include <vector>
 
 #include "base/containers/hash_tables.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
diff --git a/cc/animation/element_animations.cc b/cc/animation/element_animations.cc
index 09219dc..1264718 100644
--- a/cc/animation/element_animations.cc
+++ b/cc/animation/element_animations.cc
@@ -4,6 +4,7 @@
 
 #include "cc/animation/element_animations.h"
 
+#include "base/macros.h"
 #include "cc/animation/animation_host.h"
 #include "cc/animation/animation_player.h"
 #include "cc/animation/animation_registrar.h"
diff --git a/cc/animation/element_animations.h b/cc/animation/element_animations.h
index 0d4fb6a..de76291 100644
--- a/cc/animation/element_animations.h
+++ b/cc/animation/element_animations.h
@@ -6,6 +6,7 @@
 #define CC_ANIMATION_ELEMENT_ANIMATIONS_H_
 
 #include "base/containers/linked_list.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "cc/animation/animation_delegate.h"
 #include "cc/animation/layer_animation_controller.h"
diff --git a/cc/animation/keyframed_animation_curve.cc b/cc/animation/keyframed_animation_curve.cc
index 0d74135..a8dd9bd 100644
--- a/cc/animation/keyframed_animation_curve.cc
+++ b/cc/animation/keyframed_animation_curve.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 <algorithm>
 
 #include "cc/animation/keyframed_animation_curve.h"
diff --git a/cc/animation/keyframed_animation_curve.h b/cc/animation/keyframed_animation_curve.h
index a589c76..24101f6 100644
--- a/cc/animation/keyframed_animation_curve.h
+++ b/cc/animation/keyframed_animation_curve.h
@@ -7,6 +7,7 @@
 
 #include <vector>
 
+#include "base/macros.h"
 #include "base/time/time.h"
 #include "cc/animation/animation_curve.h"
 #include "cc/animation/timing_function.h"
diff --git a/cc/animation/layer_animation_controller.cc b/cc/animation/layer_animation_controller.cc
index 721173c..b909dcc 100644
--- a/cc/animation/layer_animation_controller.cc
+++ b/cc/animation/layer_animation_controller.cc
@@ -4,6 +4,8 @@
 
 #include "cc/animation/layer_animation_controller.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 #include <vector>
 
diff --git a/cc/animation/layer_animation_controller.h b/cc/animation/layer_animation_controller.h
index 1f85223..cbff7aa 100644
--- a/cc/animation/layer_animation_controller.h
+++ b/cc/animation/layer_animation_controller.h
@@ -7,8 +7,8 @@
 
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/containers/hash_tables.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/observer_list.h"
diff --git a/cc/animation/layer_animation_controller_unittest.cc b/cc/animation/layer_animation_controller_unittest.cc
index 7f0f033..f47b0cf 100644
--- a/cc/animation/layer_animation_controller_unittest.cc
+++ b/cc/animation/layer_animation_controller_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/animation/layer_animation_controller.h"
 
+#include <stddef.h>
+
 #include "cc/animation/animation.h"
 #include "cc/animation/animation_curve.h"
 #include "cc/animation/animation_delegate.h"
diff --git a/cc/animation/scroll_offset_animation_curve.h b/cc/animation/scroll_offset_animation_curve.h
index 95f3d9f..d27a6dd1 100644
--- a/cc/animation/scroll_offset_animation_curve.h
+++ b/cc/animation/scroll_offset_animation_curve.h
@@ -5,6 +5,7 @@
 #ifndef CC_ANIMATION_SCROLL_OFFSET_ANIMATION_CURVE_H_
 #define CC_ANIMATION_SCROLL_OFFSET_ANIMATION_CURVE_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "cc/animation/animation_curve.h"
diff --git a/cc/animation/scrollbar_animation_controller_linear_fade.h b/cc/animation/scrollbar_animation_controller_linear_fade.h
index f6f4011..8fce904 100644
--- a/cc/animation/scrollbar_animation_controller_linear_fade.h
+++ b/cc/animation/scrollbar_animation_controller_linear_fade.h
@@ -5,6 +5,7 @@
 #ifndef CC_ANIMATION_SCROLLBAR_ANIMATION_CONTROLLER_LINEAR_FADE_H_
 #define CC_ANIMATION_SCROLLBAR_ANIMATION_CONTROLLER_LINEAR_FADE_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/animation/scrollbar_animation_controller.h"
 #include "cc/base/cc_export.h"
diff --git a/cc/animation/scrollbar_animation_controller_thinning.h b/cc/animation/scrollbar_animation_controller_thinning.h
index 44362bd..b700db83 100644
--- a/cc/animation/scrollbar_animation_controller_thinning.h
+++ b/cc/animation/scrollbar_animation_controller_thinning.h
@@ -5,6 +5,7 @@
 #ifndef CC_ANIMATION_SCROLLBAR_ANIMATION_CONTROLLER_THINNING_H_
 #define CC_ANIMATION_SCROLLBAR_ANIMATION_CONTROLLER_THINNING_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/animation/scrollbar_animation_controller.h"
 #include "cc/base/cc_export.h"
diff --git a/cc/animation/timing_function.h b/cc/animation/timing_function.h
index f722dd6..ddc3c51 100644
--- a/cc/animation/timing_function.h
+++ b/cc/animation/timing_function.h
@@ -5,6 +5,7 @@
 #ifndef CC_ANIMATION_TIMING_FUNCTION_H_
 #define CC_ANIMATION_TIMING_FUNCTION_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "ui/gfx/geometry/cubic_bezier.h"
diff --git a/cc/animation/transform_operations.cc b/cc/animation/transform_operations.cc
index 29a3d90..55a23ab 100644
--- a/cc/animation/transform_operations.cc
+++ b/cc/animation/transform_operations.cc
@@ -4,6 +4,8 @@
 
 #include "cc/animation/transform_operations.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 
 #include "ui/gfx/animation/tween.h"
diff --git a/cc/animation/transform_operations.h b/cc/animation/transform_operations.h
index 65f8511..d173ace 100644
--- a/cc/animation/transform_operations.h
+++ b/cc/animation/transform_operations.h
@@ -7,6 +7,7 @@
 
 #include <vector>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/animation/transform_operation.h"
 #include "cc/base/cc_export.h"
diff --git a/cc/animation/transform_operations_unittest.cc b/cc/animation/transform_operations_unittest.cc
index 572ab47..f7610aa 100644
--- a/cc/animation/transform_operations_unittest.cc
+++ b/cc/animation/transform_operations_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 <limits>
 
-#include "base/basictypes.h"
 #include "base/memory/scoped_vector.h"
 #include "cc/animation/transform_operations.h"
 #include "cc/test/geometry_test_utils.h"
diff --git a/cc/base/contiguous_container.cc b/cc/base/contiguous_container.cc
index 53219f9..b56b26b 100644
--- a/cc/base/contiguous_container.cc
+++ b/cc/base/contiguous_container.cc
@@ -4,6 +4,8 @@
 
 #include "cc/base/contiguous_container.h"
 
+#include <stddef.h>
+
 #include <utility>
 
 namespace cc {
diff --git a/cc/base/contiguous_container.h b/cc/base/contiguous_container.h
index f58f5f8..bad1511 100644
--- a/cc/base/contiguous_container.h
+++ b/cc/base/contiguous_container.h
@@ -5,8 +5,10 @@
 #ifndef CC_BASE_CONTIGUOUS_CONTAINER_H_
 #define CC_BASE_CONTIGUOUS_CONTAINER_H_
 
-#include "base/basictypes.h"
+#include <stddef.h>
+
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/stl_util.h"
 #include "cc/base/cc_export.h"
diff --git a/cc/base/contiguous_container_unittest.cc b/cc/base/contiguous_container_unittest.cc
index b5e3a6a..dde2e62 100644
--- a/cc/base/contiguous_container_unittest.cc
+++ b/cc/base/contiguous_container_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 "cc/base/contiguous_container.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
diff --git a/cc/base/delayed_unique_notifier.h b/cc/base/delayed_unique_notifier.h
index 0e461fe..c177a1f 100644
--- a/cc/base/delayed_unique_notifier.h
+++ b/cc/base/delayed_unique_notifier.h
@@ -6,6 +6,7 @@
 #define CC_BASE_DELAYED_UNIQUE_NOTIFIER_H_
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "cc/base/cc_export.h"
 
diff --git a/cc/base/histograms.cc b/cc/base/histograms.cc
index ba6f4f6..58d9aed 100644
--- a/cc/base/histograms.cc
+++ b/cc/base/histograms.cc
@@ -4,6 +4,8 @@
 
 #include "cc/base/histograms.h"
 
+#include <stdint.h>
+
 #include <algorithm>
 #include <cmath>
 #include <cstring>
@@ -52,7 +54,7 @@
 }
 
 // Minimum elapsed time of 1us to limit weighting of fast calls.
-static const int64 kMinimumTimeMicroseconds = 1;
+static const int64_t kMinimumTimeMicroseconds = 1;
 
 ScopedUMAHistogramAreaTimerBase::ScopedUMAHistogramAreaTimerBase() : area_(0) {
 }
diff --git a/cc/base/histograms.h b/cc/base/histograms.h
index 8c8b467..6614f73 100644
--- a/cc/base/histograms.h
+++ b/cc/base/histograms.h
@@ -6,6 +6,7 @@
 #define CC_BASE_HISTOGRAMS_H_
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/metrics/histogram_base.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/numerics/safe_math.h"
diff --git a/cc/base/list_container.h b/cc/base/list_container.h
index d590740..962f6f3 100644
--- a/cc/base/list_container.h
+++ b/cc/base/list_container.h
@@ -5,6 +5,8 @@
 #ifndef CC_BASE_LIST_CONTAINER_H_
 #define CC_BASE_LIST_CONTAINER_H_
 
+#include <stddef.h>
+
 #include "base/logging.h"
 #include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
diff --git a/cc/base/list_container_helper.cc b/cc/base/list_container_helper.cc
index ea30bad..7b249ac 100644
--- a/cc/base/list_container_helper.cc
+++ b/cc/base/list_container_helper.cc
@@ -4,10 +4,13 @@
 
 #include "cc/base/list_container_helper.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 #include <vector>
 
 #include "base/logging.h"
+#include "base/macros.h"
 
 namespace {
 const size_t kDefaultNumElementTypesToReserve = 32;
diff --git a/cc/base/list_container_helper.h b/cc/base/list_container_helper.h
index 31b2310..61ca25e 100644
--- a/cc/base/list_container_helper.h
+++ b/cc/base/list_container_helper.h
@@ -5,6 +5,9 @@
 #ifndef CC_BASE_LIST_CONTAINER_HELPER_H_
 #define CC_BASE_LIST_CONTAINER_HELPER_H_
 
+#include <stddef.h>
+
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 
diff --git a/cc/base/list_container_unittest.cc b/cc/base/list_container_unittest.cc
index be0b2b7..1363025 100644
--- a/cc/base/list_container_unittest.cc
+++ b/cc/base/list_container_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/base/list_container.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 #include <vector>
 #include "testing/gmock/include/gmock/gmock.h"
diff --git a/cc/base/math_util_unittest.cc b/cc/base/math_util_unittest.cc
index 9d44fba..e82de66 100644
--- a/cc/base/math_util_unittest.cc
+++ b/cc/base/math_util_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/base/math_util.h"
 
+#include <stdint.h>
+
 #include <cmath>
 
 #include "cc/test/geometry_test_utils.h"
diff --git a/cc/base/random_access_list_container.h b/cc/base/random_access_list_container.h
index b2baf30..34eb699 100644
--- a/cc/base/random_access_list_container.h
+++ b/cc/base/random_access_list_container.h
@@ -5,6 +5,8 @@
 #ifndef CC_BASE_RANDOM_ACCESS_LIST_CONTAINER_H_
 #define CC_BASE_RANDOM_ACCESS_LIST_CONTAINER_H_
 
+#include <stddef.h>
+
 #include <vector>
 
 #include "base/logging.h"
diff --git a/cc/base/random_access_list_container_unittest.cc b/cc/base/random_access_list_container_unittest.cc
index 78004b4..c02ca78 100644
--- a/cc/base/random_access_list_container_unittest.cc
+++ b/cc/base/random_access_list_container_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/base/random_access_list_container.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 #include <vector>
 
diff --git a/cc/base/region.cc b/cc/base/region.cc
index 3030a17..8332f9a 100644
--- a/cc/base/region.cc
+++ b/cc/base/region.cc
@@ -4,6 +4,8 @@
 
 #include "cc/base/region.h"
 
+#include <stddef.h>
+
 #include "base/trace_event/trace_event_argument.h"
 #include "base/values.h"
 #include "cc/base/simple_enclosed_region.h"
diff --git a/cc/base/rolling_time_delta_history.cc b/cc/base/rolling_time_delta_history.cc
index db04f58..e296c4b 100644
--- a/cc/base/rolling_time_delta_history.cc
+++ b/cc/base/rolling_time_delta_history.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 "cc/base/rolling_time_delta_history.h"
diff --git a/cc/base/rolling_time_delta_history.h b/cc/base/rolling_time_delta_history.h
index e51fb86..61ed339 100644
--- a/cc/base/rolling_time_delta_history.h
+++ b/cc/base/rolling_time_delta_history.h
@@ -5,9 +5,12 @@
 #ifndef CC_BASE_ROLLING_TIME_DELTA_HISTORY_H_
 #define CC_BASE_ROLLING_TIME_DELTA_HISTORY_H_
 
+#include <stddef.h>
+
 #include <deque>
 #include <set>
 
+#include "base/macros.h"
 #include "base/time/time.h"
 #include "cc/base/cc_export.h"
 
diff --git a/cc/base/rtree.cc b/cc/base/rtree.cc
index 9efc746..0b389f4 100644
--- a/cc/base/rtree.cc
+++ b/cc/base/rtree.cc
@@ -4,6 +4,9 @@
 
 #include "cc/base/rtree.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <cmath>
 
 #include "base/logging.h"
diff --git a/cc/base/rtree.h b/cc/base/rtree.h
index b9bc0fb..21cd920 100644
--- a/cc/base/rtree.h
+++ b/cc/base/rtree.h
@@ -5,6 +5,9 @@
 #ifndef CC_BASE_RTREE_H_
 #define CC_BASE_RTREE_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <deque>
 #include <vector>
 
diff --git a/cc/base/rtree_unittest.cc b/cc/base/rtree_unittest.cc
index 9f6a46b..8328883 100644
--- a/cc/base/rtree_unittest.cc
+++ b/cc/base/rtree_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/base/rtree.h"
 
+#include <stddef.h>
+
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace cc {
diff --git a/cc/base/simple_enclosed_region.cc b/cc/base/simple_enclosed_region.cc
index e2683f3..50e905b 100644
--- a/cc/base/simple_enclosed_region.cc
+++ b/cc/base/simple_enclosed_region.cc
@@ -4,14 +4,17 @@
 
 #include "cc/base/simple_enclosed_region.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/logging.h"
 #include "cc/base/region.h"
 
 namespace cc {
 
 static bool RectIsLargerArea(const gfx::Rect& a, const gfx::Rect b) {
-  int64 a_area = static_cast<int64>(a.width()) * a.height();
-  int64 b_area = static_cast<int64>(b.width()) * b.height();
+  int64_t a_area = static_cast<int64_t>(a.width()) * a.height();
+  int64_t b_area = static_cast<int64_t>(b.width()) * b.height();
   return a_area > b_area;
 }
 
diff --git a/cc/base/simple_enclosed_region.h b/cc/base/simple_enclosed_region.h
index 5e8a6b2..e7bb995 100644
--- a/cc/base/simple_enclosed_region.h
+++ b/cc/base/simple_enclosed_region.h
@@ -5,6 +5,8 @@
 #ifndef CC_BASE_SIMPLE_ENCLOSED_REGION_H_
 #define CC_BASE_SIMPLE_ENCLOSED_REGION_H_
 
+#include <stddef.h>
+
 #include <string>
 
 #include "cc/base/cc_export.h"
diff --git a/cc/base/simple_enclosed_region_unittest.cc b/cc/base/simple_enclosed_region_unittest.cc
index 869da4e..ca3ad61 100644
--- a/cc/base/simple_enclosed_region_unittest.cc
+++ b/cc/base/simple_enclosed_region_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/base/simple_enclosed_region.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 #include <vector>
 
diff --git a/cc/base/tiling_data.h b/cc/base/tiling_data.h
index c95a672..3c3937d 100644
--- a/cc/base/tiling_data.h
+++ b/cc/base/tiling_data.h
@@ -7,7 +7,6 @@
 
 #include <utility>
 
-#include "base/basictypes.h"
 #include "base/logging.h"
 #include "cc/base/cc_export.h"
 #include "ui/gfx/geometry/rect.h"
diff --git a/cc/base/tiling_data_unittest.cc b/cc/base/tiling_data_unittest.cc
index 732b04db..004db11 100644
--- a/cc/base/tiling_data_unittest.cc
+++ b/cc/base/tiling_data_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/base/tiling_data.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 #include <vector>
 
diff --git a/cc/base/time_util.h b/cc/base/time_util.h
index 06682c2..d124f94 100644
--- a/cc/base/time_util.h
+++ b/cc/base/time_util.h
@@ -14,7 +14,7 @@
 class CC_EXPORT TimeUtil {
  public:
   static base::TimeDelta Scale(base::TimeDelta time_delta, double value) {
-    return base::TimeDelta::FromInternalValue(static_cast<int64>(
+    return base::TimeDelta::FromInternalValue(static_cast<int64_t>(
         static_cast<double>(time_delta.ToInternalValue()) * value));
   }
 
diff --git a/cc/base/unique_notifier.h b/cc/base/unique_notifier.h
index 3cbc22a..b54091a 100644
--- a/cc/base/unique_notifier.h
+++ b/cc/base/unique_notifier.h
@@ -6,6 +6,7 @@
 #define CC_BASE_UNIQUE_NOTIFIER_H_
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "cc/base/cc_export.h"
 
diff --git a/cc/blink/scrollbar_impl.h b/cc/blink/scrollbar_impl.h
index 6179697..5f11a1b 100644
--- a/cc/blink/scrollbar_impl.h
+++ b/cc/blink/scrollbar_impl.h
@@ -5,7 +5,7 @@
 #ifndef CC_BLINK_SCROLLBAR_IMPL_H_
 #define CC_BLINK_SCROLLBAR_IMPL_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/input/scrollbar.h"
 #include "third_party/WebKit/public/platform/WebScrollbarThemePainter.h"
diff --git a/cc/blink/web_animation_impl.h b/cc/blink/web_animation_impl.h
index c1bdb0e..92029be 100644
--- a/cc/blink/web_animation_impl.h
+++ b/cc/blink/web_animation_impl.h
@@ -5,6 +5,7 @@
 #ifndef CC_BLINK_WEB_ANIMATION_IMPL_H_
 #define CC_BLINK_WEB_ANIMATION_IMPL_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/blink/cc_blink_export.h"
 #include "third_party/WebKit/public/platform/WebCompositorAnimation.h"
diff --git a/cc/blink/web_compositor_animation_player_impl.h b/cc/blink/web_compositor_animation_player_impl.h
index 1d4879b..0cc6975 100644
--- a/cc/blink/web_compositor_animation_player_impl.h
+++ b/cc/blink/web_compositor_animation_player_impl.h
@@ -5,6 +5,7 @@
 #ifndef CC_BLINK_WEB_COMPOSITOR_ANIMATION_PLAYER_IMPL_H_
 #define CC_BLINK_WEB_COMPOSITOR_ANIMATION_PLAYER_IMPL_H_
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/blink/cc_blink_export.h"
diff --git a/cc/blink/web_compositor_animation_timeline_impl.h b/cc/blink/web_compositor_animation_timeline_impl.h
index 624d29f..556c937 100644
--- a/cc/blink/web_compositor_animation_timeline_impl.h
+++ b/cc/blink/web_compositor_animation_timeline_impl.h
@@ -5,6 +5,7 @@
 #ifndef CC_BLINK_WEB_COMPOSITOR_ANIMATION_TIMELINE_IMPL_H_
 #define CC_BLINK_WEB_COMPOSITOR_ANIMATION_TIMELINE_IMPL_H_
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/blink/cc_blink_export.h"
diff --git a/cc/blink/web_compositor_support_impl.h b/cc/blink/web_compositor_support_impl.h
index 73880b2..d32d0e1 100644
--- a/cc/blink/web_compositor_support_impl.h
+++ b/cc/blink/web_compositor_support_impl.h
@@ -5,6 +5,7 @@
 #ifndef CC_BLINK_WEB_COMPOSITOR_SUPPORT_IMPL_H_
 #define CC_BLINK_WEB_COMPOSITOR_SUPPORT_IMPL_H_
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "cc/blink/cc_blink_export.h"
 #include "third_party/WebKit/public/platform/WebCompositorAnimationCurve.h"
diff --git a/cc/blink/web_content_layer_impl.cc b/cc/blink/web_content_layer_impl.cc
index 0eb381f..6f7b66c 100644
--- a/cc/blink/web_content_layer_impl.cc
+++ b/cc/blink/web_content_layer_impl.cc
@@ -4,6 +4,8 @@
 
 #include "cc/blink/web_content_layer_impl.h"
 
+#include <stddef.h>
+
 #include "base/command_line.h"
 #include "cc/base/switches.h"
 #include "cc/blink/web_display_item_list_impl.h"
diff --git a/cc/blink/web_content_layer_impl.h b/cc/blink/web_content_layer_impl.h
index 6a075ae..53fd83c 100644
--- a/cc/blink/web_content_layer_impl.h
+++ b/cc/blink/web_content_layer_impl.h
@@ -5,6 +5,9 @@
 #ifndef CC_BLINK_WEB_CONTENT_LAYER_IMPL_H_
 #define CC_BLINK_WEB_CONTENT_LAYER_IMPL_H_
 
+#include <stddef.h>
+
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/blink/cc_blink_export.h"
 #include "cc/blink/web_layer_impl.h"
diff --git a/cc/blink/web_display_item_list_impl.cc b/cc/blink/web_display_item_list_impl.cc
index f5d89b0..c46e8a0 100644
--- a/cc/blink/web_display_item_list_impl.cc
+++ b/cc/blink/web_display_item_list_impl.cc
@@ -4,6 +4,9 @@
 
 #include "cc/blink/web_display_item_list_impl.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <vector>
 
 #include "cc/blink/web_filter_operations_impl.h"
diff --git a/cc/blink/web_display_item_list_impl.h b/cc/blink/web_display_item_list_impl.h
index 0c271f1..14278ef 100644
--- a/cc/blink/web_display_item_list_impl.h
+++ b/cc/blink/web_display_item_list_impl.h
@@ -5,6 +5,7 @@
 #ifndef CC_BLINK_WEB_DISPLAY_ITEM_LIST_IMPL_H_
 #define CC_BLINK_WEB_DISPLAY_ITEM_LIST_IMPL_H_
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "cc/blink/cc_blink_export.h"
 #include "cc/playback/display_item_list.h"
diff --git a/cc/blink/web_external_bitmap_impl.cc b/cc/blink/web_external_bitmap_impl.cc
index 23018960..ace8725 100644
--- a/cc/blink/web_external_bitmap_impl.cc
+++ b/cc/blink/web_external_bitmap_impl.cc
@@ -4,6 +4,8 @@
 
 #include "cc/blink/web_external_bitmap_impl.h"
 
+#include <stdint.h>
+
 #include "cc/resources/shared_bitmap.h"
 
 namespace cc_blink {
@@ -36,7 +38,7 @@
   return size_;
 }
 
-uint8* WebExternalBitmapImpl::pixels() {
+uint8_t* WebExternalBitmapImpl::pixels() {
   if (!shared_bitmap_) {
     // crbug.com/520417: not sure why a non-null WebExternalBitmap is
     // being passed to prepareMailbox when the shared_bitmap_ is null.
diff --git a/cc/blink/web_external_bitmap_impl.h b/cc/blink/web_external_bitmap_impl.h
index 6cada7d..20e27df 100644
--- a/cc/blink/web_external_bitmap_impl.h
+++ b/cc/blink/web_external_bitmap_impl.h
@@ -5,7 +5,10 @@
 #ifndef CC_BLINK_WEB_EXTERNAL_BITMAP_IMPL_H_
 #define CC_BLINK_WEB_EXTERNAL_BITMAP_IMPL_H_
 
+#include <stdint.h>
+
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/blink/cc_blink_export.h"
 #include "third_party/WebKit/public/platform/WebExternalBitmap.h"
@@ -31,7 +34,7 @@
   // blink::WebExternalBitmap implementation.
   blink::WebSize size() override;
   void setSize(blink::WebSize size) override;
-  uint8* pixels() override;
+  uint8_t* pixels() override;
 
   cc::SharedBitmap* shared_bitmap() { return shared_bitmap_.get(); }
 
diff --git a/cc/blink/web_external_texture_layer_impl.h b/cc/blink/web_external_texture_layer_impl.h
index 8438a89..d48af64 100644
--- a/cc/blink/web_external_texture_layer_impl.h
+++ b/cc/blink/web_external_texture_layer_impl.h
@@ -6,6 +6,7 @@
 #define CC_BLINK_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_
 
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
 #include "cc/blink/cc_blink_export.h"
diff --git a/cc/blink/web_filter_animation_curve_impl.h b/cc/blink/web_filter_animation_curve_impl.h
index e922ccb..9d6ea40 100644
--- a/cc/blink/web_filter_animation_curve_impl.h
+++ b/cc/blink/web_filter_animation_curve_impl.h
@@ -5,6 +5,7 @@
 #ifndef CC_BLINK_WEB_FILTER_ANIMATION_CURVE_IMPL_H_
 #define CC_BLINK_WEB_FILTER_ANIMATION_CURVE_IMPL_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/blink/cc_blink_export.h"
 #include "third_party/WebKit/public/platform/WebFilterAnimationCurve.h"
diff --git a/cc/blink/web_filter_operations_impl.cc b/cc/blink/web_filter_operations_impl.cc
index e896c6a..d657d11 100644
--- a/cc/blink/web_filter_operations_impl.cc
+++ b/cc/blink/web_filter_operations_impl.cc
@@ -4,7 +4,6 @@
 
 #include "cc/blink/web_filter_operations_impl.h"
 
-#include "base/basictypes.h"
 #include "skia/ext/refptr.h"
 #include "third_party/WebKit/public/platform/WebColor.h"
 #include "third_party/WebKit/public/platform/WebPoint.h"
diff --git a/cc/blink/web_filter_operations_impl.h b/cc/blink/web_filter_operations_impl.h
index d1746ce..b2a9e6a 100644
--- a/cc/blink/web_filter_operations_impl.h
+++ b/cc/blink/web_filter_operations_impl.h
@@ -5,8 +5,9 @@
 #ifndef CC_BLINK_WEB_FILTER_OPERATIONS_IMPL_H_
 #define CC_BLINK_WEB_FILTER_OPERATIONS_IMPL_H_
 
-#include "cc/output/filter_operations.h"
+#include "base/macros.h"
 #include "cc/blink/cc_blink_export.h"
+#include "cc/output/filter_operations.h"
 #include "third_party/WebKit/public/platform/WebFilterOperations.h"
 
 namespace cc_blink {
diff --git a/cc/blink/web_float_animation_curve_impl.h b/cc/blink/web_float_animation_curve_impl.h
index 42bab59f..a47b1e1 100644
--- a/cc/blink/web_float_animation_curve_impl.h
+++ b/cc/blink/web_float_animation_curve_impl.h
@@ -5,6 +5,7 @@
 #ifndef CC_BLINK_WEB_FLOAT_ANIMATION_CURVE_IMPL_H_
 #define CC_BLINK_WEB_FLOAT_ANIMATION_CURVE_IMPL_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/blink/cc_blink_export.h"
 #include "third_party/WebKit/public/platform/WebFloatAnimationCurve.h"
diff --git a/cc/blink/web_image_layer_impl.h b/cc/blink/web_image_layer_impl.h
index 74a8e76..d2775fb 100644
--- a/cc/blink/web_image_layer_impl.h
+++ b/cc/blink/web_image_layer_impl.h
@@ -5,6 +5,7 @@
 #ifndef CC_BLINK_WEB_IMAGE_LAYER_IMPL_H_
 #define CC_BLINK_WEB_IMAGE_LAYER_IMPL_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/blink/cc_blink_export.h"
 #include "third_party/WebKit/public/platform/WebImageLayer.h"
diff --git a/cc/blink/web_layer_impl.cc b/cc/blink/web_layer_impl.cc
index cdf3160..ddae256 100644
--- a/cc/blink/web_layer_impl.cc
+++ b/cc/blink/web_layer_impl.cc
@@ -4,6 +4,9 @@
 
 #include "cc/blink/web_layer_impl.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <utility>
 #include <vector>
 
diff --git a/cc/blink/web_layer_impl.h b/cc/blink/web_layer_impl.h
index e642915..a1b762b 100644
--- a/cc/blink/web_layer_impl.h
+++ b/cc/blink/web_layer_impl.h
@@ -5,9 +5,13 @@
 #ifndef CC_BLINK_WEB_LAYER_IMPL_H_
 #define CC_BLINK_WEB_LAYER_IMPL_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <string>
 #include <utility>
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/blink/cc_blink_export.h"
diff --git a/cc/blink/web_layer_impl_fixed_bounds.h b/cc/blink/web_layer_impl_fixed_bounds.h
index 3289245..614ccd3 100644
--- a/cc/blink/web_layer_impl_fixed_bounds.h
+++ b/cc/blink/web_layer_impl_fixed_bounds.h
@@ -5,6 +5,7 @@
 #ifndef CC_BLINK_WEB_LAYER_IMPL_FIXED_BOUNDS_H_
 #define CC_BLINK_WEB_LAYER_IMPL_FIXED_BOUNDS_H_
 
+#include "base/macros.h"
 #include "cc/blink/web_layer_impl.h"
 #include "ui/gfx/geometry/size.h"
 #include "ui/gfx/transform.h"
diff --git a/cc/blink/web_scroll_offset_animation_curve_impl.h b/cc/blink/web_scroll_offset_animation_curve_impl.h
index 3a21853..82e77ac 100644
--- a/cc/blink/web_scroll_offset_animation_curve_impl.h
+++ b/cc/blink/web_scroll_offset_animation_curve_impl.h
@@ -5,6 +5,7 @@
 #ifndef CC_BLINK_WEB_SCROLL_OFFSET_ANIMATION_CURVE_IMPL_H_
 #define CC_BLINK_WEB_SCROLL_OFFSET_ANIMATION_CURVE_IMPL_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/blink/cc_blink_export.h"
 #include "third_party/WebKit/public/platform/WebScrollOffsetAnimationCurve.h"
diff --git a/cc/blink/web_scrollbar_layer_impl.h b/cc/blink/web_scrollbar_layer_impl.h
index 734e069..f9cd68c 100644
--- a/cc/blink/web_scrollbar_layer_impl.h
+++ b/cc/blink/web_scrollbar_layer_impl.h
@@ -5,6 +5,7 @@
 #ifndef CC_BLINK_WEB_SCROLLBAR_LAYER_IMPL_H_
 #define CC_BLINK_WEB_SCROLLBAR_LAYER_IMPL_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/blink/cc_blink_export.h"
 #include "third_party/WebKit/public/platform/WebScrollbar.h"
diff --git a/cc/blink/web_to_cc_animation_delegate_adapter.h b/cc/blink/web_to_cc_animation_delegate_adapter.h
index 4d52cb4..72e79e6 100644
--- a/cc/blink/web_to_cc_animation_delegate_adapter.h
+++ b/cc/blink/web_to_cc_animation_delegate_adapter.h
@@ -5,8 +5,8 @@
 #ifndef CC_BLINK_WEB_TO_CC_ANIMATION_DELEGATE_ADAPTER_H_
 #define CC_BLINK_WEB_TO_CC_ANIMATION_DELEGATE_ADAPTER_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "cc/animation/animation_delegate.h"
 
 namespace blink {
diff --git a/cc/blink/web_transform_animation_curve_impl.h b/cc/blink/web_transform_animation_curve_impl.h
index 9143d3c..b6f1cabc 100644
--- a/cc/blink/web_transform_animation_curve_impl.h
+++ b/cc/blink/web_transform_animation_curve_impl.h
@@ -5,6 +5,7 @@
 #ifndef CC_BLINK_WEB_TRANSFORM_ANIMATION_CURVE_IMPL_H_
 #define CC_BLINK_WEB_TRANSFORM_ANIMATION_CURVE_IMPL_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/blink/cc_blink_export.h"
 #include "third_party/WebKit/public/platform/WebTransformAnimationCurve.h"
diff --git a/cc/blink/web_transform_operations_impl.h b/cc/blink/web_transform_operations_impl.h
index f8fe22b..c13a72b 100644
--- a/cc/blink/web_transform_operations_impl.h
+++ b/cc/blink/web_transform_operations_impl.h
@@ -5,6 +5,7 @@
 #ifndef CC_BLINK_WEB_TRANSFORM_OPERATIONS_IMPL_H_
 #define CC_BLINK_WEB_TRANSFORM_OPERATIONS_IMPL_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/animation/transform_operations.h"
 #include "cc/blink/cc_blink_export.h"
diff --git a/cc/debug/benchmark_instrumentation.h b/cc/debug/benchmark_instrumentation.h
index 99cfa21..af70156 100644
--- a/cc/debug/benchmark_instrumentation.h
+++ b/cc/debug/benchmark_instrumentation.h
@@ -5,6 +5,7 @@
 #ifndef CC_DEBUG_BENCHMARK_INSTRUMENTATION_H_
 #define CC_DEBUG_BENCHMARK_INSTRUMENTATION_H_
 
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "cc/debug/rendering_stats.h"
 
diff --git a/cc/debug/debug_colors.h b/cc/debug/debug_colors.h
index 1efabde..673f199 100644
--- a/cc/debug/debug_colors.h
+++ b/cc/debug/debug_colors.h
@@ -5,7 +5,7 @@
 #ifndef CC_DEBUG_DEBUG_COLORS_H_
 #define CC_DEBUG_DEBUG_COLORS_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "third_party/skia/include/core/SkColor.h"
 
 namespace cc {
diff --git a/cc/debug/debug_rect_history.cc b/cc/debug/debug_rect_history.cc
index 10faaca..5ac2b5d 100644
--- a/cc/debug/debug_rect_history.cc
+++ b/cc/debug/debug_rect_history.cc
@@ -4,6 +4,8 @@
 
 #include "cc/debug/debug_rect_history.h"
 
+#include <stddef.h>
+
 #include "cc/base/math_util.h"
 #include "cc/layers/layer_impl.h"
 #include "cc/layers/layer_iterator.h"
diff --git a/cc/debug/debug_rect_history.h b/cc/debug/debug_rect_history.h
index 6bcf438..bea3467 100644
--- a/cc/debug/debug_rect_history.h
+++ b/cc/debug/debug_rect_history.h
@@ -6,7 +6,7 @@
 #define CC_DEBUG_DEBUG_RECT_HISTORY_H_
 
 #include <vector>
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/layers/layer_lists.h"
 #include "ui/gfx/geometry/rect.h"
diff --git a/cc/debug/devtools_instrumentation.h b/cc/debug/devtools_instrumentation.h
index 3a28579..f6eacdc 100644
--- a/cc/debug/devtools_instrumentation.h
+++ b/cc/debug/devtools_instrumentation.h
@@ -5,6 +5,9 @@
 #ifndef CC_DEBUG_DEVTOOLS_INSTRUMENTATION_H_
 #define CC_DEBUG_DEVTOOLS_INSTRUMENTATION_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/trace_event/trace_event.h"
 #include "base/trace_event/trace_event_argument.h"
 
@@ -55,7 +58,7 @@
   explicit ScopedImageDecodeTask(const void* imagePtr) {
     TRACE_EVENT_BEGIN1(internal::kCategory, internal::kImageDecodeTask,
                        internal::kPixelRefId,
-                       reinterpret_cast<uint64>(imagePtr));
+                       reinterpret_cast<uint64_t>(imagePtr));
   }
   ~ScopedImageDecodeTask() {
     TRACE_EVENT_END0(internal::kCategory, internal::kImageDecodeTask);
diff --git a/cc/debug/frame_rate_counter.cc b/cc/debug/frame_rate_counter.cc
index c43270d..a6b4a44 100644
--- a/cc/debug/frame_rate_counter.cc
+++ b/cc/debug/frame_rate_counter.cc
@@ -4,6 +4,8 @@
 
 #include "cc/debug/frame_rate_counter.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 #include <limits>
 
diff --git a/cc/debug/frame_rate_counter.h b/cc/debug/frame_rate_counter.h
index c50d7e2..ad91598 100644
--- a/cc/debug/frame_rate_counter.h
+++ b/cc/debug/frame_rate_counter.h
@@ -5,7 +5,9 @@
 #ifndef CC_DEBUG_FRAME_RATE_COUNTER_H_
 #define CC_DEBUG_FRAME_RATE_COUNTER_H_
 
-#include "base/basictypes.h"
+#include <stddef.h>
+
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "cc/debug/ring_buffer.h"
diff --git a/cc/debug/frame_timing_request.cc b/cc/debug/frame_timing_request.cc
index 6c54ea2..211d57d 100644
--- a/cc/debug/frame_timing_request.cc
+++ b/cc/debug/frame_timing_request.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 "cc/debug/frame_timing_request.h"
 
 namespace cc {
diff --git a/cc/debug/frame_timing_request.h b/cc/debug/frame_timing_request.h
index aedd720..6b2b57c 100644
--- a/cc/debug/frame_timing_request.h
+++ b/cc/debug/frame_timing_request.h
@@ -5,6 +5,8 @@
 #ifndef CC_DEBUG_FRAME_TIMING_REQUEST_H_
 #define CC_DEBUG_FRAME_TIMING_REQUEST_H_
 
+#include <stdint.h>
+
 #include "cc/base/cc_export.h"
 #include "ui/gfx/geometry/rect.h"
 
diff --git a/cc/debug/frame_timing_tracker.cc b/cc/debug/frame_timing_tracker.cc
index e1e7258..dda2e31 100644
--- a/cc/debug/frame_timing_tracker.cc
+++ b/cc/debug/frame_timing_tracker.cc
@@ -4,6 +4,8 @@
 
 #include "cc/debug/frame_timing_tracker.h"
 
+#include <stdint.h>
+
 #include <algorithm>
 #include <limits>
 
diff --git a/cc/debug/frame_timing_tracker.h b/cc/debug/frame_timing_tracker.h
index 7b638d7..5341b6a 100644
--- a/cc/debug/frame_timing_tracker.h
+++ b/cc/debug/frame_timing_tracker.h
@@ -5,11 +5,13 @@
 #ifndef CC_DEBUG_FRAME_TIMING_TRACKER_H_
 #define CC_DEBUG_FRAME_TIMING_TRACKER_H_
 
+#include <stdint.h>
+
 #include <utility>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/containers/hash_tables.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "cc/base/cc_export.h"
diff --git a/cc/debug/frame_timing_tracker_unittest.cc b/cc/debug/frame_timing_tracker_unittest.cc
index 7383497..141e9b7 100644
--- a/cc/debug/frame_timing_tracker_unittest.cc
+++ b/cc/debug/frame_timing_tracker_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 <set>
 #include <string>
 
diff --git a/cc/debug/frame_viewer_instrumentation.h b/cc/debug/frame_viewer_instrumentation.h
index 773e8c5..119e523 100644
--- a/cc/debug/frame_viewer_instrumentation.h
+++ b/cc/debug/frame_viewer_instrumentation.h
@@ -5,6 +5,7 @@
 #ifndef CC_DEBUG_FRAME_VIEWER_INSTRUMENTATION_H_
 #define CC_DEBUG_FRAME_VIEWER_INSTRUMENTATION_H_
 
+#include "base/macros.h"
 #include "base/trace_event/trace_event.h"
 #include "cc/tiles/tile.h"
 #include "cc/tiles/tile_priority.h"
diff --git a/cc/debug/invalidation_benchmark.cc b/cc/debug/invalidation_benchmark.cc
index 8a9fc88..0cd68cb 100644
--- a/cc/debug/invalidation_benchmark.cc
+++ b/cc/debug/invalidation_benchmark.cc
@@ -4,10 +4,11 @@
 
 #include "cc/debug/invalidation_benchmark.h"
 
+#include <stdint.h>
+
 #include <algorithm>
 #include <limits>
 
-#include "base/basictypes.h"
 #include "base/rand_util.h"
 #include "base/values.h"
 #include "cc/layers/layer.h"
@@ -126,10 +127,10 @@
 // high quality, but they need to be identical in each run. Therefore, we use a
 // LCG and keep the state locally in the benchmark.
 float InvalidationBenchmark::LCGRandom() {
-  const uint32 a = 1664525;
-  const uint32 c = 1013904223;
+  const uint32_t a = 1664525;
+  const uint32_t c = 1013904223;
   seed_ = a * seed_ + c;
-  return static_cast<float>(seed_) / std::numeric_limits<uint32>::max();
+  return static_cast<float>(seed_) / std::numeric_limits<uint32_t>::max();
 }
 
 }  // namespace cc
diff --git a/cc/debug/invalidation_benchmark.h b/cc/debug/invalidation_benchmark.h
index 9423d5d..9cd2643 100644
--- a/cc/debug/invalidation_benchmark.h
+++ b/cc/debug/invalidation_benchmark.h
@@ -5,6 +5,8 @@
 #ifndef CC_DEBUG_INVALIDATION_BENCHMARK_H_
 #define CC_DEBUG_INVALIDATION_BENCHMARK_H_
 
+#include <stdint.h>
+
 #include <string>
 
 #include "cc/debug/micro_benchmark_controller.h"
@@ -36,7 +38,7 @@
   Mode mode_;
   int width_;
   int height_;
-  uint32 seed_;
+  uint32_t seed_;
 };
 
 }  // namespace cc
diff --git a/cc/debug/lap_timer.h b/cc/debug/lap_timer.h
index 48f9917..bd1ba4f 100644
--- a/cc/debug/lap_timer.h
+++ b/cc/debug/lap_timer.h
@@ -5,6 +5,7 @@
 #ifndef CC_DEBUG_LAP_TIMER_H_
 #define CC_DEBUG_LAP_TIMER_H_
 
+#include "base/macros.h"
 #include "base/time/time.h"
 #include "cc/base/cc_export.h"
 
diff --git a/cc/debug/layer_tree_debug_state.h b/cc/debug/layer_tree_debug_state.h
index d2f13d4..3b5ba3a 100644
--- a/cc/debug/layer_tree_debug_state.h
+++ b/cc/debug/layer_tree_debug_state.h
@@ -5,7 +5,6 @@
 #ifndef CC_DEBUG_LAYER_TREE_DEBUG_STATE_H_
 #define CC_DEBUG_LAYER_TREE_DEBUG_STATE_H_
 
-#include "base/basictypes.h"
 #include "cc/base/cc_export.h"
 
 namespace cc {
diff --git a/cc/debug/micro_benchmark_controller.h b/cc/debug/micro_benchmark_controller.h
index 8f1cdfc..95000cb 100644
--- a/cc/debug/micro_benchmark_controller.h
+++ b/cc/debug/micro_benchmark_controller.h
@@ -8,8 +8,8 @@
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "cc/debug/micro_benchmark.h"
 
 namespace base {
diff --git a/cc/debug/micro_benchmark_controller_impl.h b/cc/debug/micro_benchmark_controller_impl.h
index 6fdf043..bcb4aa0 100644
--- a/cc/debug/micro_benchmark_controller_impl.h
+++ b/cc/debug/micro_benchmark_controller_impl.h
@@ -8,7 +8,7 @@
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "cc/debug/micro_benchmark_impl.h"
 
 namespace cc {
diff --git a/cc/debug/picture_debug_util.cc b/cc/debug/picture_debug_util.cc
index 5494d99..b1879af 100644
--- a/cc/debug/picture_debug_util.cc
+++ b/cc/debug/picture_debug_util.cc
@@ -4,6 +4,8 @@
 
 #include "cc/debug/picture_debug_util.h"
 
+#include <stddef.h>
+
 #include <vector>
 
 #include "base/base64.h"
diff --git a/cc/debug/rasterize_and_record_benchmark.cc b/cc/debug/rasterize_and_record_benchmark.cc
index 41cd9cc..8e75017 100644
--- a/cc/debug/rasterize_and_record_benchmark.cc
+++ b/cc/debug/rasterize_and_record_benchmark.cc
@@ -4,11 +4,12 @@
 
 #include "cc/debug/rasterize_and_record_benchmark.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 #include <limits>
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/strings/stringprintf.h"
 #include "base/values.h"
 #include "cc/debug/lap_timer.h"
diff --git a/cc/debug/rasterize_and_record_benchmark.h b/cc/debug/rasterize_and_record_benchmark.h
index d96f087..76278ac 100644
--- a/cc/debug/rasterize_and_record_benchmark.h
+++ b/cc/debug/rasterize_and_record_benchmark.h
@@ -5,6 +5,8 @@
 #ifndef CC_DEBUG_RASTERIZE_AND_RECORD_BENCHMARK_H_
 #define CC_DEBUG_RASTERIZE_AND_RECORD_BENCHMARK_H_
 
+#include <stddef.h>
+
 #include <map>
 #include <utility>
 #include <vector>
diff --git a/cc/debug/rasterize_and_record_benchmark_impl.cc b/cc/debug/rasterize_and_record_benchmark_impl.cc
index 2d649cc..de681700 100644
--- a/cc/debug/rasterize_and_record_benchmark_impl.cc
+++ b/cc/debug/rasterize_and_record_benchmark_impl.cc
@@ -4,10 +4,11 @@
 
 #include "cc/debug/rasterize_and_record_benchmark_impl.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 #include <limits>
 
-#include "base/basictypes.h"
 #include "base/values.h"
 #include "cc/debug/lap_timer.h"
 #include "cc/layers/layer_impl.h"
diff --git a/cc/debug/rasterize_and_record_benchmark_impl.h b/cc/debug/rasterize_and_record_benchmark_impl.h
index 99b22f1..bb4d9a0 100644
--- a/cc/debug/rasterize_and_record_benchmark_impl.h
+++ b/cc/debug/rasterize_and_record_benchmark_impl.h
@@ -5,6 +5,8 @@
 #ifndef CC_DEBUG_RASTERIZE_AND_RECORD_BENCHMARK_IMPL_H_
 #define CC_DEBUG_RASTERIZE_AND_RECORD_BENCHMARK_IMPL_H_
 
+#include <stddef.h>
+
 #include <map>
 #include <utility>
 #include <vector>
diff --git a/cc/debug/rendering_stats.h b/cc/debug/rendering_stats.h
index fbe0d63..f296447 100644
--- a/cc/debug/rendering_stats.h
+++ b/cc/debug/rendering_stats.h
@@ -5,9 +5,10 @@
 #ifndef CC_DEBUG_RENDERING_STATS_H_
 #define CC_DEBUG_RENDERING_STATS_H_
 
+#include <stdint.h>
+
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/time/time.h"
 #include "base/trace_event/trace_event_argument.h"
 #include "base/values.h"
@@ -41,12 +42,12 @@
   // Note: when adding new members, please remember to update Add in
   // rendering_stats.cc.
 
-  int64 frame_count;
-  int64 visible_content_area;
-  int64 approximated_visible_content_area;
-  int64 checkerboarded_visible_content_area;
-  int64 checkerboarded_no_recording_content_area;
-  int64 checkerboarded_needs_raster_content_area;
+  int64_t frame_count;
+  int64_t visible_content_area;
+  int64_t approximated_visible_content_area;
+  int64_t checkerboarded_visible_content_area;
+  int64_t checkerboarded_no_recording_content_area;
+  int64_t checkerboarded_needs_raster_content_area;
 
   TimeDeltaList draw_duration;
   TimeDeltaList draw_duration_estimate;
diff --git a/cc/debug/rendering_stats_instrumentation.cc b/cc/debug/rendering_stats_instrumentation.cc
index 94768c6..de7057e 100644
--- a/cc/debug/rendering_stats_instrumentation.cc
+++ b/cc/debug/rendering_stats_instrumentation.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 "cc/debug/rendering_stats_instrumentation.h"
 
 namespace cc {
@@ -37,7 +39,7 @@
   impl_thread_rendering_stats_ = RenderingStats();
 }
 
-void RenderingStatsInstrumentation::IncrementFrameCount(int64 count) {
+void RenderingStatsInstrumentation::IncrementFrameCount(int64_t count) {
   if (!record_rendering_stats_)
     return;
 
@@ -45,7 +47,7 @@
   impl_thread_rendering_stats_.frame_count += count;
 }
 
-void RenderingStatsInstrumentation::AddVisibleContentArea(int64 area) {
+void RenderingStatsInstrumentation::AddVisibleContentArea(int64_t area) {
   if (!record_rendering_stats_)
     return;
 
@@ -54,7 +56,7 @@
 }
 
 void RenderingStatsInstrumentation::AddApproximatedVisibleContentArea(
-    int64 area) {
+    int64_t area) {
   if (!record_rendering_stats_)
     return;
 
@@ -63,7 +65,7 @@
 }
 
 void RenderingStatsInstrumentation::AddCheckerboardedVisibleContentArea(
-    int64 area) {
+    int64_t area) {
   if (!record_rendering_stats_)
     return;
 
@@ -72,7 +74,7 @@
 }
 
 void RenderingStatsInstrumentation::AddCheckerboardedNoRecordingContentArea(
-    int64 area) {
+    int64_t area) {
   if (!record_rendering_stats_)
     return;
 
@@ -81,7 +83,7 @@
 }
 
 void RenderingStatsInstrumentation::AddCheckerboardedNeedsRasterContentArea(
-    int64 area) {
+    int64_t area) {
   if (!record_rendering_stats_)
     return;
 
diff --git a/cc/debug/rendering_stats_instrumentation.h b/cc/debug/rendering_stats_instrumentation.h
index 834e10c..9197fb6 100644
--- a/cc/debug/rendering_stats_instrumentation.h
+++ b/cc/debug/rendering_stats_instrumentation.h
@@ -5,6 +5,9 @@
 #ifndef CC_DEBUG_RENDERING_STATS_INSTRUMENTATION_H_
 #define CC_DEBUG_RENDERING_STATS_INSTRUMENTATION_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/synchronization/lock.h"
 #include "cc/debug/rendering_stats.h"
@@ -37,12 +40,12 @@
       record_rendering_stats_ = record_rendering_stats;
   }
 
-  void IncrementFrameCount(int64 count);
-  void AddVisibleContentArea(int64 area);
-  void AddApproximatedVisibleContentArea(int64 area);
-  void AddCheckerboardedVisibleContentArea(int64 area);
-  void AddCheckerboardedNoRecordingContentArea(int64 area);
-  void AddCheckerboardedNeedsRasterContentArea(int64 area);
+  void IncrementFrameCount(int64_t count);
+  void AddVisibleContentArea(int64_t area);
+  void AddApproximatedVisibleContentArea(int64_t area);
+  void AddCheckerboardedVisibleContentArea(int64_t area);
+  void AddCheckerboardedNoRecordingContentArea(int64_t area);
+  void AddCheckerboardedNeedsRasterContentArea(int64_t area);
   void AddDrawDuration(base::TimeDelta draw_duration,
                        base::TimeDelta draw_duration_estimate);
   void AddBeginMainFrameToCommitDuration(
diff --git a/cc/debug/ring_buffer.h b/cc/debug/ring_buffer.h
index f9a6749..5f7d49a 100644
--- a/cc/debug/ring_buffer.h
+++ b/cc/debug/ring_buffer.h
@@ -5,7 +5,10 @@
 #ifndef CC_DEBUG_RING_BUFFER_H_
 #define CC_DEBUG_RING_BUFFER_H_
 
+#include <stddef.h>
+
 #include "base/logging.h"
+#include "base/macros.h"
 
 namespace cc {
 
diff --git a/cc/debug/traced_display_item_list.h b/cc/debug/traced_display_item_list.h
index f7caa04..6b42243 100644
--- a/cc/debug/traced_display_item_list.h
+++ b/cc/debug/traced_display_item_list.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/trace_event/trace_event.h"
 #include "cc/debug/traced_value.h"
diff --git a/cc/input/input_handler.h b/cc/input/input_handler.h
index 7b09cc1..2d49543 100644
--- a/cc/input/input_handler.h
+++ b/cc/input/input_handler.h
@@ -5,7 +5,7 @@
 #ifndef CC_INPUT_INPUT_HANDLER_H_
 #define CC_INPUT_INPUT_HANDLER_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "cc/base/cc_export.h"
diff --git a/cc/input/page_scale_animation.h b/cc/input/page_scale_animation.h
index d73116c..dbe018b 100644
--- a/cc/input/page_scale_animation.h
+++ b/cc/input/page_scale_animation.h
@@ -5,7 +5,7 @@
 #ifndef CC_INPUT_PAGE_SCALE_ANIMATION_H_
 #define CC_INPUT_PAGE_SCALE_ANIMATION_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "cc/base/cc_export.h"
diff --git a/cc/input/top_controls_manager.cc b/cc/input/top_controls_manager.cc
index 5fe1267..6547f20 100644
--- a/cc/input/top_controls_manager.cc
+++ b/cc/input/top_controls_manager.cc
@@ -4,6 +4,8 @@
 
 #include "cc/input/top_controls_manager.h"
 
+#include <stdint.h>
+
 #include <algorithm>
 
 #include "base/logging.h"
@@ -19,7 +21,7 @@
 namespace {
 // These constants were chosen empirically for their visually pleasant behavior.
 // Contact tedchoc@chromium.org for questions about changing these values.
-const int64 kShowHideMaxDurationMs = 200;
+const int64_t kShowHideMaxDurationMs = 200;
 }
 
 // static
diff --git a/cc/input/top_controls_manager.h b/cc/input/top_controls_manager.h
index fc40378..8cd7c29 100644
--- a/cc/input/top_controls_manager.h
+++ b/cc/input/top_controls_manager.h
@@ -5,6 +5,7 @@
 #ifndef CC_INPUT_TOP_CONTROLS_MANAGER_H_
 #define CC_INPUT_TOP_CONTROLS_MANAGER_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "cc/input/top_controls_state.h"
diff --git a/cc/layers/append_quads_data.h b/cc/layers/append_quads_data.h
index 3d05109..f4e82bc 100644
--- a/cc/layers/append_quads_data.h
+++ b/cc/layers/append_quads_data.h
@@ -5,7 +5,8 @@
 #ifndef CC_LAYERS_APPEND_QUADS_DATA_H_
 #define CC_LAYERS_APPEND_QUADS_DATA_H_
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
 #include "cc/quads/render_pass_id.h"
 
 namespace cc {
@@ -21,19 +22,19 @@
         checkerboarded_needs_raster_content_area(0) {}
 
   // Set by the layer appending quads.
-  int64 num_incomplete_tiles;
+  int64_t num_incomplete_tiles;
   // Set by the layer appending quads.
-  int64 num_missing_tiles;
+  int64_t num_missing_tiles;
   // Set by the layer appending quads.
-  int64 visible_layer_area;
+  int64_t visible_layer_area;
   // Set by the layer appending quads.
-  int64 approximated_visible_content_area;
+  int64_t approximated_visible_content_area;
   // Set by the layer appending quads. This is total of the following two areas.
-  int64 checkerboarded_visible_content_area;
+  int64_t checkerboarded_visible_content_area;
   // Set by the layer appending quads. This is the area outside interest rect.
-  int64 checkerboarded_no_recording_content_area;
+  int64_t checkerboarded_no_recording_content_area;
   // Set by the layer appending quads. This is the area within interest rect.
-  int64 checkerboarded_needs_raster_content_area;
+  int64_t checkerboarded_needs_raster_content_area;
 };
 
 }  // namespace cc
diff --git a/cc/layers/content_layer_client.h b/cc/layers/content_layer_client.h
index 6c9983b..24c37ae 100644
--- a/cc/layers/content_layer_client.h
+++ b/cc/layers/content_layer_client.h
@@ -5,6 +5,8 @@
 #ifndef CC_LAYERS_CONTENT_LAYER_CLIENT_H_
 #define CC_LAYERS_CONTENT_LAYER_CLIENT_H_
 
+#include <stddef.h>
+
 #include "cc/base/cc_export.h"
 #include "cc/playback/display_item_list.h"
 
diff --git a/cc/layers/delegated_frame_provider.cc b/cc/layers/delegated_frame_provider.cc
index 06b041f..4923485 100644
--- a/cc/layers/delegated_frame_provider.cc
+++ b/cc/layers/delegated_frame_provider.cc
@@ -4,6 +4,8 @@
 
 #include "cc/layers/delegated_frame_provider.h"
 
+#include <stddef.h>
+
 #include "cc/layers/delegated_frame_resource_collection.h"
 #include "cc/layers/delegated_renderer_layer.h"
 #include "cc/output/delegated_frame_data.h"
diff --git a/cc/layers/delegated_frame_provider.h b/cc/layers/delegated_frame_provider.h
index f3f9373..7757d0c 100644
--- a/cc/layers/delegated_frame_provider.h
+++ b/cc/layers/delegated_frame_provider.h
@@ -7,6 +7,7 @@
 
 #include <vector>
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
diff --git a/cc/layers/delegated_frame_resource_collection.cc b/cc/layers/delegated_frame_resource_collection.cc
index a1bc759..c567b822 100644
--- a/cc/layers/delegated_frame_resource_collection.cc
+++ b/cc/layers/delegated_frame_resource_collection.cc
@@ -4,6 +4,8 @@
 
 #include "cc/layers/delegated_frame_resource_collection.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "cc/trees/blocking_task_runner.h"
 
diff --git a/cc/layers/delegated_frame_resource_collection.h b/cc/layers/delegated_frame_resource_collection.h
index afbc355..0e38c68 100644
--- a/cc/layers/delegated_frame_resource_collection.h
+++ b/cc/layers/delegated_frame_resource_collection.h
@@ -6,6 +6,7 @@
 #define CC_LAYERS_DELEGATED_FRAME_RESOURCE_COLLECTION_H_
 
 #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/thread_checker.h"
diff --git a/cc/layers/delegated_renderer_layer.h b/cc/layers/delegated_renderer_layer.h
index 8845258..b71b6ee 100644
--- a/cc/layers/delegated_renderer_layer.h
+++ b/cc/layers/delegated_renderer_layer.h
@@ -6,6 +6,7 @@
 #define CC_LAYERS_DELEGATED_RENDERER_LAYER_H_
 
 #include "base/containers/hash_tables.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
 #include "base/synchronization/lock.h"
diff --git a/cc/layers/delegated_renderer_layer_impl.cc b/cc/layers/delegated_renderer_layer_impl.cc
index 000a7ea..5d51116 100644
--- a/cc/layers/delegated_renderer_layer_impl.cc
+++ b/cc/layers/delegated_renderer_layer_impl.cc
@@ -4,6 +4,9 @@
 
 #include "cc/layers/delegated_renderer_layer_impl.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <algorithm>
 #include <utility>
 
diff --git a/cc/layers/delegated_renderer_layer_impl.h b/cc/layers/delegated_renderer_layer_impl.h
index 5c9b46a..0ca13eb 100644
--- a/cc/layers/delegated_renderer_layer_impl.h
+++ b/cc/layers/delegated_renderer_layer_impl.h
@@ -5,7 +5,10 @@
 #ifndef CC_LAYERS_DELEGATED_RENDERER_LAYER_IMPL_H_
 #define CC_LAYERS_DELEGATED_RENDERER_LAYER_IMPL_H_
 
+#include <stddef.h>
+
 #include "base/containers/hash_tables.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer_impl.h"
diff --git a/cc/layers/delegated_renderer_layer_impl_unittest.cc b/cc/layers/delegated_renderer_layer_impl_unittest.cc
index 725fb79..b94dedf 100644
--- a/cc/layers/delegated_renderer_layer_impl_unittest.cc
+++ b/cc/layers/delegated_renderer_layer_impl_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/layers/delegated_renderer_layer_impl.h"
 
+#include <stddef.h>
+
 #include "cc/layers/solid_color_layer_impl.h"
 #include "cc/quads/render_pass_draw_quad.h"
 #include "cc/quads/solid_color_draw_quad.h"
diff --git a/cc/layers/draw_properties.h b/cc/layers/draw_properties.h
index bcab910..0c7e479 100644
--- a/cc/layers/draw_properties.h
+++ b/cc/layers/draw_properties.h
@@ -5,6 +5,8 @@
 #ifndef CC_LAYERS_DRAW_PROPERTIES_H_
 #define CC_LAYERS_DRAW_PROPERTIES_H_
 
+#include <stddef.h>
+
 #include "base/memory/scoped_ptr.h"
 #include "cc/trees/occlusion.h"
 #include "third_party/skia/include/core/SkXfermode.h"
diff --git a/cc/layers/heads_up_display_layer.h b/cc/layers/heads_up_display_layer.h
index 0760353..5ffa31a 100644
--- a/cc/layers/heads_up_display_layer.h
+++ b/cc/layers/heads_up_display_layer.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer.h"
diff --git a/cc/layers/heads_up_display_layer_impl.cc b/cc/layers/heads_up_display_layer_impl.cc
index 4d65a817..dd13298 100644
--- a/cc/layers/heads_up_display_layer_impl.cc
+++ b/cc/layers/heads_up_display_layer_impl.cc
@@ -4,6 +4,9 @@
 
 #include "cc/layers/heads_up_display_layer_impl.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <algorithm>
 #include <vector>
 
diff --git a/cc/layers/heads_up_display_layer_impl.h b/cc/layers/heads_up_display_layer_impl.h
index e5880c4..07e4bed 100644
--- a/cc/layers/heads_up_display_layer_impl.h
+++ b/cc/layers/heads_up_display_layer_impl.h
@@ -8,6 +8,7 @@
 #include <string>
 #include <vector>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "cc/base/cc_export.h"
diff --git a/cc/layers/heads_up_display_layer_impl_unittest.cc b/cc/layers/heads_up_display_layer_impl_unittest.cc
index 77cfe55..e104c33 100644
--- a/cc/layers/heads_up_display_layer_impl_unittest.cc
+++ b/cc/layers/heads_up_display_layer_impl_unittest.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
+
 #include "cc/layers/append_quads_data.h"
 #include "cc/layers/heads_up_display_layer_impl.h"
 #include "cc/test/fake_impl_task_runner_provider.h"
diff --git a/cc/layers/io_surface_layer.cc b/cc/layers/io_surface_layer.cc
index c2e3530..7fb3f3f1 100644
--- a/cc/layers/io_surface_layer.cc
+++ b/cc/layers/io_surface_layer.cc
@@ -4,6 +4,8 @@
 
 #include "cc/layers/io_surface_layer.h"
 
+#include <stdint.h>
+
 #include "cc/layers/io_surface_layer_impl.h"
 
 namespace cc {
diff --git a/cc/layers/io_surface_layer.h b/cc/layers/io_surface_layer.h
index 14eabd9..a88492f 100644
--- a/cc/layers/io_surface_layer.h
+++ b/cc/layers/io_surface_layer.h
@@ -5,6 +5,9 @@
 #ifndef CC_LAYERS_IO_SURFACE_LAYER_H_
 #define CC_LAYERS_IO_SURFACE_LAYER_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer.h"
 
diff --git a/cc/layers/io_surface_layer_impl.h b/cc/layers/io_surface_layer_impl.h
index 8317760..29e9973 100644
--- a/cc/layers/io_surface_layer_impl.h
+++ b/cc/layers/io_surface_layer_impl.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer_impl.h"
 #include "ui/gfx/geometry/size.h"
diff --git a/cc/layers/io_surface_layer_impl_unittest.cc b/cc/layers/io_surface_layer_impl_unittest.cc
index 75c2cf77..ff3e79e 100644
--- a/cc/layers/io_surface_layer_impl_unittest.cc
+++ b/cc/layers/io_surface_layer_impl_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/layers/io_surface_layer_impl.h"
 
+#include <stddef.h>
+
 #include "cc/test/layer_test_common.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index 526b5dd2..c085f16 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -4,6 +4,9 @@
 
 #include "cc/layers/layer.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <algorithm>
 
 #include "base/atomic_sequence_num.h"
diff --git a/cc/layers/layer.h b/cc/layers/layer.h
index c5c031c..6c9036c 100644
--- a/cc/layers/layer.h
+++ b/cc/layers/layer.h
@@ -5,11 +5,15 @@
 #ifndef CC_LAYERS_LAYER_H_
 #define CC_LAYERS_LAYER_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <set>
 #include <string>
 #include <vector>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/observer_list.h"
 #include "cc/animation/layer_animation_controller.h"
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 74927e8..3837bca 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -4,6 +4,9 @@
 
 #include "cc/layers/layer_impl.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <utility>
 
 #include "base/json/json_reader.h"
diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h
index 8d83a0e..42362c8 100644
--- a/cc/layers/layer_impl.h
+++ b/cc/layers/layer_impl.h
@@ -5,12 +5,16 @@
 #ifndef CC_LAYERS_LAYER_IMPL_H_
 #define CC_LAYERS_LAYER_IMPL_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <map>
 #include <set>
 #include <string>
 #include <vector>
 
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/values.h"
 #include "cc/animation/animation_delegate.h"
diff --git a/cc/layers/layer_iterator.h b/cc/layers/layer_iterator.h
index 2c129e4..cf01ca1 100644
--- a/cc/layers/layer_iterator.h
+++ b/cc/layers/layer_iterator.h
@@ -5,6 +5,8 @@
 #ifndef CC_LAYERS_LAYER_ITERATOR_H_
 #define CC_LAYERS_LAYER_ITERATOR_H_
 
+#include <stddef.h>
+
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer_impl.h"
 #include "cc/trees/layer_tree_host_common.h"
diff --git a/cc/layers/layer_unittest.cc b/cc/layers/layer_unittest.cc
index 789152a..a9caa02 100644
--- a/cc/layers/layer_unittest.cc
+++ b/cc/layers/layer_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/layers/layer.h"
 
+#include <stddef.h>
+
 #include "base/thread_task_runner_handle.h"
 #include "cc/animation/keyframed_animation_curve.h"
 #include "cc/animation/mutable_properties.h"
diff --git a/cc/layers/nine_patch_layer.h b/cc/layers/nine_patch_layer.h
index 714a407..ff76663 100644
--- a/cc/layers/nine_patch_layer.h
+++ b/cc/layers/nine_patch_layer.h
@@ -5,6 +5,7 @@
 #ifndef CC_LAYERS_NINE_PATCH_LAYER_H_
 #define CC_LAYERS_NINE_PATCH_LAYER_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer.h"
diff --git a/cc/layers/nine_patch_layer_impl.h b/cc/layers/nine_patch_layer_impl.h
index 948758a..28721b3 100644
--- a/cc/layers/nine_patch_layer_impl.h
+++ b/cc/layers/nine_patch_layer_impl.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer_impl.h"
 #include "cc/layers/ui_resource_layer_impl.h"
diff --git a/cc/layers/nine_patch_layer_impl_unittest.cc b/cc/layers/nine_patch_layer_impl_unittest.cc
index e4c779a..96778724 100644
--- a/cc/layers/nine_patch_layer_impl_unittest.cc
+++ b/cc/layers/nine_patch_layer_impl_unittest.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
+
 #include "base/containers/hash_tables.h"
 #include "cc/layers/append_quads_data.h"
 #include "cc/layers/nine_patch_layer_impl.h"
diff --git a/cc/layers/painted_scrollbar_layer.cc b/cc/layers/painted_scrollbar_layer.cc
index 0d25dbc..13826e7 100644
--- a/cc/layers/painted_scrollbar_layer.cc
+++ b/cc/layers/painted_scrollbar_layer.cc
@@ -7,7 +7,6 @@
 #include <algorithm>
 
 #include "base/auto_reset.h"
-#include "base/basictypes.h"
 #include "base/trace_event/trace_event.h"
 #include "cc/base/math_util.h"
 #include "cc/layers/painted_scrollbar_layer_impl.h"
diff --git a/cc/layers/painted_scrollbar_layer.h b/cc/layers/painted_scrollbar_layer.h
index 8f01601..27dc2c3 100644
--- a/cc/layers/painted_scrollbar_layer.h
+++ b/cc/layers/painted_scrollbar_layer.h
@@ -5,6 +5,7 @@
 #ifndef CC_LAYERS_PAINTED_SCROLLBAR_LAYER_H_
 #define CC_LAYERS_PAINTED_SCROLLBAR_LAYER_H_
 
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "cc/input/scrollbar.h"
 #include "cc/layers/layer.h"
diff --git a/cc/layers/painted_scrollbar_layer_impl.h b/cc/layers/painted_scrollbar_layer_impl.h
index 190526f..8ea06ab 100644
--- a/cc/layers/painted_scrollbar_layer_impl.h
+++ b/cc/layers/painted_scrollbar_layer_impl.h
@@ -5,6 +5,7 @@
 #ifndef CC_LAYERS_PAINTED_SCROLLBAR_LAYER_IMPL_H_
 #define CC_LAYERS_PAINTED_SCROLLBAR_LAYER_IMPL_H_
 
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "cc/input/scrollbar.h"
 #include "cc/layers/scrollbar_layer_impl_base.h"
diff --git a/cc/layers/painted_scrollbar_layer_impl_unittest.cc b/cc/layers/painted_scrollbar_layer_impl_unittest.cc
index 3edc450..4bc3f06 100644
--- a/cc/layers/painted_scrollbar_layer_impl_unittest.cc
+++ b/cc/layers/painted_scrollbar_layer_impl_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/layers/painted_scrollbar_layer_impl.h"
 
+#include <stddef.h>
+
 #include "cc/quads/draw_quad.h"
 #include "cc/quads/texture_draw_quad.h"
 #include "cc/test/layer_test_common.h"
diff --git a/cc/layers/picture_image_layer.cc b/cc/layers/picture_image_layer.cc
index 0ca203e..b5a55c2 100644
--- a/cc/layers/picture_image_layer.cc
+++ b/cc/layers/picture_image_layer.cc
@@ -4,6 +4,8 @@
 
 #include "cc/layers/picture_image_layer.h"
 
+#include <stddef.h>
+
 #include "cc/layers/picture_image_layer_impl.h"
 #include "cc/playback/display_item_list_settings.h"
 #include "cc/playback/drawing_display_item.h"
diff --git a/cc/layers/picture_image_layer.h b/cc/layers/picture_image_layer.h
index 146ce83..fd3c1a2 100644
--- a/cc/layers/picture_image_layer.h
+++ b/cc/layers/picture_image_layer.h
@@ -5,6 +5,9 @@
 #ifndef CC_LAYERS_PICTURE_IMAGE_LAYER_H_
 #define CC_LAYERS_PICTURE_IMAGE_LAYER_H_
 
+#include <stddef.h>
+
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/content_layer_client.h"
 #include "cc/layers/picture_layer.h"
diff --git a/cc/layers/picture_image_layer_impl.h b/cc/layers/picture_image_layer_impl.h
index f478951..759606a 100644
--- a/cc/layers/picture_image_layer_impl.h
+++ b/cc/layers/picture_image_layer_impl.h
@@ -5,6 +5,7 @@
 #ifndef CC_LAYERS_PICTURE_IMAGE_LAYER_IMPL_H_
 #define CC_LAYERS_PICTURE_IMAGE_LAYER_IMPL_H_
 
+#include "base/macros.h"
 #include "cc/layers/picture_layer_impl.h"
 
 namespace cc {
diff --git a/cc/layers/picture_layer.h b/cc/layers/picture_layer.h
index 7eb87f0..7f1345e 100644
--- a/cc/layers/picture_layer.h
+++ b/cc/layers/picture_layer.h
@@ -5,6 +5,7 @@
 #ifndef CC_LAYERS_PICTURE_LAYER_H_
 #define CC_LAYERS_PICTURE_LAYER_H_
 
+#include "base/macros.h"
 #include "cc/base/invalidation_region.h"
 #include "cc/debug/devtools_instrumentation.h"
 #include "cc/debug/micro_benchmark_controller.h"
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index 8d2efe0..b3590d4 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -4,6 +4,9 @@
 
 #include "cc/layers/picture_layer_impl.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <algorithm>
 #include <cmath>
 #include <limits>
@@ -347,7 +350,7 @@
         append_quads_data->num_missing_tiles++;
         ++missing_tile_count;
       }
-      int64 checkerboarded_area =
+      int64_t checkerboarded_area =
           visible_geometry_rect.width() * visible_geometry_rect.height();
       append_quads_data->checkerboarded_visible_content_area +=
           checkerboarded_area;
@@ -357,7 +360,7 @@
       // subtraction.
       gfx::Rect visible_rect_has_recording = visible_geometry_rect;
       visible_rect_has_recording.Intersect(scaled_recorded_viewport);
-      int64 checkerboarded_has_recording_area =
+      int64_t checkerboarded_has_recording_area =
           visible_rect_has_recording.width() *
           visible_rect_has_recording.height();
       append_quads_data->checkerboarded_needs_raster_content_area +=
@@ -977,22 +980,24 @@
     if (maximum_scale) {
       gfx::Size bounds_at_maximum_scale =
           gfx::ScaleToCeiledSize(raster_source_->GetSize(), maximum_scale);
-      int64 maximum_area = static_cast<int64>(bounds_at_maximum_scale.width()) *
-                           static_cast<int64>(bounds_at_maximum_scale.height());
+      int64_t maximum_area =
+          static_cast<int64_t>(bounds_at_maximum_scale.width()) *
+          static_cast<int64_t>(bounds_at_maximum_scale.height());
       gfx::Size viewport = layer_tree_impl()->device_viewport_size();
-      int64 viewport_area = static_cast<int64>(viewport.width()) *
-                            static_cast<int64>(viewport.height());
+      int64_t viewport_area = static_cast<int64_t>(viewport.width()) *
+                              static_cast<int64_t>(viewport.height());
       if (maximum_area <= viewport_area)
         can_raster_at_maximum_scale = true;
     }
     if (starting_scale && starting_scale > maximum_scale) {
       gfx::Size bounds_at_starting_scale =
           gfx::ScaleToCeiledSize(raster_source_->GetSize(), starting_scale);
-      int64 start_area = static_cast<int64>(bounds_at_starting_scale.width()) *
-                         static_cast<int64>(bounds_at_starting_scale.height());
+      int64_t start_area =
+          static_cast<int64_t>(bounds_at_starting_scale.width()) *
+          static_cast<int64_t>(bounds_at_starting_scale.height());
       gfx::Size viewport = layer_tree_impl()->device_viewport_size();
-      int64 viewport_area = static_cast<int64>(viewport.width()) *
-                            static_cast<int64>(viewport.height());
+      int64_t viewport_area = static_cast<int64_t>(viewport.width()) *
+                              static_cast<int64_t>(viewport.height());
       if (start_area <= viewport_area)
         should_raster_at_starting_scale = true;
     }
diff --git a/cc/layers/picture_layer_impl.h b/cc/layers/picture_layer_impl.h
index 6cbd7a0..8a2465a 100644
--- a/cc/layers/picture_layer_impl.h
+++ b/cc/layers/picture_layer_impl.h
@@ -5,10 +5,13 @@
 #ifndef CC_LAYERS_PICTURE_LAYER_IMPL_H_
 #define CC_LAYERS_PICTURE_LAYER_IMPL_H_
 
+#include <stddef.h>
+
 #include <map>
 #include <string>
 #include <vector>
 
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer_impl.h"
 #include "cc/tiles/picture_layer_tiling.h"
diff --git a/cc/layers/picture_layer_impl_perftest.cc b/cc/layers/picture_layer_impl_perftest.cc
index 5088df4..c38dd3e 100644
--- a/cc/layers/picture_layer_impl_perftest.cc
+++ b/cc/layers/picture_layer_impl_perftest.cc
@@ -4,6 +4,7 @@
 
 #include "cc/layers/picture_layer_impl.h"
 
+#include "base/macros.h"
 #include "base/thread_task_runner_handle.h"
 #include "cc/debug/lap_timer.h"
 #include "cc/test/fake_display_list_raster_source.h"
diff --git a/cc/layers/picture_layer_impl_unittest.cc b/cc/layers/picture_layer_impl_unittest.cc
index c41ff5ab..badd37f 100644
--- a/cc/layers/picture_layer_impl_unittest.cc
+++ b/cc/layers/picture_layer_impl_unittest.cc
@@ -4,12 +4,15 @@
 
 #include "cc/layers/picture_layer_impl.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 #include <limits>
 #include <set>
 #include <utility>
 
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/thread_task_runner_handle.h"
 #include "cc/base/math_util.h"
 #include "cc/layers/append_quads_data.h"
diff --git a/cc/layers/picture_layer_unittest.cc b/cc/layers/picture_layer_unittest.cc
index 97751fd..9568bde 100644
--- a/cc/layers/picture_layer_unittest.cc
+++ b/cc/layers/picture_layer_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/layers/picture_layer.h"
 
+#include <stddef.h>
+
 #include "base/thread_task_runner_handle.h"
 #include "cc/layers/content_layer_client.h"
 #include "cc/layers/layer_settings.h"
diff --git a/cc/layers/render_surface_impl.cc b/cc/layers/render_surface_impl.cc
index d93e052..d329667 100644
--- a/cc/layers/render_surface_impl.cc
+++ b/cc/layers/render_surface_impl.cc
@@ -4,6 +4,8 @@
 
 #include "cc/layers/render_surface_impl.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 
 #include "base/logging.h"
diff --git a/cc/layers/render_surface_impl.h b/cc/layers/render_surface_impl.h
index 283f0eb..9ba0f18 100644
--- a/cc/layers/render_surface_impl.h
+++ b/cc/layers/render_surface_impl.h
@@ -5,10 +5,12 @@
 #ifndef CC_LAYERS_RENDER_SURFACE_IMPL_H_
 #define CC_LAYERS_RENDER_SURFACE_IMPL_H_
 
+#include <stddef.h>
+
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer_lists.h"
diff --git a/cc/layers/render_surface_impl_unittest.cc b/cc/layers/render_surface_impl_unittest.cc
index 96ca40b..e8eb264 100644
--- a/cc/layers/render_surface_impl_unittest.cc
+++ b/cc/layers/render_surface_impl_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/layers/render_surface_impl.h"
 
+#include <stddef.h>
+
 #include "cc/layers/append_quads_data.h"
 #include "cc/quads/render_pass_draw_quad.h"
 #include "cc/test/fake_mask_layer_impl.h"
diff --git a/cc/layers/scrollbar_layer_impl_base.h b/cc/layers/scrollbar_layer_impl_base.h
index ebe508b..79a18e5 100644
--- a/cc/layers/scrollbar_layer_impl_base.h
+++ b/cc/layers/scrollbar_layer_impl_base.h
@@ -5,6 +5,7 @@
 #ifndef CC_LAYERS_SCROLLBAR_LAYER_IMPL_BASE_H_
 #define CC_LAYERS_SCROLLBAR_LAYER_IMPL_BASE_H_
 
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "cc/input/scrollbar.h"
 #include "cc/layers/layer.h"
diff --git a/cc/layers/scrollbar_layer_interface.h b/cc/layers/scrollbar_layer_interface.h
index a396a5d..5a386b0 100644
--- a/cc/layers/scrollbar_layer_interface.h
+++ b/cc/layers/scrollbar_layer_interface.h
@@ -5,6 +5,7 @@
 #ifndef CC_LAYERS_SCROLLBAR_LAYER_INTERFACE_H_
 #define CC_LAYERS_SCROLLBAR_LAYER_INTERFACE_H_
 
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "cc/input/scrollbar.h"
 
diff --git a/cc/layers/scrollbar_layer_unittest.cc b/cc/layers/scrollbar_layer_unittest.cc
index 99d52b6..0202f4b4 100644
--- a/cc/layers/scrollbar_layer_unittest.cc
+++ b/cc/layers/scrollbar_layer_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/containers/hash_tables.h"
 #include "base/thread_task_runner_handle.h"
 #include "cc/animation/scrollbar_animation_controller.h"
diff --git a/cc/layers/solid_color_layer.h b/cc/layers/solid_color_layer.h
index b544f66..9a16f1a 100644
--- a/cc/layers/solid_color_layer.h
+++ b/cc/layers/solid_color_layer.h
@@ -6,6 +6,7 @@
 #ifndef CC_LAYERS_SOLID_COLOR_LAYER_H_
 #define CC_LAYERS_SOLID_COLOR_LAYER_H_
 
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer.h"
 
diff --git a/cc/layers/solid_color_layer_impl.h b/cc/layers/solid_color_layer_impl.h
index 2068ac5d..a56b69b 100644
--- a/cc/layers/solid_color_layer_impl.h
+++ b/cc/layers/solid_color_layer_impl.h
@@ -5,6 +5,7 @@
 #ifndef CC_LAYERS_SOLID_COLOR_LAYER_IMPL_H_
 #define CC_LAYERS_SOLID_COLOR_LAYER_IMPL_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer_impl.h"
diff --git a/cc/layers/solid_color_layer_impl_unittest.cc b/cc/layers/solid_color_layer_impl_unittest.cc
index a7317ec..a4d1bfa 100644
--- a/cc/layers/solid_color_layer_impl_unittest.cc
+++ b/cc/layers/solid_color_layer_impl_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/layers/solid_color_layer_impl.h"
 
+#include <stddef.h>
+
 #include <vector>
 
 #include "cc/layers/append_quads_data.h"
diff --git a/cc/layers/solid_color_scrollbar_layer.h b/cc/layers/solid_color_scrollbar_layer.h
index 8b14bce..8f0c00c 100644
--- a/cc/layers/solid_color_scrollbar_layer.h
+++ b/cc/layers/solid_color_scrollbar_layer.h
@@ -5,6 +5,7 @@
 #ifndef CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_
 #define CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_H_
 
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer.h"
 #include "cc/layers/scrollbar_layer_interface.h"
diff --git a/cc/layers/solid_color_scrollbar_layer_impl_unittest.cc b/cc/layers/solid_color_scrollbar_layer_impl_unittest.cc
index f141535..a285f44 100644
--- a/cc/layers/solid_color_scrollbar_layer_impl_unittest.cc
+++ b/cc/layers/solid_color_scrollbar_layer_impl_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/layers/solid_color_scrollbar_layer_impl.h"
 
+#include <stddef.h>
+
 #include "cc/test/layer_test_common.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
diff --git a/cc/layers/surface_layer.cc b/cc/layers/surface_layer.cc
index 8d46188..21f9273 100644
--- a/cc/layers/surface_layer.cc
+++ b/cc/layers/surface_layer.cc
@@ -4,6 +4,9 @@
 
 #include "cc/layers/surface_layer.h"
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "cc/layers/surface_layer_impl.h"
 #include "cc/output/swap_promise.h"
 #include "cc/trees/layer_tree_host.h"
@@ -27,7 +30,7 @@
   void DidNotSwap(DidNotSwapReason reason) override {
     satisfy_callback_.Run(sequence_);
   }
-  int64 TraceId() const override { return 0; }
+  int64_t TraceId() const override { return 0; }
 
   SurfaceSequence sequence_;
   SurfaceLayer::SatisfyCallback satisfy_callback_;
diff --git a/cc/layers/surface_layer.h b/cc/layers/surface_layer.h
index e62d6a2..c2e8a2d 100644
--- a/cc/layers/surface_layer.h
+++ b/cc/layers/surface_layer.h
@@ -5,6 +5,7 @@
 #ifndef CC_LAYERS_SURFACE_LAYER_H_
 #define CC_LAYERS_SURFACE_LAYER_H_
 
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer.h"
 #include "cc/surfaces/surface_id.h"
diff --git a/cc/layers/surface_layer_impl.cc b/cc/layers/surface_layer_impl.cc
index e0dcadf..a8a50f33 100644
--- a/cc/layers/surface_layer_impl.cc
+++ b/cc/layers/surface_layer_impl.cc
@@ -4,6 +4,8 @@
 
 #include "cc/layers/surface_layer_impl.h"
 
+#include <stdint.h>
+
 #include "base/trace_event/trace_event_argument.h"
 #include "cc/debug/debug_colors.h"
 #include "cc/quads/solid_color_draw_quad.h"
diff --git a/cc/layers/surface_layer_impl.h b/cc/layers/surface_layer_impl.h
index 4d2c48b4..819ee73 100644
--- a/cc/layers/surface_layer_impl.h
+++ b/cc/layers/surface_layer_impl.h
@@ -5,6 +5,7 @@
 #ifndef CC_LAYERS_SURFACE_LAYER_IMPL_H_
 #define CC_LAYERS_SURFACE_LAYER_IMPL_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer_impl.h"
diff --git a/cc/layers/surface_layer_impl_unittest.cc b/cc/layers/surface_layer_impl_unittest.cc
index 3ff8255..50d4b3a 100644
--- a/cc/layers/surface_layer_impl_unittest.cc
+++ b/cc/layers/surface_layer_impl_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/layers/surface_layer_impl.h"
 
+#include <stddef.h>
+
 #include "cc/test/layer_test_common.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
diff --git a/cc/layers/surface_layer_unittest.cc b/cc/layers/surface_layer_unittest.cc
index 2348909..2f8d5cd 100644
--- a/cc/layers/surface_layer_unittest.cc
+++ b/cc/layers/surface_layer_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 <set>
 #include <vector>
 
diff --git a/cc/layers/texture_layer.h b/cc/layers/texture_layer.h
index b1e9243..6b529dd 100644
--- a/cc/layers/texture_layer.h
+++ b/cc/layers/texture_layer.h
@@ -8,6 +8,7 @@
 #include <string>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/synchronization/lock.h"
 #include "base/threading/thread_checker.h"
 #include "cc/base/cc_export.h"
diff --git a/cc/layers/texture_layer_impl.cc b/cc/layers/texture_layer_impl.cc
index 295faf41..0d2f4e7 100644
--- a/cc/layers/texture_layer_impl.cc
+++ b/cc/layers/texture_layer_impl.cc
@@ -4,6 +4,9 @@
 
 #include "cc/layers/texture_layer_impl.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <vector>
 
 #include "base/strings/stringprintf.h"
@@ -110,8 +113,8 @@
     }
 
     if (texture_copy_->id()) {
-      std::vector<uint8> swizzled;
-      uint8* pixels = texture_mailbox_.shared_bitmap()->pixels();
+      std::vector<uint8_t> swizzled;
+      uint8_t* pixels = texture_mailbox_.shared_bitmap()->pixels();
 
       if (!PlatformColor::SameComponentOrder(texture_copy_->format())) {
         // Swizzle colors. This is slow, but should be really uncommon.
diff --git a/cc/layers/texture_layer_impl.h b/cc/layers/texture_layer_impl.h
index 680aaf0..e799eff 100644
--- a/cc/layers/texture_layer_impl.h
+++ b/cc/layers/texture_layer_impl.h
@@ -8,6 +8,7 @@
 #include <string>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer_impl.h"
 
diff --git a/cc/layers/texture_layer_impl_unittest.cc b/cc/layers/texture_layer_impl_unittest.cc
index fe2e006..93e3342 100644
--- a/cc/layers/texture_layer_impl_unittest.cc
+++ b/cc/layers/texture_layer_impl_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/layers/texture_layer_impl.h"
 
+#include <stddef.h>
+
 #include "cc/output/context_provider.h"
 #include "cc/output/output_surface.h"
 #include "cc/test/layer_test_common.h"
diff --git a/cc/layers/texture_layer_unittest.cc b/cc/layers/texture_layer_unittest.cc
index c7c64b6..31313af 100644
--- a/cc/layers/texture_layer_unittest.cc
+++ b/cc/layers/texture_layer_unittest.cc
@@ -4,12 +4,16 @@
 
 #include "cc/layers/texture_layer.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <algorithm>
 #include <string>
 
 #include "base/bind.h"
 #include "base/callback.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/single_thread_task_runner.h"
 #include "base/synchronization/lock.h"
 #include "base/synchronization/waitable_event.h"
@@ -151,8 +155,8 @@
     release_mailbox2_impl_ = base::Bind(&MockMailboxCallback::ReleaseImpl,
                                         base::Unretained(&mock_callback_),
                                         mailbox_name2_);
-    const uint32 arbitrary_target1 = GL_TEXTURE_2D;
-    const uint32 arbitrary_target2 = GL_TEXTURE_EXTERNAL_OES;
+    const uint32_t arbitrary_target1 = GL_TEXTURE_2D;
+    const uint32_t arbitrary_target2 = GL_TEXTURE_EXTERNAL_OES;
     mailbox1_ = TextureMailbox(mailbox_name1_, sync_token1_, arbitrary_target1);
     mailbox2_ = TextureMailbox(mailbox_name2_, sync_token2_, arbitrary_target2);
     gfx::Size size(128, 128);
diff --git a/cc/layers/ui_resource_layer.h b/cc/layers/ui_resource_layer.h
index 600f245..52a45b7 100644
--- a/cc/layers/ui_resource_layer.h
+++ b/cc/layers/ui_resource_layer.h
@@ -5,6 +5,7 @@
 #ifndef CC_LAYERS_UI_RESOURCE_LAYER_H_
 #define CC_LAYERS_UI_RESOURCE_LAYER_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer.h"
diff --git a/cc/layers/ui_resource_layer_impl.h b/cc/layers/ui_resource_layer_impl.h
index 87d77e8..05293e67 100644
--- a/cc/layers/ui_resource_layer_impl.h
+++ b/cc/layers/ui_resource_layer_impl.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer_impl.h"
 #include "cc/resources/resource_provider.h"
diff --git a/cc/layers/ui_resource_layer_impl_unittest.cc b/cc/layers/ui_resource_layer_impl_unittest.cc
index c184dd6..18759a6 100644
--- a/cc/layers/ui_resource_layer_impl_unittest.cc
+++ b/cc/layers/ui_resource_layer_impl_unittest.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
+
 #include "cc/layers/append_quads_data.h"
 #include "cc/layers/ui_resource_layer_impl.h"
 #include "cc/quads/draw_quad.h"
diff --git a/cc/layers/video_frame_provider_client_impl.h b/cc/layers/video_frame_provider_client_impl.h
index e626b54..17525ec 100644
--- a/cc/layers/video_frame_provider_client_impl.h
+++ b/cc/layers/video_frame_provider_client_impl.h
@@ -5,6 +5,7 @@
 #ifndef CC_LAYERS_VIDEO_FRAME_PROVIDER_CLIENT_IMPL_H_
 #define CC_LAYERS_VIDEO_FRAME_PROVIDER_CLIENT_IMPL_H_
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/synchronization/lock.h"
 #include "base/threading/thread_checker.h"
diff --git a/cc/layers/video_frame_provider_client_impl_unittest.cc b/cc/layers/video_frame_provider_client_impl_unittest.cc
index 3cc4709..e337baa 100644
--- a/cc/layers/video_frame_provider_client_impl_unittest.cc
+++ b/cc/layers/video_frame_provider_client_impl_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 "cc/layers/video_frame_provider_client_impl.h"
 #include "cc/layers/video_layer_impl.h"
 #include "cc/output/begin_frame_args.h"
diff --git a/cc/layers/video_layer.h b/cc/layers/video_layer.h
index 575de46..a59f1cc 100644
--- a/cc/layers/video_layer.h
+++ b/cc/layers/video_layer.h
@@ -6,6 +6,7 @@
 #define CC_LAYERS_VIDEO_LAYER_H_
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer.h"
 #include "media/base/video_rotation.h"
diff --git a/cc/layers/video_layer_impl.cc b/cc/layers/video_layer_impl.cc
index ca5dd6e..d173cc6 100644
--- a/cc/layers/video_layer_impl.cc
+++ b/cc/layers/video_layer_impl.cc
@@ -4,6 +4,8 @@
 
 #include "cc/layers/video_layer_impl.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/logging.h"
 #include "cc/layers/video_frame_provider_client_impl.h"
diff --git a/cc/layers/video_layer_impl.h b/cc/layers/video_layer_impl.h
index 127700b..c1688e8 100644
--- a/cc/layers/video_layer_impl.h
+++ b/cc/layers/video_layer_impl.h
@@ -7,6 +7,7 @@
 
 #include <vector>
 
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer_impl.h"
 #include "cc/resources/release_callback_impl.h"
diff --git a/cc/layers/video_layer_impl_unittest.cc b/cc/layers/video_layer_impl_unittest.cc
index 48c574b..b5f1c0f 100644
--- a/cc/layers/video_layer_impl_unittest.cc
+++ b/cc/layers/video_layer_impl_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/layers/video_layer_impl.h"
 
+#include <stddef.h>
+
 #include "cc/layers/video_frame_provider_client_impl.h"
 #include "cc/output/context_provider.h"
 #include "cc/output/output_surface.h"
diff --git a/cc/layers/viewport.h b/cc/layers/viewport.h
index 5d96cd3..5052b5e 100644
--- a/cc/layers/viewport.h
+++ b/cc/layers/viewport.h
@@ -5,6 +5,7 @@
 #ifndef CC_LAYERS_VIEWPORT_H_
 #define CC_LAYERS_VIEWPORT_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/layers/layer_impl.h"
 #include "ui/gfx/geometry/vector2d_f.h"
diff --git a/cc/output/bsp_tree.h b/cc/output/bsp_tree.h
index efe4cc5..695c47e 100644
--- a/cc/output/bsp_tree.h
+++ b/cc/output/bsp_tree.h
@@ -5,6 +5,8 @@
 #ifndef CC_OUTPUT_BSP_TREE_H_
 #define CC_OUTPUT_BSP_TREE_H_
 
+#include <stddef.h>
+
 #include <deque>
 #include <vector>
 
diff --git a/cc/output/bsp_tree_unittest.cc b/cc/output/bsp_tree_unittest.cc
index f55577b..1d71413 100644
--- a/cc/output/bsp_tree_unittest.cc
+++ b/cc/output/bsp_tree_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 <deque>
 
 #include "base/macros.h"
diff --git a/cc/output/compositor_frame.h b/cc/output/compositor_frame.h
index 3ab1e8c2..8a95fff 100644
--- a/cc/output/compositor_frame.h
+++ b/cc/output/compositor_frame.h
@@ -5,6 +5,7 @@
 #ifndef CC_OUTPUT_COMPOSITOR_FRAME_H_
 #define CC_OUTPUT_COMPOSITOR_FRAME_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/output/compositor_frame_metadata.h"
diff --git a/cc/output/compositor_frame_ack.h b/cc/output/compositor_frame_ack.h
index aa48fa1..a4e161b 100644
--- a/cc/output/compositor_frame_ack.h
+++ b/cc/output/compositor_frame_ack.h
@@ -5,6 +5,7 @@
 #ifndef CC_OUTPUT_COMPOSITOR_FRAME_ACK_H_
 #define CC_OUTPUT_COMPOSITOR_FRAME_ACK_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/output/gl_frame_data.h"
diff --git a/cc/output/compositor_frame_metadata.h b/cc/output/compositor_frame_metadata.h
index 392c6b0..ad3cdd8 100644
--- a/cc/output/compositor_frame_metadata.h
+++ b/cc/output/compositor_frame_metadata.h
@@ -5,6 +5,8 @@
 #ifndef CC_OUTPUT_COMPOSITOR_FRAME_METADATA_H_
 #define CC_OUTPUT_COMPOSITOR_FRAME_METADATA_H_
 
+#include <stdint.h>
+
 #include <vector>
 
 #include "cc/base/cc_export.h"
diff --git a/cc/output/context_provider.cc b/cc/output/context_provider.cc
index 23a8e2c8..5ff7f93 100644
--- a/cc/output/context_provider.cc
+++ b/cc/output/context_provider.cc
@@ -4,6 +4,8 @@
 
 #include "cc/output/context_provider.h"
 
+#include <stddef.h>
+
 #include <limits>
 
 namespace cc {
diff --git a/cc/output/context_provider.h b/cc/output/context_provider.h
index db12706..c560ad0 100644
--- a/cc/output/context_provider.h
+++ b/cc/output/context_provider.h
@@ -5,6 +5,9 @@
 #ifndef CC_OUTPUT_CONTEXT_PROVIDER_H_
 #define CC_OUTPUT_CONTEXT_PROVIDER_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/callback.h"
 #include "base/memory/ref_counted.h"
 #include "base/synchronization/lock.h"
diff --git a/cc/output/delegated_frame_data.h b/cc/output/delegated_frame_data.h
index 3cb946c..8d9d275 100644
--- a/cc/output/delegated_frame_data.h
+++ b/cc/output/delegated_frame_data.h
@@ -5,6 +5,7 @@
 #ifndef CC_OUTPUT_DELEGATED_FRAME_DATA_H_
 #define CC_OUTPUT_DELEGATED_FRAME_DATA_H_
 
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "cc/quads/render_pass.h"
 #include "cc/resources/transferable_resource.h"
diff --git a/cc/output/delegating_renderer.h b/cc/output/delegating_renderer.h
index b2bc01f..4b0c9cc 100644
--- a/cc/output/delegating_renderer.h
+++ b/cc/output/delegating_renderer.h
@@ -5,6 +5,7 @@
 #ifndef CC_OUTPUT_DELEGATING_RENDERER_H_
 #define CC_OUTPUT_DELEGATING_RENDERER_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/output/compositor_frame.h"
diff --git a/cc/output/delegating_renderer_unittest.cc b/cc/output/delegating_renderer_unittest.cc
index df06696..73dbfdd 100644
--- a/cc/output/delegating_renderer_unittest.cc
+++ b/cc/output/delegating_renderer_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/output/delegating_renderer.h"
 
+#include <stdint.h>
+
 #include "cc/test/fake_output_surface.h"
 #include "cc/test/layer_tree_test.h"
 #include "cc/test/render_pass_test_utils.h"
diff --git a/cc/output/direct_renderer.cc b/cc/output/direct_renderer.cc
index d22d7e4..3a10cbe 100644
--- a/cc/output/direct_renderer.cc
+++ b/cc/output/direct_renderer.cc
@@ -4,6 +4,8 @@
 
 #include "cc/output/direct_renderer.h"
 
+#include <stddef.h>
+
 #include <utility>
 #include <vector>
 
diff --git a/cc/output/direct_renderer.h b/cc/output/direct_renderer.h
index 9c3db40..28f2591 100644
--- a/cc/output/direct_renderer.h
+++ b/cc/output/direct_renderer.h
@@ -5,9 +5,9 @@
 #ifndef CC_OUTPUT_DIRECT_RENDERER_H_
 #define CC_OUTPUT_DIRECT_RENDERER_H_
 
-#include "base/basictypes.h"
 #include "base/callback.h"
 #include "base/containers/scoped_ptr_hash_map.h"
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "cc/output/ca_layer_overlay.h"
 #include "cc/output/overlay_processor.h"
diff --git a/cc/output/dynamic_geometry_binding.cc b/cc/output/dynamic_geometry_binding.cc
index ecdf66e..95fc0fb 100644
--- a/cc/output/dynamic_geometry_binding.cc
+++ b/cc/output/dynamic_geometry_binding.cc
@@ -4,6 +4,8 @@
 
 #include "cc/output/dynamic_geometry_binding.h"
 
+#include <stdint.h>
+
 #include "gpu/command_buffer/client/gles2_interface.h"
 #include "ui/gfx/geometry/quad_f.h"
 #include "ui/gfx/geometry/rect_f.h"
@@ -50,8 +52,9 @@
 
   GeometryBindingQuad local_quad = {v0, v1, v2, v3};
   GeometryBindingQuadIndex quad_index(
-      static_cast<uint16>(0), static_cast<uint16>(1), static_cast<uint16>(2),
-      static_cast<uint16>(3), static_cast<uint16>(0), static_cast<uint16>(2));
+      static_cast<uint16_t>(0), static_cast<uint16_t>(1),
+      static_cast<uint16_t>(2), static_cast<uint16_t>(3),
+      static_cast<uint16_t>(0), static_cast<uint16_t>(2));
 
   gl_->BufferSubData(GL_ARRAY_BUFFER, 0, sizeof(GeometryBindingQuad),
                      &local_quad);
diff --git a/cc/output/dynamic_geometry_binding.h b/cc/output/dynamic_geometry_binding.h
index 4e4ea3d..5f3e3ff 100644
--- a/cc/output/dynamic_geometry_binding.h
+++ b/cc/output/dynamic_geometry_binding.h
@@ -5,6 +5,7 @@
 #ifndef CC_OUTPUT_DYNAMIC_GEOMETRY_BINDING_H_
 #define CC_OUTPUT_DYNAMIC_GEOMETRY_BINDING_H_
 
+#include "base/macros.h"
 #include "cc/output/geometry_binding.h"
 
 namespace cc {
diff --git a/cc/output/filter_operation.cc b/cc/output/filter_operation.cc
index 1579e55..a37d27d 100644
--- a/cc/output/filter_operation.cc
+++ b/cc/output/filter_operation.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 <algorithm>
 
 #include "base/trace_event/trace_event_argument.h"
diff --git a/cc/output/filter_operations.cc b/cc/output/filter_operations.cc
index d734d4b..40bde98 100644
--- a/cc/output/filter_operations.cc
+++ b/cc/output/filter_operations.cc
@@ -4,6 +4,8 @@
 
 #include "cc/output/filter_operations.h"
 
+#include <stddef.h>
+
 #include <cmath>
 
 #include "base/trace_event/trace_event_argument.h"
diff --git a/cc/output/filter_operations.h b/cc/output/filter_operations.h
index 7018b82..6769969 100644
--- a/cc/output/filter_operations.h
+++ b/cc/output/filter_operations.h
@@ -5,6 +5,8 @@
 #ifndef CC_OUTPUT_FILTER_OPERATIONS_H_
 #define CC_OUTPUT_FILTER_OPERATIONS_H_
 
+#include <stddef.h>
+
 #include <vector>
 
 #include "base/logging.h"
diff --git a/cc/output/filter_operations_unittest.cc b/cc/output/filter_operations_unittest.cc
index 6ba1349..05c0289 100644
--- a/cc/output/filter_operations_unittest.cc
+++ b/cc/output/filter_operations_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 "cc/output/filter_operations.h"
 #include "skia/ext/refptr.h"
 #include "testing/gtest/include/gtest/gtest.h"
diff --git a/cc/output/geometry_binding.cc b/cc/output/geometry_binding.cc
index 9a87c7f..93b2d19 100644
--- a/cc/output/geometry_binding.cc
+++ b/cc/output/geometry_binding.cc
@@ -4,6 +4,8 @@
 
 #include "cc/output/geometry_binding.h"
 
+#include <stdint.h>
+
 #include "gpu/command_buffer/client/gles2_interface.h"
 #include "ui/gfx/geometry/rect_f.h"
 
@@ -56,12 +58,12 @@
   memset(data, 0x0, sizeof(data));
 }
 
-GeometryBindingQuadIndex::GeometryBindingQuadIndex(uint16 index0,
-                                                   uint16 index1,
-                                                   uint16 index2,
-                                                   uint16 index3,
-                                                   uint16 index4,
-                                                   uint16 index5) {
+GeometryBindingQuadIndex::GeometryBindingQuadIndex(uint16_t index0,
+                                                   uint16_t index1,
+                                                   uint16_t index2,
+                                                   uint16_t index3,
+                                                   uint16_t index4,
+                                                   uint16_t index5) {
   data[0] = index0;
   data[1] = index1;
   data[2] = index2;
diff --git a/cc/output/geometry_binding.h b/cc/output/geometry_binding.h
index de7cfc9..4734216 100644
--- a/cc/output/geometry_binding.h
+++ b/cc/output/geometry_binding.h
@@ -5,7 +5,8 @@
 #ifndef CC_OUTPUT_GEOMETRY_BINDING_H_
 #define CC_OUTPUT_GEOMETRY_BINDING_H_
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
 #include "gpu/command_buffer/client/gles2_interface.h"
 #include "third_party/khronos/GLES2/gl2.h"
 #include "third_party/khronos/GLES2/gl2ext.h"
@@ -38,14 +39,14 @@
 
 struct GeometryBindingQuadIndex {
   GeometryBindingQuadIndex();
-  GeometryBindingQuadIndex(uint16 index0,
-                           uint16 index1,
-                           uint16 index2,
-                           uint16 index3,
-                           uint16 index4,
-                           uint16 index5);
+  GeometryBindingQuadIndex(uint16_t index0,
+                           uint16_t index1,
+                           uint16_t index2,
+                           uint16_t index3,
+                           uint16_t index4,
+                           uint16_t index5);
 
-  uint16 data[6];
+  uint16_t data[6];
 };
 
 class DrawQuad;
diff --git a/cc/output/gl_frame_data.h b/cc/output/gl_frame_data.h
index df6227f..a4f9af4 100644
--- a/cc/output/gl_frame_data.h
+++ b/cc/output/gl_frame_data.h
@@ -7,7 +7,6 @@
 
 #include <string>
 
-#include "base/basictypes.h"
 #include "cc/base/cc_export.h"
 #include "gpu/command_buffer/common/mailbox.h"
 #include "gpu/command_buffer/common/sync_token.h"
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index dda82ef..977bfe7 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -4,6 +4,9 @@
 
 #include "cc/output/gl_renderer.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <algorithm>
 #include <limits>
 #include <set>
@@ -11,12 +14,13 @@
 #include <vector>
 
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/strings/string_split.h"
 #include "base/strings/string_util.h"
 #include "base/strings/stringprintf.h"
-#include "build/build_config.h"
 #include "base/trace_event/trace_event.h"
+#include "build/build_config.h"
 #include "cc/base/container_util.h"
 #include "cc/base/math_util.h"
 #include "cc/output/compositor_frame.h"
@@ -2837,19 +2841,19 @@
   DCHECK(iter != reverse_end);
   PendingAsyncReadPixels* current_read = iter->get();
 
-  uint8* src_pixels = NULL;
+  uint8_t* src_pixels = NULL;
   scoped_ptr<SkBitmap> bitmap;
 
   if (source_buffer != 0) {
     gl_->BindBuffer(GL_PIXEL_PACK_TRANSFER_BUFFER_CHROMIUM, source_buffer);
-    src_pixels = static_cast<uint8*>(gl_->MapBufferCHROMIUM(
+    src_pixels = static_cast<uint8_t*>(gl_->MapBufferCHROMIUM(
         GL_PIXEL_PACK_TRANSFER_BUFFER_CHROMIUM, GL_READ_ONLY));
 
     if (src_pixels) {
       bitmap.reset(new SkBitmap);
       bitmap->allocN32Pixels(size.width(), size.height());
       scoped_ptr<SkAutoLockPixels> lock(new SkAutoLockPixels(*bitmap));
-      uint8* dest_pixels = static_cast<uint8*>(bitmap->getPixels());
+      uint8_t* dest_pixels = static_cast<uint8_t*>(bitmap->getPixels());
 
       size_t row_bytes = size.width() * 4;
       int num_rows = size.height();
diff --git a/cc/output/gl_renderer.h b/cc/output/gl_renderer.h
index 233fd3b..8a7694a 100644
--- a/cc/output/gl_renderer.h
+++ b/cc/output/gl_renderer.h
@@ -9,6 +9,7 @@
 #include <vector>
 
 #include "base/cancelable_callback.h"
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "cc/output/direct_renderer.h"
 #include "cc/output/gl_renderer_draw_cache.h"
diff --git a/cc/output/gl_renderer_draw_cache.h b/cc/output/gl_renderer_draw_cache.h
index a16c8a5..e02b73b 100644
--- a/cc/output/gl_renderer_draw_cache.h
+++ b/cc/output/gl_renderer_draw_cache.h
@@ -7,7 +7,7 @@
 
 #include <vector>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "third_party/skia/include/core/SkColor.h"
 
 namespace cc {
diff --git a/cc/output/gl_renderer_unittest.cc b/cc/output/gl_renderer_unittest.cc
index 3e8535e..3db6d62 100644
--- a/cc/output/gl_renderer_unittest.cc
+++ b/cc/output/gl_renderer_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/output/gl_renderer.h"
 
+#include <stdint.h>
+
 #include <set>
 
 #include "base/location.h"
diff --git a/cc/output/latency_info_swap_promise.cc b/cc/output/latency_info_swap_promise.cc
index 3b26745..f20eb2d 100644
--- a/cc/output/latency_info_swap_promise.cc
+++ b/cc/output/latency_info_swap_promise.cc
@@ -4,6 +4,8 @@
 
 #include "cc/output/latency_info_swap_promise.h"
 
+#include <stdint.h>
+
 #include "base/logging.h"
 #include "base/trace_event/trace_event.h"
 
@@ -46,7 +48,7 @@
   // DCHECK(latency_.terminated);
 }
 
-int64 LatencyInfoSwapPromise::TraceId() const {
+int64_t LatencyInfoSwapPromise::TraceId() const {
   return latency_.trace_id();
 }
 
diff --git a/cc/output/latency_info_swap_promise.h b/cc/output/latency_info_swap_promise.h
index 9a4deb6..23a1c86 100644
--- a/cc/output/latency_info_swap_promise.h
+++ b/cc/output/latency_info_swap_promise.h
@@ -5,6 +5,8 @@
 #ifndef CC_OUTPUT_LATENCY_INFO_SWAP_PROMISE_H_
 #define CC_OUTPUT_LATENCY_INFO_SWAP_PROMISE_H_
 
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
 #include "cc/output/swap_promise.h"
 #include "ui/events/latency_info.h"
@@ -21,7 +23,7 @@
   void DidNotSwap(DidNotSwapReason reason) override;
   void OnCommit() override;
 
-  int64 TraceId() const override;
+  int64_t TraceId() const override;
 
  private:
   ui::LatencyInfo latency_;
diff --git a/cc/output/layer_quad.cc b/cc/output/layer_quad.cc
index 537c87b..450bfbc 100644
--- a/cc/output/layer_quad.cc
+++ b/cc/output/layer_quad.cc
@@ -4,6 +4,8 @@
 
 #include "cc/output/layer_quad.h"
 
+#include <stddef.h>
+
 #include "base/logging.h"
 #include "ui/gfx/geometry/quad_f.h"
 
diff --git a/cc/output/layer_quad.h b/cc/output/layer_quad.h
index 9ed3ff5..22b9357 100644
--- a/cc/output/layer_quad.h
+++ b/cc/output/layer_quad.h
@@ -6,7 +6,7 @@
 #ifndef CC_OUTPUT_LAYER_QUAD_H_
 #define CC_OUTPUT_LAYER_QUAD_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "ui/gfx/geometry/point_f.h"
 
diff --git a/cc/output/managed_memory_policy.cc b/cc/output/managed_memory_policy.cc
index f7ed214..0dc7def 100644
--- a/cc/output/managed_memory_policy.cc
+++ b/cc/output/managed_memory_policy.cc
@@ -4,6 +4,8 @@
 
 #include "cc/output/managed_memory_policy.h"
 
+#include <stddef.h>
+
 #include "base/logging.h"
 #include "cc/proto/gpu_conversions.h"
 #include "cc/proto/managed_memory_policy.pb.h"
diff --git a/cc/output/managed_memory_policy.h b/cc/output/managed_memory_policy.h
index 2f68e05..54fa271 100644
--- a/cc/output/managed_memory_policy.h
+++ b/cc/output/managed_memory_policy.h
@@ -5,7 +5,8 @@
 #ifndef CC_OUTPUT_MANAGED_MEMORY_POLICY_H_
 #define CC_OUTPUT_MANAGED_MEMORY_POLICY_H_
 
-#include "base/basictypes.h"
+#include <stddef.h>
+
 #include "cc/base/cc_export.h"
 #include "cc/tiles/tile_priority.h"
 #include "gpu/command_buffer/common/gpu_memory_allocation.h"
diff --git a/cc/output/managed_memory_policy_unittest.cc b/cc/output/managed_memory_policy_unittest.cc
index 3ba7546..de2ecfd 100644
--- a/cc/output/managed_memory_policy_unittest.cc
+++ b/cc/output/managed_memory_policy_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/output/managed_memory_policy.h"
 
+#include <stddef.h>
+
 #include "cc/proto/managed_memory_policy.pb.h"
 #include "cc/proto/memory_allocation.pb.h"
 #include "gpu/command_buffer/common/gpu_memory_allocation.h"
diff --git a/cc/output/output_surface.cc b/cc/output/output_surface.cc
index 108f5562..13e41d3 100644
--- a/cc/output/output_surface.cc
+++ b/cc/output/output_surface.cc
@@ -4,8 +4,11 @@
 
 #include "cc/output/output_surface.h"
 
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
 #include "base/trace_event/trace_event.h"
@@ -53,7 +56,7 @@
   void setMemoryBacking(const char* dump_name,
                         const char* backing_type,
                         const char* backing_object_id) override {
-    const uint64 tracing_process_id =
+    const uint64_t tracing_process_id =
         base::trace_event::MemoryDumpManager::GetInstance()
             ->GetTracingProcessId();
 
diff --git a/cc/output/output_surface.h b/cc/output/output_surface.h
index 05b6ad3..1ccc9cc 100644
--- a/cc/output/output_surface.h
+++ b/cc/output/output_surface.h
@@ -7,7 +7,7 @@
 
 #include <deque>
 
-#include "base/basictypes.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/cc/output/overlay_processor.h b/cc/output/overlay_processor.h
index 8f3704c..beaae08 100644
--- a/cc/output/overlay_processor.h
+++ b/cc/output/overlay_processor.h
@@ -5,7 +5,7 @@
 #ifndef CC_OUTPUT_OVERLAY_PROCESSOR_H_
 #define CC_OUTPUT_OVERLAY_PROCESSOR_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/output/ca_layer_overlay.h"
diff --git a/cc/output/overlay_strategy_sandwich.h b/cc/output/overlay_strategy_sandwich.h
index 076ea9d..f46dd03 100644
--- a/cc/output/overlay_strategy_sandwich.h
+++ b/cc/output/overlay_strategy_sandwich.h
@@ -5,6 +5,7 @@
 #ifndef CC_OUTPUT_OVERLAY_STRATEGY_SANDWICH_H_
 #define CC_OUTPUT_OVERLAY_STRATEGY_SANDWICH_H_
 
+#include "base/macros.h"
 #include "cc/output/overlay_processor.h"
 
 namespace cc {
diff --git a/cc/output/overlay_strategy_single_on_top.h b/cc/output/overlay_strategy_single_on_top.h
index bdf2cc2..0613b89 100644
--- a/cc/output/overlay_strategy_single_on_top.h
+++ b/cc/output/overlay_strategy_single_on_top.h
@@ -5,6 +5,7 @@
 #ifndef CC_OUTPUT_OVERLAY_STRATEGY_SINGLE_ON_TOP_H_
 #define CC_OUTPUT_OVERLAY_STRATEGY_SINGLE_ON_TOP_H_
 
+#include "base/macros.h"
 #include "cc/output/overlay_processor.h"
 
 namespace cc {
diff --git a/cc/output/overlay_strategy_underlay.h b/cc/output/overlay_strategy_underlay.h
index f276c1cb..806753bd 100644
--- a/cc/output/overlay_strategy_underlay.h
+++ b/cc/output/overlay_strategy_underlay.h
@@ -5,6 +5,7 @@
 #ifndef CC_OUTPUT_OVERLAY_STRATEGY_UNDERLAY_H_
 #define CC_OUTPUT_OVERLAY_STRATEGY_UNDERLAY_H_
 
+#include "base/macros.h"
 #include "cc/output/overlay_processor.h"
 
 namespace cc {
diff --git a/cc/output/overlay_unittest.cc b/cc/output/overlay_unittest.cc
index e525025..8b2333d 100644
--- a/cc/output/overlay_unittest.cc
+++ b/cc/output/overlay_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 <utility>
 
 #include "cc/base/region.h"
diff --git a/cc/output/program_binding.h b/cc/output/program_binding.h
index 8018cad..1a29436 100644
--- a/cc/output/program_binding.h
+++ b/cc/output/program_binding.h
@@ -8,6 +8,7 @@
 #include <string>
 
 #include "base/logging.h"
+#include "base/macros.h"
 #include "cc/output/context_provider.h"
 #include "cc/output/shader.h"
 
diff --git a/cc/output/render_surface_filters.cc b/cc/output/render_surface_filters.cc
index 7cccb24..9405474 100644
--- a/cc/output/render_surface_filters.cc
+++ b/cc/output/render_surface_filters.cc
@@ -4,6 +4,8 @@
 
 #include "cc/output/render_surface_filters.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 
 #include "cc/output/filter_operation.h"
diff --git a/cc/output/render_surface_filters.h b/cc/output/render_surface_filters.h
index 42b6e45..bf54986 100644
--- a/cc/output/render_surface_filters.h
+++ b/cc/output/render_surface_filters.h
@@ -6,7 +6,7 @@
 #ifndef CC_OUTPUT_RENDER_SURFACE_FILTERS_H_
 #define CC_OUTPUT_RENDER_SURFACE_FILTERS_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "skia/ext/refptr.h"
 
diff --git a/cc/output/renderer.h b/cc/output/renderer.h
index f91b039..d22d509 100644
--- a/cc/output/renderer.h
+++ b/cc/output/renderer.h
@@ -5,7 +5,7 @@
 #ifndef CC_OUTPUT_RENDERER_H_
 #define CC_OUTPUT_RENDERER_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "cc/output/renderer_capabilities.h"
 #include "cc/output/renderer_settings.h"
diff --git a/cc/output/renderer_pixeltest.cc b/cc/output/renderer_pixeltest.cc
index 1c7f086..6c5e255 100644
--- a/cc/output/renderer_pixeltest.cc
+++ b/cc/output/renderer_pixeltest.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/message_loop/message_loop.h"
 #include "cc/output/gl_renderer.h"
 #include "cc/quads/draw_quad.h"
@@ -183,7 +186,7 @@
 void CreateTestYUVVideoDrawQuad_FromVideoFrame(
     const SharedQuadState* shared_state,
     scoped_refptr<media::VideoFrame> video_frame,
-    uint8 alpha_value,
+    uint8_t alpha_value,
     const gfx::RectF& tex_coord_rect,
     RenderPass* render_pass,
     VideoResourceUpdater* video_resource_updater,
@@ -304,7 +307,7 @@
       v_row[j] = (v_value += 5);
     }
   }
-  uint8 alpha_value = is_transparent ? 0 : 128;
+  uint8_t alpha_value = is_transparent ? 0 : 128;
   CreateTestYUVVideoDrawQuad_FromVideoFrame(
       shared_state, video_frame, alpha_value, tex_coord_rect, render_pass,
       video_resource_updater, rect, visible_rect, resource_provider);
@@ -322,13 +325,13 @@
     const gfx::RectF& tex_coord_rect,
     const gfx::Size& background_size,
     const gfx::Rect& visible_rect,
-    uint8 y_background,
-    uint8 u_background,
-    uint8 v_background,
+    uint8_t y_background,
+    uint8_t u_background,
+    uint8_t v_background,
     const gfx::Rect& foreground_rect,
-    uint8 y_foreground,
-    uint8 u_foreground,
-    uint8 v_foreground,
+    uint8_t y_foreground,
+    uint8_t u_foreground,
+    uint8_t v_foreground,
     RenderPass* render_pass,
     VideoResourceUpdater* video_resource_updater,
     ResourceProvider* resource_provider) {
@@ -343,8 +346,8 @@
   int planes[] = {media::VideoFrame::kYPlane,
                   media::VideoFrame::kUPlane,
                   media::VideoFrame::kVPlane};
-  uint8 yuv_background[] = {y_background, u_background, v_background};
-  uint8 yuv_foreground[] = {y_foreground, u_foreground, v_foreground};
+  uint8_t yuv_background[] = {y_background, u_background, v_background};
+  uint8_t yuv_foreground[] = {y_foreground, u_foreground, v_foreground};
   int sample_size[] = {1, 2, 2};
 
   for (int i = 0; i < 3; ++i) {
@@ -372,7 +375,7 @@
     }
   }
 
-  uint8 alpha_value = 255;
+  uint8_t alpha_value = 255;
   CreateTestYUVVideoDrawQuad_FromVideoFrame(
       shared_state, video_frame, alpha_value, tex_coord_rect, render_pass,
       video_resource_updater, rect, visible_rect, resource_provider);
@@ -384,9 +387,9 @@
     media::ColorSpace color_space,
     bool is_transparent,
     const gfx::RectF& tex_coord_rect,
-    uint8 y,
-    uint8 u,
-    uint8 v,
+    uint8_t y,
+    uint8_t u,
+    uint8_t v,
     RenderPass* render_pass,
     VideoResourceUpdater* video_resource_updater,
     const gfx::Rect& rect,
@@ -409,7 +412,7 @@
          video_frame->stride(media::VideoFrame::kVPlane) *
              video_frame->rows(media::VideoFrame::kVPlane));
 
-  uint8 alpha_value = is_transparent ? 0 : 128;
+  uint8_t alpha_value = is_transparent ? 0 : 128;
   CreateTestYUVVideoDrawQuad_FromVideoFrame(
       shared_state, video_frame, alpha_value, tex_coord_rect, render_pass,
       video_resource_updater, rect, visible_rect, resource_provider);
diff --git a/cc/output/renderer_settings.h b/cc/output/renderer_settings.h
index 4910a25..46008fe 100644
--- a/cc/output/renderer_settings.h
+++ b/cc/output/renderer_settings.h
@@ -5,7 +5,8 @@
 #ifndef CC_OUTPUT_RENDERER_SETTINGS_H_
 #define CC_OUTPUT_RENDERER_SETTINGS_H_
 
-#include "base/basictypes.h"
+#include <stddef.h>
+
 #include "cc/base/cc_export.h"
 
 namespace cc {
diff --git a/cc/output/shader.cc b/cc/output/shader.cc
index de1ddd4..75cac6c 100644
--- a/cc/output/shader.cc
+++ b/cc/output/shader.cc
@@ -4,9 +4,10 @@
 
 #include "cc/output/shader.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 
-#include "base/basictypes.h"
 #include "base/logging.h"
 #include "base/strings/stringprintf.h"
 #include "cc/output/static_geometry_binding.h"
diff --git a/cc/output/shader.h b/cc/output/shader.h
index 448ff07..88b632e 100644
--- a/cc/output/shader.h
+++ b/cc/output/shader.h
@@ -7,7 +7,7 @@
 
 #include <string>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 
 namespace gfx {
diff --git a/cc/output/software_output_device.h b/cc/output/software_output_device.h
index 127c70a..722a192 100644
--- a/cc/output/software_output_device.h
+++ b/cc/output/software_output_device.h
@@ -5,7 +5,7 @@
 #ifndef CC_OUTPUT_SOFTWARE_OUTPUT_DEVICE_H_
 #define CC_OUTPUT_SOFTWARE_OUTPUT_DEVICE_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "skia/ext/refptr.h"
diff --git a/cc/output/software_renderer.h b/cc/output/software_renderer.h
index 58d0417..19143a5 100644
--- a/cc/output/software_renderer.h
+++ b/cc/output/software_renderer.h
@@ -5,7 +5,7 @@
 #ifndef CC_OUTPUT_SOFTWARE_RENDERER_H_
 #define CC_OUTPUT_SOFTWARE_RENDERER_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "cc/output/compositor_frame.h"
 #include "cc/output/direct_renderer.h"
diff --git a/cc/output/software_renderer_unittest.cc b/cc/output/software_renderer_unittest.cc
index 12976623..7f890c9 100644
--- a/cc/output/software_renderer_unittest.cc
+++ b/cc/output/software_renderer_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/output/software_renderer.h"
 
+#include <stdint.h>
+
 #include "base/run_loop.h"
 #include "cc/output/compositor_frame_metadata.h"
 #include "cc/output/copy_output_request.h"
diff --git a/cc/output/static_geometry_binding.cc b/cc/output/static_geometry_binding.cc
index dc79c1e..df54067 100644
--- a/cc/output/static_geometry_binding.cc
+++ b/cc/output/static_geometry_binding.cc
@@ -4,6 +4,9 @@
 
 #include "cc/output/static_geometry_binding.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "gpu/command_buffer/client/gles2_interface.h"
 #include "ui/gfx/geometry/rect_f.h"
 
@@ -40,9 +43,9 @@
     GeometryBindingQuad x(v0, v1, v2, v3);
     quads[i] = x;
     GeometryBindingQuadIndex y(
-        static_cast<uint16>(0 + 4 * i), static_cast<uint16>(1 + 4 * i),
-        static_cast<uint16>(2 + 4 * i), static_cast<uint16>(3 + 4 * i),
-        static_cast<uint16>(0 + 4 * i), static_cast<uint16>(2 + 4 * i));
+        static_cast<uint16_t>(0 + 4 * i), static_cast<uint16_t>(1 + 4 * i),
+        static_cast<uint16_t>(2 + 4 * i), static_cast<uint16_t>(3 + 4 * i),
+        static_cast<uint16_t>(0 + 4 * i), static_cast<uint16_t>(2 + 4 * i));
     quad_indices[i] = y;
   }
 
diff --git a/cc/output/static_geometry_binding.h b/cc/output/static_geometry_binding.h
index 85166ef..86b84ee8 100644
--- a/cc/output/static_geometry_binding.h
+++ b/cc/output/static_geometry_binding.h
@@ -5,6 +5,7 @@
 #ifndef CC_OUTPUT_STATIC_GEOMETRY_BINDING_H_
 #define CC_OUTPUT_STATIC_GEOMETRY_BINDING_H_
 
+#include "base/macros.h"
 #include "cc/output/geometry_binding.h"
 
 using gpu::gles2::GLES2Interface;
diff --git a/cc/output/swap_promise.h b/cc/output/swap_promise.h
index cf0b88d..f3c3fbd 100644
--- a/cc/output/swap_promise.h
+++ b/cc/output/swap_promise.h
@@ -5,6 +5,8 @@
 #ifndef CC_OUTPUT_SWAP_PROMISE_H_
 #define CC_OUTPUT_SWAP_PROMISE_H_
 
+#include <stdint.h>
+
 #include "cc/output/compositor_frame_metadata.h"
 
 namespace cc {
@@ -60,7 +62,7 @@
   // A non-zero trace id identifies a trace flow object that is embedded in the
   // swap promise. This can be used for registering additional flow steps to
   // visualize the object's path through the system.
-  virtual int64 TraceId() const = 0;
+  virtual int64_t TraceId() const = 0;
 };
 
 }  // namespace cc
diff --git a/cc/output/texture_mailbox_deleter.cc b/cc/output/texture_mailbox_deleter.cc
index 8585938..2bef8eb 100644
--- a/cc/output/texture_mailbox_deleter.cc
+++ b/cc/output/texture_mailbox_deleter.cc
@@ -4,6 +4,8 @@
 
 #include "cc/output/texture_mailbox_deleter.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/location.h"
 #include "base/memory/weak_ptr.h"
diff --git a/cc/playback/clip_display_item.cc b/cc/playback/clip_display_item.cc
index 96a2df8..90b8904 100644
--- a/cc/playback/clip_display_item.cc
+++ b/cc/playback/clip_display_item.cc
@@ -4,6 +4,8 @@
 
 #include "cc/playback/clip_display_item.h"
 
+#include <stddef.h>
+
 #include <string>
 
 #include "base/logging.h"
diff --git a/cc/playback/clip_display_item.h b/cc/playback/clip_display_item.h
index 51402139..97e877e 100644
--- a/cc/playback/clip_display_item.h
+++ b/cc/playback/clip_display_item.h
@@ -5,6 +5,8 @@
 #ifndef CC_PLAYBACK_CLIP_DISPLAY_ITEM_H_
 #define CC_PLAYBACK_CLIP_DISPLAY_ITEM_H_
 
+#include <stddef.h>
+
 #include <vector>
 
 #include "base/memory/scoped_ptr.h"
diff --git a/cc/playback/clip_path_display_item.cc b/cc/playback/clip_path_display_item.cc
index 5b9b3f2..1a39af2 100644
--- a/cc/playback/clip_path_display_item.cc
+++ b/cc/playback/clip_path_display_item.cc
@@ -4,6 +4,9 @@
 
 #include "cc/playback/clip_path_display_item.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/strings/stringprintf.h"
 #include "base/trace_event/trace_event_argument.h"
 #include "cc/proto/display_item.pb.h"
diff --git a/cc/playback/clip_path_display_item.h b/cc/playback/clip_path_display_item.h
index f3eaa0a..0ad1eff 100644
--- a/cc/playback/clip_path_display_item.h
+++ b/cc/playback/clip_path_display_item.h
@@ -5,6 +5,8 @@
 #ifndef CC_PLAYBACK_CLIP_PATH_DISPLAY_ITEM_H_
 #define CC_PLAYBACK_CLIP_PATH_DISPLAY_ITEM_H_
 
+#include <stddef.h>
+
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/playback/display_item.h"
diff --git a/cc/playback/compositing_display_item.cc b/cc/playback/compositing_display_item.cc
index 3c6e8b0..6828fcf 100644
--- a/cc/playback/compositing_display_item.cc
+++ b/cc/playback/compositing_display_item.cc
@@ -4,6 +4,9 @@
 
 #include "cc/playback/compositing_display_item.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/strings/stringprintf.h"
 #include "base/trace_event/trace_event_argument.h"
 #include "cc/proto/display_item.pb.h"
diff --git a/cc/playback/compositing_display_item.h b/cc/playback/compositing_display_item.h
index e0dd8701..4745208 100644
--- a/cc/playback/compositing_display_item.h
+++ b/cc/playback/compositing_display_item.h
@@ -5,6 +5,9 @@
 #ifndef CC_PLAYBACK_COMPOSITING_DISPLAY_ITEM_H_
 #define CC_PLAYBACK_COMPOSITING_DISPLAY_ITEM_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/playback/display_item.h"
diff --git a/cc/playback/discardable_image_map.cc b/cc/playback/discardable_image_map.cc
index e109e2be..93ee2c5 100644
--- a/cc/playback/discardable_image_map.cc
+++ b/cc/playback/discardable_image_map.cc
@@ -4,6 +4,8 @@
 
 #include "cc/playback/discardable_image_map.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 #include <limits>
 
diff --git a/cc/playback/discardable_image_map_unittest.cc b/cc/playback/discardable_image_map_unittest.cc
index 70253caa..1c7c1fb4 100644
--- a/cc/playback/discardable_image_map_unittest.cc
+++ b/cc/playback/discardable_image_map_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/playback/discardable_image_map.h"
 
+#include <stddef.h>
+
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/values.h"
diff --git a/cc/playback/display_item.h b/cc/playback/display_item.h
index aeea050..c4140f33 100644
--- a/cc/playback/display_item.h
+++ b/cc/playback/display_item.h
@@ -5,6 +5,8 @@
 #ifndef CC_PLAYBACK_DISPLAY_ITEM_H_
 #define CC_PLAYBACK_DISPLAY_ITEM_H_
 
+#include <stddef.h>
+
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/debug/traced_value.h"
diff --git a/cc/playback/display_item_list.cc b/cc/playback/display_item_list.cc
index 80c713d..19b97d8 100644
--- a/cc/playback/display_item_list.cc
+++ b/cc/playback/display_item_list.cc
@@ -4,6 +4,8 @@
 
 #include "cc/playback/display_item_list.h"
 
+#include <stddef.h>
+
 #include <string>
 
 #include "base/numerics/safe_conversions.h"
diff --git a/cc/playback/display_item_list.h b/cc/playback/display_item_list.h
index 3ce1662..7b68e07 100644
--- a/cc/playback/display_item_list.h
+++ b/cc/playback/display_item_list.h
@@ -5,7 +5,10 @@
 #ifndef CC_PLAYBACK_DISPLAY_ITEM_LIST_H_
 #define CC_PLAYBACK_DISPLAY_ITEM_LIST_H_
 
+#include <stddef.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/trace_event/trace_event.h"
diff --git a/cc/playback/display_item_list_unittest.cc b/cc/playback/display_item_list_unittest.cc
index 65d12d6..191b533 100644
--- a/cc/playback/display_item_list_unittest.cc
+++ b/cc/playback/display_item_list_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/playback/display_item_list.h"
 
+#include <stddef.h>
+
 #include <vector>
 
 #include "cc/output/filter_operation.h"
diff --git a/cc/playback/display_list_raster_source.cc b/cc/playback/display_list_raster_source.cc
index cc4f7a7..4fc0f63 100644
--- a/cc/playback/display_list_raster_source.cc
+++ b/cc/playback/display_list_raster_source.cc
@@ -4,6 +4,8 @@
 
 #include "cc/playback/display_list_raster_source.h"
 
+#include <stddef.h>
+
 #include "base/trace_event/trace_event.h"
 #include "cc/base/region.h"
 #include "cc/debug/debug_colors.h"
diff --git a/cc/playback/display_list_raster_source.h b/cc/playback/display_list_raster_source.h
index 8c06c8d6..377e081 100644
--- a/cc/playback/display_list_raster_source.h
+++ b/cc/playback/display_list_raster_source.h
@@ -5,8 +5,11 @@
 #ifndef CC_PLAYBACK_DISPLAY_LIST_RASTER_SOURCE_H_
 #define CC_PLAYBACK_DISPLAY_LIST_RASTER_SOURCE_H_
 
+#include <stddef.h>
+
 #include <vector>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/debug/rendering_stats_instrumentation.h"
diff --git a/cc/playback/display_list_raster_source_unittest.cc b/cc/playback/display_list_raster_source_unittest.cc
index c7b3af9..ca746fc 100644
--- a/cc/playback/display_list_raster_source_unittest.cc
+++ b/cc/playback/display_list_raster_source_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/memory/scoped_ptr.h"
 #include "cc/playback/display_list_raster_source.h"
 #include "cc/test/fake_display_list_recording_source.h"
diff --git a/cc/playback/display_list_recording_source.cc b/cc/playback/display_list_recording_source.cc
index 57602fb..9054238 100644
--- a/cc/playback/display_list_recording_source.cc
+++ b/cc/playback/display_list_recording_source.cc
@@ -4,6 +4,8 @@
 
 #include "cc/playback/display_list_recording_source.h"
 
+#include <stdint.h>
+
 #include <algorithm>
 
 #include "base/numerics/safe_math.h"
diff --git a/cc/playback/display_list_recording_source.h b/cc/playback/display_list_recording_source.h
index f8d469e..d1caf98e 100644
--- a/cc/playback/display_list_recording_source.h
+++ b/cc/playback/display_list_recording_source.h
@@ -5,6 +5,9 @@
 #ifndef CC_PLAYBACK_DISPLAY_LIST_RECORDING_SOURCE_H_
 #define CC_PLAYBACK_DISPLAY_LIST_RECORDING_SOURCE_H_
 
+#include <stddef.h>
+
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
diff --git a/cc/playback/drawing_display_item.cc b/cc/playback/drawing_display_item.cc
index f314608..78f26fe 100644
--- a/cc/playback/drawing_display_item.cc
+++ b/cc/playback/drawing_display_item.cc
@@ -4,6 +4,8 @@
 
 #include "cc/playback/drawing_display_item.h"
 
+#include <stddef.h>
+
 #include <string>
 
 #include "base/strings/stringprintf.h"
diff --git a/cc/playback/drawing_display_item.h b/cc/playback/drawing_display_item.h
index 261b3b3..9e8f110 100644
--- a/cc/playback/drawing_display_item.h
+++ b/cc/playback/drawing_display_item.h
@@ -5,6 +5,8 @@
 #ifndef CC_PLAYBACK_DRAWING_DISPLAY_ITEM_H_
 #define CC_PLAYBACK_DRAWING_DISPLAY_ITEM_H_
 
+#include <stddef.h>
+
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/playback/display_item.h"
diff --git a/cc/playback/filter_display_item.cc b/cc/playback/filter_display_item.cc
index d51da7c..0c6ebe0a 100644
--- a/cc/playback/filter_display_item.cc
+++ b/cc/playback/filter_display_item.cc
@@ -4,6 +4,8 @@
 
 #include "cc/playback/filter_display_item.h"
 
+#include <stddef.h>
+
 #include "base/strings/stringprintf.h"
 #include "base/trace_event/trace_event_argument.h"
 #include "cc/output/render_surface_filters.h"
diff --git a/cc/playback/filter_display_item.h b/cc/playback/filter_display_item.h
index c0a8df9..d4506ed 100644
--- a/cc/playback/filter_display_item.h
+++ b/cc/playback/filter_display_item.h
@@ -5,6 +5,8 @@
 #ifndef CC_PLAYBACK_FILTER_DISPLAY_ITEM_H_
 #define CC_PLAYBACK_FILTER_DISPLAY_ITEM_H_
 
+#include <stddef.h>
+
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/output/filter_operations.h"
diff --git a/cc/playback/float_clip_display_item.cc b/cc/playback/float_clip_display_item.cc
index b57e640..3601e9d 100644
--- a/cc/playback/float_clip_display_item.cc
+++ b/cc/playback/float_clip_display_item.cc
@@ -4,6 +4,8 @@
 
 #include "cc/playback/float_clip_display_item.h"
 
+#include <stddef.h>
+
 #include "base/strings/stringprintf.h"
 #include "base/trace_event/trace_event_argument.h"
 #include "cc/proto/display_item.pb.h"
diff --git a/cc/playback/float_clip_display_item.h b/cc/playback/float_clip_display_item.h
index 6769c98..8c34c5f 100644
--- a/cc/playback/float_clip_display_item.h
+++ b/cc/playback/float_clip_display_item.h
@@ -5,6 +5,8 @@
 #ifndef CC_PLAYBACK_FLOAT_CLIP_DISPLAY_ITEM_H_
 #define CC_PLAYBACK_FLOAT_CLIP_DISPLAY_ITEM_H_
 
+#include <stddef.h>
+
 #include <vector>
 
 #include "base/memory/scoped_ptr.h"
diff --git a/cc/playback/largest_display_item.cc b/cc/playback/largest_display_item.cc
index 0ecd3d0..7c761141 100644
--- a/cc/playback/largest_display_item.cc
+++ b/cc/playback/largest_display_item.cc
@@ -4,6 +4,8 @@
 
 #include "cc/playback/largest_display_item.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 
 #include "cc/playback/clip_display_item.h"
diff --git a/cc/playback/largest_display_item.h b/cc/playback/largest_display_item.h
index cce56719..8350c61 100644
--- a/cc/playback/largest_display_item.h
+++ b/cc/playback/largest_display_item.h
@@ -5,7 +5,8 @@
 #ifndef CC_PLAYBACK_LARGEST_DISPLAY_ITEM_H_
 #define CC_PLAYBACK_LARGEST_DISPLAY_ITEM_H_
 
-#include "base/basictypes.h"
+#include <stddef.h>
+
 #include "cc/base/cc_export.h"
 
 namespace cc {
diff --git a/cc/playback/transform_display_item.cc b/cc/playback/transform_display_item.cc
index 8f7303c..c4625ff 100644
--- a/cc/playback/transform_display_item.cc
+++ b/cc/playback/transform_display_item.cc
@@ -4,6 +4,8 @@
 
 #include "cc/playback/transform_display_item.h"
 
+#include <stddef.h>
+
 #include "base/strings/stringprintf.h"
 #include "base/trace_event/trace_event_argument.h"
 #include "cc/proto/display_item.pb.h"
diff --git a/cc/playback/transform_display_item.h b/cc/playback/transform_display_item.h
index 7e0a297..5b89136 100644
--- a/cc/playback/transform_display_item.h
+++ b/cc/playback/transform_display_item.h
@@ -5,6 +5,8 @@
 #ifndef CC_PLAYBACK_TRANSFORM_DISPLAY_ITEM_H_
 #define CC_PLAYBACK_TRANSFORM_DISPLAY_ITEM_H_
 
+#include <stddef.h>
+
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/playback/display_item.h"
diff --git a/cc/proto/gpu_conversions_unittest.cc b/cc/proto/gpu_conversions_unittest.cc
index f845f81..7ed770b 100644
--- a/cc/proto/gpu_conversions_unittest.cc
+++ b/cc/proto/gpu_conversions_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/proto/gpu_conversions.h"
 
+#include <stddef.h>
+
 #include "cc/proto/memory_allocation.pb.h"
 #include "gpu/command_buffer/common/gpu_memory_allocation.h"
 #include "testing/gtest/include/gtest/gtest.h"
diff --git a/cc/proto/skia_conversions_unittest.cc b/cc/proto/skia_conversions_unittest.cc
index 6785a0c..c8e02a7 100644
--- a/cc/proto/skia_conversions_unittest.cc
+++ b/cc/proto/skia_conversions_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/proto/skia_conversions.h"
 
+#include <stddef.h>
+
 #include "cc/proto/skregion.pb.h"
 #include "cc/proto/skrrect.pb.h"
 #include "cc/proto/skxfermode.pb.h"
diff --git a/cc/quads/draw_polygon.cc b/cc/quads/draw_polygon.cc
index b279fe6..a300c92 100644
--- a/cc/quads/draw_polygon.cc
+++ b/cc/quads/draw_polygon.cc
@@ -4,6 +4,8 @@
 
 #include "cc/quads/draw_polygon.h"
 
+#include <stddef.h>
+
 #include <vector>
 
 #include "cc/output/bsp_compare_result.h"
diff --git a/cc/quads/draw_polygon_unittest.cc b/cc/quads/draw_polygon_unittest.cc
index 95eaf6b..eb6d162 100644
--- a/cc/quads/draw_polygon_unittest.cc
+++ b/cc/quads/draw_polygon_unittest.cc
@@ -7,6 +7,8 @@
 #define _USE_MATH_DEFINES
 #endif
 
+#include <stddef.h>
+
 #include <limits>
 #include <vector>
 
diff --git a/cc/quads/draw_quad.cc b/cc/quads/draw_quad.cc
index f9bf6fc..9bf17f2 100644
--- a/cc/quads/draw_quad.cc
+++ b/cc/quads/draw_quad.cc
@@ -4,6 +4,8 @@
 
 #include "cc/quads/draw_quad.h"
 
+#include <stddef.h>
+
 #include "base/logging.h"
 #include "base/trace_event/trace_event_argument.h"
 #include "base/values.h"
diff --git a/cc/quads/draw_quad.h b/cc/quads/draw_quad.h
index 10b0e40..dcc671ac 100644
--- a/cc/quads/draw_quad.h
+++ b/cc/quads/draw_quad.h
@@ -5,6 +5,8 @@
 #ifndef CC_QUADS_DRAW_QUAD_H_
 #define CC_QUADS_DRAW_QUAD_H_
 
+#include <stddef.h>
+
 #include "base/callback.h"
 #include "cc/base/cc_export.h"
 #include "cc/base/resource_id.h"
diff --git a/cc/quads/draw_quad_unittest.cc b/cc/quads/draw_quad_unittest.cc
index 838cfe0..cfc20a1 100644
--- a/cc/quads/draw_quad_unittest.cc
+++ b/cc/quads/draw_quad_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/quads/draw_quad.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 
 #include "base/bind.h"
diff --git a/cc/quads/io_surface_draw_quad.h b/cc/quads/io_surface_draw_quad.h
index 4a8a072c..9deb8fa 100644
--- a/cc/quads/io_surface_draw_quad.h
+++ b/cc/quads/io_surface_draw_quad.h
@@ -5,6 +5,8 @@
 #ifndef CC_QUADS_IO_SURFACE_DRAW_QUAD_H_
 #define CC_QUADS_IO_SURFACE_DRAW_QUAD_H_
 
+#include <stddef.h>
+
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/quads/draw_quad.h"
diff --git a/cc/quads/largest_draw_quad.cc b/cc/quads/largest_draw_quad.cc
index b652638..cd5dd38 100644
--- a/cc/quads/largest_draw_quad.cc
+++ b/cc/quads/largest_draw_quad.cc
@@ -4,6 +4,8 @@
 
 #include "cc/quads/largest_draw_quad.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 
 #include "cc/quads/debug_border_draw_quad.h"
diff --git a/cc/quads/largest_draw_quad.h b/cc/quads/largest_draw_quad.h
index 85d9f17..62593e5 100644
--- a/cc/quads/largest_draw_quad.h
+++ b/cc/quads/largest_draw_quad.h
@@ -5,7 +5,8 @@
 #ifndef CC_QUADS_LARGEST_DRAW_QUAD_H_
 #define CC_QUADS_LARGEST_DRAW_QUAD_H_
 
-#include "base/basictypes.h"
+#include <stddef.h>
+
 #include "cc/base/cc_export.h"
 
 namespace cc {
diff --git a/cc/quads/render_pass.cc b/cc/quads/render_pass.cc
index ba5806f..15ed6a4 100644
--- a/cc/quads/render_pass.cc
+++ b/cc/quads/render_pass.cc
@@ -4,6 +4,8 @@
 
 #include "cc/quads/render_pass.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 
 #include "base/numerics/safe_conversions.h"
diff --git a/cc/quads/render_pass.h b/cc/quads/render_pass.h
index e6cc67a6..9ba727e 100644
--- a/cc/quads/render_pass.h
+++ b/cc/quads/render_pass.h
@@ -5,12 +5,14 @@
 #ifndef CC_QUADS_RENDER_PASS_H_
 #define CC_QUADS_RENDER_PASS_H_
 
+#include <stddef.h>
+
 #include <utility>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
 #include "base/containers/hash_tables.h"
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "cc/base/list_container.h"
 #include "cc/quads/render_pass_id.h"
diff --git a/cc/quads/render_pass_draw_quad.h b/cc/quads/render_pass_draw_quad.h
index c0d6b52..08e0cc0 100644
--- a/cc/quads/render_pass_draw_quad.h
+++ b/cc/quads/render_pass_draw_quad.h
@@ -5,7 +5,8 @@
 #ifndef CC_QUADS_RENDER_PASS_DRAW_QUAD_H_
 #define CC_QUADS_RENDER_PASS_DRAW_QUAD_H_
 
-#include "base/basictypes.h"
+#include <stddef.h>
+
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/output/filter_operations.h"
diff --git a/cc/quads/render_pass_id.cc b/cc/quads/render_pass_id.cc
index 5fea6dc8..0f53e81 100644
--- a/cc/quads/render_pass_id.cc
+++ b/cc/quads/render_pass_id.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 "cc/quads/render_pass_id.h"
 
 namespace cc {
diff --git a/cc/quads/render_pass_id.h b/cc/quads/render_pass_id.h
index f6ab9ce..11cb7772 100644
--- a/cc/quads/render_pass_id.h
+++ b/cc/quads/render_pass_id.h
@@ -5,9 +5,10 @@
 #ifndef CC_QUADS_RENDER_PASS_ID_H_
 #define CC_QUADS_RENDER_PASS_ID_H_
 
+#include <stddef.h>
+
 #include <tuple>
 
-#include "base/basictypes.h"
 #include "base/containers/hash_tables.h"
 #include "cc/base/cc_export.h"
 
diff --git a/cc/quads/render_pass_unittest.cc b/cc/quads/render_pass_unittest.cc
index 140b7e1..b833a0c 100644
--- a/cc/quads/render_pass_unittest.cc
+++ b/cc/quads/render_pass_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/quads/render_pass.h"
 
+#include <stddef.h>
+
 #include "cc/base/math_util.h"
 #include "cc/output/copy_output_request.h"
 #include "cc/quads/render_pass_draw_quad.h"
diff --git a/cc/quads/stream_video_draw_quad.h b/cc/quads/stream_video_draw_quad.h
index 1044fdc..8547b66 100644
--- a/cc/quads/stream_video_draw_quad.h
+++ b/cc/quads/stream_video_draw_quad.h
@@ -5,6 +5,8 @@
 #ifndef CC_QUADS_STREAM_VIDEO_DRAW_QUAD_H_
 #define CC_QUADS_STREAM_VIDEO_DRAW_QUAD_H_
 
+#include <stddef.h>
+
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/quads/draw_quad.h"
diff --git a/cc/quads/texture_draw_quad.cc b/cc/quads/texture_draw_quad.cc
index 370277b..46f6be4 100644
--- a/cc/quads/texture_draw_quad.cc
+++ b/cc/quads/texture_draw_quad.cc
@@ -4,6 +4,8 @@
 
 #include "cc/quads/texture_draw_quad.h"
 
+#include <stddef.h>
+
 #include "base/logging.h"
 #include "base/trace_event/trace_event_argument.h"
 #include "base/values.h"
diff --git a/cc/quads/texture_draw_quad.h b/cc/quads/texture_draw_quad.h
index 9b9fab9..2ba5b9d 100644
--- a/cc/quads/texture_draw_quad.h
+++ b/cc/quads/texture_draw_quad.h
@@ -5,6 +5,8 @@
 #ifndef CC_QUADS_TEXTURE_DRAW_QUAD_H_
 #define CC_QUADS_TEXTURE_DRAW_QUAD_H_
 
+#include <stddef.h>
+
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/quads/draw_quad.h"
diff --git a/cc/quads/tile_draw_quad.h b/cc/quads/tile_draw_quad.h
index feb9e87..d13ac97 100644
--- a/cc/quads/tile_draw_quad.h
+++ b/cc/quads/tile_draw_quad.h
@@ -5,6 +5,8 @@
 #ifndef CC_QUADS_TILE_DRAW_QUAD_H_
 #define CC_QUADS_TILE_DRAW_QUAD_H_
 
+#include <stddef.h>
+
 #include "cc/quads/content_draw_quad_base.h"
 
 namespace cc {
diff --git a/cc/quads/yuv_video_draw_quad.h b/cc/quads/yuv_video_draw_quad.h
index 3dfd85b..1a72078 100644
--- a/cc/quads/yuv_video_draw_quad.h
+++ b/cc/quads/yuv_video_draw_quad.h
@@ -5,7 +5,8 @@
 #ifndef CC_QUADS_YUV_VIDEO_DRAW_QUAD_H_
 #define CC_QUADS_YUV_VIDEO_DRAW_QUAD_H_
 
-#include "base/basictypes.h"
+#include <stddef.h>
+
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/quads/draw_quad.h"
diff --git a/cc/raster/bitmap_tile_task_worker_pool.cc b/cc/raster/bitmap_tile_task_worker_pool.cc
index c059483..8892502 100644
--- a/cc/raster/bitmap_tile_task_worker_pool.cc
+++ b/cc/raster/bitmap_tile_task_worker_pool.cc
@@ -4,8 +4,12 @@
 
 #include "cc/raster/bitmap_tile_task_worker_pool.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <algorithm>
 
+#include "base/macros.h"
 #include "base/strings/stringprintf.h"
 #include "base/trace_event/trace_event.h"
 #include "base/trace_event/trace_event_argument.h"
diff --git a/cc/raster/bitmap_tile_task_worker_pool.h b/cc/raster/bitmap_tile_task_worker_pool.h
index f53768f..4c39a1f 100644
--- a/cc/raster/bitmap_tile_task_worker_pool.h
+++ b/cc/raster/bitmap_tile_task_worker_pool.h
@@ -5,6 +5,9 @@
 #ifndef CC_RASTER_BITMAP_TILE_TASK_WORKER_POOL_H_
 #define CC_RASTER_BITMAP_TILE_TASK_WORKER_POOL_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/values.h"
 #include "cc/raster/tile_task_runner.h"
 #include "cc/raster/tile_task_worker_pool.h"
diff --git a/cc/raster/gpu_rasterizer.h b/cc/raster/gpu_rasterizer.h
index 04b5c18..e14ea26 100644
--- a/cc/raster/gpu_rasterizer.h
+++ b/cc/raster/gpu_rasterizer.h
@@ -7,6 +7,7 @@
 
 #include <vector>
 
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "cc/resources/resource_pool.h"
 #include "cc/tiles/tile.h"
diff --git a/cc/raster/gpu_tile_task_worker_pool.cc b/cc/raster/gpu_tile_task_worker_pool.cc
index 306d5d1..ce5876a 100644
--- a/cc/raster/gpu_tile_task_worker_pool.cc
+++ b/cc/raster/gpu_tile_task_worker_pool.cc
@@ -4,8 +4,11 @@
 
 #include "cc/raster/gpu_tile_task_worker_pool.h"
 
+#include <stdint.h>
+
 #include <algorithm>
 
+#include "base/macros.h"
 #include "base/trace_event/trace_event.h"
 #include "cc/playback/display_list_raster_source.h"
 #include "cc/raster/gpu_rasterizer.h"
diff --git a/cc/raster/gpu_tile_task_worker_pool.h b/cc/raster/gpu_tile_task_worker_pool.h
index 20ac14c..0577b51 100644
--- a/cc/raster/gpu_tile_task_worker_pool.h
+++ b/cc/raster/gpu_tile_task_worker_pool.h
@@ -5,6 +5,9 @@
 #ifndef CC_RASTER_GPU_TILE_TASK_WORKER_POOL_H_
 #define CC_RASTER_GPU_TILE_TASK_WORKER_POOL_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "cc/raster/tile_task_runner.h"
 #include "cc/raster/tile_task_worker_pool.h"
 
diff --git a/cc/raster/one_copy_tile_task_worker_pool.cc b/cc/raster/one_copy_tile_task_worker_pool.cc
index 16ac585..9ca1ae3 100644
--- a/cc/raster/one_copy_tile_task_worker_pool.cc
+++ b/cc/raster/one_copy_tile_task_worker_pool.cc
@@ -4,10 +4,13 @@
 
 #include "cc/raster/one_copy_tile_task_worker_pool.h"
 
+#include <stdint.h>
+
 #include <algorithm>
 #include <limits>
 #include <utility>
 
+#include "base/macros.h"
 #include "base/strings/stringprintf.h"
 #include "base/thread_task_runner_handle.h"
 #include "base/trace_event/memory_dump_manager.h"
@@ -160,7 +163,7 @@
                          in_free_list ? buffer_size_in_bytes : 0);
 
   // Emit an ownership edge towards a global allocator dump node.
-  const uint64 tracing_process_id =
+  const uint64_t tracing_process_id =
       base::trace_event::MemoryDumpManager::GetInstance()
           ->GetTracingProcessId();
   base::trace_event::MemoryAllocatorDumpGuid shared_buffer_guid =
diff --git a/cc/raster/one_copy_tile_task_worker_pool.h b/cc/raster/one_copy_tile_task_worker_pool.h
index 8dc861f..4196b3a 100644
--- a/cc/raster/one_copy_tile_task_worker_pool.h
+++ b/cc/raster/one_copy_tile_task_worker_pool.h
@@ -5,9 +5,12 @@
 #ifndef CC_RASTER_ONE_COPY_TILE_TASK_WORKER_POOL_H_
 #define CC_RASTER_ONE_COPY_TILE_TASK_WORKER_POOL_H_
 
+#include <stdint.h>
+
 #include <deque>
 #include <set>
 
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/synchronization/lock.h"
 #include "base/time/time.h"
diff --git a/cc/raster/raster_buffer.h b/cc/raster/raster_buffer.h
index d3dc01c..8bd305d 100644
--- a/cc/raster/raster_buffer.h
+++ b/cc/raster/raster_buffer.h
@@ -5,6 +5,8 @@
 #ifndef CC_RASTER_RASTER_BUFFER_H_
 #define CC_RASTER_RASTER_BUFFER_H_
 
+#include <stdint.h>
+
 #include "cc/base/cc_export.h"
 #include "ui/gfx/geometry/rect.h"
 
diff --git a/cc/raster/scoped_gpu_raster.h b/cc/raster/scoped_gpu_raster.h
index d9613b3..274772c 100644
--- a/cc/raster/scoped_gpu_raster.h
+++ b/cc/raster/scoped_gpu_raster.h
@@ -6,6 +6,7 @@
 #define CC_RASTER_SCOPED_GPU_RASTER_H_
 
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/output/context_provider.h"
diff --git a/cc/raster/single_thread_task_graph_runner.cc b/cc/raster/single_thread_task_graph_runner.cc
index 80c85db..ba879af 100644
--- a/cc/raster/single_thread_task_graph_runner.cc
+++ b/cc/raster/single_thread_task_graph_runner.cc
@@ -4,6 +4,8 @@
 
 #include "cc/raster/single_thread_task_graph_runner.h"
 
+#include <stdint.h>
+
 #include <string>
 
 #include "base/threading/simple_thread.h"
diff --git a/cc/raster/synchronous_task_graph_runner.cc b/cc/raster/synchronous_task_graph_runner.cc
index 156ef9ac..2f5055d 100644
--- a/cc/raster/synchronous_task_graph_runner.cc
+++ b/cc/raster/synchronous_task_graph_runner.cc
@@ -4,6 +4,8 @@
 
 #include "cc/raster/synchronous_task_graph_runner.h"
 
+#include <stdint.h>
+
 #include <algorithm>
 #include <utility>
 
diff --git a/cc/raster/task_graph_runner.h b/cc/raster/task_graph_runner.h
index 181a455..4b3c664 100644
--- a/cc/raster/task_graph_runner.h
+++ b/cc/raster/task_graph_runner.h
@@ -5,6 +5,9 @@
 #ifndef CC_RASTER_TASK_GRAPH_RUNNER_H_
 #define CC_RASTER_TASK_GRAPH_RUNNER_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <algorithm>
 #include <map>
 #include <vector>
diff --git a/cc/raster/task_graph_runner_perftest.cc b/cc/raster/task_graph_runner_perftest.cc
index b97b93c..f86bae57 100644
--- a/cc/raster/task_graph_runner_perftest.cc
+++ b/cc/raster/task_graph_runner_perftest.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 <vector>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "cc/base/completion_event.h"
diff --git a/cc/raster/task_graph_work_queue.cc b/cc/raster/task_graph_work_queue.cc
index 95faedc..8780057 100644
--- a/cc/raster/task_graph_work_queue.cc
+++ b/cc/raster/task_graph_work_queue.cc
@@ -4,6 +4,9 @@
 
 #include "cc/raster/task_graph_work_queue.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <algorithm>
 #include <map>
 #include <utility>
diff --git a/cc/raster/task_graph_work_queue.h b/cc/raster/task_graph_work_queue.h
index 7b6840c..95d3c77 100644
--- a/cc/raster/task_graph_work_queue.h
+++ b/cc/raster/task_graph_work_queue.h
@@ -5,6 +5,8 @@
 #ifndef CC_RASTER_TASK_GRAPH_WORK_QUEUE_H_
 #define CC_RASTER_TASK_GRAPH_WORK_QUEUE_H_
 
+#include <stdint.h>
+
 #include <algorithm>
 #include <map>
 #include <vector>
diff --git a/cc/raster/texture_compressor_etc1.cc b/cc/raster/texture_compressor_etc1.cc
index e02737c..55b0ca4 100644
--- a/cc/raster/texture_compressor_etc1.cc
+++ b/cc/raster/texture_compressor_etc1.cc
@@ -7,6 +7,7 @@
 
 #include "cc/raster/texture_compressor_etc1.h"
 
+#include <stdint.h>
 #include <string.h>
 #include <limits>
 
diff --git a/cc/raster/texture_compressor_etc1.h b/cc/raster/texture_compressor_etc1.h
index 2d2771a..311a4c3 100644
--- a/cc/raster/texture_compressor_etc1.h
+++ b/cc/raster/texture_compressor_etc1.h
@@ -7,8 +7,11 @@
 
 #include "cc/raster/texture_compressor.h"
 
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
 #include "base/logging.h"
+#include "base/macros.h"
 
 namespace cc {
 
diff --git a/cc/raster/texture_compressor_etc1_sse.cc b/cc/raster/texture_compressor_etc1_sse.cc
index 6f1005b..cb8579c 100644
--- a/cc/raster/texture_compressor_etc1_sse.cc
+++ b/cc/raster/texture_compressor_etc1_sse.cc
@@ -5,6 +5,7 @@
 #include "cc/raster/texture_compressor_etc1_sse.h"
 
 #include <emmintrin.h>
+#include <stdint.h>
 
 #include "base/compiler_specific.h"
 #include "base/logging.h"
diff --git a/cc/raster/texture_compressor_etc1_sse.h b/cc/raster/texture_compressor_etc1_sse.h
index 3822699..3c186c6 100644
--- a/cc/raster/texture_compressor_etc1_sse.h
+++ b/cc/raster/texture_compressor_etc1_sse.h
@@ -5,6 +5,9 @@
 #ifndef CC_RASTER_TEXTURE_COMPRESSOR_ETC1_SSE_H_
 #define CC_RASTER_TEXTURE_COMPRESSOR_ETC1_SSE_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "cc/raster/texture_compressor.h"
 
 namespace cc {
diff --git a/cc/raster/texture_compressor_etc1_unittest.cc b/cc/raster/texture_compressor_etc1_unittest.cc
index d0c63f4..dc90ebb 100644
--- a/cc/raster/texture_compressor_etc1_unittest.cc
+++ b/cc/raster/texture_compressor_etc1_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/raster/texture_compressor.h"
 
+#include <stdint.h>
+
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace cc {
diff --git a/cc/raster/texture_compressor_perftest.cc b/cc/raster/texture_compressor_perftest.cc
index 4b2967c..96ab60db 100644
--- a/cc/raster/texture_compressor_perftest.cc
+++ b/cc/raster/texture_compressor_perftest.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/logging.h"
 #include "cc/debug/lap_timer.h"
 #include "cc/raster/texture_compressor.h"
diff --git a/cc/raster/tile_task_runner.h b/cc/raster/tile_task_runner.h
index 1958ca2..ed0f29a 100644
--- a/cc/raster/tile_task_runner.h
+++ b/cc/raster/tile_task_runner.h
@@ -5,6 +5,8 @@
 #ifndef CC_RASTER_TILE_TASK_RUNNER_H_
 #define CC_RASTER_TILE_TASK_RUNNER_H_
 
+#include <stdint.h>
+
 #include <vector>
 
 #include "base/callback.h"
diff --git a/cc/raster/tile_task_worker_pool.cc b/cc/raster/tile_task_worker_pool.cc
index b55f69d..46a10ab 100644
--- a/cc/raster/tile_task_worker_pool.cc
+++ b/cc/raster/tile_task_worker_pool.cc
@@ -4,6 +4,8 @@
 
 #include "cc/raster/tile_task_worker_pool.h"
 
+#include <stddef.h>
+
 #include "base/trace_event/trace_event.h"
 #include "cc/playback/display_list_raster_source.h"
 #include "skia/ext/refptr.h"
diff --git a/cc/raster/tile_task_worker_pool.h b/cc/raster/tile_task_worker_pool.h
index 6b550fa..5f22961 100644
--- a/cc/raster/tile_task_worker_pool.h
+++ b/cc/raster/tile_task_worker_pool.h
@@ -5,6 +5,8 @@
 #ifndef CC_RASTER_TILE_TASK_WORKER_POOL_H_
 #define CC_RASTER_TILE_TASK_WORKER_POOL_H_
 
+#include <stddef.h>
+
 #include "cc/raster/tile_task_runner.h"
 #include "ui/gfx/geometry/rect.h"
 #include "ui/gfx/geometry/size.h"
diff --git a/cc/raster/tile_task_worker_pool_perftest.cc b/cc/raster/tile_task_worker_pool_perftest.cc
index 32be835..0abdf8e 100644
--- a/cc/raster/tile_task_worker_pool_perftest.cc
+++ b/cc/raster/tile_task_worker_pool_perftest.cc
@@ -4,6 +4,10 @@
 
 #include "cc/raster/tile_task_worker_pool.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/test/test_simple_task_runner.h"
 #include "base/time/time.h"
 #include "cc/debug/lap_timer.h"
diff --git a/cc/raster/tile_task_worker_pool_unittest.cc b/cc/raster/tile_task_worker_pool_unittest.cc
index 8a2d485..c873089e 100644
--- a/cc/raster/tile_task_worker_pool_unittest.cc
+++ b/cc/raster/tile_task_worker_pool_unittest.cc
@@ -4,12 +4,16 @@
 
 #include "cc/raster/tile_task_worker_pool.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <algorithm>
 #include <limits>
 #include <vector>
 
 #include "base/cancelable_callback.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
 #include "cc/base/unique_notifier.h"
diff --git a/cc/raster/zero_copy_tile_task_worker_pool.cc b/cc/raster/zero_copy_tile_task_worker_pool.cc
index 8830c1f0..4310f96 100644
--- a/cc/raster/zero_copy_tile_task_worker_pool.cc
+++ b/cc/raster/zero_copy_tile_task_worker_pool.cc
@@ -4,8 +4,11 @@
 
 #include "cc/raster/zero_copy_tile_task_worker_pool.h"
 
+#include <stdint.h>
+
 #include <algorithm>
 
+#include "base/macros.h"
 #include "base/strings/stringprintf.h"
 #include "base/trace_event/trace_event.h"
 #include "base/trace_event/trace_event_argument.h"
diff --git a/cc/raster/zero_copy_tile_task_worker_pool.h b/cc/raster/zero_copy_tile_task_worker_pool.h
index 3ca9b06..ffbde20 100644
--- a/cc/raster/zero_copy_tile_task_worker_pool.h
+++ b/cc/raster/zero_copy_tile_task_worker_pool.h
@@ -5,6 +5,9 @@
 #ifndef CC_RASTER_ZERO_COPY_TILE_TASK_WORKER_POOL_H_
 #define CC_RASTER_ZERO_COPY_TILE_TASK_WORKER_POOL_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/values.h"
 #include "cc/raster/tile_task_runner.h"
diff --git a/cc/resources/memory_history.h b/cc/resources/memory_history.h
index 15ddc75..cdcc46a 100644
--- a/cc/resources/memory_history.h
+++ b/cc/resources/memory_history.h
@@ -5,7 +5,10 @@
 #ifndef CC_RESOURCES_MEMORY_HISTORY_H_
 #define CC_RESOURCES_MEMORY_HISTORY_H_
 
-#include "base/basictypes.h"
+#include <stddef.h>
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "cc/debug/ring_buffer.h"
@@ -26,7 +29,7 @@
           had_enough_memory(false) {}
 
     size_t total_budget_in_bytes;
-    int64 total_bytes_used;
+    int64_t total_bytes_used;
     bool had_enough_memory;
   };
 
diff --git a/cc/resources/platform_color.h b/cc/resources/platform_color.h
index 17eddc1..f7d3705d 100644
--- a/cc/resources/platform_color.h
+++ b/cc/resources/platform_color.h
@@ -5,8 +5,8 @@
 #ifndef CC_RESOURCES_PLATFORM_COLOR_H_
 #define CC_RESOURCES_PLATFORM_COLOR_H_
 
-#include "base/basictypes.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "cc/resources/resource_format.h"
 #include "third_party/skia/include/core/SkTypes.h"
 
diff --git a/cc/resources/platform_color_unittest.cc b/cc/resources/platform_color_unittest.cc
index 83b2a1e..bbc4c06 100644
--- a/cc/resources/platform_color_unittest.cc
+++ b/cc/resources/platform_color_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/resources/platform_color.h"
 
+#include <stddef.h>
+
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace cc {
diff --git a/cc/resources/resource.h b/cc/resources/resource.h
index 549a314..1a547a7 100644
--- a/cc/resources/resource.h
+++ b/cc/resources/resource.h
@@ -5,6 +5,7 @@
 #ifndef CC_RESOURCES_RESOURCE_H_
 #define CC_RESOURCES_RESOURCE_H_
 
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "cc/resources/resource_provider.h"
 #include "cc/resources/resource_util.h"
diff --git a/cc/resources/resource_pool.cc b/cc/resources/resource_pool.cc
index 507aa2b..b9630faf 100644
--- a/cc/resources/resource_pool.cc
+++ b/cc/resources/resource_pool.cc
@@ -4,6 +4,9 @@
 
 #include "cc/resources/resource_pool.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <algorithm>
 #include <utility>
 
diff --git a/cc/resources/resource_pool.h b/cc/resources/resource_pool.h
index e17032b..df95846 100644
--- a/cc/resources/resource_pool.h
+++ b/cc/resources/resource_pool.h
@@ -5,9 +5,13 @@
 #ifndef CC_RESOURCES_RESOURCE_POOL_H_
 #define CC_RESOURCES_RESOURCE_POOL_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <deque>
 #include <map>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/trace_event/memory_dump_provider.h"
 #include "cc/base/cc_export.h"
@@ -37,7 +41,7 @@
   ~ResourcePool() override;
 
   Resource* AcquireResource(const gfx::Size& size, ResourceFormat format);
-  Resource* TryAcquireResourceWithContentId(uint64 content_id);
+  Resource* TryAcquireResourceWithContentId(uint64_t content_id);
   void ReleaseResource(Resource* resource, uint64_t content_id);
 
   void SetResourceUsageLimits(size_t max_memory_usage_bytes,
diff --git a/cc/resources/resource_pool_unittest.cc b/cc/resources/resource_pool_unittest.cc
index 0dc8806..af86503 100644
--- a/cc/resources/resource_pool_unittest.cc
+++ b/cc/resources/resource_pool_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/resources/resource_pool.h"
 
+#include <stddef.h>
+
 #include "base/run_loop.h"
 #include "base/thread_task_runner_handle.h"
 #include "cc/resources/resource_util.h"
diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc
index 4e49075..c6e5c91 100644
--- a/cc/resources/resource_provider.cc
+++ b/cc/resources/resource_provider.cc
@@ -4,11 +4,15 @@
 
 #include "cc/resources/resource_provider.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <algorithm>
 #include <limits>
 
 #include "base/atomic_sequence_num.h"
 #include "base/containers/hash_tables.h"
+#include "base/macros.h"
 #include "base/metrics/histogram.h"
 #include "base/numerics/safe_math.h"
 #include "base/stl_util.h"
@@ -1623,7 +1627,7 @@
     base::trace_event::ProcessMemoryDump* pmd) {
   DCHECK(thread_checker_.CalledOnValidThread());
 
-  const uint64 tracing_process_id =
+  const uint64_t tracing_process_id =
       base::trace_event::MemoryDumpManager::GetInstance()
           ->GetTracingProcessId();
 
diff --git a/cc/resources/resource_provider.h b/cc/resources/resource_provider.h
index 5a03cda..1aed50f 100644
--- a/cc/resources/resource_provider.h
+++ b/cc/resources/resource_provider.h
@@ -5,15 +5,18 @@
 #ifndef CC_RESOURCES_RESOURCE_PROVIDER_H_
 #define CC_RESOURCES_RESOURCE_PROVIDER_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <deque>
 #include <set>
 #include <string>
 #include <utility>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
 #include "base/containers/hash_tables.h"
+#include "base/macros.h"
 #include "base/memory/linked_ptr.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/threading/thread_checker.h"
diff --git a/cc/resources/resource_provider_unittest.cc b/cc/resources/resource_provider_unittest.cc
index 90ec427..3374e85 100644
--- a/cc/resources/resource_provider_unittest.cc
+++ b/cc/resources/resource_provider_unittest.cc
@@ -4,6 +4,9 @@
 
 #include "cc/resources/resource_provider.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <algorithm>
 #include <deque>
 #include <map>
@@ -124,7 +127,7 @@
     return make_scoped_ptr(new ContextSharedData());
   }
 
-  uint32 InsertSyncPoint() { return next_sync_point_++; }
+  uint32_t InsertSyncPoint() { return next_sync_point_++; }
 
   void GenMailbox(GLbyte* mailbox) {
     memset(mailbox, 0, GL_MAILBOX_SIZE_CHROMIUM);
@@ -164,11 +167,11 @@
  private:
   ContextSharedData() : next_sync_point_(1), next_mailbox_(1) {}
 
-  uint32 next_sync_point_;
+  uint32_t next_sync_point_;
   unsigned next_mailbox_;
   typedef base::hash_map<unsigned, scoped_refptr<TestTexture>> TextureMap;
   TextureMap textures_;
-  base::hash_map<unsigned, uint32> sync_point_for_mailbox_;
+  base::hash_map<unsigned, uint32_t> sync_point_for_mailbox_;
 };
 
 class ResourceProviderContext : public TestWebGraphicsContext3D {
@@ -179,7 +182,7 @@
   }
 
   GLuint insertSyncPoint() override {
-    uint32 sync_point = shared_data_->InsertSyncPoint();
+    uint32_t sync_point = shared_data_->InsertSyncPoint();
     // Commit the produceTextureCHROMIUM calls at this point, so that
     // they're associated with the sync point.
     for (const scoped_ptr<PendingProduceTexture>& pending_texture :
diff --git a/cc/resources/resource_util.h b/cc/resources/resource_util.h
index 9d9905b..68a4aa5 100644
--- a/cc/resources/resource_util.h
+++ b/cc/resources/resource_util.h
@@ -5,8 +5,11 @@
 #ifndef CC_RESOURCES_RESOURCE_UTIL_H_
 #define CC_RESOURCES_RESOURCE_UTIL_H_
 
+#include <stddef.h>
+
 #include <limits>
 
+#include "base/macros.h"
 #include "base/numerics/safe_math.h"
 #include "cc/base/cc_export.h"
 #include "cc/base/math_util.h"
diff --git a/cc/resources/resource_util_unittest.cc b/cc/resources/resource_util_unittest.cc
index 1fabc3b..b159d1d 100644
--- a/cc/resources/resource_util_unittest.cc
+++ b/cc/resources/resource_util_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/logging.h"
 #include "cc/resources/resource_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
diff --git a/cc/resources/returned_resource.h b/cc/resources/returned_resource.h
index 92e57ad..35de506 100644
--- a/cc/resources/returned_resource.h
+++ b/cc/resources/returned_resource.h
@@ -7,7 +7,6 @@
 
 #include <vector>
 
-#include "base/basictypes.h"
 #include "cc/base/cc_export.h"
 #include "cc/base/resource_id.h"
 #include "gpu/command_buffer/common/sync_token.h"
diff --git a/cc/resources/scoped_resource.h b/cc/resources/scoped_resource.h
index 8924ed9..0e50d0a 100644
--- a/cc/resources/scoped_resource.h
+++ b/cc/resources/scoped_resource.h
@@ -5,8 +5,8 @@
 #ifndef CC_RESOURCES_SCOPED_RESOURCE_H_
 #define CC_RESOURCES_SCOPED_RESOURCE_H_
 
-#include "base/basictypes.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/resources/resource.h"
diff --git a/cc/resources/scoped_resource_unittest.cc b/cc/resources/scoped_resource_unittest.cc
index cb41bf6..1133f21 100644
--- a/cc/resources/scoped_resource_unittest.cc
+++ b/cc/resources/scoped_resource_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/resources/scoped_resource.h"
 
+#include <stddef.h>
+
 #include "cc/output/renderer.h"
 #include "cc/test/fake_output_surface.h"
 #include "cc/test/fake_output_surface_client.h"
diff --git a/cc/resources/scoped_ui_resource.cc b/cc/resources/scoped_ui_resource.cc
index e69b4bc..2db3edd 100644
--- a/cc/resources/scoped_ui_resource.cc
+++ b/cc/resources/scoped_ui_resource.cc
@@ -4,7 +4,6 @@
 
 #include "cc/resources/scoped_ui_resource.h"
 
-#include "base/basictypes.h"
 #include "base/bind.h"
 #include "cc/trees/layer_tree_host.h"
 
diff --git a/cc/resources/scoped_ui_resource.h b/cc/resources/scoped_ui_resource.h
index 0e5a02c..0e1676f 100644
--- a/cc/resources/scoped_ui_resource.h
+++ b/cc/resources/scoped_ui_resource.h
@@ -5,6 +5,7 @@
 #ifndef CC_RESOURCES_SCOPED_UI_RESOURCE_H_
 #define CC_RESOURCES_SCOPED_UI_RESOURCE_H_
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "cc/base/cc_export.h"
 #include "cc/resources/ui_resource_bitmap.h"
diff --git a/cc/resources/shared_bitmap.cc b/cc/resources/shared_bitmap.cc
index fc157363..2eb128a 100644
--- a/cc/resources/shared_bitmap.cc
+++ b/cc/resources/shared_bitmap.cc
@@ -4,6 +4,9 @@
 
 #include "cc/resources/shared_bitmap.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/logging.h"
 #include "base/numerics/safe_math.h"
 #include "base/rand_util.h"
@@ -12,9 +15,8 @@
 
 namespace cc {
 
-SharedBitmap::SharedBitmap(uint8* pixels, const SharedBitmapId& id)
-    : pixels_(pixels), id_(id) {
-}
+SharedBitmap::SharedBitmap(uint8_t* pixels, const SharedBitmapId& id)
+    : pixels_(pixels), id_(id) {}
 
 SharedBitmap::~SharedBitmap() {
 }
diff --git a/cc/resources/shared_bitmap.h b/cc/resources/shared_bitmap.h
index 04dab74..c711a8b 100644
--- a/cc/resources/shared_bitmap.h
+++ b/cc/resources/shared_bitmap.h
@@ -5,7 +5,10 @@
 #ifndef CC_RESOURCES_SHARED_BITMAP_H_
 #define CC_RESOURCES_SHARED_BITMAP_H_
 
-#include "base/basictypes.h"
+#include <stddef.h>
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/trace_event/memory_allocator_dump.h"
 #include "cc/base/cc_export.h"
 #include "gpu/command_buffer/common/mailbox.h"
@@ -19,11 +22,11 @@
 
 class CC_EXPORT SharedBitmap {
  public:
-  SharedBitmap(uint8* pixels, const SharedBitmapId& id);
+  SharedBitmap(uint8_t* pixels, const SharedBitmapId& id);
 
   virtual ~SharedBitmap();
 
-  uint8* pixels() { return pixels_; }
+  uint8_t* pixels() { return pixels_; }
 
   const SharedBitmapId& id() { return id_; }
 
@@ -41,7 +44,7 @@
   static SharedBitmapId GenerateId();
 
  private:
-  uint8* pixels_;
+  uint8_t* pixels_;
   SharedBitmapId id_;
 
   DISALLOW_COPY_AND_ASSIGN(SharedBitmap);
diff --git a/cc/resources/shared_bitmap_manager.h b/cc/resources/shared_bitmap_manager.h
index d5239e4..881f6fa 100644
--- a/cc/resources/shared_bitmap_manager.h
+++ b/cc/resources/shared_bitmap_manager.h
@@ -5,7 +5,7 @@
 #ifndef CC_RESOURCES_SHARED_BITMAP_MANAGER_H_
 #define CC_RESOURCES_SHARED_BITMAP_MANAGER_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/resources/shared_bitmap.h"
diff --git a/cc/resources/texture_mailbox.cc b/cc/resources/texture_mailbox.cc
index 3045671..804080c 100644
--- a/cc/resources/texture_mailbox.cc
+++ b/cc/resources/texture_mailbox.cc
@@ -4,6 +4,9 @@
 
 #include "cc/resources/texture_mailbox.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/logging.h"
 #include "cc/resources/shared_bitmap.h"
 
@@ -20,7 +23,7 @@
 
 TextureMailbox::TextureMailbox(const gpu::Mailbox& mailbox,
                                const gpu::SyncToken& sync_token,
-                               uint32 target)
+                               uint32_t target)
     : mailbox_holder_(mailbox, sync_token, target),
       shared_bitmap_(NULL),
       is_overlay_candidate_(false),
@@ -28,7 +31,7 @@
 
 TextureMailbox::TextureMailbox(const gpu::Mailbox& mailbox,
                                const gpu::SyncToken& sync_token,
-                               uint32 target,
+                               uint32_t target,
                                const gfx::Size& size_in_pixels,
                                bool is_overlay_candidate)
     : mailbox_holder_(mailbox, sync_token, target),
diff --git a/cc/resources/texture_mailbox.h b/cc/resources/texture_mailbox.h
index 01cc660..42109c6 100644
--- a/cc/resources/texture_mailbox.h
+++ b/cc/resources/texture_mailbox.h
@@ -5,6 +5,9 @@
 #ifndef CC_RESOURCES_TEXTURE_MAILBOX_H_
 #define CC_RESOURCES_TEXTURE_MAILBOX_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <string>
 
 #include "base/memory/shared_memory.h"
@@ -23,10 +26,10 @@
   explicit TextureMailbox(const gpu::MailboxHolder& mailbox_holder);
   TextureMailbox(const gpu::Mailbox& mailbox,
                  const gpu::SyncToken& sync_token,
-                 uint32 target);
+                 uint32_t target);
   TextureMailbox(const gpu::Mailbox& mailbox,
                  const gpu::SyncToken& sync_token,
-                 uint32 target,
+                 uint32_t target,
                  const gfx::Size& size_in_pixels,
                  bool is_overlay_candidate);
   TextureMailbox(SharedBitmap* shared_bitmap, const gfx::Size& size_in_pixels);
@@ -40,8 +43,8 @@
   bool Equals(const TextureMailbox&) const;
 
   const gpu::Mailbox& mailbox() const { return mailbox_holder_.mailbox; }
-  const int8* name() const { return mailbox().name; }
-  uint32 target() const { return mailbox_holder_.texture_target; }
+  const int8_t* name() const { return mailbox().name; }
+  uint32_t target() const { return mailbox_holder_.texture_target; }
   const gpu::SyncToken& sync_token() const {
     return mailbox_holder_.sync_token;
   }
diff --git a/cc/resources/transferable_resource.h b/cc/resources/transferable_resource.h
index a3231bc..55d2216 100644
--- a/cc/resources/transferable_resource.h
+++ b/cc/resources/transferable_resource.h
@@ -5,9 +5,10 @@
 #ifndef CC_RESOURCES_TRANSFERABLE_RESOURCE_H_
 #define CC_RESOURCES_TRANSFERABLE_RESOURCE_H_
 
+#include <stdint.h>
+
 #include <vector>
 
-#include "base/basictypes.h"
 #include "cc/base/cc_export.h"
 #include "cc/base/resource_id.h"
 #include "cc/resources/resource_format.h"
@@ -31,7 +32,7 @@
 
   ResourceId id;
   ResourceFormat format;
-  uint32 filter;
+  uint32_t filter;
   gfx::Size size;
   gpu::MailboxHolder mailbox_holder;
   bool read_lock_fences_enabled;
diff --git a/cc/resources/ui_resource_bitmap.cc b/cc/resources/ui_resource_bitmap.cc
index 953d4199..b8fbf31 100644
--- a/cc/resources/ui_resource_bitmap.cc
+++ b/cc/resources/ui_resource_bitmap.cc
@@ -4,6 +4,8 @@
 
 #include "cc/resources/ui_resource_bitmap.h"
 
+#include <stdint.h>
+
 #include "base/logging.h"
 #include "base/memory/scoped_ptr.h"
 #include "third_party/skia/include/core/SkBitmap.h"
diff --git a/cc/resources/ui_resource_bitmap.h b/cc/resources/ui_resource_bitmap.h
index 129be96..34e73ee 100644
--- a/cc/resources/ui_resource_bitmap.h
+++ b/cc/resources/ui_resource_bitmap.h
@@ -5,6 +5,8 @@
 #ifndef CC_RESOURCES_UI_RESOURCE_BITMAP_H_
 #define CC_RESOURCES_UI_RESOURCE_BITMAP_H_
 
+#include <stdint.h>
+
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
diff --git a/cc/resources/ui_resource_client.h b/cc/resources/ui_resource_client.h
index 24309a5..07d5fd8 100644
--- a/cc/resources/ui_resource_client.h
+++ b/cc/resources/ui_resource_client.h
@@ -5,7 +5,6 @@
 #ifndef CC_RESOURCES_UI_RESOURCE_CLIENT_H_
 #define CC_RESOURCES_UI_RESOURCE_CLIENT_H_
 
-#include "base/basictypes.h"
 #include "base/callback.h"
 #include "base/memory/ref_counted.h"
 #include "cc/base/cc_export.h"
diff --git a/cc/resources/video_resource_updater.cc b/cc/resources/video_resource_updater.cc
index 4936dae..7d57a41 100644
--- a/cc/resources/video_resource_updater.cc
+++ b/cc/resources/video_resource_updater.cc
@@ -4,6 +4,9 @@
 
 #include "cc/resources/video_resource_updater.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <algorithm>
 
 #include "base/bind.h"
diff --git a/cc/resources/video_resource_updater.h b/cc/resources/video_resource_updater.h
index 3da2023..1044518 100644
--- a/cc/resources/video_resource_updater.h
+++ b/cc/resources/video_resource_updater.h
@@ -5,10 +5,13 @@
 #ifndef CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_
 #define CC_RESOURCES_VIDEO_RESOURCE_UPDATER_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <list>
 #include <vector>
 
-#include "base/basictypes.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/cc/resources/video_resource_updater_unittest.cc b/cc/resources/video_resource_updater_unittest.cc
index 689de68..064829e 100644
--- a/cc/resources/video_resource_updater_unittest.cc
+++ b/cc/resources/video_resource_updater_unittest.cc
@@ -4,6 +4,9 @@
 
 #include "cc/resources/video_resource_updater.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "cc/resources/resource_provider.h"
 #include "cc/test/fake_output_surface.h"
 #include "cc/test/fake_output_surface_client.h"
@@ -80,9 +83,9 @@
   scoped_refptr<media::VideoFrame> CreateTestYUVVideoFrame() {
     const int kDimension = 10;
     gfx::Size size(kDimension, kDimension);
-    static uint8 y_data[kDimension * kDimension] = { 0 };
-    static uint8 u_data[kDimension * kDimension / 2] = { 0 };
-    static uint8 v_data[kDimension * kDimension / 2] = { 0 };
+    static uint8_t y_data[kDimension * kDimension] = {0};
+    static uint8_t u_data[kDimension * kDimension / 2] = {0};
+    static uint8_t v_data[kDimension * kDimension / 2] = {0};
 
     return media::VideoFrame::WrapExternalYuvData(
         media::PIXEL_FORMAT_YV16,  // format
diff --git a/cc/scheduler/begin_frame_source.cc b/cc/scheduler/begin_frame_source.cc
index 2681983..17b4a26 100644
--- a/cc/scheduler/begin_frame_source.cc
+++ b/cc/scheduler/begin_frame_source.cc
@@ -4,6 +4,8 @@
 
 #include "cc/scheduler/begin_frame_source.h"
 
+#include <stddef.h>
+
 #include "base/auto_reset.h"
 #include "base/location.h"
 #include "base/logging.h"
diff --git a/cc/scheduler/begin_frame_source.h b/cc/scheduler/begin_frame_source.h
index 87ed17f..ec8aaa5 100644
--- a/cc/scheduler/begin_frame_source.h
+++ b/cc/scheduler/begin_frame_source.h
@@ -5,10 +5,14 @@
 #ifndef CC_SCHEDULER_BEGIN_FRAME_SOURCE_H_
 #define CC_SCHEDULER_BEGIN_FRAME_SOURCE_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <set>
 #include <string>
 
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/trace_event/trace_event.h"
 #include "cc/output/begin_frame_args.h"
 #include "cc/scheduler/delay_based_time_source.h"
diff --git a/cc/scheduler/begin_frame_source_unittest.cc b/cc/scheduler/begin_frame_source_unittest.cc
index afc3b30..43ba4fa7 100644
--- a/cc/scheduler/begin_frame_source_unittest.cc
+++ b/cc/scheduler/begin_frame_source_unittest.cc
@@ -4,7 +4,8 @@
 
 #include "cc/scheduler/begin_frame_source.h"
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
 #include "base/test/test_simple_task_runner.h"
 #include "cc/test/begin_frame_args_test.h"
 #include "cc/test/begin_frame_source_test.h"
diff --git a/cc/scheduler/compositor_timing_history.cc b/cc/scheduler/compositor_timing_history.cc
index d21696d..f3ac067 100644
--- a/cc/scheduler/compositor_timing_history.cc
+++ b/cc/scheduler/compositor_timing_history.cc
@@ -4,6 +4,9 @@
 
 #include "cc/scheduler/compositor_timing_history.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/metrics/histogram.h"
 #include "base/trace_event/trace_event.h"
 #include "cc/debug/rendering_stats_instrumentation.h"
@@ -66,7 +69,7 @@
 const double kDrawEstimationPercentile = 90.0;
 
 const int kUmaDurationMinMicros = 1;
-const int64 kUmaDurationMaxMicros = 1 * base::Time::kMicrosecondsPerSecond;
+const int64_t kUmaDurationMaxMicros = 1 * base::Time::kMicrosecondsPerSecond;
 const size_t kUmaDurationBucketCount = 100;
 
 // Deprecated because they combine Browser and Renderer stats and have low
diff --git a/cc/scheduler/compositor_timing_history.h b/cc/scheduler/compositor_timing_history.h
index 1523aeb..b64dc056 100644
--- a/cc/scheduler/compositor_timing_history.h
+++ b/cc/scheduler/compositor_timing_history.h
@@ -5,6 +5,7 @@
 #ifndef CC_SCHEDULER_COMPOSITOR_TIMING_HISTORY_H_
 #define CC_SCHEDULER_COMPOSITOR_TIMING_HISTORY_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/rolling_time_delta_history.h"
 
diff --git a/cc/scheduler/compositor_timing_history_unittest.cc b/cc/scheduler/compositor_timing_history_unittest.cc
index 70710db..2cbc8a8 100644
--- a/cc/scheduler/compositor_timing_history_unittest.cc
+++ b/cc/scheduler/compositor_timing_history_unittest.cc
@@ -4,6 +4,7 @@
 
 #include "cc/scheduler/compositor_timing_history.h"
 
+#include "base/macros.h"
 #include "cc/debug/rendering_stats_instrumentation.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
diff --git a/cc/scheduler/delay_based_time_source.h b/cc/scheduler/delay_based_time_source.h
index cd474a5..7f97a91 100644
--- a/cc/scheduler/delay_based_time_source.h
+++ b/cc/scheduler/delay_based_time_source.h
@@ -8,6 +8,7 @@
 #include <string>
 
 #include "base/cancelable_callback.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/values.h"
 #include "cc/base/cc_export.h"
diff --git a/cc/scheduler/delay_based_time_source_unittest.cc b/cc/scheduler/delay_based_time_source_unittest.cc
index 948e020..5e224e6 100644
--- a/cc/scheduler/delay_based_time_source_unittest.cc
+++ b/cc/scheduler/delay_based_time_source_unittest.cc
@@ -4,7 +4,8 @@
 
 #include "cc/scheduler/delay_based_time_source.h"
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
 #include "base/test/test_simple_task_runner.h"
 #include "cc/test/scheduler_test_common.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -429,7 +430,7 @@
 
   double total_frame_time = 0.0;
   for (int i = 0; i < num_iterations; ++i) {
-    int64 delay_ms = task_runner->NextPendingTaskDelay().InMilliseconds();
+    int64_t delay_ms = task_runner->NextPendingTaskDelay().InMilliseconds();
 
     // accumulate the "delay"
     total_frame_time += delay_ms / 1000.0;
diff --git a/cc/scheduler/scheduler.h b/cc/scheduler/scheduler.h
index cbb30d1..e1a067c 100644
--- a/cc/scheduler/scheduler.h
+++ b/cc/scheduler/scheduler.h
@@ -8,8 +8,8 @@
 #include <deque>
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/cancelable_callback.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "cc/base/cc_export.h"
diff --git a/cc/scheduler/scheduler_state_machine.h b/cc/scheduler/scheduler_state_machine.h
index 2cc4c63..22c58d0 100644
--- a/cc/scheduler/scheduler_state_machine.h
+++ b/cc/scheduler/scheduler_state_machine.h
@@ -7,7 +7,7 @@
 
 #include <string>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/output/begin_frame_args.h"
diff --git a/cc/scheduler/scheduler_state_machine_unittest.cc b/cc/scheduler/scheduler_state_machine_unittest.cc
index 44d16c1..668f515 100644
--- a/cc/scheduler/scheduler_state_machine_unittest.cc
+++ b/cc/scheduler/scheduler_state_machine_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/scheduler/scheduler_state_machine.h"
 
+#include <stddef.h>
+
 #include "base/trace_event/trace_event.h"
 #include "cc/scheduler/scheduler.h"
 #include "cc/test/begin_frame_args_test.h"
diff --git a/cc/scheduler/scheduler_unittest.cc b/cc/scheduler/scheduler_unittest.cc
index 17935ac..7f577a6 100644
--- a/cc/scheduler/scheduler_unittest.cc
+++ b/cc/scheduler/scheduler_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/scheduler/scheduler.h"
 
+#include <stddef.h>
+
 #include <string>
 #include <vector>
 
diff --git a/cc/surfaces/display.cc b/cc/surfaces/display.cc
index 1344847..64a2906 100644
--- a/cc/surfaces/display.cc
+++ b/cc/surfaces/display.cc
@@ -4,6 +4,8 @@
 
 #include "cc/surfaces/display.h"
 
+#include <stddef.h>
+
 #include "base/thread_task_runner_handle.h"
 #include "base/trace_event/trace_event.h"
 #include "cc/debug/benchmark_instrumentation.h"
diff --git a/cc/surfaces/display.h b/cc/surfaces/display.h
index 7bbcd6e..6c29dc86 100644
--- a/cc/surfaces/display.h
+++ b/cc/surfaces/display.h
@@ -7,6 +7,7 @@
 
 #include <vector>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/output/output_surface_client.h"
 #include "cc/output/renderer.h"
diff --git a/cc/surfaces/display_scheduler.h b/cc/surfaces/display_scheduler.h
index 7b043c0..838af40 100644
--- a/cc/surfaces/display_scheduler.h
+++ b/cc/surfaces/display_scheduler.h
@@ -6,6 +6,7 @@
 #define CC_SURFACES_DISPLAY_SCHEDULER_H_
 
 #include "base/cancelable_callback.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/single_thread_task_runner.h"
diff --git a/cc/surfaces/onscreen_display_client.h b/cc/surfaces/onscreen_display_client.h
index 3094306..80d6c52 100644
--- a/cc/surfaces/onscreen_display_client.h
+++ b/cc/surfaces/onscreen_display_client.h
@@ -8,6 +8,7 @@
 #include "cc/surfaces/display_client.h"
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/single_thread_task_runner.h"
diff --git a/cc/surfaces/surface.cc b/cc/surfaces/surface.cc
index 29d2c47..b60a64f 100644
--- a/cc/surfaces/surface.cc
+++ b/cc/surfaces/surface.cc
@@ -4,6 +4,9 @@
 
 #include "cc/surfaces/surface.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <algorithm>
 
 #include "cc/base/container_util.h"
diff --git a/cc/surfaces/surface.h b/cc/surfaces/surface.h
index 267983d..a83aee3 100644
--- a/cc/surfaces/surface.h
+++ b/cc/surfaces/surface.h
@@ -5,6 +5,9 @@
 #ifndef CC_SURFACES_SURFACE_H_
 #define CC_SURFACES_SURFACE_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <map>
 #include <set>
 #include <vector>
diff --git a/cc/surfaces/surface_aggregator.cc b/cc/surfaces/surface_aggregator.cc
index 3c97bdc..9901d00 100644
--- a/cc/surfaces/surface_aggregator.cc
+++ b/cc/surfaces/surface_aggregator.cc
@@ -4,11 +4,14 @@
 
 #include "cc/surfaces/surface_aggregator.h"
 
+#include <stddef.h>
+
 #include <map>
 
 #include "base/bind.h"
 #include "base/containers/hash_tables.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/stl_util.h"
 #include "base/trace_event/trace_event.h"
 #include "cc/base/math_util.h"
diff --git a/cc/surfaces/surface_aggregator.h b/cc/surfaces/surface_aggregator.h
index 6df7e6b..0b640a9 100644
--- a/cc/surfaces/surface_aggregator.h
+++ b/cc/surfaces/surface_aggregator.h
@@ -9,6 +9,7 @@
 
 #include "base/containers/hash_tables.h"
 #include "base/containers/scoped_ptr_hash_map.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/quads/draw_quad.h"
 #include "cc/quads/render_pass.h"
diff --git a/cc/surfaces/surface_aggregator_unittest.cc b/cc/surfaces/surface_aggregator_unittest.cc
index a0ac9f0..95f02611 100644
--- a/cc/surfaces/surface_aggregator_unittest.cc
+++ b/cc/surfaces/surface_aggregator_unittest.cc
@@ -4,8 +4,12 @@
 
 #include "cc/surfaces/surface_aggregator.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <utility>
 
+#include "base/macros.h"
 #include "cc/output/compositor_frame.h"
 #include "cc/output/delegated_frame_data.h"
 #include "cc/quads/render_pass.h"
diff --git a/cc/surfaces/surface_display_output_surface.h b/cc/surfaces/surface_display_output_surface.h
index 5dbbbe0..d173218 100644
--- a/cc/surfaces/surface_display_output_surface.h
+++ b/cc/surfaces/surface_display_output_surface.h
@@ -5,6 +5,7 @@
 #ifndef CC_SURFACES_SURFACE_DISPLAY_OUTPUT_SURFACE_H_
 #define CC_SURFACES_SURFACE_DISPLAY_OUTPUT_SURFACE_H_
 
+#include "base/macros.h"
 #include "cc/output/output_surface.h"
 #include "cc/surfaces/surface_factory.h"
 #include "cc/surfaces/surface_factory_client.h"
diff --git a/cc/surfaces/surface_factory.h b/cc/surfaces/surface_factory.h
index 1347728..fdfad17 100644
--- a/cc/surfaces/surface_factory.h
+++ b/cc/surfaces/surface_factory.h
@@ -9,6 +9,7 @@
 
 #include "base/callback_forward.h"
 #include "base/containers/scoped_ptr_hash_map.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/cc/surfaces/surface_factory_unittest.cc b/cc/surfaces/surface_factory_unittest.cc
index cf242c3..540d9da 100644
--- a/cc/surfaces/surface_factory_unittest.cc
+++ b/cc/surfaces/surface_factory_unittest.cc
@@ -4,9 +4,13 @@
 
 #include "cc/surfaces/surface_factory.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <utility>
 
 #include "base/bind.h"
+#include "base/macros.h"
 #include "cc/output/compositor_frame.h"
 #include "cc/output/copy_output_request.h"
 #include "cc/output/copy_output_result.h"
@@ -400,7 +404,7 @@
   factory_->Destroy(surface_id);
 }
 
-void DrawCallback(uint32* execute_count,
+void DrawCallback(uint32_t* execute_count,
                   SurfaceDrawStatus* result,
                   SurfaceDrawStatus drawn) {
   *execute_count += 1;
@@ -419,7 +423,7 @@
   frame_data->resource_list.push_back(resource);
   scoped_ptr<CompositorFrame> frame(new CompositorFrame);
   frame->delegated_frame_data = std::move(frame_data);
-  uint32 execute_count = 0;
+  uint32_t execute_count = 0;
   SurfaceDrawStatus drawn = SurfaceDrawStatus::DRAW_SKIPPED;
 
   factory_->SubmitCompositorFrame(
diff --git a/cc/surfaces/surface_hittest_unittest.cc b/cc/surfaces/surface_hittest_unittest.cc
index 144d0d6..5970d45 100644
--- a/cc/surfaces/surface_hittest_unittest.cc
+++ b/cc/surfaces/surface_hittest_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 "cc/output/compositor_frame.h"
 #include "cc/surfaces/surface.h"
 #include "cc/surfaces/surface_factory.h"
diff --git a/cc/surfaces/surface_id.h b/cc/surfaces/surface_id.h
index 070265a..0ade6ab 100644
--- a/cc/surfaces/surface_id.h
+++ b/cc/surfaces/surface_id.h
@@ -5,6 +5,9 @@
 #ifndef CC_SURFACES_SURFACE_ID_H_
 #define CC_SURFACES_SURFACE_ID_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/containers/hash_tables.h"
 
 namespace cc {
diff --git a/cc/surfaces/surface_id_allocator.cc b/cc/surfaces/surface_id_allocator.cc
index 04f60d9..d7146756 100644
--- a/cc/surfaces/surface_id_allocator.cc
+++ b/cc/surfaces/surface_id_allocator.cc
@@ -4,6 +4,8 @@
 
 #include "cc/surfaces/surface_id_allocator.h"
 
+#include <stdint.h>
+
 #include "cc/surfaces/surface_manager.h"
 
 namespace cc {
diff --git a/cc/surfaces/surface_id_allocator.h b/cc/surfaces/surface_id_allocator.h
index 31b1e87..b0f8bf4 100644
--- a/cc/surfaces/surface_id_allocator.h
+++ b/cc/surfaces/surface_id_allocator.h
@@ -5,6 +5,9 @@
 #ifndef CC_SURFACES_SURFACE_ID_ALLOCATOR_H_
 #define CC_SURFACES_SURFACE_ID_ALLOCATOR_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "cc/surfaces/surface_id.h"
 #include "cc/surfaces/surfaces_export.h"
 
diff --git a/cc/surfaces/surface_manager.cc b/cc/surfaces/surface_manager.cc
index 9ced46e..03951e4 100644
--- a/cc/surfaces/surface_manager.cc
+++ b/cc/surfaces/surface_manager.cc
@@ -4,6 +4,9 @@
 
 #include "cc/surfaces/surface_manager.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/logging.h"
 #include "cc/surfaces/surface.h"
 #include "cc/surfaces/surface_id_allocator.h"
diff --git a/cc/surfaces/surface_manager.h b/cc/surfaces/surface_manager.h
index 8430ea6..7466501 100644
--- a/cc/surfaces/surface_manager.h
+++ b/cc/surfaces/surface_manager.h
@@ -5,6 +5,8 @@
 #ifndef CC_SURFACES_SURFACE_MANAGER_H_
 #define CC_SURFACES_SURFACE_MANAGER_H_
 
+#include <stdint.h>
+
 #include <list>
 #include <vector>
 
diff --git a/cc/surfaces/surface_sequence.h b/cc/surfaces/surface_sequence.h
index b579296..21decf6 100644
--- a/cc/surfaces/surface_sequence.h
+++ b/cc/surfaces/surface_sequence.h
@@ -5,6 +5,9 @@
 #ifndef CC_SURFACES_SURFACE_SEQUENCE_H_
 #define CC_SURFACES_SURFACE_SEQUENCE_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <tuple>
 
 #include "base/containers/hash_tables.h"
diff --git a/cc/test/animation_timelines_test_common.cc b/cc/test/animation_timelines_test_common.cc
index 9212da6..6df5bd1 100644
--- a/cc/test/animation_timelines_test_common.cc
+++ b/cc/test/animation_timelines_test_common.cc
@@ -197,9 +197,11 @@
       host_impl_(nullptr),
       timeline_id_(AnimationIdProvider::NextTimelineId()),
       player_id_(AnimationIdProvider::NextPlayerId()),
-      layer_id_(1) {
+      next_test_layer_id_(0) {
   host_ = client_.host();
   host_impl_ = client_impl_.host();
+
+  layer_id_ = NextTestLayerId();
 }
 
 AnimationTimelinesTest::~AnimationTimelinesTest() {
@@ -258,4 +260,9 @@
                             : nullptr;
 }
 
+int AnimationTimelinesTest::NextTestLayerId() {
+  next_test_layer_id_++;
+  return next_test_layer_id_;
+}
+
 }  // namespace cc
diff --git a/cc/test/animation_timelines_test_common.h b/cc/test/animation_timelines_test_common.h
index 8b3996b3..518929d6 100644
--- a/cc/test/animation_timelines_test_common.h
+++ b/cc/test/animation_timelines_test_common.h
@@ -174,6 +174,8 @@
   AnimationPlayer* GetPlayerForLayerId(int layer_id);
   AnimationPlayer* GetImplPlayerForLayerId(int layer_id);
 
+  int NextTestLayerId();
+
   TestHostClient client_;
   TestHostClient client_impl_;
 
@@ -182,7 +184,9 @@
 
   const int timeline_id_;
   const int player_id_;
-  const int layer_id_;
+  int layer_id_;
+
+  int next_test_layer_id_;
 
   scoped_refptr<AnimationTimeline> timeline_;
   scoped_refptr<AnimationPlayer> player_;
diff --git a/cc/test/begin_frame_args_test.cc b/cc/test/begin_frame_args_test.cc
index 4c3b5a4..8b4dfd3 100644
--- a/cc/test/begin_frame_args_test.cc
+++ b/cc/test/begin_frame_args_test.cc
@@ -4,6 +4,8 @@
 
 #include "cc/test/begin_frame_args_test.h"
 
+#include <stdint.h>
+
 #include "base/time/time.h"
 #include "cc/output/begin_frame_args.h"
 
@@ -26,9 +28,9 @@
 
 BeginFrameArgs CreateBeginFrameArgsForTesting(
     BeginFrameArgs::CreationLocation location,
-    int64 frame_time,
-    int64 deadline,
-    int64 interval) {
+    int64_t frame_time,
+    int64_t deadline,
+    int64_t interval) {
   return BeginFrameArgs::Create(
       location, base::TimeTicks::FromInternalValue(frame_time),
       base::TimeTicks::FromInternalValue(deadline),
@@ -37,9 +39,9 @@
 
 BeginFrameArgs CreateBeginFrameArgsForTesting(
     BeginFrameArgs::CreationLocation location,
-    int64 frame_time,
-    int64 deadline,
-    int64 interval,
+    int64_t frame_time,
+    int64_t deadline,
+    int64_t interval,
     BeginFrameArgs::BeginFrameArgsType type) {
   return BeginFrameArgs::Create(
       location, base::TimeTicks::FromInternalValue(frame_time),
diff --git a/cc/test/begin_frame_args_test.h b/cc/test/begin_frame_args_test.h
index 9ef5d53..d798094 100644
--- a/cc/test/begin_frame_args_test.h
+++ b/cc/test/begin_frame_args_test.h
@@ -5,6 +5,8 @@
 #ifndef CC_TEST_BEGIN_FRAME_ARGS_TEST_H_
 #define CC_TEST_BEGIN_FRAME_ARGS_TEST_H_
 
+#include <stdint.h>
+
 #include <iosfwd>
 
 #include "base/test/simple_test_tick_clock.h"
@@ -22,14 +24,14 @@
     base::TimeTicks frame_time);
 BeginFrameArgs CreateBeginFrameArgsForTesting(
     BeginFrameArgs::CreationLocation location,
-    int64 frame_time,
-    int64 deadline,
-    int64 interval);
+    int64_t frame_time,
+    int64_t deadline,
+    int64_t interval);
 BeginFrameArgs CreateBeginFrameArgsForTesting(
     BeginFrameArgs::CreationLocation location,
-    int64 frame_time,
-    int64 deadline,
-    int64 interval,
+    int64_t frame_time,
+    int64_t deadline,
+    int64_t interval,
     BeginFrameArgs::BeginFrameArgsType type);
 
 // Creates a BeginFrameArgs using the fake Now value stored on the
diff --git a/cc/test/begin_frame_source_test.h b/cc/test/begin_frame_source_test.h
index 98f5d90..1de8b99 100644
--- a/cc/test/begin_frame_source_test.h
+++ b/cc/test/begin_frame_source_test.h
@@ -5,7 +5,6 @@
 #ifndef CC_TEST_BEGIN_FRAME_SOURCE_TEST_H_
 #define CC_TEST_BEGIN_FRAME_SOURCE_TEST_H_
 
-#include "base/basictypes.h"
 #include "base/trace_event/trace_event_argument.h"
 #include "cc/scheduler/begin_frame_source.h"
 #include "cc/test/begin_frame_args_test.h"
diff --git a/cc/test/failure_output_surface.h b/cc/test/failure_output_surface.h
index 4878ea5..a7aca5b 100644
--- a/cc/test/failure_output_surface.h
+++ b/cc/test/failure_output_surface.h
@@ -5,6 +5,7 @@
 #ifndef CC_TEST_FAILURE_OUTPUT_SURFACE_H_
 #define CC_TEST_FAILURE_OUTPUT_SURFACE_H_
 
+#include "base/macros.h"
 #include "cc/test/fake_output_surface.h"
 
 namespace cc {
diff --git a/cc/test/fake_content_layer_client.cc b/cc/test/fake_content_layer_client.cc
index 6ffa8fe..7876d29 100644
--- a/cc/test/fake_content_layer_client.cc
+++ b/cc/test/fake_content_layer_client.cc
@@ -4,6 +4,8 @@
 
 #include "cc/test/fake_content_layer_client.h"
 
+#include <stddef.h>
+
 #include "cc/playback/clip_display_item.h"
 #include "cc/playback/display_item_list_settings.h"
 #include "cc/playback/drawing_display_item.h"
diff --git a/cc/test/fake_content_layer_client.h b/cc/test/fake_content_layer_client.h
index c63f5d2..5354833 100644
--- a/cc/test/fake_content_layer_client.h
+++ b/cc/test/fake_content_layer_client.h
@@ -5,6 +5,8 @@
 #ifndef CC_TEST_FAKE_CONTENT_LAYER_CLIENT_H_
 #define CC_TEST_FAKE_CONTENT_LAYER_CLIENT_H_
 
+#include <stddef.h>
+
 #include <utility>
 #include <vector>
 
diff --git a/cc/test/fake_display_list_recording_source.h b/cc/test/fake_display_list_recording_source.h
index cb526ad..158c053 100644
--- a/cc/test/fake_display_list_recording_source.h
+++ b/cc/test/fake_display_list_recording_source.h
@@ -5,6 +5,8 @@
 #ifndef CC_TEST_FAKE_DISPLAY_LIST_RECORDING_SOURCE_H_
 #define CC_TEST_FAKE_DISPLAY_LIST_RECORDING_SOURCE_H_
 
+#include <stddef.h>
+
 #include "cc/base/region.h"
 #include "cc/playback/display_list_recording_source.h"
 #include "cc/test/fake_content_layer_client.h"
diff --git a/cc/test/fake_layer_tree_host_impl.cc b/cc/test/fake_layer_tree_host_impl.cc
index e837ab7..ae47704 100644
--- a/cc/test/fake_layer_tree_host_impl.cc
+++ b/cc/test/fake_layer_tree_host_impl.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 "cc/test/begin_frame_args_test.h"
 #include "cc/test/fake_layer_tree_host_impl.h"
 #include "cc/test/layer_tree_settings_for_testing.h"
diff --git a/cc/test/fake_output_surface.h b/cc/test/fake_output_surface.h
index 6804b13..a7a68bd 100644
--- a/cc/test/fake_output_surface.h
+++ b/cc/test/fake_output_surface.h
@@ -5,6 +5,8 @@
 #ifndef CC_TEST_FAKE_OUTPUT_SURFACE_H_
 #define CC_TEST_FAKE_OUTPUT_SURFACE_H_
 
+#include <stddef.h>
+
 #include "base/callback.h"
 #include "base/logging.h"
 #include "base/time/time.h"
diff --git a/cc/test/fake_painted_scrollbar_layer.h b/cc/test/fake_painted_scrollbar_layer.h
index 72ea250..95ed921 100644
--- a/cc/test/fake_painted_scrollbar_layer.h
+++ b/cc/test/fake_painted_scrollbar_layer.h
@@ -5,6 +5,8 @@
 #ifndef CC_TEST_FAKE_PAINTED_SCROLLBAR_LAYER_H_
 #define CC_TEST_FAKE_PAINTED_SCROLLBAR_LAYER_H_
 
+#include <stddef.h>
+
 #include "base/memory/scoped_ptr.h"
 #include "cc/layers/painted_scrollbar_layer.h"
 #include "cc/test/fake_scrollbar.h"
diff --git a/cc/test/fake_picture_layer.h b/cc/test/fake_picture_layer.h
index 96dae06..6bb9b175 100644
--- a/cc/test/fake_picture_layer.h
+++ b/cc/test/fake_picture_layer.h
@@ -5,6 +5,8 @@
 #ifndef CC_TEST_FAKE_PICTURE_LAYER_H_
 #define CC_TEST_FAKE_PICTURE_LAYER_H_
 
+#include <stddef.h>
+
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/layers/picture_layer.h"
diff --git a/cc/test/fake_picture_layer_impl.cc b/cc/test/fake_picture_layer_impl.cc
index 8743287..545cc89 100644
--- a/cc/test/fake_picture_layer_impl.cc
+++ b/cc/test/fake_picture_layer_impl.cc
@@ -4,6 +4,8 @@
 
 #include "cc/test/fake_picture_layer_impl.h"
 
+#include <stddef.h>
+
 #include <vector>
 #include "cc/tiles/tile.h"
 #include "cc/trees/layer_tree_impl.h"
diff --git a/cc/test/fake_picture_layer_impl.h b/cc/test/fake_picture_layer_impl.h
index 3d8431e..759bb83 100644
--- a/cc/test/fake_picture_layer_impl.h
+++ b/cc/test/fake_picture_layer_impl.h
@@ -5,6 +5,8 @@
 #ifndef CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_
 #define CC_TEST_FAKE_PICTURE_LAYER_IMPL_H_
 
+#include <stddef.h>
+
 #include "base/memory/scoped_ptr.h"
 #include "cc/layers/picture_layer_impl.h"
 #include "cc/playback/display_list_raster_source.h"
diff --git a/cc/test/fake_picture_layer_tiling_client.cc b/cc/test/fake_picture_layer_tiling_client.cc
index 67785ca..aa76d6a 100644
--- a/cc/test/fake_picture_layer_tiling_client.cc
+++ b/cc/test/fake_picture_layer_tiling_client.cc
@@ -4,6 +4,8 @@
 
 #include "cc/test/fake_picture_layer_tiling_client.h"
 
+#include <stddef.h>
+
 #include <limits>
 
 #include "base/thread_task_runner_handle.h"
diff --git a/cc/test/fake_resource_provider.h b/cc/test/fake_resource_provider.h
index 4ad254f..0279d73 100644
--- a/cc/test/fake_resource_provider.h
+++ b/cc/test/fake_resource_provider.h
@@ -5,6 +5,8 @@
 #ifndef CC_TEST_FAKE_RESOURCE_PROVIDER_H_
 #define CC_TEST_FAKE_RESOURCE_PROVIDER_H_
 
+#include <stddef.h>
+
 #include "cc/resources/resource_provider.h"
 #include "ui/gfx/buffer_types.h"
 
diff --git a/cc/test/fake_scrollbar.h b/cc/test/fake_scrollbar.h
index 8ae49e4..6dccdc3 100644
--- a/cc/test/fake_scrollbar.h
+++ b/cc/test/fake_scrollbar.h
@@ -6,6 +6,7 @@
 #define CC_TEST_FAKE_SCROLLBAR_H_
 
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "cc/input/scrollbar.h"
 #include "third_party/skia/include/core/SkColor.h"
 
diff --git a/cc/test/fake_tile_manager.cc b/cc/test/fake_tile_manager.cc
index 1025192..9dde7495 100644
--- a/cc/test/fake_tile_manager.cc
+++ b/cc/test/fake_tile_manager.cc
@@ -4,6 +4,9 @@
 
 #include "cc/test/fake_tile_manager.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <deque>
 #include <limits>
 
diff --git a/cc/test/layer_test_common.cc b/cc/test/layer_test_common.cc
index a2559769..f482544f0 100644
--- a/cc/test/layer_test_common.cc
+++ b/cc/test/layer_test_common.cc
@@ -4,6 +4,8 @@
 
 #include "cc/test/layer_test_common.h"
 
+#include <stddef.h>
+
 #include "cc/base/math_util.h"
 #include "cc/base/region.h"
 #include "cc/layers/append_quads_data.h"
diff --git a/cc/test/layer_test_common.h b/cc/test/layer_test_common.h
index a025629..80c1980 100644
--- a/cc/test/layer_test_common.h
+++ b/cc/test/layer_test_common.h
@@ -5,9 +5,10 @@
 #ifndef CC_TEST_LAYER_TEST_COMMON_H_
 #define CC_TEST_LAYER_TEST_COMMON_H_
 
+#include <stddef.h>
+
 #include <utility>
 
-#include "base/basictypes.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/quads/render_pass.h"
 #include "cc/test/fake_layer_tree_host.h"
diff --git a/cc/test/layer_tree_host_common_test.cc b/cc/test/layer_tree_host_common_test.cc
index 02b66ac..0f07a43 100644
--- a/cc/test/layer_tree_host_common_test.cc
+++ b/cc/test/layer_tree_host_common_test.cc
@@ -4,6 +4,8 @@
 
 #include "cc/test/layer_tree_host_common_test.h"
 
+#include <stddef.h>
+
 #include "cc/layers/layer.h"
 #include "cc/layers/layer_impl.h"
 #include "cc/test/fake_layer_tree_host.h"
diff --git a/cc/test/layer_tree_json_parser.cc b/cc/test/layer_tree_json_parser.cc
index f2dc8a8..4dd3d66 100644
--- a/cc/test/layer_tree_json_parser.cc
+++ b/cc/test/layer_tree_json_parser.cc
@@ -4,6 +4,8 @@
 
 #include "cc/test/layer_tree_json_parser.h"
 
+#include <stddef.h>
+
 #include "base/test/values_test_util.h"
 #include "base/values.h"
 #include "cc/layers/layer.h"
diff --git a/cc/test/layer_tree_json_parser_unittest.cc b/cc/test/layer_tree_json_parser_unittest.cc
index d0f7544..f111032 100644
--- a/cc/test/layer_tree_json_parser_unittest.cc
+++ b/cc/test/layer_tree_json_parser_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/test/layer_tree_json_parser.h"
 
+#include <stddef.h>
+
 #include "cc/layers/layer.h"
 #include "cc/test/fake_impl_task_runner_provider.h"
 #include "cc/test/fake_layer_tree_host.h"
diff --git a/cc/test/layer_tree_pixel_test.cc b/cc/test/layer_tree_pixel_test.cc
index fa2549e..48a5dbb 100644
--- a/cc/test/layer_tree_pixel_test.cc
+++ b/cc/test/layer_tree_pixel_test.cc
@@ -4,6 +4,9 @@
 
 #include "cc/test/layer_tree_pixel_test.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/command_line.h"
 #include "base/path_service.h"
 #include "cc/base/switches.h"
@@ -232,7 +235,7 @@
   EXPECT_EQ(static_cast<unsigned>(GL_FRAMEBUFFER_COMPLETE),
             gl->CheckFramebufferStatus(GL_FRAMEBUFFER));
 
-  scoped_ptr<uint8[]> pixels(new uint8[size.GetArea() * 4]);
+  scoped_ptr<uint8_t[]> pixels(new uint8_t[size.GetArea() * 4]);
   gl->ReadPixels(0,
                  0,
                  size.width(),
@@ -247,7 +250,7 @@
   scoped_ptr<SkBitmap> bitmap(new SkBitmap);
   bitmap->allocN32Pixels(size.width(), size.height());
 
-  uint8* out_pixels = static_cast<uint8*>(bitmap->getPixels());
+  uint8_t* out_pixels = static_cast<uint8_t*>(bitmap->getPixels());
 
   size_t row_bytes = size.width() * 4;
   size_t total_bytes = size.height() * row_bytes;
diff --git a/cc/test/mock_occlusion_tracker.h b/cc/test/mock_occlusion_tracker.h
index b291bf5..47f1f0e 100644
--- a/cc/test/mock_occlusion_tracker.h
+++ b/cc/test/mock_occlusion_tracker.h
@@ -5,6 +5,7 @@
 #ifndef CC_TEST_MOCK_OCCLUSION_TRACKER_H_
 #define CC_TEST_MOCK_OCCLUSION_TRACKER_H_
 
+#include "base/macros.h"
 #include "cc/trees/occlusion_tracker.h"
 
 namespace cc {
diff --git a/cc/test/ordered_simple_task_runner.cc b/cc/test/ordered_simple_task_runner.cc
index 3e0864c..dea8556 100644
--- a/cc/test/ordered_simple_task_runner.cc
+++ b/cc/test/ordered_simple_task_runner.cc
@@ -4,6 +4,9 @@
 
 #include "cc/test/ordered_simple_task_runner.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <limits>
 #include <set>
 #include <sstream>
diff --git a/cc/test/ordered_simple_task_runner.h b/cc/test/ordered_simple_task_runner.h
index 91ea4be..c7abe40 100644
--- a/cc/test/ordered_simple_task_runner.h
+++ b/cc/test/ordered_simple_task_runner.h
@@ -5,13 +5,15 @@
 #ifndef CC_TEST_ORDERED_SIMPLE_TASK_RUNNER_H_
 #define CC_TEST_ORDERED_SIMPLE_TASK_RUNNER_H_
 
+#include <stddef.h>
+
 #include <limits>
 #include <set>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/test/simple_test_tick_clock.h"
 #include "base/test/test_simple_task_runner.h"
 #include "base/trace_event/trace_event.h"
diff --git a/cc/test/ordered_simple_task_runner_unittest.cc b/cc/test/ordered_simple_task_runner_unittest.cc
index 437235e..cb3c4c5 100644
--- a/cc/test/ordered_simple_task_runner_unittest.cc
+++ b/cc/test/ordered_simple_task_runner_unittest.cc
@@ -6,6 +6,7 @@
 
 #include "base/cancelable_callback.h"
 #include "base/format_macros.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/strings/stringprintf.h"
 #include "base/test/test_pending_task.h"
diff --git a/cc/test/ordered_texture_map.cc b/cc/test/ordered_texture_map.cc
index 649700c..a474dbf 100644
--- a/cc/test/ordered_texture_map.cc
+++ b/cc/test/ordered_texture_map.cc
@@ -4,6 +4,8 @@
 
 #include "cc/test/ordered_texture_map.h"
 
+#include <stddef.h>
+
 #include "base/logging.h"
 #include "cc/test/test_texture.h"
 
diff --git a/cc/test/ordered_texture_map.h b/cc/test/ordered_texture_map.h
index 2aa3111..8b2a6ca 100644
--- a/cc/test/ordered_texture_map.h
+++ b/cc/test/ordered_texture_map.h
@@ -5,6 +5,8 @@
 #ifndef CC_TEST_ORDERED_TEXTURE_MAP_H_
 #define CC_TEST_ORDERED_TEXTURE_MAP_H_
 
+#include <stddef.h>
+
 #include <vector>
 
 #include "base/containers/hash_tables.h"
diff --git a/cc/test/pixel_comparator.cc b/cc/test/pixel_comparator.cc
index 4067787..4b43188 100644
--- a/cc/test/pixel_comparator.cc
+++ b/cc/test/pixel_comparator.cc
@@ -4,6 +4,8 @@
 
 #include "cc/test/pixel_comparator.h"
 
+#include <stdint.h>
+
 #include <algorithm>
 
 #include "base/logging.h"
@@ -75,10 +77,10 @@
   // Number of pixels with a small error
   int small_error_pixels_count = 0;
   // The per channel sums of absolute errors over all pixels.
-  int64 sum_abs_error_r = 0;
-  int64 sum_abs_error_g = 0;
-  int64 sum_abs_error_b = 0;
-  int64 sum_abs_error_a = 0;
+  int64_t sum_abs_error_r = 0;
+  int64_t sum_abs_error_g = 0;
+  int64_t sum_abs_error_b = 0;
+  int64_t sum_abs_error_a = 0;
   // The per channel maximum absolute errors over all pixels.
   int max_abs_error_r = 0;
   int max_abs_error_g = 0;
diff --git a/cc/test/render_pass_test_utils.cc b/cc/test/render_pass_test_utils.cc
index 1bb9966..b0464c24 100644
--- a/cc/test/render_pass_test_utils.cc
+++ b/cc/test/render_pass_test_utils.cc
@@ -4,6 +4,8 @@
 
 #include "cc/test/render_pass_test_utils.h"
 
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "cc/quads/debug_border_draw_quad.h"
 #include "cc/quads/io_surface_draw_quad.h"
diff --git a/cc/test/render_pass_test_utils.h b/cc/test/render_pass_test_utils.h
index 9182b5a..3cf34ee 100644
--- a/cc/test/render_pass_test_utils.h
+++ b/cc/test/render_pass_test_utils.h
@@ -5,6 +5,8 @@
 #ifndef CC_TEST_RENDER_PASS_TEST_UTILS_H_
 #define CC_TEST_RENDER_PASS_TEST_UTILS_H_
 
+#include <stdint.h>
+
 #include "cc/output/filter_operations.h"
 #include "cc/quads/render_pass.h"
 #include "cc/resources/resource_provider.h"
diff --git a/cc/test/scheduler_test_common.cc b/cc/test/scheduler_test_common.cc
index c04c1e0..4d7f06d 100644
--- a/cc/test/scheduler_test_common.cc
+++ b/cc/test/scheduler_test_common.cc
@@ -4,6 +4,8 @@
 
 #include "cc/test/scheduler_test_common.h"
 
+#include <stddef.h>
+
 #include <string>
 
 #include "base/logging.h"
diff --git a/cc/test/scheduler_test_common.h b/cc/test/scheduler_test_common.h
index 5cb3377c..e561d82 100644
--- a/cc/test/scheduler_test_common.h
+++ b/cc/test/scheduler_test_common.h
@@ -5,9 +5,11 @@
 #ifndef CC_TEST_SCHEDULER_TEST_COMMON_H_
 #define CC_TEST_SCHEDULER_TEST_COMMON_H_
 
+#include <stddef.h>
+
 #include <string>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "cc/scheduler/compositor_timing_history.h"
diff --git a/cc/test/skia_common.cc b/cc/test/skia_common.cc
index aed4025..c237c39e 100644
--- a/cc/test/skia_common.cc
+++ b/cc/test/skia_common.cc
@@ -4,6 +4,8 @@
 
 #include "cc/test/skia_common.h"
 
+#include <stddef.h>
+
 #include "cc/playback/display_item_list.h"
 #include "skia/ext/refptr.h"
 #include "third_party/skia/include/core/SkCanvas.h"
diff --git a/cc/test/solid_color_content_layer_client.cc b/cc/test/solid_color_content_layer_client.cc
index a4f01ca..2973afff 100644
--- a/cc/test/solid_color_content_layer_client.cc
+++ b/cc/test/solid_color_content_layer_client.cc
@@ -4,6 +4,8 @@
 
 #include "cc/test/solid_color_content_layer_client.h"
 
+#include <stddef.h>
+
 #include "cc/playback/display_item_list_settings.h"
 #include "cc/playback/drawing_display_item.h"
 #include "third_party/skia/include/core/SkCanvas.h"
diff --git a/cc/test/solid_color_content_layer_client.h b/cc/test/solid_color_content_layer_client.h
index 1176abe..d765f94 100644
--- a/cc/test/solid_color_content_layer_client.h
+++ b/cc/test/solid_color_content_layer_client.h
@@ -5,6 +5,8 @@
 #ifndef CC_TEST_SOLID_COLOR_CONTENT_LAYER_CLIENT_H_
 #define CC_TEST_SOLID_COLOR_CONTENT_LAYER_CLIENT_H_
 
+#include <stddef.h>
+
 #include "base/compiler_specific.h"
 #include "cc/layers/content_layer_client.h"
 #include "third_party/skia/include/core/SkColor.h"
diff --git a/cc/test/surface_aggregator_test_helpers.cc b/cc/test/surface_aggregator_test_helpers.cc
index 05e54b7a..2b0aff5 100644
--- a/cc/test/surface_aggregator_test_helpers.cc
+++ b/cc/test/surface_aggregator_test_helpers.cc
@@ -4,6 +4,8 @@
 
 #include "cc/test/surface_aggregator_test_helpers.h"
 
+#include <stddef.h>
+
 #include "base/format_macros.h"
 #include "base/strings/stringprintf.h"
 #include "cc/layers/append_quads_data.h"
diff --git a/cc/test/surface_aggregator_test_helpers.h b/cc/test/surface_aggregator_test_helpers.h
index ae3347c..356033d 100644
--- a/cc/test/surface_aggregator_test_helpers.h
+++ b/cc/test/surface_aggregator_test_helpers.h
@@ -5,6 +5,8 @@
 #ifndef CC_TEST_SURFACE_AGGREGATOR_TEST_HELPERS_H_
 #define CC_TEST_SURFACE_AGGREGATOR_TEST_HELPERS_H_
 
+#include <stddef.h>
+
 #include <vector>
 
 #include "cc/quads/draw_quad.h"
diff --git a/cc/test/test_context_provider.cc b/cc/test/test_context_provider.cc
index 3a570ca..c9de320 100644
--- a/cc/test/test_context_provider.cc
+++ b/cc/test/test_context_provider.cc
@@ -4,6 +4,9 @@
 
 #include "cc/test/test_context_provider.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <set>
 #include <vector>
 
diff --git a/cc/test/test_context_provider.h b/cc/test/test_context_provider.h
index 1b7a915..b0ac88e 100644
--- a/cc/test/test_context_provider.h
+++ b/cc/test/test_context_provider.h
@@ -5,7 +5,11 @@
 #ifndef CC_TEST_TEST_CONTEXT_PROVIDER_H_
 #define CC_TEST_TEST_CONTEXT_PROVIDER_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #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"
diff --git a/cc/test/test_context_support.cc b/cc/test/test_context_support.cc
index 0c74ec8..bf033fc 100644
--- a/cc/test/test_context_support.cc
+++ b/cc/test/test_context_support.cc
@@ -4,6 +4,9 @@
 
 #include "cc/test/test_context_support.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/location.h"
 #include "base/single_thread_task_runner.h"
@@ -16,7 +19,7 @@
 
 TestContextSupport::~TestContextSupport() {}
 
-void TestContextSupport::SignalSyncPoint(uint32 sync_point,
+void TestContextSupport::SignalSyncPoint(uint32_t sync_point,
                                          const base::Closure& callback) {
   sync_point_callbacks_.push_back(callback);
   base::ThreadTaskRunnerHandle::Get()->PostTask(
@@ -32,7 +35,7 @@
                             weak_ptr_factory_.GetWeakPtr()));
 }
 
-void TestContextSupport::SignalQuery(uint32 query,
+void TestContextSupport::SignalQuery(uint32_t query,
                                      const base::Closure& callback) {
   sync_point_callbacks_.push_back(callback);
   base::ThreadTaskRunnerHandle::Get()->PostTask(
@@ -68,12 +71,12 @@
 void TestContextSupport::Swap() {
 }
 
-uint32 TestContextSupport::InsertFutureSyncPointCHROMIUM() {
+uint32_t TestContextSupport::InsertFutureSyncPointCHROMIUM() {
   NOTIMPLEMENTED();
   return 0;
 }
 
-void TestContextSupport::RetireSyncPointCHROMIUM(uint32 sync_point) {
+void TestContextSupport::RetireSyncPointCHROMIUM(uint32_t sync_point) {
   NOTIMPLEMENTED();
 }
 
diff --git a/cc/test/test_context_support.h b/cc/test/test_context_support.h
index f619ac1..d82c7ae 100644
--- a/cc/test/test_context_support.h
+++ b/cc/test/test_context_support.h
@@ -5,8 +5,11 @@
 #ifndef CC_TEST_TEST_CONTEXT_SUPPORT_H_
 #define CC_TEST_TEST_CONTEXT_SUPPORT_H_
 
+#include <stdint.h>
+
 #include <vector>
 
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "gpu/command_buffer/client/context_support.h"
 
@@ -23,17 +26,17 @@
   ~TestContextSupport() override;
 
   // gpu::ContextSupport implementation.
-  void SignalSyncPoint(uint32 sync_point,
+  void SignalSyncPoint(uint32_t sync_point,
                        const base::Closure& callback) override;
   void SignalSyncToken(const gpu::SyncToken& sync_token,
                        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 SetAggressivelyFreeResources(bool aggressively_free_resources) override;
   void Swap() override;
   void PartialSwapBuffers(const gfx::Rect& sub_buffer) override;
   void CommitOverlayPlanes() override;
-  uint32 InsertFutureSyncPointCHROMIUM() override;
-  void RetireSyncPointCHROMIUM(uint32 sync_point) override;
+  uint32_t InsertFutureSyncPointCHROMIUM() override;
+  void RetireSyncPointCHROMIUM(uint32_t sync_point) override;
   void ScheduleOverlayPlane(int plane_z_order,
                             gfx::OverlayTransform plane_transform,
                             unsigned overlay_texture_id,
diff --git a/cc/test/test_gpu_memory_buffer_manager.cc b/cc/test/test_gpu_memory_buffer_manager.cc
index 273ed36..e1e6e89 100644
--- a/cc/test/test_gpu_memory_buffer_manager.cc
+++ b/cc/test/test_gpu_memory_buffer_manager.cc
@@ -4,6 +4,9 @@
 
 #include "cc/test/test_gpu_memory_buffer_manager.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/logging.h"
 #include "base/numerics/safe_conversions.h"
 #include "ui/gfx/buffer_format_util.h"
diff --git a/cc/test/test_gpu_memory_buffer_manager.h b/cc/test/test_gpu_memory_buffer_manager.h
index 85f642c..fcaaa32 100644
--- a/cc/test/test_gpu_memory_buffer_manager.h
+++ b/cc/test/test_gpu_memory_buffer_manager.h
@@ -5,6 +5,7 @@
 #ifndef CC_TEST_TEST_GPU_MEMORY_BUFFER_MANAGER_H_
 #define CC_TEST_TEST_GPU_MEMORY_BUFFER_MANAGER_H_
 
+#include "base/macros.h"
 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h"
 
 namespace cc {
diff --git a/cc/test/test_image_factory.cc b/cc/test/test_image_factory.cc
index 79c2e7e..e9a09bee 100644
--- a/cc/test/test_image_factory.cc
+++ b/cc/test/test_image_factory.cc
@@ -4,6 +4,8 @@
 
 #include "cc/test/test_image_factory.h"
 
+#include <stddef.h>
+
 #include "base/numerics/safe_conversions.h"
 #include "ui/gl/gl_image_shared_memory.h"
 
diff --git a/cc/test/test_image_factory.h b/cc/test/test_image_factory.h
index 3cf0c19..42a92e3 100644
--- a/cc/test/test_image_factory.h
+++ b/cc/test/test_image_factory.h
@@ -5,6 +5,7 @@
 #ifndef CC_TEST_TEST_IMAGE_FACTORY_H_
 #define CC_TEST_TEST_IMAGE_FACTORY_H_
 
+#include "base/macros.h"
 #include "gpu/command_buffer/service/image_factory.h"
 
 namespace cc {
diff --git a/cc/test/test_in_process_context_provider.cc b/cc/test/test_in_process_context_provider.cc
index a0b4c28..fd1745e 100644
--- a/cc/test/test_in_process_context_provider.cc
+++ b/cc/test/test_in_process_context_provider.cc
@@ -4,7 +4,10 @@
 
 #include "cc/test/test_in_process_context_provider.h"
 
+#include <stdint.h>
+
 #include "base/lazy_instance.h"
+#include "base/macros.h"
 #include "cc/resources/platform_color.h"
 #include "gpu/GLES2/gl2extchromium.h"
 #include "gpu/command_buffer/client/gl_in_process_context.h"
diff --git a/cc/test/test_in_process_context_provider.h b/cc/test/test_in_process_context_provider.h
index 904ac6d..b8e1bf8 100644
--- a/cc/test/test_in_process_context_provider.h
+++ b/cc/test/test_in_process_context_provider.h
@@ -5,6 +5,8 @@
 #ifndef CC_TEST_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_
 #define CC_TEST_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_
 
+#include <stdint.h>
+
 #include "base/synchronization/lock.h"
 #include "cc/output/context_provider.h"
 #include "cc/test/test_gpu_memory_buffer_manager.h"
diff --git a/cc/test/test_occlusion_tracker.h b/cc/test/test_occlusion_tracker.h
index 7697bd1e1..d074168 100644
--- a/cc/test/test_occlusion_tracker.h
+++ b/cc/test/test_occlusion_tracker.h
@@ -5,6 +5,8 @@
 #ifndef CC_TEST_TEST_OCCLUSION_TRACKER_H_
 #define CC_TEST_TEST_OCCLUSION_TRACKER_H_
 
+#include <stddef.h>
+
 #include "cc/layers/render_surface_impl.h"
 #include "cc/trees/occlusion_tracker.h"
 
diff --git a/cc/test/test_shared_bitmap_manager.cc b/cc/test/test_shared_bitmap_manager.cc
index ef3b484..589a782 100644
--- a/cc/test/test_shared_bitmap_manager.cc
+++ b/cc/test/test_shared_bitmap_manager.cc
@@ -4,6 +4,8 @@
 
 #include "cc/test/test_shared_bitmap_manager.h"
 
+#include <stdint.h>
+
 #include "base/memory/shared_memory.h"
 
 namespace cc {
@@ -13,7 +15,7 @@
  public:
   OwnedSharedBitmap(scoped_ptr<base::SharedMemory> shared_memory,
                     const SharedBitmapId& id)
-      : SharedBitmap(static_cast<uint8*>(shared_memory->memory()), id),
+      : SharedBitmap(static_cast<uint8_t*>(shared_memory->memory()), id),
         shared_memory_(std::move(shared_memory)) {}
 
   ~OwnedSharedBitmap() override {}
@@ -44,7 +46,7 @@
   base::AutoLock lock(lock_);
   if (bitmap_map_.find(id) == bitmap_map_.end())
     return nullptr;
-  uint8* pixels = static_cast<uint8*>(bitmap_map_[id]->memory());
+  uint8_t* pixels = static_cast<uint8_t*>(bitmap_map_[id]->memory());
   return make_scoped_ptr(new SharedBitmap(pixels, id));
 }
 
diff --git a/cc/test/test_task_graph_runner.h b/cc/test/test_task_graph_runner.h
index 60ddca1..b0e9bc4 100644
--- a/cc/test/test_task_graph_runner.h
+++ b/cc/test/test_task_graph_runner.h
@@ -5,6 +5,7 @@
 #ifndef CC_TEST_TEST_TASK_GRAPH_RUNNER_H_
 #define CC_TEST_TEST_TASK_GRAPH_RUNNER_H_
 
+#include "base/macros.h"
 #include "base/threading/simple_thread.h"
 #include "cc/raster/single_thread_task_graph_runner.h"
 
diff --git a/cc/test/test_texture.cc b/cc/test/test_texture.cc
index b9fff8d..fea16fb 100644
--- a/cc/test/test_texture.cc
+++ b/cc/test/test_texture.cc
@@ -4,6 +4,9 @@
 
 #include "cc/test/test_texture.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "gpu/GLES2/gl2extchromium.h"
 #include "third_party/khronos/GLES2/gl2ext.h"
 
diff --git a/cc/test/test_texture.h b/cc/test/test_texture.h
index 9265589..c5b6e21 100644
--- a/cc/test/test_texture.h
+++ b/cc/test/test_texture.h
@@ -5,6 +5,9 @@
 #ifndef CC_TEST_TEST_TEXTURE_H_
 #define CC_TEST_TEST_TEXTURE_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/containers/hash_tables.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
diff --git a/cc/test/test_web_graphics_context_3d.cc b/cc/test/test_web_graphics_context_3d.cc
index 72ac8ad..96b11b4 100644
--- a/cc/test/test_web_graphics_context_3d.cc
+++ b/cc/test/test_web_graphics_context_3d.cc
@@ -4,6 +4,9 @@
 
 #include "cc/test/test_web_graphics_context_3d.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <algorithm>
 #include <string>
 
@@ -548,7 +551,7 @@
 
   size_t old_size = buffer->size;
 
-  buffer->pixels.reset(new uint8[size]);
+  buffer->pixels.reset(new uint8_t[size]);
   buffer->size = size;
   if (data != NULL)
     memcpy(buffer->pixels.get(), data, size);
diff --git a/cc/test/test_web_graphics_context_3d.h b/cc/test/test_web_graphics_context_3d.h
index 4e6d7611..08447f7 100644
--- a/cc/test/test_web_graphics_context_3d.h
+++ b/cc/test/test_web_graphics_context_3d.h
@@ -5,12 +5,16 @@
 #ifndef CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_
 #define CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <vector>
 
 #include "base/callback.h"
 #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/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
@@ -407,7 +411,7 @@
     ~Buffer();
 
     GLenum target;
-    scoped_ptr<uint8[]> pixels;
+    scoped_ptr<uint8_t[]> pixels;
     size_t size;
 
    private:
@@ -418,7 +422,7 @@
     Image();
     ~Image();
 
-    scoped_ptr<uint8[]> pixels;
+    scoped_ptr<uint8_t[]> pixels;
 
    private:
     DISALLOW_COPY_AND_ASSIGN(Image);
diff --git a/cc/tiles/eviction_tile_priority_queue.h b/cc/tiles/eviction_tile_priority_queue.h
index 3198889..558c1fe 100644
--- a/cc/tiles/eviction_tile_priority_queue.h
+++ b/cc/tiles/eviction_tile_priority_queue.h
@@ -9,6 +9,7 @@
 #include <utility>
 #include <vector>
 
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/picture_layer_impl.h"
 #include "cc/tiles/tile_priority.h"
diff --git a/cc/tiles/image_decode_controller.cc b/cc/tiles/image_decode_controller.cc
index 70b6dc7..914f7e5 100644
--- a/cc/tiles/image_decode_controller.cc
+++ b/cc/tiles/image_decode_controller.cc
@@ -4,6 +4,9 @@
 
 #include "cc/tiles/image_decode_controller.h"
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "cc/debug/devtools_instrumentation.h"
 
 namespace cc {
diff --git a/cc/tiles/image_decode_controller.h b/cc/tiles/image_decode_controller.h
index f07892c1..f63361a 100644
--- a/cc/tiles/image_decode_controller.h
+++ b/cc/tiles/image_decode_controller.h
@@ -5,6 +5,8 @@
 #ifndef CC_TILES_IMAGE_DECODE_CONTROLLER_H_
 #define CC_TILES_IMAGE_DECODE_CONTROLLER_H_
 
+#include <stdint.h>
+
 #include "base/containers/hash_tables.h"
 #include "base/memory/ref_counted.h"
 #include "cc/base/cc_export.h"
diff --git a/cc/tiles/picture_layer_tiling.cc b/cc/tiles/picture_layer_tiling.cc
index 747dd94..7390913 100644
--- a/cc/tiles/picture_layer_tiling.cc
+++ b/cc/tiles/picture_layer_tiling.cc
@@ -4,6 +4,8 @@
 
 #include "cc/tiles/picture_layer_tiling.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 #include <cmath>
 #include <limits>
diff --git a/cc/tiles/picture_layer_tiling.h b/cc/tiles/picture_layer_tiling.h
index 0d38f1e..9185d5d 100644
--- a/cc/tiles/picture_layer_tiling.h
+++ b/cc/tiles/picture_layer_tiling.h
@@ -5,12 +5,15 @@
 #ifndef CC_TILES_PICTURE_LAYER_TILING_H_
 #define CC_TILES_PICTURE_LAYER_TILING_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <map>
 #include <utility>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/containers/scoped_ptr_hash_map.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/base/region.h"
@@ -70,9 +73,9 @@
 template <>
 struct hash<cc::TileMapKey> {
   size_t operator()(const cc::TileMapKey& key) const {
-    uint16 value1 = static_cast<uint16>(key.index_x);
-    uint16 value2 = static_cast<uint16>(key.index_y);
-    uint32 value1_32 = value1;
+    uint16_t value1 = static_cast<uint16_t>(key.index_x);
+    uint16_t value2 = static_cast<uint16_t>(key.index_y);
+    uint32_t value1_32 = value1;
     return (value1_32 << 16) | value2;
   }
 };
diff --git a/cc/tiles/picture_layer_tiling_set.cc b/cc/tiles/picture_layer_tiling_set.cc
index 77589c1..014e281 100644
--- a/cc/tiles/picture_layer_tiling_set.cc
+++ b/cc/tiles/picture_layer_tiling_set.cc
@@ -4,6 +4,8 @@
 
 #include "cc/tiles/picture_layer_tiling_set.h"
 
+#include <stddef.h>
+
 #include <limits>
 #include <set>
 #include <vector>
diff --git a/cc/tiles/picture_layer_tiling_set.h b/cc/tiles/picture_layer_tiling_set.h
index ed1038f..56122870 100644
--- a/cc/tiles/picture_layer_tiling_set.h
+++ b/cc/tiles/picture_layer_tiling_set.h
@@ -5,9 +5,12 @@
 #ifndef CC_TILES_PICTURE_LAYER_TILING_SET_H_
 #define CC_TILES_PICTURE_LAYER_TILING_SET_H_
 
+#include <stddef.h>
+
 #include <set>
 #include <vector>
 
+#include "base/macros.h"
 #include "cc/base/region.h"
 #include "cc/tiles/picture_layer_tiling.h"
 #include "ui/gfx/geometry/size.h"
diff --git a/cc/tiles/picture_layer_tiling_unittest.cc b/cc/tiles/picture_layer_tiling_unittest.cc
index b3aeecc..b937804 100644
--- a/cc/tiles/picture_layer_tiling_unittest.cc
+++ b/cc/tiles/picture_layer_tiling_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 <limits>
 #include <set>
 
+#include "base/macros.h"
 #include "cc/base/math_util.h"
 #include "cc/test/fake_display_list_raster_source.h"
 #include "cc/test/fake_output_surface.h"
diff --git a/cc/tiles/raster_tile_priority_queue.h b/cc/tiles/raster_tile_priority_queue.h
index e2187d2c..828f3cf 100644
--- a/cc/tiles/raster_tile_priority_queue.h
+++ b/cc/tiles/raster_tile_priority_queue.h
@@ -7,6 +7,7 @@
 
 #include <vector>
 
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/picture_layer_impl.h"
 #include "cc/tiles/tile_priority.h"
diff --git a/cc/tiles/raster_tile_priority_queue_all.h b/cc/tiles/raster_tile_priority_queue_all.h
index 10dc1f7..275a731 100644
--- a/cc/tiles/raster_tile_priority_queue_all.h
+++ b/cc/tiles/raster_tile_priority_queue_all.h
@@ -9,6 +9,7 @@
 #include <utility>
 #include <vector>
 
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/picture_layer_impl.h"
 #include "cc/tiles/raster_tile_priority_queue.h"
diff --git a/cc/tiles/raster_tile_priority_queue_required.h b/cc/tiles/raster_tile_priority_queue_required.h
index 3719d95..f88993f 100644
--- a/cc/tiles/raster_tile_priority_queue_required.h
+++ b/cc/tiles/raster_tile_priority_queue_required.h
@@ -7,6 +7,7 @@
 
 #include <vector>
 
+#include "base/macros.h"
 #include "cc/layers/picture_layer_impl.h"
 #include "cc/tiles/raster_tile_priority_queue.h"
 #include "cc/tiles/tiling_set_raster_queue_required.h"
diff --git a/cc/tiles/tile.cc b/cc/tiles/tile.cc
index 87ec3f7..81dce76 100644
--- a/cc/tiles/tile.cc
+++ b/cc/tiles/tile.cc
@@ -4,6 +4,8 @@
 
 #include "cc/tiles/tile.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 
 #include "base/numerics/safe_conversions.h"
diff --git a/cc/tiles/tile.h b/cc/tiles/tile.h
index e245e01..6ca9e87e 100644
--- a/cc/tiles/tile.h
+++ b/cc/tiles/tile.h
@@ -5,6 +5,10 @@
 #ifndef CC_TILES_TILE_H_
 #define CC_TILES_TILE_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "cc/tiles/tile_draw_info.h"
 #include "ui/gfx/geometry/rect.h"
@@ -45,7 +49,7 @@
 
   enum TileRasterFlags { USE_PICTURE_ANALYSIS = 1 << 0, IS_OPAQUE = 1 << 1 };
 
-  typedef uint64 Id;
+  typedef uint64_t Id;
 
   Id id() const {
     return id_;
diff --git a/cc/tiles/tile_manager.cc b/cc/tiles/tile_manager.cc
index 0e9cb1c..400fff2 100644
--- a/cc/tiles/tile_manager.cc
+++ b/cc/tiles/tile_manager.cc
@@ -4,6 +4,9 @@
 
 #include "cc/tiles/tile_manager.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <algorithm>
 #include <limits>
 #include <string>
@@ -11,6 +14,7 @@
 #include "base/bind.h"
 #include "base/json/json_writer.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/metrics/histogram.h"
 #include "base/numerics/safe_conversions.h"
 #include "base/trace_event/trace_event_argument.h"
@@ -1102,14 +1106,14 @@
 
 TileManager::MemoryUsage::MemoryUsage(size_t memory_bytes,
                                       size_t resource_count)
-    : memory_bytes_(static_cast<int64>(memory_bytes)),
+    : memory_bytes_(static_cast<int64_t>(memory_bytes)),
       resource_count_(static_cast<int>(resource_count)) {
   // MemoryUsage is constructed using size_ts, since it deals with memory and
   // the inputs are typically size_t. However, during the course of usage (in
   // particular operator-=) can cause internal values to become negative. Thus,
   // member variables are signed.
   DCHECK_LE(memory_bytes,
-            static_cast<size_t>(std::numeric_limits<int64>::max()));
+            static_cast<size_t>(std::numeric_limits<int64_t>::max()));
   DCHECK_LE(resource_count,
             static_cast<size_t>(std::numeric_limits<int>::max()));
 }
diff --git a/cc/tiles/tile_manager.h b/cc/tiles/tile_manager.h
index c041ce24..00f22e3 100644
--- a/cc/tiles/tile_manager.h
+++ b/cc/tiles/tile_manager.h
@@ -5,11 +5,15 @@
 #ifndef CC_TILES_TILE_MANAGER_H_
 #define CC_TILES_TILE_MANAGER_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <set>
 #include <utility>
 #include <vector>
 
 #include "base/containers/hash_tables.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/values.h"
 #include "cc/base/unique_notifier.h"
@@ -228,10 +232,10 @@
     MemoryUsage operator-(const MemoryUsage& other);
 
     bool Exceeds(const MemoryUsage& limit) const;
-    int64 memory_bytes() const { return memory_bytes_; }
+    int64_t memory_bytes() const { return memory_bytes_; }
 
    private:
-    int64 memory_bytes_;
+    int64_t memory_bytes_;
     int resource_count_;
   };
 
diff --git a/cc/tiles/tile_manager_perftest.cc b/cc/tiles/tile_manager_perftest.cc
index 2806b04..07bbb2b 100644
--- a/cc/tiles/tile_manager_perftest.cc
+++ b/cc/tiles/tile_manager_perftest.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/lazy_instance.h"
 #include "base/location.h"
 #include "base/thread_task_runner_handle.h"
diff --git a/cc/tiles/tile_manager_unittest.cc b/cc/tiles/tile_manager_unittest.cc
index 2c69999..ff67be2 100644
--- a/cc/tiles/tile_manager_unittest.cc
+++ b/cc/tiles/tile_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 "base/run_loop.h"
 #include "base/thread_task_runner_handle.h"
 #include "cc/playback/display_list_raster_source.h"
diff --git a/cc/tiles/tile_priority.h b/cc/tiles/tile_priority.h
index 184fc2d..023fac53 100644
--- a/cc/tiles/tile_priority.h
+++ b/cc/tiles/tile_priority.h
@@ -5,6 +5,8 @@
 #ifndef CC_TILES_TILE_PRIORITY_H_
 #define CC_TILES_TILE_PRIORITY_H_
 
+#include <stddef.h>
+
 #include <algorithm>
 #include <limits>
 #include <string>
diff --git a/cc/tiles/tiling_set_eviction_queue.cc b/cc/tiles/tiling_set_eviction_queue.cc
index 4b314d7..45bab03 100644
--- a/cc/tiles/tiling_set_eviction_queue.cc
+++ b/cc/tiles/tiling_set_eviction_queue.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 <utility>
 
 #include "cc/tiles/tiling_set_eviction_queue.h"
diff --git a/cc/tiles/tiling_set_eviction_queue.h b/cc/tiles/tiling_set_eviction_queue.h
index dc9b686..493d74a 100644
--- a/cc/tiles/tiling_set_eviction_queue.h
+++ b/cc/tiles/tiling_set_eviction_queue.h
@@ -5,6 +5,8 @@
 #ifndef CC_TILES_TILING_SET_EVICTION_QUEUE_H_
 #define CC_TILES_TILING_SET_EVICTION_QUEUE_H_
 
+#include <stddef.h>
+
 #include <vector>
 
 #include "cc/base/cc_export.h"
diff --git a/cc/tiles/tiling_set_raster_queue_all.cc b/cc/tiles/tiling_set_raster_queue_all.cc
index 1cac85d..1ed618a 100644
--- a/cc/tiles/tiling_set_raster_queue_all.cc
+++ b/cc/tiles/tiling_set_raster_queue_all.cc
@@ -4,6 +4,8 @@
 
 #include "cc/tiles/tiling_set_raster_queue_all.h"
 
+#include <stddef.h>
+
 #include <utility>
 
 #include "cc/tiles/picture_layer_tiling_set.h"
diff --git a/cc/tiles/tiling_set_raster_queue_all.h b/cc/tiles/tiling_set_raster_queue_all.h
index d6f7946..c49a37e 100644
--- a/cc/tiles/tiling_set_raster_queue_all.h
+++ b/cc/tiles/tiling_set_raster_queue_all.h
@@ -5,7 +5,10 @@
 #ifndef CC_TILES_TILING_SET_RASTER_QUEUE_ALL_H_
 #define CC_TILES_TILING_SET_RASTER_QUEUE_ALL_H_
 
+#include <stddef.h>
+
 #include "base/containers/stack_container.h"
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "cc/tiles/picture_layer_tiling_set.h"
 #include "cc/tiles/prioritized_tile.h"
diff --git a/cc/tiles/tiling_set_raster_queue_required.cc b/cc/tiles/tiling_set_raster_queue_required.cc
index 59696e4..b0173c9 100644
--- a/cc/tiles/tiling_set_raster_queue_required.cc
+++ b/cc/tiles/tiling_set_raster_queue_required.cc
@@ -4,6 +4,8 @@
 
 #include "cc/tiles/tiling_set_raster_queue_required.h"
 
+#include <stddef.h>
+
 #include <utility>
 
 #include "cc/tiles/picture_layer_tiling_set.h"
diff --git a/cc/trees/blocking_task_runner.cc b/cc/trees/blocking_task_runner.cc
index b0a935e..c276044 100644
--- a/cc/trees/blocking_task_runner.cc
+++ b/cc/trees/blocking_task_runner.cc
@@ -4,6 +4,8 @@
 
 #include "cc/trees/blocking_task_runner.h"
 
+#include <stddef.h>
+
 #include <utility>
 
 #include "base/callback.h"
diff --git a/cc/trees/blocking_task_runner.h b/cc/trees/blocking_task_runner.h
index eb43b91..a0101766 100644
--- a/cc/trees/blocking_task_runner.h
+++ b/cc/trees/blocking_task_runner.h
@@ -8,6 +8,7 @@
 #include <vector>
 
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "base/synchronization/lock.h"
diff --git a/cc/trees/damage_tracker.cc b/cc/trees/damage_tracker.cc
index 6c90c6c..f534c73 100644
--- a/cc/trees/damage_tracker.cc
+++ b/cc/trees/damage_tracker.cc
@@ -4,6 +4,8 @@
 
 #include "cc/trees/damage_tracker.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 
 #include "cc/base/math_util.h"
diff --git a/cc/trees/damage_tracker.h b/cc/trees/damage_tracker.h
index aafbd03..6550db1 100644
--- a/cc/trees/damage_tracker.h
+++ b/cc/trees/damage_tracker.h
@@ -6,6 +6,7 @@
 #define CC_TREES_DAMAGE_TRACKER_H_
 
 #include <vector>
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 #include "cc/layers/layer_lists.h"
diff --git a/cc/trees/damage_tracker_unittest.cc b/cc/trees/damage_tracker_unittest.cc
index 9a00403..c8a3d3f 100644
--- a/cc/trees/damage_tracker_unittest.cc
+++ b/cc/trees/damage_tracker_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/trees/damage_tracker.h"
 
+#include <stddef.h>
+
 #include "cc/base/math_util.h"
 #include "cc/layers/layer_impl.h"
 #include "cc/output/filter_operation.h"
diff --git a/cc/trees/draw_property_utils.cc b/cc/trees/draw_property_utils.cc
index 7a086a7..2d79a5e 100644
--- a/cc/trees/draw_property_utils.cc
+++ b/cc/trees/draw_property_utils.cc
@@ -4,6 +4,8 @@
 
 #include "cc/trees/draw_property_utils.h"
 
+#include <stddef.h>
+
 #include <vector>
 
 #include "cc/base/math_util.h"
diff --git a/cc/trees/latency_info_swap_promise_monitor.cc b/cc/trees/latency_info_swap_promise_monitor.cc
index 9f2bc82..23635cd 100644
--- a/cc/trees/latency_info_swap_promise_monitor.cc
+++ b/cc/trees/latency_info_swap_promise_monitor.cc
@@ -4,6 +4,8 @@
 
 #include "cc/trees/latency_info_swap_promise_monitor.h"
 
+#include <stdint.h>
+
 #include "base/threading/platform_thread.h"
 #include "cc/output/latency_info_swap_promise.h"
 #include "cc/trees/layer_tree_host.h"
@@ -70,14 +72,14 @@
 
 void LatencyInfoSwapPromiseMonitor::OnForwardScrollUpdateToMainThreadOnImpl() {
   if (AddForwardingScrollUpdateToMainComponent(latency_)) {
-    int64 new_sequence_number = 0;
+    int64_t new_sequence_number = 0;
     for (ui::LatencyInfo::LatencyMap::const_iterator it =
              latency_->latency_components().begin();
          it != latency_->latency_components().end(); ++it) {
       if (it->first.first == ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT) {
         new_sequence_number =
-            ((static_cast<int64>(base::PlatformThread::CurrentId()) << 32) ^
-             (reinterpret_cast<uint64>(this) << 32)) |
+            ((static_cast<int64_t>(base::PlatformThread::CurrentId()) << 32) ^
+             (reinterpret_cast<uint64_t>(this) << 32)) |
             (it->second.sequence_number & 0xffffffff);
         if (new_sequence_number == it->second.sequence_number)
           return;
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 2ef633b..7074093 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -4,6 +4,9 @@
 
 #include "cc/trees/layer_tree_host.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <algorithm>
 #include <stack>
 #include <string>
diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h
index e7e3318f..f7bd43368 100644
--- a/cc/trees/layer_tree_host.h
+++ b/cc/trees/layer_tree_host.h
@@ -5,14 +5,17 @@
 #ifndef CC_TREES_LAYER_TREE_HOST_H_
 #define CC_TREES_LAYER_TREE_HOST_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <limits>
 #include <set>
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/cancelable_callback.h"
 #include "base/containers/hash_tables.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/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc
index ff6ba40..c1e3d10 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -4,6 +4,8 @@
 
 #include "cc/trees/layer_tree_host_common.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 
 #include "base/trace_event/trace_event.h"
diff --git a/cc/trees/layer_tree_host_common.h b/cc/trees/layer_tree_host_common.h
index 6ebd86a..df74721 100644
--- a/cc/trees/layer_tree_host_common.h
+++ b/cc/trees/layer_tree_host_common.h
@@ -5,6 +5,8 @@
 #ifndef CC_TREES_LAYER_TREE_HOST_COMMON_H_
 #define CC_TREES_LAYER_TREE_HOST_COMMON_H_
 
+#include <stddef.h>
+
 #include <limits>
 #include <vector>
 
diff --git a/cc/trees/layer_tree_host_common_perftest.cc b/cc/trees/layer_tree_host_common_perftest.cc
index 9bb4550..3cf35fb 100644
--- a/cc/trees/layer_tree_host_common_perftest.cc
+++ b/cc/trees/layer_tree_host_common_perftest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/trees/layer_tree_host_common.h"
 
+#include <stddef.h>
+
 #include <deque>
 #include <sstream>
 
diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc
index c4e46ed8..bbe4ec5 100644
--- a/cc/trees/layer_tree_host_common_unittest.cc
+++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/trees/layer_tree_host_common.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 #include <set>
 #include <vector>
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 14c167e..203670f 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -4,13 +4,15 @@
 
 #include "cc/trees/layer_tree_host_impl.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <algorithm>
 #include <limits>
 #include <map>
 #include <set>
 
 #include "base/auto_reset.h"
-#include "base/basictypes.h"
 #include "base/containers/hash_tables.h"
 #include "base/containers/small_map.h"
 #include "base/json/json_writer.h"
@@ -823,7 +825,7 @@
   TRACE_EVENT_BEGIN2(
       "cc", "LayerTreeHostImpl::CalculateRenderPasses",
       "render_surface_layer_list.size()",
-      static_cast<uint64>(frame->render_surface_layer_list->size()),
+      static_cast<uint64_t>(frame->render_surface_layer_list->size()),
       "RequiresHighResToDraw", RequiresHighResToDraw());
 
   // Create the render passes in dependency order.
@@ -885,8 +887,8 @@
 
   int num_missing_tiles = 0;
   int num_incomplete_tiles = 0;
-  int64 checkerboarded_no_recording_content_area = 0;
-  int64 checkerboarded_needs_raster_content_area = 0;
+  int64_t checkerboarded_no_recording_content_area = 0;
+  int64_t checkerboarded_needs_raster_content_area = 0;
   bool have_copy_request = false;
   bool have_missing_animated_tiles = false;
 
@@ -1269,7 +1271,7 @@
     global_tile_state_.hard_memory_limit_in_bytes =
         policy.bytes_limit_when_visible;
     global_tile_state_.soft_memory_limit_in_bytes =
-        (static_cast<int64>(global_tile_state_.hard_memory_limit_in_bytes) *
+        (static_cast<int64_t>(global_tile_state_.hard_memory_limit_in_bytes) *
          settings_.max_memory_for_prepaint_percentage) /
         100;
   }
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index 7f2cc34..f7391beb 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -5,12 +5,14 @@
 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_
 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_
 
+#include <stddef.h>
+
 #include <set>
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/containers/hash_tables.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
 #include "cc/animation/animation_events.h"
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index 066302b..78be80f 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/trees/layer_tree_host_impl.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 #include <cmath>
 #include <utility>
diff --git a/cc/trees/layer_tree_host_perftest.cc b/cc/trees/layer_tree_host_perftest.cc
index 3acd9a5..9f3f3ac 100644
--- a/cc/trees/layer_tree_host_perftest.cc
+++ b/cc/trees/layer_tree_host_perftest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/trees/layer_tree_host.h"
 
+#include <stdint.h>
+
 #include <sstream>
 
 #include "base/files/file_path.h"
@@ -291,7 +293,7 @@
     std::ostringstream name_stream;
     name_stream << "name" << next_sync_point_;
     gpu_mailbox.SetName(
-        reinterpret_cast<const int8*>(name_stream.str().c_str()));
+        reinterpret_cast<const int8_t*>(name_stream.str().c_str()));
     scoped_ptr<SingleReleaseCallback> callback = SingleReleaseCallback::Create(
         base::Bind(&EmptyReleaseCallback));
     TextureMailbox mailbox(gpu_mailbox, gpu::SyncToken(next_sync_point_),
diff --git a/cc/trees/layer_tree_host_pixeltest_blending.cc b/cc/trees/layer_tree_host_pixeltest_blending.cc
index 29ab0d0..980d692 100644
--- a/cc/trees/layer_tree_host_pixeltest_blending.cc
+++ b/cc/trees/layer_tree_host_pixeltest_blending.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 "cc/layers/picture_image_layer.h"
 #include "cc/layers/solid_color_layer.h"
 #include "cc/test/layer_tree_pixel_resource_test.h"
@@ -50,11 +52,11 @@
 const int kBlendModesCount = arraysize(kBlendModes);
 const int kCSSTestColorsCount = arraysize(kCSSTestColors);
 
-using RenderPassOptions = uint32;
-const uint32 kUseMasks = 1 << 0;
-const uint32 kUseAntialiasing = 1 << 1;
-const uint32 kUseColorMatrix = 1 << 2;
-const uint32 kForceShaders = 1 << 3;
+using RenderPassOptions = uint32_t;
+const uint32_t kUseMasks = 1 << 0;
+const uint32_t kUseAntialiasing = 1 << 1;
+const uint32_t kUseColorMatrix = 1 << 2;
+const uint32_t kForceShaders = 1 << 3;
 
 class LayerTreeHostBlendingPixelTest : public LayerTreeHostPixelResourceTest {
  public:
diff --git a/cc/trees/layer_tree_host_pixeltest_filters.cc b/cc/trees/layer_tree_host_pixeltest_filters.cc
index 33a7683..971fc37 100644
--- a/cc/trees/layer_tree_host_pixeltest_filters.cc
+++ b/cc/trees/layer_tree_host_pixeltest_filters.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 "build/build_config.h"
 #include "cc/layers/solid_color_layer.h"
 #include "cc/test/layer_tree_pixel_test.h"
diff --git a/cc/trees/layer_tree_host_pixeltest_masks.cc b/cc/trees/layer_tree_host_pixeltest_masks.cc
index f913d51..a79186d 100644
--- a/cc/trees/layer_tree_host_pixeltest_masks.cc
+++ b/cc/trees/layer_tree_host_pixeltest_masks.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 "build/build_config.h"
 #include "cc/layers/content_layer_client.h"
 #include "cc/layers/picture_image_layer.h"
diff --git a/cc/trees/layer_tree_host_pixeltest_tiles.cc b/cc/trees/layer_tree_host_pixeltest_tiles.cc
index 51457be..fa31599 100644
--- a/cc/trees/layer_tree_host_pixeltest_tiles.cc
+++ b/cc/trees/layer_tree_host_pixeltest_tiles.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 "cc/layers/content_layer_client.h"
 #include "cc/layers/picture_layer.h"
 #include "cc/output/copy_output_request.h"
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index de59950..6974c92 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -4,6 +4,9 @@
 
 #include "cc/trees/layer_tree_host.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <algorithm>
 
 #include "base/auto_reset.h"
@@ -4095,7 +4098,7 @@
     result_->reason = reason;
   }
 
-  int64 TraceId() const override { return 0; }
+  int64_t TraceId() const override { return 0; }
 
  private:
   // Not owned.
diff --git a/cc/trees/layer_tree_host_unittest_animation.cc b/cc/trees/layer_tree_host_unittest_animation.cc
index b6d8505..624aa68 100644
--- a/cc/trees/layer_tree_host_unittest_animation.cc
+++ b/cc/trees/layer_tree_host_unittest_animation.cc
@@ -4,6 +4,8 @@
 
 #include "cc/trees/layer_tree_host.h"
 
+#include <stdint.h>
+
 #include "cc/animation/animation_curve.h"
 #include "cc/animation/layer_animation_controller.h"
 #include "cc/animation/scroll_offset_animation_curve.h"
@@ -1302,8 +1304,8 @@
                               Animation::TargetProperty target_property,
                               int group) override {
     called_animation_started_ = true;
-    layer_tree_host()->AnimateLayers(
-        base::TimeTicks::FromInternalValue(std::numeric_limits<int64>::max()));
+    layer_tree_host()->AnimateLayers(base::TimeTicks::FromInternalValue(
+        std::numeric_limits<int64_t>::max()));
     PostSetNeedsCommitToMainThread();
   }
 
diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_host_unittest_context.cc
index 8c5dd8a..c7ce754 100644
--- a/cc/trees/layer_tree_host_unittest_context.cc
+++ b/cc/trees/layer_tree_host_unittest_context.cc
@@ -4,7 +4,9 @@
 
 #include "cc/trees/layer_tree_host.h"
 
-#include "base/basictypes.h"
+#include <stddef.h>
+#include <stdint.h>
+
 #include "cc/layers/delegated_frame_provider.h"
 #include "cc/layers/delegated_frame_resource_collection.h"
 #include "cc/layers/heads_up_display_layer.h"
diff --git a/cc/trees/layer_tree_host_unittest_copyrequest.cc b/cc/trees/layer_tree_host_unittest_copyrequest.cc
index 96b18da..97362f4 100644
--- a/cc/trees/layer_tree_host_unittest_copyrequest.cc
+++ b/cc/trees/layer_tree_host_unittest_copyrequest.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 "cc/layers/layer_iterator.h"
 #include "cc/output/copy_output_request.h"
 #include "cc/output/copy_output_result.h"
diff --git a/cc/trees/layer_tree_host_unittest_delegated.cc b/cc/trees/layer_tree_host_unittest_delegated.cc
index 897f225..b0ddf86 100644
--- a/cc/trees/layer_tree_host_unittest_delegated.cc
+++ b/cc/trees/layer_tree_host_unittest_delegated.cc
@@ -4,6 +4,8 @@
 
 #include "cc/trees/layer_tree_host.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 
 #include "base/bind.h"
diff --git a/cc/trees/layer_tree_host_unittest_proxy.cc b/cc/trees/layer_tree_host_unittest_proxy.cc
index e00b085..4136221 100644
--- a/cc/trees/layer_tree_host_unittest_proxy.cc
+++ b/cc/trees/layer_tree_host_unittest_proxy.cc
@@ -2,8 +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 "base/compiler_specific.h"
+#include "base/macros.h"
 #include "cc/test/fake_content_layer_client.h"
 #include "cc/test/fake_picture_layer.h"
 #include "cc/test/layer_tree_test.h"
diff --git a/cc/trees/layer_tree_host_unittest_video.cc b/cc/trees/layer_tree_host_unittest_video.cc
index 9488cad..c1c3cb4 100644
--- a/cc/trees/layer_tree_host_unittest_video.cc
+++ b/cc/trees/layer_tree_host_unittest_video.cc
@@ -4,7 +4,6 @@
 
 #include "cc/trees/layer_tree_host.h"
 
-#include "base/basictypes.h"
 #include "cc/layers/render_surface_impl.h"
 #include "cc/layers/video_layer.h"
 #include "cc/layers/video_layer_impl.h"
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 93e8145..3519f29 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -4,6 +4,9 @@
 
 #include "cc/trees/layer_tree_impl.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <algorithm>
 #include <limits>
 #include <set>
diff --git a/cc/trees/layer_tree_impl.h b/cc/trees/layer_tree_impl.h
index a70351a..6d4ba26 100644
--- a/cc/trees/layer_tree_impl.h
+++ b/cc/trees/layer_tree_impl.h
@@ -5,12 +5,16 @@
 #ifndef CC_TREES_LAYER_TREE_IMPL_H_
 #define CC_TREES_LAYER_TREE_IMPL_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <map>
 #include <set>
 #include <string>
 #include <vector>
 
 #include "base/containers/hash_tables.h"
+#include "base/macros.h"
 #include "base/values.h"
 #include "cc/base/synced_property.h"
 #include "cc/input/layer_selection_bound.h"
diff --git a/cc/trees/layer_tree_settings.cc b/cc/trees/layer_tree_settings.cc
index 7c27273..0eb1849 100644
--- a/cc/trees/layer_tree_settings.cc
+++ b/cc/trees/layer_tree_settings.cc
@@ -5,6 +5,7 @@
 #include "cc/trees/layer_tree_settings.h"
 
 #include <GLES2/gl2.h>
+#include <stddef.h>
 #include <limits>
 
 #include "base/command_line.h"
diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h
index 0939ba0..b5e983b 100644
--- a/cc/trees/layer_tree_settings.h
+++ b/cc/trees/layer_tree_settings.h
@@ -5,9 +5,10 @@
 #ifndef CC_TREES_LAYER_TREE_SETTINGS_H_
 #define CC_TREES_LAYER_TREE_SETTINGS_H_
 
+#include <stddef.h>
+
 #include <vector>
 
-#include "base/basictypes.h"
 #include "cc/base/cc_export.h"
 #include "cc/debug/layer_tree_debug_state.h"
 #include "cc/output/managed_memory_policy.h"
diff --git a/cc/trees/occlusion.h b/cc/trees/occlusion.h
index fec4915..7e856aa 100644
--- a/cc/trees/occlusion.h
+++ b/cc/trees/occlusion.h
@@ -7,7 +7,6 @@
 
 #include <string>
 
-#include "base/basictypes.h"
 #include "cc/base/cc_export.h"
 #include "cc/base/simple_enclosed_region.h"
 #include "ui/gfx/geometry/rect.h"
diff --git a/cc/trees/occlusion_tracker.cc b/cc/trees/occlusion_tracker.cc
index 38015a4..250ac4d 100644
--- a/cc/trees/occlusion_tracker.cc
+++ b/cc/trees/occlusion_tracker.cc
@@ -4,6 +4,8 @@
 
 #include "cc/trees/occlusion_tracker.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 
 #include "cc/base/math_util.h"
diff --git a/cc/trees/occlusion_tracker.h b/cc/trees/occlusion_tracker.h
index 9a9294c..847de7b 100644
--- a/cc/trees/occlusion_tracker.h
+++ b/cc/trees/occlusion_tracker.h
@@ -7,7 +7,7 @@
 
 #include <vector>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "cc/base/cc_export.h"
 #include "cc/base/simple_enclosed_region.h"
 #include "cc/layers/layer_iterator.h"
diff --git a/cc/trees/occlusion_tracker_perftest.cc b/cc/trees/occlusion_tracker_perftest.cc
index 3ae39e6..ccaa75a 100644
--- a/cc/trees/occlusion_tracker_perftest.cc
+++ b/cc/trees/occlusion_tracker_perftest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/trees/occlusion_tracker.h"
 
+#include <stddef.h>
+
 #include "base/thread_task_runner_handle.h"
 #include "base/time/time.h"
 #include "cc/debug/lap_timer.h"
diff --git a/cc/trees/occlusion_tracker_unittest.cc b/cc/trees/occlusion_tracker_unittest.cc
index 5c658c3..5bfd312 100644
--- a/cc/trees/occlusion_tracker_unittest.cc
+++ b/cc/trees/occlusion_tracker_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/trees/occlusion_tracker.h"
 
+#include <stddef.h>
+
 #include "cc/animation/layer_animation_controller.h"
 #include "cc/base/math_util.h"
 #include "cc/layers/layer.h"
diff --git a/cc/trees/occlusion_unittest.cc b/cc/trees/occlusion_unittest.cc
index becc7a3..da2f6fd 100644
--- a/cc/trees/occlusion_unittest.cc
+++ b/cc/trees/occlusion_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/trees/occlusion.h"
 
+#include <stddef.h>
+
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace cc {
diff --git a/cc/trees/property_tree.cc b/cc/trees/property_tree.cc
index 9c0e616..1120d30 100644
--- a/cc/trees/property_tree.cc
+++ b/cc/trees/property_tree.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
+
 #include <set>
 #include <vector>
 
diff --git a/cc/trees/property_tree.h b/cc/trees/property_tree.h
index 5afbcac48..ff5c8a5a 100644
--- a/cc/trees/property_tree.h
+++ b/cc/trees/property_tree.h
@@ -5,9 +5,10 @@
 #ifndef CC_TREES_PROPERTY_TREE_H_
 #define CC_TREES_PROPERTY_TREE_H_
 
+#include <stddef.h>
+
 #include <vector>
 
-#include "base/basictypes.h"
 #include "cc/base/cc_export.h"
 #include "ui/gfx/geometry/rect_f.h"
 #include "ui/gfx/geometry/scroll_offset.h"
diff --git a/cc/trees/property_tree_builder.cc b/cc/trees/property_tree_builder.cc
index 7c59807..3a41a56 100644
--- a/cc/trees/property_tree_builder.cc
+++ b/cc/trees/property_tree_builder.cc
@@ -4,6 +4,8 @@
 
 #include "cc/trees/property_tree_builder.h"
 
+#include <stddef.h>
+
 #include <map>
 #include <set>
 
diff --git a/cc/trees/proxy.h b/cc/trees/proxy.h
index 5798fa8..f4d7bec 100644
--- a/cc/trees/proxy.h
+++ b/cc/trees/proxy.h
@@ -7,7 +7,6 @@
 
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/logging.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
diff --git a/cc/trees/proxy_common.h b/cc/trees/proxy_common.h
index 5fce5e4..a9e991c 100644
--- a/cc/trees/proxy_common.h
+++ b/cc/trees/proxy_common.h
@@ -5,6 +5,8 @@
 #ifndef CC_TREES_PROXY_COMMON_H_
 #define CC_TREES_PROXY_COMMON_H_
 
+#include <stddef.h>
+
 #include "cc/base/cc_export.h"
 #include "cc/output/begin_frame_args.h"
 #include "cc/trees/layer_tree_host_common.h"
diff --git a/cc/trees/scoped_abort_remaining_swap_promises.h b/cc/trees/scoped_abort_remaining_swap_promises.h
index e35fbf9..1d46ec4 100644
--- a/cc/trees/scoped_abort_remaining_swap_promises.h
+++ b/cc/trees/scoped_abort_remaining_swap_promises.h
@@ -5,6 +5,7 @@
 #ifndef CC_TREES_SCOPED_ABORT_REMAINING_SWAP_PROMISES_H_
 #define CC_TREES_SCOPED_ABORT_REMAINING_SWAP_PROMISES_H_
 
+#include "base/macros.h"
 #include "cc/output/swap_promise.h"
 #include "cc/trees/layer_tree_host.h"
 
diff --git a/cc/trees/single_thread_proxy.h b/cc/trees/single_thread_proxy.h
index e7bcd6d..ec82b70 100644
--- a/cc/trees/single_thread_proxy.h
+++ b/cc/trees/single_thread_proxy.h
@@ -8,6 +8,7 @@
 #include <limits>
 
 #include "base/cancelable_callback.h"
+#include "base/macros.h"
 #include "base/time/time.h"
 #include "cc/animation/animation_events.h"
 #include "cc/output/begin_frame_args.h"
diff --git a/cc/trees/task_runner_provider.h b/cc/trees/task_runner_provider.h
index 38ca31f..cab850e 100644
--- a/cc/trees/task_runner_provider.h
+++ b/cc/trees/task_runner_provider.h
@@ -7,8 +7,8 @@
 
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/single_thread_task_runner.h"
diff --git a/cc/trees/threaded_channel.h b/cc/trees/threaded_channel.h
index 5d10f4a..71d2c54 100644
--- a/cc/trees/threaded_channel.h
+++ b/cc/trees/threaded_channel.h
@@ -5,6 +5,7 @@
 #ifndef CC_TREES_THREADED_CHANNEL_H_
 #define CC_TREES_THREADED_CHANNEL_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/cc/trees/threaded_channel_unittest.cc b/cc/trees/threaded_channel_unittest.cc
index 17350d8..359a7f9 100644
--- a/cc/trees/threaded_channel_unittest.cc
+++ b/cc/trees/threaded_channel_unittest.cc
@@ -4,6 +4,7 @@
 
 #include "cc/trees/threaded_channel.h"
 
+#include "base/macros.h"
 #include "cc/test/layer_tree_test.h"
 #include "cc/trees/single_thread_proxy.h"
 #include "testing/gtest/include/gtest/gtest.h"
diff --git a/cc/trees/tree_synchronizer.cc b/cc/trees/tree_synchronizer.cc
index 9935147..72b6daa 100644
--- a/cc/trees/tree_synchronizer.cc
+++ b/cc/trees/tree_synchronizer.cc
@@ -4,6 +4,8 @@
 
 #include "cc/trees/tree_synchronizer.h"
 
+#include <stddef.h>
+
 #include <set>
 
 #include "base/containers/hash_tables.h"
diff --git a/cc/trees/tree_synchronizer.h b/cc/trees/tree_synchronizer.h
index ef13b1d..a580362 100644
--- a/cc/trees/tree_synchronizer.h
+++ b/cc/trees/tree_synchronizer.h
@@ -5,7 +5,7 @@
 #ifndef CC_TREES_TREE_SYNCHRONIZER_H_
 #define CC_TREES_TREE_SYNCHRONIZER_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "cc/base/cc_export.h"
 
diff --git a/cc/trees/tree_synchronizer_unittest.cc b/cc/trees/tree_synchronizer_unittest.cc
index 8782d5d..a288da3 100644
--- a/cc/trees/tree_synchronizer_unittest.cc
+++ b/cc/trees/tree_synchronizer_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "cc/trees/tree_synchronizer.h"
 
+#include <stddef.h>
+
 #include <algorithm>
 #include <set>
 #include <vector>
diff --git a/chrome/VERSION b/chrome/VERSION
index 6a97c19..f0192b4 100644
--- a/chrome/VERSION
+++ b/chrome/VERSION
@@ -1,4 +1,4 @@
 MAJOR=49
 MINOR=0
-BUILD=2598
+BUILD=2599
 PATCH=0
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkFolderSelectActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkFolderSelectActivity.java
index c3375b6..a68d4c84 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkFolderSelectActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkFolderSelectActivity.java
@@ -206,6 +206,7 @@
             EnhancedBookmarkAddEditFolderActivity.startAddFolderActivity(this, mBookmarksToMove);
         } else if (entry.mType == FolderListEntry.TYPE_NORMAL) {
             mEnhancedBookmarksModel.moveBookmarks(mBookmarksToMove, entry.mId);
+            EnhancedBookmarkUtils.setLastUsedParent(this, entry.mId);
             finish();
         }
     }
@@ -218,6 +219,7 @@
             BookmarkId createdBookmark = BookmarkId.getBookmarkIdFromString(data.getStringExtra(
                     EnhancedBookmarkAddEditFolderActivity.INTENT_CREATED_BOOKMARK));
             mEnhancedBookmarksModel.moveBookmarks(mBookmarksToMove, createdBookmark);
+            EnhancedBookmarkUtils.setLastUsedParent(this, createdBookmark);
             finish();
         }
     }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkUtils.java
index b7f9769..2214561 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkUtils.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/enhancedbookmarks/EnhancedBookmarkUtils.java
@@ -7,7 +7,7 @@
 import android.app.Activity;
 import android.content.Context;
 import android.content.Intent;
-import android.graphics.Bitmap;
+import android.content.SharedPreferences;
 import android.net.Uri;
 import android.os.AsyncTask;
 import android.preference.PreferenceManager;
@@ -25,7 +25,6 @@
 import org.chromium.chrome.browser.bookmark.BookmarksBridge;
 import org.chromium.chrome.browser.document.ChromeLauncherActivity;
 import org.chromium.chrome.browser.enhancedbookmarks.EnhancedBookmarksModel.AddBookmarkCallback;
-import org.chromium.chrome.browser.favicon.FaviconHelper;
 import org.chromium.chrome.browser.ntp.NewTabPageUma;
 import org.chromium.chrome.browser.offlinepages.OfflinePageBridge;
 import org.chromium.chrome.browser.offlinepages.OfflinePageFreeUpSpaceCallback;
@@ -48,6 +47,7 @@
  */
 public class EnhancedBookmarkUtils {
     private static final String PREF_LAST_USED_URL = "enhanced_bookmark_last_used_url";
+    private static final String PREF_LAST_USED_PARENT = "enhanced_bookmark_last_used_parent_folder";
 
     /**
      * @return True if enhanced bookmark feature is enabled.
@@ -73,7 +73,7 @@
             return;
         }
 
-        BookmarkId parent = bookmarkModel.getDefaultFolder();
+        BookmarkId parent = getLastUsedParent(activity, bookmarkModel);
         bookmarkModel.addBookmarkAsync(parent, bookmarkModel.getChildCount(parent), tab.getTitle(),
                 tab.getUrl(), tab.getWebContents(), tab.isShowingErrorPage(),
                 createAddBookmarkCallback(bookmarkModel, snackbarManager, activity));
@@ -104,42 +104,45 @@
     private static void showSnackbarForAddingBookmark(final EnhancedBookmarksModel bookmarkModel,
             final SnackbarManager snackbarManager, final Activity activity,
             final BookmarkId bookmarkId, final int saveResult, boolean isStorageAlmostFull) {
-        SnackbarController snackbarController = null;
-        int messageId;
-        int buttonId = 0;
-
+        Snackbar snackbar;
         OfflinePageBridge offlinePageBridge = bookmarkModel.getOfflinePageBridge();
         if (offlinePageBridge == null) {
-            messageId = R.string.enhanced_bookmark_page_saved;
-        } else if (saveResult == AddBookmarkCallback.SKIPPED) {
-            messageId = R.string.offline_pages_page_skipped;
-        } else if (isStorageAlmostFull) {
-            messageId = saveResult == AddBookmarkCallback.SAVED
-                    ? R.string.offline_pages_page_saved_storage_near_full
-                    : R.string.offline_pages_page_failed_to_save_storage_near_full;
-            // Show "Free up space" button.
-            buttonId = R.string.offline_pages_free_up_space_title;
-            snackbarController = createSnackbarControllerForFreeUpSpaceButton(
-                    bookmarkModel, snackbarManager, activity);
-        } else {
-            messageId = saveResult == AddBookmarkCallback.SAVED
-                    ? R.string.offline_pages_page_saved
-                    : R.string.offline_pages_page_failed_to_save;
-        }
-
-        // Show "Edit" button when "Free up space" button is not desired, regardless
-        // whether the offline page was saved successfuly, because a bookmark was
-        // created and user might want to edit title.
-        if (buttonId == 0) {
-            buttonId = R.string.enhanced_bookmark_item_edit;
-            snackbarController = createSnackbarControllerForEditButton(
+            String folderName = bookmarkModel
+                    .getBookmarkTitle(bookmarkModel.getBookmarkById(bookmarkId).getParentId());
+            SnackbarController snackbarController = createSnackbarControllerForEditButton(
                     bookmarkModel, activity, bookmarkId);
+            snackbar = Snackbar.make(folderName, snackbarController)
+                    .setTemplateText(activity.getString(R.string.enhanced_bookmark_page_saved))
+                    .setAction(activity.getString(R.string.enhanced_bookmark_item_edit), null);
+        } else {
+            SnackbarController snackbarController = null;
+            int messageId;
+            int buttonId = R.string.enhanced_bookmark_item_edit;
+
+            if (saveResult == AddBookmarkCallback.SKIPPED) {
+                messageId = R.string.offline_pages_page_skipped;
+            } else if (isStorageAlmostFull) {
+                messageId = saveResult == AddBookmarkCallback.SAVED
+                        ? R.string.offline_pages_page_saved_storage_near_full
+                        : R.string.offline_pages_page_failed_to_save_storage_near_full;
+                // Show "Free up space" button.
+                buttonId = R.string.offline_pages_free_up_space_title;
+                snackbarController = createSnackbarControllerForFreeUpSpaceButton(
+                        bookmarkModel, snackbarManager, activity);
+            } else {
+                messageId = saveResult == AddBookmarkCallback.SAVED
+                        ? R.string.offline_pages_page_saved
+                        : R.string.offline_pages_page_failed_to_save;
+            }
+            if (snackbarController == null) {
+                snackbarController = createSnackbarControllerForEditButton(
+                        bookmarkModel, activity, bookmarkId);
+            }
+            snackbar = Snackbar.make(activity.getString(messageId), snackbarController)
+                    .setAction(activity.getString(buttonId), null).setSingleLine(false);
         }
 
-        snackbarManager.showSnackbar(
-                Snackbar.make(activity.getString(messageId), snackbarController)
-                        .setAction(activity.getString(buttonId), null)
-                        .setSingleLine(false));
+        snackbarManager.showSnackbar(snackbar);
     }
 
     private static AddBookmarkCallback createAddBookmarkCallback(
@@ -195,7 +198,6 @@
             @Override
             public void onAction(Object actionData) {
                 RecordUserAction.record("EnhancedBookmarks.EditAfterCreateButtonClicked");
-                // Show edit activity with the name of parent folder highlighted.
                 startEditActivity(activity, bookmarkId, null);
                 bookmarkModel.destroy();
             }
@@ -322,6 +324,31 @@
     }
 
     /**
+     * Save the last used {@link BookmarkId} as a folder to put new bookmarks to.
+     */
+    static void setLastUsedParent(Context context, BookmarkId bookmarkId) {
+        PreferenceManager.getDefaultSharedPreferences(context).edit()
+                .putString(PREF_LAST_USED_PARENT, bookmarkId.toString()).apply();
+    }
+
+    /**
+     * @return The parent {@link BookmarkId} that the user used the last time,
+     *         or the default folder if no previous user action has been recorded.
+     */
+    static BookmarkId getLastUsedParent(Context context, EnhancedBookmarksModel model) {
+        BookmarkId parentId = null;
+        SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
+        if (preferences.contains(PREF_LAST_USED_PARENT)) {
+            parentId = BookmarkId
+                    .getBookmarkIdFromString(preferences.getString(PREF_LAST_USED_PARENT, null));
+        }
+        if (parentId == null || !model.doesBookmarkExist(parentId)) {
+            parentId = model.getDefaultFolder();
+        }
+        return parentId;
+    }
+
+    /**
      * Starts an {@link EnhancedBookmarkEditActivity} for the given {@link BookmarkId}.
      */
     public static void startEditActivity(
@@ -380,21 +407,6 @@
     }
 
     /**
-     * Get dominant color from bitmap. This function uses favicon helper to fulfil its task.
-     * @param bitmap The bitmap to extract color from.
-     * @return The dominant color in ARGB format.
-     */
-    public static int getDominantColorForBitmap(Bitmap bitmap) {
-        int mDominantColor = FaviconHelper.getDominantColorForBitmap(bitmap);
-        // FaviconHelper returns color in ABGR format, do a manual conversion here.
-        int red = (mDominantColor & 0xff) << 16;
-        int green = mDominantColor & 0xff00;
-        int blue = (mDominantColor & 0xff0000) >> 16;
-        int alpha = mDominantColor & 0xff000000;
-        return alpha + red + green + blue;
-    }
-
-    /**
      * Updates the title of chrome shown in recent tasks. It only takes effect in document mode.
      */
     public static void setTaskDescriptionInDocumentMode(Activity activity, String description) {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/snackbar/Snackbar.java b/chrome/android/java/src/org/chromium/chrome/browser/snackbar/Snackbar.java
index 69f0285..21908ae5 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/snackbar/Snackbar.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/snackbar/Snackbar.java
@@ -57,7 +57,7 @@
     /**
      * Sets the action button to show on the snackbar.
      * @param actionText The text to show on the button. If null, the button will not be shown.
-     * @param actionData An object to be passed to {@linkSnackbarController#onAction} or
+     * @param actionData An object to be passed to {@link SnackbarController#onAction} or
      *        {@link SnackbarController#onDismissNoAction} when the button is pressed or the
      *        snackbar is dismissed.
      */
@@ -68,9 +68,9 @@
     }
 
     /**
-     * Sets the identity profileImage (profile image) which should be displayed in the snackbar.
-     * If null, snackbar will have no profileImage. Ability to have an icon is specific to the
-     * identity snackbars and should be used only there.
+     * Sets the identity profile image that will be displayed at the beginning of the snackbar.
+     * If null, there won't be a profile image. The ability to have an icon is exclusive to
+     * identity snackbars.
      */
     public Snackbar setProfileImage(Bitmap profileImage) {
         mProfileImage = profileImage;
diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd
index b0c45d8..4e21f20 100644
--- a/chrome/android/java/strings/android_chrome_strings.grd
+++ b/chrome/android/java/strings/android_chrome_strings.grd
@@ -1845,7 +1845,7 @@
         Sign in
       </message>
       <message name="IDS_ENHANCED_BOOKMARK_PAGE_SAVED" desc="Message shown after user adds a new bookmark. [CHAR-LIMIT=32]">
-        Bookmarked
+        Bookmarked to <ph name="FOLDER_NAME">%1$s<ex>Mobile bookmarks</ex></ph>
       </message>
       <message name="IDS_ENHANCED_BOOKMARK_DRAWER_ALL_ITEMS" desc="Menu item for showing all bookmark items in the enhanced bookmarks UI [CHAR-LIMIT=24]">
         All bookmarks
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index df3b5c9c..80fb43b 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -12927,9 +12927,12 @@
         <message name="IDS_PROFILES_CREATE_SIGN_IN_ERROR" desc="Message shown when a sign-in error occurs during creation of a new supervised user.">
           Oops! The new supervised user couldn't be created. Please make sure you're signed in properly and try again.
         </message>
-        <message name="IDS_PROFILES_CREATE_EXISTING_LEGACY_SUPERVISED_USER_ERROR" desc="Message shown when the user enters the name of a supervised user that can be imported.">
+        <message name="IDS_PROFILES_CREATE_LEGACY_SUPERVISED_USER_ERROR_EXISTS_REMOTELY" desc="Message shown when the user enters the name of a supervised user that can be imported.">
           Looks like you're already managing a user by that name.<ph name="LINE_BREAK">&lt;br/&gt;</ph>Did you want to <ph name="BEGIN_LINK">&lt;a is="action-link" id="supervised-user-import-existing"&gt;</ph>import <ph name="PROFILE_NAME">$1<ex>John</ex></ph> to this device<ph name="END_LINK">&lt;/a&gt;</ph>?
         </message>
+        <message name="IDS_PROFILES_CREATE_LEGACY_SUPERVISED_USER_ERROR_EXISTS_LOCALLY" desc="Message shown when the user enters the name of a supervised user that we already have locally.">
+          Looks like you already have a supervised user with this name.
+        </message>
         <message name="IDS_PROFILES_CREATE_SUPERVISED_SIGNED_IN_LABEL" desc="Label for the 'Supervised user' checkbox in the create-profile dialog when the current user is signed in.">
           Control and view the websites this person visits from <ph name="CUSTODIAN_EMAIL">$1<ex>user@gmail.com</ex></ph>.
         </message>
diff --git a/chrome/browser/apps/guest_view/web_view_browsertest.cc b/chrome/browser/apps/guest_view/web_view_browsertest.cc
index 1d745f4..e12d457 100644
--- a/chrome/browser/apps/guest_view/web_view_browsertest.cc
+++ b/chrome/browser/apps/guest_view/web_view_browsertest.cc
@@ -413,8 +413,7 @@
                           base::CompareCase::SENSITIVE))
       return scoped_ptr<net::test_server::HttpResponse>();
 
-    std::map<std::string, std::string>::const_iterator it =
-          request.headers.find("User-Agent");
+    auto it = request.headers.find("User-Agent");
     EXPECT_TRUE(it != request.headers.end());
     if (!base::StartsWith("foobar", it->second,
                           base::CompareCase::SENSITIVE))
diff --git a/chrome/browser/extensions/extension_apitest.cc b/chrome/browser/extensions/extension_apitest.cc
index 8590545..fb198c7 100644
--- a/chrome/browser/extensions/extension_apitest.cc
+++ b/chrome/browser/extensions/extension_apitest.cc
@@ -68,8 +68,7 @@
       request.relative_url.substr(query_string_pos + 1);
 
   std::string header_value;
-  std::map<std::string, std::string>::const_iterator it = request.headers.find(
-      header_name);
+  auto it = request.headers.find(header_name);
   if (it != request.headers.end())
     header_value = it->second;
 
diff --git a/chrome/browser/extensions/isolated_app_browsertest.cc b/chrome/browser/extensions/isolated_app_browsertest.cc
index 255cda6..1408c0c 100644
--- a/chrome/browser/extensions/isolated_app_browsertest.cc
+++ b/chrome/browser/extensions/isolated_app_browsertest.cc
@@ -52,8 +52,7 @@
   http_response->set_code(net::HTTP_OK);
 
   std::string request_cookies;
-  std::map<std::string, std::string>::const_iterator it =
-      request.headers.find("Cookie");
+  auto it = request.headers.find("Cookie");
   if (it != request.headers.end())
     request_cookies = it->second;
 
diff --git a/chrome/browser/net/sdch_browsertest.cc b/chrome/browser/net/sdch_browsertest.cc
index 3180a19..b9c30e5 100644
--- a/chrome/browser/net/sdch_browsertest.cc
+++ b/chrome/browser/net/sdch_browsertest.cc
@@ -53,7 +53,7 @@
 namespace {
 
 typedef std::vector<net::test_server::HttpRequest> RequestVector;
-typedef std::map<std::string, std::string> HttpRequestHeaderMap;
+typedef net::test_server::HttpRequest::HeaderMap HttpRequestHeaderMap;
 
 // Credit Alfred, Lord Tennyson
 static const char kSampleData[] = "<html><body><pre>"
diff --git a/chrome/browser/resources/options/manage_profile_overlay.js b/chrome/browser/resources/options/manage_profile_overlay.js
index df9862b..4e9ae66 100644
--- a/chrome/browser/resources/options/manage_profile_overlay.js
+++ b/chrome/browser/resources/options/manage_profile_overlay.js
@@ -379,27 +379,37 @@
       var newName = $('create-profile-name').value;
       var i;
       for (i = 0; i < supervisedUsers.length; ++i) {
-        if (supervisedUsers[i].name == newName &&
-            !supervisedUsers[i].onCurrentDevice) {
-          var errorHtml = loadTimeData.getStringF(
-              'manageProfilesExistingSupervisedUser',
-              HTMLEscape(elide(newName, /* maxLength */ 50)));
-          this.showErrorBubble_(errorHtml, 'create', true);
-
-          // Check if another supervised user also exists with that name.
-          var nameIsUnique = true;
-          var j;
-          for (j = i + 1; j < supervisedUsers.length; ++j) {
-            if (supervisedUsers[j].name == newName) {
-              nameIsUnique = false;
-              break;
-            }
+        if (supervisedUsers[i].name != newName)
+          continue;
+        // Check if another supervised user also exists with that name.
+        var nameIsUnique = true;
+        // Handling the case when multiple supervised users with the same
+        // name exist, but not all of them are on the device.
+        // If at least one is not imported, we want to offer that
+        // option to the user. This could happen due to a bug that allowed
+        // creating SUs with the same name (https://crbug.com/557445).
+        var allOnCurrentDevice = supervisedUsers[i].onCurrentDevice;
+        var j;
+        for (j = i + 1; j < supervisedUsers.length; ++j) {
+          if (supervisedUsers[j].name == newName) {
+            nameIsUnique = false;
+            allOnCurrentDevice = allOnCurrentDevice &&
+               supervisedUsers[j].onCurrentDevice;
           }
-          $('supervised-user-import-existing').onclick =
-              this.getImportHandler_(supervisedUsers[i], nameIsUnique);
-          $('create-profile-ok').disabled = true;
-          return;
         }
+
+        var errorHtml = allOnCurrentDevice ?
+            loadTimeData.getStringF(
+                'managedProfilesExistingLocalSupervisedUser') :
+            loadTimeData.getStringF(
+                'manageProfilesExistingSupervisedUser',
+                HTMLEscape(elide(newName, /* maxLength */ 50)));
+        this.showErrorBubble_(errorHtml, 'create', true);
+
+        $('supervised-user-import-existing').onclick =
+            this.getImportHandler_(supervisedUsers[i], nameIsUnique);
+        $('create-profile-ok').disabled = true;
+        return;
       }
     },
 
diff --git a/chrome/browser/ui/webui/options/manage_profile_browsertest.js b/chrome/browser/ui/webui/options/manage_profile_browsertest.js
index c587573..d4144e0 100644
--- a/chrome/browser/ui/webui/options/manage_profile_browsertest.js
+++ b/chrome/browser/ui/webui/options/manage_profile_browsertest.js
@@ -202,7 +202,14 @@
     },
     {
       id: 'supervisedUser4',
-      name: 'SameName',
+      name: 'RepeatingName',
+      iconURL: 'chrome://path/to/icon/image',
+      onCurrentDevice: true,
+      needAvatar: false
+    },
+    {
+      id: 'supervisedUser5',
+      name: 'RepeatingName',
       iconURL: 'chrome://path/to/icon/image',
       onCurrentDevice: false,
       needAvatar: false
@@ -218,10 +225,10 @@
                CreateProfileOverlay.getInstance().signedInEmail_);
   this.setProfileSupervised_(false, 'create');
 
-  // Also add the names 'Test' and 'SameName' to |existingProfileNames_| to
+  // Also add the names 'Test' and 'RepeatingName' to |existingProfileNames_| to
   // simulate that profiles with those names exist on the device.
   ManageProfileOverlay.getInstance().existingProfileNames_.Test = true;
-  ManageProfileOverlay.getInstance().existingProfileNames_.SameName = true;
+  ManageProfileOverlay.getInstance().existingProfileNames_.RepeatingName = true;
 
   // Initially, the ok button should be enabled and the import link should not
   // exist.
@@ -252,12 +259,13 @@
     ManageProfileOverlay.getInstance().onNameChanged_('create');
     return options.SupervisedUserListData.getInstance().promise_;
   }).then(function() {
-    assertFalse($('create-profile-ok').disabled);
+    assertTrue($('create-profile-ok').disabled);
     assertTrue($('supervised-user-import-existing') == null);
 
-    // A profile which does not exist on the device, but there is a profile with
-    // the same name already on the device.
-    nameField.value = 'SameName';
+    // A supervised user profile that is on the device, but has the same name
+    // as a supervised user profile that is not imported.
+    // This can happen due to a bug (https://crbug.com/557445)
+    nameField.value = 'RepeatingName';
     ManageProfileOverlay.getInstance().onNameChanged_('create');
     return options.SupervisedUserListData.getInstance().promise_;
   }).then(function() {
diff --git a/chrome/browser/ui/webui/options/manage_profile_handler.cc b/chrome/browser/ui/webui/options/manage_profile_handler.cc
index 43e5f87..f2aa14c 100644
--- a/chrome/browser/ui/webui/options/manage_profile_handler.cc
+++ b/chrome/browser/ui/webui/options/manage_profile_handler.cc
@@ -91,7 +91,9 @@
     { "manageProfilesNameLabel", IDS_PROFILES_MANAGE_NAME_LABEL },
     { "manageProfilesIconLabel", IDS_PROFILES_MANAGE_ICON_LABEL },
     { "manageProfilesExistingSupervisedUser",
-        IDS_PROFILES_CREATE_EXISTING_LEGACY_SUPERVISED_USER_ERROR },
+        IDS_PROFILES_CREATE_LEGACY_SUPERVISED_USER_ERROR_EXISTS_REMOTELY },
+    { "managedProfilesExistingLocalSupervisedUser",
+        IDS_PROFILES_CREATE_LEGACY_SUPERVISED_USER_ERROR_EXISTS_LOCALLY },
     { "manageProfilesSupervisedSignedInLabel",
         IDS_PROFILES_CREATE_SUPERVISED_SIGNED_IN_LABEL },
     { "manageProfilesSupervisedNotSignedIn",
diff --git a/chrome/renderer/safe_browsing/phishing_classifier_delegate_browsertest.cc b/chrome/renderer/safe_browsing/phishing_classifier_delegate_browsertest.cc
index ce70b2b..9f19508 100644
--- a/chrome/renderer/safe_browsing/phishing_classifier_delegate_browsertest.cc
+++ b/chrome/renderer/safe_browsing/phishing_classifier_delegate_browsertest.cc
@@ -192,8 +192,7 @@
 
   scoped_ptr<net::test_server::HttpResponse> HandleRequest(
       const net::test_server::HttpRequest& request) {
-    std::map<std::string, std::string>::const_iterator host_it =
-        request.headers.find("Host");
+    auto host_it = request.headers.find("Host");
     if (host_it == request.headers.end())
       return scoped_ptr<net::test_server::HttpResponse>();
 
diff --git a/chrome/renderer/safe_browsing/phishing_dom_feature_extractor_browsertest.cc b/chrome/renderer/safe_browsing/phishing_dom_feature_extractor_browsertest.cc
index 06414c3..ab32c03 100644
--- a/chrome/renderer/safe_browsing/phishing_dom_feature_extractor_browsertest.cc
+++ b/chrome/renderer/safe_browsing/phishing_dom_feature_extractor_browsertest.cc
@@ -136,8 +136,7 @@
 
   scoped_ptr<net::test_server::HttpResponse> HandleRequest(
       const net::test_server::HttpRequest& request) {
-    std::map<std::string, std::string>::const_iterator host_it =
-        request.headers.find("Host");
+    auto host_it = request.headers.find("Host");
     if (host_it == request.headers.end())
       return scoped_ptr<net::test_server::HttpResponse>();
 
diff --git a/chrome/test/data/extensions/platform_apps/web_view/shim/main.js b/chrome/test/data/extensions/platform_apps/web_view/shim/main.js
index 9cc1005..07697b6 100644
--- a/chrome/test/data/extensions/platform_apps/web_view/shim/main.js
+++ b/chrome/test/data/extensions/platform_apps/web_view/shim/main.js
@@ -1718,7 +1718,7 @@
   webview.request.onBeforeSendHeaders.addListener(function(details) {
     var headers = details.requestHeaders;
     for( var i = 0, l = headers.length; i < l; ++i ) {
-      if (headers[i].name == 'User-Agent') {
+      if (headers[i].name.toLowerCase() == 'user-agent') {
         headers[i].value = 'foobar';
         break;
       }
diff --git a/chrome/test/nacl/pnacl_header_test.cc b/chrome/test/nacl/pnacl_header_test.cc
index b7d32a0..a301a32 100644
--- a/chrome/test/nacl/pnacl_header_test.cc
+++ b/chrome/test/nacl/pnacl_header_test.cc
@@ -109,8 +109,7 @@
   // For pexe files, check for the special Accept header,
   // along with the expected ResourceType of the URL request.
   EXPECT_NE(0U, request.headers.count("Accept"));
-  std::map<std::string, std::string>::const_iterator it =
-      request.headers.find("Accept");
+  auto it = request.headers.find("Accept");
   EXPECT_NE(std::string::npos, it->second.find("application/x-pnacl"));
   EXPECT_NE(std::string::npos, it->second.find("*/*"));
   EXPECT_TRUE(test_delegate_.found_pnacl_header());
diff --git a/chromeos/accelerometer/accelerometer_reader.cc b/chromeos/accelerometer/accelerometer_reader.cc
index 4fad1de..38d683d 100644
--- a/chromeos/accelerometer/accelerometer_reader.cc
+++ b/chromeos/accelerometer/accelerometer_reader.cc
@@ -4,6 +4,9 @@
 
 #include "chromeos/accelerometer/accelerometer_reader.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
@@ -11,6 +14,7 @@
 #include "base/files/file_enumerator.h"
 #include "base/files/file_util.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/memory/singleton.h"
 #include "base/single_thread_task_runner.h"
 #include "base/strings/string_number_conversions.h"
@@ -444,7 +448,7 @@
     }
     for (AccelerometerSource source : reading_data.sources) {
       DCHECK(configuration_.has[source]);
-      int16* values = reinterpret_cast<int16*>(reading);
+      int16_t* values = reinterpret_cast<int16_t*>(reading);
       update_->Set(source, values[configuration_.index[source][0]] *
                                configuration_.scale[source][0],
                    values[configuration_.index[source][1]] *
diff --git a/chromeos/accelerometer/accelerometer_reader.h b/chromeos/accelerometer/accelerometer_reader.h
index 15732c4..5c3a881 100644
--- a/chromeos/accelerometer/accelerometer_reader.h
+++ b/chromeos/accelerometer/accelerometer_reader.h
@@ -5,6 +5,7 @@
 #ifndef CHROMEOS_ACCELEROMETER_ACCELEROMETER_READER_H_
 #define CHROMEOS_ACCELEROMETER_ACCELEROMETER_READER_H_
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/observer_list_threadsafe.h"
 #include "chromeos/accelerometer/accelerometer_types.h"
diff --git a/chromeos/app_mode/kiosk_oem_manifest_parser.h b/chromeos/app_mode/kiosk_oem_manifest_parser.h
index 05b7e0a..92998c6 100644
--- a/chromeos/app_mode/kiosk_oem_manifest_parser.h
+++ b/chromeos/app_mode/kiosk_oem_manifest_parser.h
@@ -8,6 +8,7 @@
 #include <string>
 
 #include "base/files/file_path.h"
+#include "base/macros.h"
 #include "chromeos/chromeos_export.h"
 
 namespace chromeos {
diff --git a/chromeos/attestation/attestation_flow.h b/chromeos/attestation/attestation_flow.h
index a6c6cd2..a5ced3c 100644
--- a/chromeos/attestation/attestation_flow.h
+++ b/chromeos/attestation/attestation_flow.h
@@ -7,8 +7,8 @@
 
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/callback_forward.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "chromeos/attestation/attestation_constants.h"
diff --git a/chromeos/attestation/mock_attestation_flow.h b/chromeos/attestation/mock_attestation_flow.h
index efefd94..fad04f0 100644
--- a/chromeos/attestation/mock_attestation_flow.h
+++ b/chromeos/attestation/mock_attestation_flow.h
@@ -7,8 +7,8 @@
 
 #include "chromeos/attestation/attestation_flow.h"
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "testing/gmock/include/gmock/gmock.h"
 
 namespace chromeos {
diff --git a/chromeos/audio/audio_device.cc b/chromeos/audio/audio_device.cc
index 27109ed..5374194 100644
--- a/chromeos/audio/audio_device.cc
+++ b/chromeos/audio/audio_device.cc
@@ -4,6 +4,8 @@
 
 #include "chromeos/audio/audio_device.h"
 
+#include <stdint.h>
+
 #include "base/format_macros.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/stringprintf.h"
@@ -15,7 +17,7 @@
 
 // Get the priority for a particular device type. The priority returned
 // will be between 0 to 3, the higher number meaning a higher priority.
-uint8 GetDevicePriority(AudioDeviceType type, bool is_input) {
+uint8_t GetDevicePriority(AudioDeviceType type, bool is_input) {
   // Lower the priority of bluetooth mic to prevent unexpected bad eperience
   // to user because of bluetooth audio profile switching. Make priority to
   // zero so this mic will never be automatically chosen.
diff --git a/chromeos/audio/audio_device.h b/chromeos/audio/audio_device.h
index 240f892b1..ee47ee5 100644
--- a/chromeos/audio/audio_device.h
+++ b/chromeos/audio/audio_device.h
@@ -5,11 +5,12 @@
 #ifndef CHROMEOS_AUDIO_AUDIO_DEVICE_H_
 #define CHROMEOS_AUDIO_AUDIO_DEVICE_H_
 
+#include <stdint.h>
+
 #include <map>
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/audio_node.h"
 
@@ -56,18 +57,18 @@
   }
 
   bool is_input;
-  uint64 id;
+  uint64_t id;
   std::string display_name;
   std::string device_name;
   std::string mic_positions;
   AudioDeviceType type;
-  uint8 priority;
+  uint8_t priority;
   bool active;
-  uint64 plugged_time;
+  uint64_t plugged_time;
 };
 
 typedef std::vector<AudioDevice> AudioDeviceList;
-typedef std::map<uint64, AudioDevice> AudioDeviceMap;
+typedef std::map<uint64_t, AudioDevice> AudioDeviceMap;
 
 struct AudioDeviceCompare {
   // Rules used to discern which device is higher,
diff --git a/chromeos/audio/audio_devices_pref_handler.h b/chromeos/audio/audio_devices_pref_handler.h
index dfa582e..2347aad 100644
--- a/chromeos/audio/audio_devices_pref_handler.h
+++ b/chromeos/audio/audio_devices_pref_handler.h
@@ -5,7 +5,6 @@
 #ifndef CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_H_
 #define CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_H_
 
-#include "base/basictypes.h"
 #include "base/memory/ref_counted.h"
 #include "chromeos/audio/audio_pref_observer.h"
 #include "chromeos/chromeos_export.h"
diff --git a/chromeos/audio/audio_devices_pref_handler_impl.cc b/chromeos/audio/audio_devices_pref_handler_impl.cc
index 17b5681..45aa433 100644
--- a/chromeos/audio/audio_devices_pref_handler_impl.cc
+++ b/chromeos/audio/audio_devices_pref_handler_impl.cc
@@ -4,6 +4,8 @@
 
 #include "chromeos/audio/audio_devices_pref_handler_impl.h"
 
+#include <stdint.h>
+
 #include <algorithm>
 
 #include "base/bind.h"
@@ -32,7 +34,7 @@
 std::string GetDeviceIdString(const chromeos::AudioDevice& device) {
   std::string device_id_string =
       device.device_name + " : " +
-      base::Uint64ToString(device.id & static_cast<uint64>(0xffffffff)) +
+      base::Uint64ToString(device.id & static_cast<uint64_t>(0xffffffff)) +
       " : " + (device.is_input ? "1" : "0");
   // Replace any periods from the device id string with a space, since setting
   // names cannot contain periods.
diff --git a/chromeos/audio/audio_devices_pref_handler_impl.h b/chromeos/audio/audio_devices_pref_handler_impl.h
index 72dc335..7d30552 100644
--- a/chromeos/audio/audio_devices_pref_handler_impl.h
+++ b/chromeos/audio/audio_devices_pref_handler_impl.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "base/observer_list.h"
 #include "base/prefs/pref_change_registrar.h"
 #include "base/values.h"
diff --git a/chromeos/audio/audio_devices_pref_handler_impl_unittest.cc b/chromeos/audio/audio_devices_pref_handler_impl_unittest.cc
index ba87132..a4a97da 100644
--- a/chromeos/audio/audio_devices_pref_handler_impl_unittest.cc
+++ b/chromeos/audio/audio_devices_pref_handler_impl_unittest.cc
@@ -4,6 +4,9 @@
 
 #include "chromeos/audio/audio_devices_pref_handler_impl.h"
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/prefs/testing_pref_service.h"
 #include "chromeos/audio/audio_device.h"
@@ -14,11 +17,11 @@
 
 namespace chromeos {
 
-const uint64 kInternalMicId = 10003;
-const uint64 kHeadphoneId = 10002;
-const uint64 kHDMIOutputId = 10006;
-const uint64 kOtherTypeOutputId = 90001;
-const uint64 kOtherTypeInputId = 90002;
+const uint64_t kInternalMicId = 10003;
+const uint64_t kHeadphoneId = 10002;
+const uint64_t kHDMIOutputId = 10006;
+const uint64_t kOtherTypeOutputId = 90001;
+const uint64_t kOtherTypeInputId = 90002;
 
 const AudioDevice kInternalMic(AudioNode(true,
                                          kInternalMicId,
diff --git a/chromeos/audio/audio_devices_pref_handler_stub.h b/chromeos/audio/audio_devices_pref_handler_stub.h
index 4cb5d5f..6efe238 100644
--- a/chromeos/audio/audio_devices_pref_handler_stub.h
+++ b/chromeos/audio/audio_devices_pref_handler_stub.h
@@ -5,6 +5,8 @@
 #ifndef CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_STUB_H_
 #define CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_STUB_H_
 
+#include <stdint.h>
+
 #include <map>
 
 #include "base/macros.h"
diff --git a/chromeos/audio/audio_pref_observer.h b/chromeos/audio/audio_pref_observer.h
index 52393d4..b183ebfe 100644
--- a/chromeos/audio/audio_pref_observer.h
+++ b/chromeos/audio/audio_pref_observer.h
@@ -5,7 +5,6 @@
 #ifndef CHROMEOS_AUDIO_AUDIO_PREF_OBSERVER_H_
 #define CHROMEOS_AUDIO_AUDIO_PREF_OBSERVER_H_
 
-#include "base/basictypes.h"
 #include "base/memory/ref_counted.h"
 #include "chromeos/chromeos_export.h"
 
diff --git a/chromeos/audio/cras_audio_handler.cc b/chromeos/audio/cras_audio_handler.cc
index 8ee6009..970c78c 100644
--- a/chromeos/audio/cras_audio_handler.cc
+++ b/chromeos/audio/cras_audio_handler.cc
@@ -4,6 +4,9 @@
 
 #include "chromeos/audio/cras_audio_handler.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <algorithm>
 #include <cmath>
 
diff --git a/chromeos/audio/cras_audio_handler.h b/chromeos/audio/cras_audio_handler.h
index a12e5ae4..39e4ac8 100644
--- a/chromeos/audio/cras_audio_handler.h
+++ b/chromeos/audio/cras_audio_handler.h
@@ -5,9 +5,11 @@
 #ifndef CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_
 #define CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_
 
+#include <stddef.h>
 #include <stdint.h>
 #include <queue>
 
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
diff --git a/chromeos/audio/cras_audio_handler_unittest.cc b/chromeos/audio/cras_audio_handler_unittest.cc
index 4633d87..46e7d3e 100644
--- a/chromeos/audio/cras_audio_handler_unittest.cc
+++ b/chromeos/audio/cras_audio_handler_unittest.cc
@@ -4,7 +4,11 @@
 
 #include "chromeos/audio/cras_audio_handler.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"
@@ -20,23 +24,23 @@
 namespace chromeos {
 namespace {
 
-const uint64 kInternalSpeakerId = 10001;
-const uint64 kHeadphoneId = 10002;
-const uint64 kInternalMicId = 10003;
-const uint64 kUSBMicId = 10004;
-const uint64 kBluetoothHeadsetId = 10005;
-const uint64 kHDMIOutputId = 10006;
-const uint64 kUSBHeadphoneId1 = 10007;
-const uint64 kUSBHeadphoneId2 = 10008;
-const uint64 kMicJackId = 10009;
-const uint64 kKeyboardMicId = 10010;
-const uint64 kOtherTypeOutputId = 90001;
-const uint64 kOtherTypeInputId = 90002;
-const uint64 kUSBJabraSpeakerOutputId1 = 90003;
-const uint64 kUSBJabraSpeakerOutputId2 = 90004;
-const uint64 kUSBJabraSpeakerInputId1 = 90005;
-const uint64 kUSBJabraSpeakerInputId2 = 90006;
-const uint64 kUSBCameraInputId = 90007;
+const uint64_t kInternalSpeakerId = 10001;
+const uint64_t kHeadphoneId = 10002;
+const uint64_t kInternalMicId = 10003;
+const uint64_t kUSBMicId = 10004;
+const uint64_t kBluetoothHeadsetId = 10005;
+const uint64_t kHDMIOutputId = 10006;
+const uint64_t kUSBHeadphoneId1 = 10007;
+const uint64_t kUSBHeadphoneId2 = 10008;
+const uint64_t kMicJackId = 10009;
+const uint64_t kKeyboardMicId = 10010;
+const uint64_t kOtherTypeOutputId = 90001;
+const uint64_t kOtherTypeInputId = 90002;
+const uint64_t kUSBJabraSpeakerOutputId1 = 90003;
+const uint64_t kUSBJabraSpeakerOutputId2 = 90004;
+const uint64_t kUSBJabraSpeakerInputId1 = 90005;
+const uint64_t kUSBJabraSpeakerInputId2 = 90006;
+const uint64_t kUSBCameraInputId = 90007;
 
 const AudioNode kInternalSpeaker(
     false,
@@ -265,12 +269,12 @@
     ++input_mute_changed_count_;
   }
 
-  void OnOutputNodeVolumeChanged(uint64 /* node_id */,
+  void OnOutputNodeVolumeChanged(uint64_t /* node_id */,
                                  int /* volume */) override {
     ++output_volume_changed_count_;
   }
 
-  void OnInputNodeGainChanged(uint64 /* node_id */, int /* gain */) override {
+  void OnInputNodeGainChanged(uint64_t /* node_id */, int /* gain */) override {
     ++input_gain_changed_count_;
   }
 
@@ -341,7 +345,7 @@
     message_loop_.RunUntilIdle();
   }
 
-  const AudioDevice* GetDeviceFromId(uint64 id) {
+  const AudioDevice* GetDeviceFromId(uint64_t id) {
     return cras_audio_handler_->GetDeviceFromId(id);
   }
 
diff --git a/chromeos/binder/buffer_reader.h b/chromeos/binder/buffer_reader.h
index 0de70c1..12a26f3 100644
--- a/chromeos/binder/buffer_reader.h
+++ b/chromeos/binder/buffer_reader.h
@@ -5,6 +5,8 @@
 #ifndef CHROMEOS_BINDER_BUFFER_READER_H_
 #define CHROMEOS_BINDER_BUFFER_READER_H_
 
+#include <stddef.h>
+
 #include "base/macros.h"
 #include "chromeos/chromeos_export.h"
 
diff --git a/chromeos/binder/buffer_reader_unittest.cc b/chromeos/binder/buffer_reader_unittest.cc
index 7e5c3c7d..487855db 100644
--- a/chromeos/binder/buffer_reader_unittest.cc
+++ b/chromeos/binder/buffer_reader_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 "chromeos/binder/buffer_reader.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
diff --git a/chromeos/binder/command_broker.cc b/chromeos/binder/command_broker.cc
index ada6c8e..0a5393f 100644
--- a/chromeos/binder/command_broker.cc
+++ b/chromeos/binder/command_broker.cc
@@ -5,6 +5,8 @@
 #include "chromeos/binder/command_broker.h"
 
 #include <linux/android/binder.h>
+#include <stddef.h>
+#include <stdint.h>
 
 #include "base/logging.h"
 #include "chromeos/binder/driver.h"
@@ -42,7 +44,7 @@
   DCHECK(thread_checker_.CalledOnValidThread());
 }
 
-bool CommandBroker::Transact(int32 handle,
+bool CommandBroker::Transact(int32_t handle,
                              const TransactionData& request,
                              scoped_ptr<TransactionData>* reply) {
   DCHECK(thread_checker_.CalledOnValidThread());
diff --git a/chromeos/binder/command_broker.h b/chromeos/binder/command_broker.h
index 86e0324..4f3ae2d1 100644
--- a/chromeos/binder/command_broker.h
+++ b/chromeos/binder/command_broker.h
@@ -5,9 +5,10 @@
 #ifndef CHROMEOS_BINDER_COMMAND_BROKER_H_
 #define CHROMEOS_BINDER_COMMAND_BROKER_H_
 
+#include <stdint.h>
+
 #include <utility>
 
-#include "base/basictypes.h"
 #include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/threading/thread_checker.h"
@@ -32,7 +33,7 @@
   // Performs transaction with the remote object specified by the handle.
   // Returns true on success. If not one-way transaction, this method blocks
   // until the target object sends a reply.
-  bool Transact(int32 handle,
+  bool Transact(int32_t handle,
                 const TransactionData& request,
                 scoped_ptr<TransactionData>* reply);
 
diff --git a/chromeos/binder/command_stream.cc b/chromeos/binder/command_stream.cc
index 3a0d00c..e80c346 100644
--- a/chromeos/binder/command_stream.cc
+++ b/chromeos/binder/command_stream.cc
@@ -5,6 +5,8 @@
 #include "chromeos/binder/command_stream.h"
 
 #include <linux/android/binder.h>
+#include <stddef.h>
+#include <stdint.h>
 
 #include "base/bind.h"
 #include "chromeos/binder/buffer_reader.h"
@@ -52,7 +54,7 @@
 bool CommandStream::ProcessIncomingCommand() {
   DCHECK(thread_checker_.CalledOnValidThread());
   DCHECK(CanProcessIncomingCommand());
-  uint32 command = 0;
+  uint32_t command = 0;
   if (!incoming_data_reader_->Read(&command, sizeof(command)) ||
       !OnIncomingCommand(command, incoming_data_reader_.get())) {
     LOG(ERROR) << "Error while handling command: " << command;
@@ -61,7 +63,7 @@
   return true;
 }
 
-void CommandStream::AppendOutgoingCommand(uint32 command,
+void CommandStream::AppendOutgoingCommand(uint32_t command,
                                           const void* data,
                                           size_t size) {
   DCHECK(thread_checker_.CalledOnValidThread());
@@ -93,14 +95,14 @@
   return true;
 }
 
-bool CommandStream::OnIncomingCommand(uint32 command, BufferReader* reader) {
+bool CommandStream::OnIncomingCommand(uint32_t command, BufferReader* reader) {
   DCHECK(thread_checker_.CalledOnValidThread());
   // TODO(hashimoto): Replace all NOTIMPLEMENTED with logic to handle incoming
   // commands.
   VLOG(1) << "Processing " << CommandToString(command) << ", this = " << this;
   switch (command) {
     case BR_ERROR: {
-      int32 error = 0;
+      int32_t error = 0;
       if (!reader->Read(&error, sizeof(error))) {
         LOG(ERROR) << "Failed to read error code.";
         return false;
diff --git a/chromeos/binder/command_stream.h b/chromeos/binder/command_stream.h
index 3ce431a..cd85343 100644
--- a/chromeos/binder/command_stream.h
+++ b/chromeos/binder/command_stream.h
@@ -5,9 +5,11 @@
 #ifndef CHROMEOS_BINDER_COMMAND_STREAM_H_
 #define CHROMEOS_BINDER_COMMAND_STREAM_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
@@ -59,7 +61,7 @@
   bool ProcessIncomingCommand();
 
   // Appends a command to the outgoing command buffer.
-  void AppendOutgoingCommand(uint32 command, const void* data, size_t size);
+  void AppendOutgoingCommand(uint32_t command, const void* data, size_t size);
 
   // Writes buffered outgoing commands to the driver, and returns true on
   // success.
@@ -67,7 +69,7 @@
 
  private:
   // Calls the appropriate delegate method to handle the incoming command.
-  bool OnIncomingCommand(uint32 command, BufferReader* reader);
+  bool OnIncomingCommand(uint32_t command, BufferReader* reader);
 
   // Frees the buffer used by the driver to pass transaction data payload.
   void FreeTransactionBuffer(const void* ptr);
diff --git a/chromeos/binder/constants.h b/chromeos/binder/constants.h
index d039b18..531021d 100644
--- a/chromeos/binder/constants.h
+++ b/chromeos/binder/constants.h
@@ -11,12 +11,12 @@
 namespace binder {
 
 // Context manager's handle is always 0.
-const uint32 kContextManagerHandle = 0;
+const uint32_t kContextManagerHandle = 0;
 
 // Transaction code constants.
-const uint32 kFirstTransactionCode = 0x00000001;
-const uint32 kLastTransactionCode = 0x00ffffff;
-const uint32 kPingTransactionCode = BINDER_PACK_CHARS('_', 'P', 'N', 'G');
+const uint32_t kFirstTransactionCode = 0x00000001;
+const uint32_t kLastTransactionCode = 0x00ffffff;
+const uint32_t kPingTransactionCode = BINDER_PACK_CHARS('_', 'P', 'N', 'G');
 
 }  // namespace binder
 
diff --git a/chromeos/binder/driver.cc b/chromeos/binder/driver.cc
index f82470c..be917db 100644
--- a/chromeos/binder/driver.cc
+++ b/chromeos/binder/driver.cc
@@ -7,6 +7,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <linux/android/binder.h>
+#include <stddef.h>
 #include <sys/ioctl.h>
 #include <sys/mman.h>
 #include <sys/user.h>
diff --git a/chromeos/binder/driver.h b/chromeos/binder/driver.h
index da7479e..ccc6e2e 100644
--- a/chromeos/binder/driver.h
+++ b/chromeos/binder/driver.h
@@ -5,6 +5,8 @@
 #ifndef CHROMEOS_BINDER_DRIVER_H_
 #define CHROMEOS_BINDER_DRIVER_H_
 
+#include <stddef.h>
+
 #include "base/files/scoped_file.h"
 #include "base/macros.h"
 #include "chromeos/chromeos_export.h"
diff --git a/chromeos/binder/status.h b/chromeos/binder/status.h
index 0bcf4fa..346211e1 100644
--- a/chromeos/binder/status.h
+++ b/chromeos/binder/status.h
@@ -6,14 +6,13 @@
 #define CHROMEOS_BINDER_STATUS_H_
 
 #include <errno.h>
-
-#include "base/basictypes.h"
+#include <stdint.h>
 
 namespace binder {
 
 // Status code.
 // Using the same values as used by libbinder.
-enum class Status : int32 {
+enum class Status : int32_t {
   OK = 0,
 
   UNKNOWN_ERROR = INT32_MIN,
diff --git a/chromeos/binder/transaction_data.h b/chromeos/binder/transaction_data.h
index c7602c0..d43fc69 100644
--- a/chromeos/binder/transaction_data.h
+++ b/chromeos/binder/transaction_data.h
@@ -5,7 +5,6 @@
 #ifndef CHROMEOS_BINDER_TRANSACTION_DATA_H_
 #define CHROMEOS_BINDER_TRANSACTION_DATA_H_
 
-#include "base/basictypes.h"
 #include "chromeos/binder/status.h"
 
 namespace binder {
@@ -19,7 +18,7 @@
   virtual uintptr_t GetCookie() const = 0;
 
   // Returns the transaction code.
-  virtual uint32 GetCode() const = 0;
+  virtual uint32_t GetCode() const = 0;
 
   // Returns the PID of the sender.
   virtual pid_t GetSenderPID() const = 0;
diff --git a/chromeos/binder/transaction_data_from_driver.cc b/chromeos/binder/transaction_data_from_driver.cc
index 9b76ebf..b14c324 100644
--- a/chromeos/binder/transaction_data_from_driver.cc
+++ b/chromeos/binder/transaction_data_from_driver.cc
@@ -4,6 +4,9 @@
 
 #include "chromeos/binder/transaction_data_from_driver.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/location.h"
 #include "base/logging.h"
@@ -44,7 +47,7 @@
   return data_.cookie;
 }
 
-uint32 TransactionDataFromDriver::GetCode() const {
+uint32_t TransactionDataFromDriver::GetCode() const {
   return data_.code;
 }
 
diff --git a/chromeos/binder/transaction_data_from_driver.h b/chromeos/binder/transaction_data_from_driver.h
index 96aee9a..cf7837c 100644
--- a/chromeos/binder/transaction_data_from_driver.h
+++ b/chromeos/binder/transaction_data_from_driver.h
@@ -5,8 +5,10 @@
 #ifndef CHROMEOS_BINDER_TRANSACTION_DATA_FROM_DRIVER_H_
 #define CHROMEOS_BINDER_TRANSACTION_DATA_FROM_DRIVER_H_
 
-#include <unistd.h>
 #include <linux/android/binder.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <unistd.h>
 
 #include "base/callback.h"
 #include "base/macros.h"
@@ -33,7 +35,7 @@
 
   // TransactionData override:
   uintptr_t GetCookie() const override;
-  uint32 GetCode() const override;
+  uint32_t GetCode() const override;
   pid_t GetSenderPID() const override;
   uid_t GetSenderEUID() const override;
   bool IsOneWay() const override;
diff --git a/chromeos/binder/transaction_data_reader.cc b/chromeos/binder/transaction_data_reader.cc
index cf206ae..4505911 100644
--- a/chromeos/binder/transaction_data_reader.cc
+++ b/chromeos/binder/transaction_data_reader.cc
@@ -4,6 +4,9 @@
 
 #include "chromeos/binder/transaction_data_reader.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "chromeos/binder/transaction_data.h"
 
 namespace binder {
@@ -32,19 +35,19 @@
   return reader_.Read(buf, n) && reader_.Skip(AddPadding(n) - n);
 }
 
-bool TransactionDataReader::ReadInt32(int32* value) {
+bool TransactionDataReader::ReadInt32(int32_t* value) {
   return ReadData(value, sizeof(*value));
 }
 
-bool TransactionDataReader::ReadUint32(uint32* value) {
+bool TransactionDataReader::ReadUint32(uint32_t* value) {
   return ReadData(value, sizeof(*value));
 }
 
-bool TransactionDataReader::ReadInt64(int64* value) {
+bool TransactionDataReader::ReadInt64(int64_t* value) {
   return ReadData(value, sizeof(*value));
 }
 
-bool TransactionDataReader::ReadUint64(uint64* value) {
+bool TransactionDataReader::ReadUint64(uint64_t* value) {
   return ReadData(value, sizeof(*value));
 }
 
diff --git a/chromeos/binder/transaction_data_reader.h b/chromeos/binder/transaction_data_reader.h
index 22dddef..26cb916 100644
--- a/chromeos/binder/transaction_data_reader.h
+++ b/chromeos/binder/transaction_data_reader.h
@@ -5,7 +5,9 @@
 #ifndef CHROMEOS_BINDER_TRANSACTION_DATA_READER_H_
 #define CHROMEOS_BINDER_TRANSACTION_DATA_READER_H_
 
-#include "base/basictypes.h"
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/macros.h"
 #include "chromeos/binder/buffer_reader.h"
 #include "chromeos/chromeos_export.h"
@@ -28,17 +30,17 @@
   // Reads the specified number of bytes with appropriate padding.
   bool ReadData(void* buf, size_t n);
 
-  // Reads an int32 value.
-  bool ReadInt32(int32* value);
+  // Reads an int32_t value.
+  bool ReadInt32(int32_t* value);
 
-  // Reads an uint32 value.
-  bool ReadUint32(uint32* value);
+  // Reads an uint32_t value.
+  bool ReadUint32(uint32_t* value);
 
-  // Reads an int64 value.
-  bool ReadInt64(int64* value);
+  // Reads an int64_t value.
+  bool ReadInt64(int64_t* value);
 
-  // Reads an uint64 value.
-  bool ReadUint64(uint64* value);
+  // Reads an uint64_t value.
+  bool ReadUint64(uint64_t* value);
 
   // Reads a float value.
   bool ReadFloat(float* value);
diff --git a/chromeos/binder/transaction_data_reader_unittest.cc b/chromeos/binder/transaction_data_reader_unittest.cc
index 21c90ec..8bed9ea 100644
--- a/chromeos/binder/transaction_data_reader_unittest.cc
+++ b/chromeos/binder/transaction_data_reader_unittest.cc
@@ -2,6 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <vector>
 
 #include "chromeos/binder/transaction_data_reader.h"
@@ -31,10 +34,10 @@
 }
 
 TEST(BinderTransactionDataReaderTest, ReadScalarValues) {
-  const int32 kInt32Value = -1;
-  const uint32 kUint32Value = 2;
-  const int64 kInt64Value = -3;
-  const uint64 kUint64Value = 4;
+  const int32_t kInt32Value = -1;
+  const uint32_t kUint32Value = 2;
+  const int64_t kInt64Value = -3;
+  const uint64_t kUint64Value = 4;
   const float kFloatValue = 5.55;
   const double kDoubleValue = 6.66;
 
@@ -49,22 +52,22 @@
   TransactionDataReader reader(data);
   EXPECT_TRUE(reader.HasMoreData());
   {
-    int32 result = 0;
+    int32_t result = 0;
     EXPECT_TRUE(reader.ReadInt32(&result));
     EXPECT_EQ(kInt32Value, result);
   }
   {
-    uint32 result = 0;
+    uint32_t result = 0;
     EXPECT_TRUE(reader.ReadUint32(&result));
     EXPECT_EQ(kUint32Value, result);
   }
   {
-    int64 result = 0;
+    int64_t result = 0;
     EXPECT_TRUE(reader.ReadInt64(&result));
     EXPECT_EQ(kInt64Value, result);
   }
   {
-    uint64 result = 0;
+    uint64_t result = 0;
     EXPECT_TRUE(reader.ReadUint64(&result));
     EXPECT_EQ(kUint64Value, result);
   }
diff --git a/chromeos/binder/transaction_status.cc b/chromeos/binder/transaction_status.cc
index cdf0d39..20f997c 100644
--- a/chromeos/binder/transaction_status.cc
+++ b/chromeos/binder/transaction_status.cc
@@ -14,7 +14,7 @@
   return 0;
 }
 
-uint32 TransactionStatus::GetCode() const {
+uint32_t TransactionStatus::GetCode() const {
   return 0;
 }
 
diff --git a/chromeos/binder/transaction_status.h b/chromeos/binder/transaction_status.h
index c239e73..088d173 100644
--- a/chromeos/binder/transaction_status.h
+++ b/chromeos/binder/transaction_status.h
@@ -5,7 +5,9 @@
 #ifndef CHROMEOS_BINDER_TRANSACTION_STATUS_H_
 #define CHROMEOS_BINDER_TRANSACTION_STATUS_H_
 
-#include "base/basictypes.h"
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/macros.h"
 #include "chromeos/binder/status.h"
 #include "chromeos/binder/transaction_data.h"
@@ -23,7 +25,7 @@
 
   // TransactionData override:
   uintptr_t GetCookie() const override;
-  uint32 GetCode() const override;
+  uint32_t GetCode() const override;
   pid_t GetSenderPID() const override;
   uid_t GetSenderEUID() const override;
   bool IsOneWay() const override;
diff --git a/chromeos/binder/util.cc b/chromeos/binder/util.cc
index e5788a3..cd9802d 100644
--- a/chromeos/binder/util.cc
+++ b/chromeos/binder/util.cc
@@ -5,12 +5,13 @@
 #include "chromeos/binder/util.h"
 
 #include <linux/android/binder.h>
+#include <stdint.h>
 
 #include "base/logging.h"
 
 namespace binder {
 
-const char* CommandToString(uint32 command) {
+const char* CommandToString(uint32_t command) {
   switch (command) {
     case BR_ERROR:
       return "BR_ERROR";
diff --git a/chromeos/binder/util.h b/chromeos/binder/util.h
index 6801d24..461d4e0 100644
--- a/chromeos/binder/util.h
+++ b/chromeos/binder/util.h
@@ -5,14 +5,13 @@
 #ifndef CHROMEOS_BINDER_UTIL_H_
 #define CHROMEOS_BINDER_UTIL_H_
 
-#include "base/basictypes.h"
 #include "chromeos/chromeos_export.h"
 
 namespace binder {
 
 // Returns the string representation of the given binder command or "UNKNOWN"
 // if command is unknown, never returns null.
-CHROMEOS_EXPORT const char* CommandToString(uint32 command);
+CHROMEOS_EXPORT const char* CommandToString(uint32_t command);
 
 }  // namespace binder
 
diff --git a/chromeos/binder/writable_transaction_data.cc b/chromeos/binder/writable_transaction_data.cc
index 07c4bd6..1afbdc0 100644
--- a/chromeos/binder/writable_transaction_data.cc
+++ b/chromeos/binder/writable_transaction_data.cc
@@ -14,7 +14,7 @@
   return 0;
 }
 
-uint32 WritableTransactionData::GetCode() const {
+uint32_t WritableTransactionData::GetCode() const {
   return code_;
 }
 
@@ -66,21 +66,21 @@
   }
 }
 
-void WritableTransactionData::WriteInt32(int32 value) {
+void WritableTransactionData::WriteInt32(int32_t value) {
   // Binder is not used for inter-device communication, so no endian conversion.
   // The same applies to other Write() methods.
   WriteData(&value, sizeof(value));
 }
 
-void WritableTransactionData::WriteUint32(uint32 value) {
+void WritableTransactionData::WriteUint32(uint32_t value) {
   WriteData(&value, sizeof(value));
 }
 
-void WritableTransactionData::WriteInt64(int64 value) {
+void WritableTransactionData::WriteInt64(int64_t value) {
   WriteData(&value, sizeof(value));
 }
 
-void WritableTransactionData::WriteUint64(uint64 value) {
+void WritableTransactionData::WriteUint64(uint64_t value) {
   WriteData(&value, sizeof(value));
 }
 
diff --git a/chromeos/binder/writable_transaction_data.h b/chromeos/binder/writable_transaction_data.h
index f32eff8..9001ad3 100644
--- a/chromeos/binder/writable_transaction_data.h
+++ b/chromeos/binder/writable_transaction_data.h
@@ -5,9 +5,11 @@
 #ifndef CHROMEOS_BINDER_WRITABLE_TRANSACTION_DATA_H_
 #define CHROMEOS_BINDER_WRITABLE_TRANSACTION_DATA_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/macros.h"
 #include "chromeos/binder/transaction_data.h"
 #include "chromeos/chromeos_export.h"
@@ -24,7 +26,7 @@
 
   // TransactionData override:
   uintptr_t GetCookie() const override;
-  uint32 GetCode() const override;
+  uint32_t GetCode() const override;
   pid_t GetSenderPID() const override;
   uid_t GetSenderEUID() const override;
   bool IsOneWay() const override;
@@ -39,7 +41,7 @@
   void Reserve(size_t n);
 
   // Sets the transaction code returned by GetCode().
-  void SetCode(uint32 code) { code_ = code; }
+  void SetCode(uint32_t code) { code_ = code; }
 
   // Sets the value returned by IsOneWay().
   void SetIsOneWay(bool is_one_way) { is_one_way_ = is_one_way; }
@@ -47,17 +49,17 @@
   // Appends the specified data with appropriate padding.
   void WriteData(const void* data, size_t n);
 
-  // Appends an int32 value.
-  void WriteInt32(int32 value);
+  // Appends an int32_t value.
+  void WriteInt32(int32_t value);
 
-  // Appends a uint32 value.
-  void WriteUint32(uint32 value);
+  // Appends a uint32_t value.
+  void WriteUint32(uint32_t value);
 
-  // Appends an int64 vlaue.
-  void WriteInt64(int64 value);
+  // Appends an int64_t vlaue.
+  void WriteInt64(int64_t value);
 
-  // Appends a uint64 value.
-  void WriteUint64(uint64 value);
+  // Appends a uint64_t value.
+  void WriteUint64(uint64_t value);
 
   // Appends a float value.
   void WriteFloat(float value);
@@ -67,7 +69,7 @@
   // TODO(hashimoto): Support more types (i.e. strings, FDs, objects).
 
  private:
-  uint32 code_ = 0;
+  uint32_t code_ = 0;
   bool is_one_way_ = false;
   std::vector<char> data_;
   std::vector<uintptr_t> object_offsets_;
diff --git a/chromeos/binder/writable_transaction_data_unittest.cc b/chromeos/binder/writable_transaction_data_unittest.cc
index a77a947..07d1d31 100644
--- a/chromeos/binder/writable_transaction_data_unittest.cc
+++ b/chromeos/binder/writable_transaction_data_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 "chromeos/binder/buffer_reader.h"
 #include "chromeos/binder/writable_transaction_data.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -25,52 +28,52 @@
 }
 
 TEST(BinderWritableTransactionDataTest, WriteInt32) {
-  const int32 kValue = -1234;
+  const int32_t kValue = -1234;
   WritableTransactionData data;
   data.WriteInt32(kValue);
   EXPECT_EQ(sizeof(kValue), data.GetDataSize());
   BufferReader reader(reinterpret_cast<const char*>(data.GetData()),
                       data.GetDataSize());
-  int32 result = 0;
+  int32_t result = 0;
   EXPECT_TRUE(reader.Read(&result, sizeof(result)));
   EXPECT_EQ(kValue, result);
   EXPECT_FALSE(reader.HasMoreData());
 }
 
 TEST(BinderWritableTransactionDataTest, WriteUint32) {
-  const uint32 kValue = 1234;
+  const uint32_t kValue = 1234;
   WritableTransactionData data;
   data.WriteUint32(kValue);
   EXPECT_EQ(sizeof(kValue), data.GetDataSize());
   BufferReader reader(reinterpret_cast<const char*>(data.GetData()),
                       data.GetDataSize());
-  uint32 result = 0;
+  uint32_t result = 0;
   EXPECT_TRUE(reader.Read(&result, sizeof(result)));
   EXPECT_EQ(kValue, result);
   EXPECT_FALSE(reader.HasMoreData());
 }
 
 TEST(BinderWritableTransactionDataTest, WriteInt64) {
-  const int64 kValue = -1234;
+  const int64_t kValue = -1234;
   WritableTransactionData data;
   data.WriteInt64(kValue);
   EXPECT_EQ(sizeof(kValue), data.GetDataSize());
   BufferReader reader(reinterpret_cast<const char*>(data.GetData()),
                       data.GetDataSize());
-  int64 result = 0;
+  int64_t result = 0;
   EXPECT_TRUE(reader.Read(&result, sizeof(result)));
   EXPECT_EQ(kValue, result);
   EXPECT_FALSE(reader.HasMoreData());
 }
 
 TEST(BinderWritableTransactionDataTest, WriteUint64) {
-  const uint64 kValue = 1234;
+  const uint64_t kValue = 1234;
   WritableTransactionData data;
   data.WriteUint64(kValue);
   EXPECT_EQ(sizeof(kValue), data.GetDataSize());
   BufferReader reader(reinterpret_cast<const char*>(data.GetData()),
                       data.GetDataSize());
-  uint64 result = 0;
+  uint64_t result = 0;
   EXPECT_TRUE(reader.Read(&result, sizeof(result)));
   EXPECT_EQ(kValue, result);
   EXPECT_FALSE(reader.HasMoreData());
diff --git a/chromeos/cert_loader.h b/chromeos/cert_loader.h
index 694ea31..a837e4d 100644
--- a/chromeos/cert_loader.h
+++ b/chromeos/cert_loader.h
@@ -8,8 +8,8 @@
 #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/weak_ptr.h"
 #include "base/observer_list.h"
diff --git a/chromeos/cert_loader_unittest.cc b/chromeos/cert_loader_unittest.cc
index 8c397bd..f594f93a 100644
--- a/chromeos/cert_loader_unittest.cc
+++ b/chromeos/cert_loader_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "chromeos/cert_loader.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/files/file_util.h"
 #include "base/memory/scoped_ptr.h"
diff --git a/chromeos/cryptohome/async_method_caller.cc b/chromeos/cryptohome/async_method_caller.cc
index eab0bd5..b95966f 100644
--- a/chromeos/cryptohome/async_method_caller.cc
+++ b/chromeos/cryptohome/async_method_caller.cc
@@ -7,6 +7,7 @@
 #include "base/bind.h"
 #include "base/containers/hash_tables.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
 #include "chromeos/dbus/dbus_thread_manager.h"
diff --git a/chromeos/cryptohome/async_method_caller.h b/chromeos/cryptohome/async_method_caller.h
index 7f1660e..374da45 100644
--- a/chromeos/cryptohome/async_method_caller.h
+++ b/chromeos/cryptohome/async_method_caller.h
@@ -7,7 +7,6 @@
 
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/callback_forward.h"
 #include "chromeos/attestation/attestation_constants.h"
 #include "chromeos/chromeos_export.h"
diff --git a/chromeos/cryptohome/cryptohome_parameters.cc b/chromeos/cryptohome/cryptohome_parameters.cc
index 5b3ac4d..8b65a71 100644
--- a/chromeos/cryptohome/cryptohome_parameters.cc
+++ b/chromeos/cryptohome/cryptohome_parameters.cc
@@ -4,6 +4,9 @@
 
 #include "chromeos/cryptohome/cryptohome_parameters.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "chromeos/dbus/cryptohome/key.pb.h"
 
 namespace cryptohome {
@@ -81,15 +84,14 @@
 KeyDefinition::ProviderData::ProviderData(const ProviderData& other)
     : name(other.name) {
   if (other.number)
-    number.reset(new int64(*other.number));
+    number.reset(new int64_t(*other.number));
   if (other.bytes)
     bytes.reset(new std::string(*other.bytes));
 }
 
-KeyDefinition::ProviderData::ProviderData(const std::string& name, int64 number)
-    : name(name),
-      number(new int64(number)) {
-}
+KeyDefinition::ProviderData::ProviderData(const std::string& name,
+                                          int64_t number)
+    : name(name), number(new int64_t(number)) {}
 
 KeyDefinition::ProviderData::ProviderData(const std::string& name,
                                           const std::string& bytes)
@@ -99,7 +101,7 @@
 
 void KeyDefinition::ProviderData::operator=(const ProviderData& other) {
   name = other.name;
-  number.reset(other.number ? new int64(*other.number) : NULL);
+  number.reset(other.number ? new int64_t(*other.number) : NULL);
   bytes.reset(other.bytes ? new std::string(*other.bytes) : NULL);
 }
 
diff --git a/chromeos/cryptohome/cryptohome_parameters.h b/chromeos/cryptohome/cryptohome_parameters.h
index 0b744a4..3738b56 100644
--- a/chromeos/cryptohome/cryptohome_parameters.h
+++ b/chromeos/cryptohome/cryptohome_parameters.h
@@ -5,10 +5,11 @@
 #ifndef CHROMEOS_CRYPTOHOME_CRYPTOHOME_PARAMETERS_H_
 #define CHROMEOS_CRYPTOHOME_CRYPTOHOME_PARAMETERS_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/memory/scoped_ptr.h"
 #include "chromeos/chromeos_export.h"
 
@@ -85,7 +86,7 @@
     ProviderData();
     explicit ProviderData(const std::string& name);
     explicit ProviderData(const ProviderData& other);
-    ProviderData(const std::string& name, int64 number);
+    ProviderData(const std::string& name, int64_t number);
     ProviderData(const std::string& name, const std::string& bytes);
     void operator=(const ProviderData& other);
     ~ProviderData();
@@ -93,7 +94,7 @@
     bool operator==(const ProviderData& other) const;
 
     std::string name;
-    scoped_ptr<int64> number;
+    scoped_ptr<int64_t> number;
     scoped_ptr<std::string> bytes;
   };
 
diff --git a/chromeos/cryptohome/cryptohome_util.cc b/chromeos/cryptohome/cryptohome_util.cc
index 5e2b310..7d057b1 100644
--- a/chromeos/cryptohome/cryptohome_util.cc
+++ b/chromeos/cryptohome/cryptohome_util.cc
@@ -4,6 +4,8 @@
 
 #include "chromeos/cryptohome/cryptohome_util.h"
 
+#include <stdint.h>
+
 #include "base/logging.h"
 #include "chromeos/dbus/cryptohome_client.h"
 #include "chromeos/dbus/dbus_thread_manager.h"
@@ -34,7 +36,7 @@
 
 bool InstallAttributesGet(
     const std::string& name, std::string* value) {
-  std::vector<uint8> buf;
+  std::vector<uint8_t> buf;
   bool success = false;
   DBusThreadManager::Get()->GetCryptohomeClient()->
       InstallAttributesGet(name, &buf, &success);
@@ -49,7 +51,7 @@
 
 bool InstallAttributesSet(
     const std::string& name, const std::string& value) {
-  std::vector<uint8> buf(value.c_str(), value.c_str() + value.size() + 1);
+  std::vector<uint8_t> buf(value.c_str(), value.c_str() + value.size() + 1);
   bool success = false;
   DBusThreadManager::Get()->GetCryptohomeClient()->
       InstallAttributesSet(name, buf, &success);
diff --git a/chromeos/cryptohome/homedir_methods.cc b/chromeos/cryptohome/homedir_methods.cc
index 0407e3c..8413c72 100644
--- a/chromeos/cryptohome/homedir_methods.cc
+++ b/chromeos/cryptohome/homedir_methods.cc
@@ -4,8 +4,12 @@
 
 #include "chromeos/cryptohome/homedir_methods.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "chromeos/dbus/cryptohome/key.pb.h"
 #include "chromeos/dbus/cryptohome/rpc.pb.h"
 #include "chromeos/dbus/dbus_thread_manager.h"
@@ -387,7 +391,7 @@
 
         // Extract |number|.
         if (provider_data_it->has_number()) {
-          provider_data.number.reset(new int64(provider_data_it->number()));
+          provider_data.number.reset(new int64_t(provider_data_it->number()));
           ++data_items;
         }
 
diff --git a/chromeos/cryptohome/homedir_methods.h b/chromeos/cryptohome/homedir_methods.h
index cabfded5..17f0f55 100644
--- a/chromeos/cryptohome/homedir_methods.h
+++ b/chromeos/cryptohome/homedir_methods.h
@@ -8,7 +8,6 @@
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/callback_forward.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/cryptohome/cryptohome_parameters.h"
diff --git a/chromeos/cryptohome/homedir_methods_unittest.cc b/chromeos/cryptohome/homedir_methods_unittest.cc
index 9edd7b0..f6174add 100644
--- a/chromeos/cryptohome/homedir_methods_unittest.cc
+++ b/chromeos/cryptohome/homedir_methods_unittest.cc
@@ -4,9 +4,12 @@
 
 #include "chromeos/cryptohome/homedir_methods.h"
 
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "chromeos/dbus/cryptohome/rpc.pb.h"
 #include "chromeos/dbus/cryptohome_client.h"
@@ -37,9 +40,9 @@
 const char kUserID[] = "user@example.com";
 const char kKeyLabel[] = "key_label";
 
-const int64 kKeyRevision = 123;
+const int64_t kKeyRevision = 123;
 const char kProviderData1Name[] = "data_1";
-const int64 kProviderData1Number = 12345;
+const int64_t kProviderData1Number = 12345;
 const char kProviderData2Name[] = "data_2";
 const char kProviderData2Bytes[] = "data_2 bytes";
 
diff --git a/chromeos/cryptohome/mock_async_method_caller.h b/chromeos/cryptohome/mock_async_method_caller.h
index 515ec78..97ead2fa 100644
--- a/chromeos/cryptohome/mock_async_method_caller.h
+++ b/chromeos/cryptohome/mock_async_method_caller.h
@@ -7,8 +7,8 @@
 
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "chromeos/cryptohome/async_method_caller.h"
 #include "testing/gmock/include/gmock/gmock.h"
 
diff --git a/chromeos/cryptohome/mock_homedir_methods.h b/chromeos/cryptohome/mock_homedir_methods.h
index 8647744d2..81a82a2 100644
--- a/chromeos/cryptohome/mock_homedir_methods.h
+++ b/chromeos/cryptohome/mock_homedir_methods.h
@@ -7,8 +7,8 @@
 
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "chromeos/cryptohome/homedir_methods.h"
 #include "testing/gmock/include/gmock/gmock.h"
 
diff --git a/chromeos/cryptohome/system_salt_getter.cc b/chromeos/cryptohome/system_salt_getter.cc
index b0bbc9e..0e79fc1 100644
--- a/chromeos/cryptohome/system_salt_getter.cc
+++ b/chromeos/cryptohome/system_salt_getter.cc
@@ -4,6 +4,8 @@
 
 #include "chromeos/cryptohome/system_salt_getter.h"
 
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/location.h"
 #include "base/single_thread_task_runner.h"
@@ -54,9 +56,10 @@
                  callback));
 }
 
-void SystemSaltGetter::DidGetSystemSalt(const GetSystemSaltCallback& callback,
-                                        DBusMethodCallStatus call_status,
-                                        const std::vector<uint8>& system_salt) {
+void SystemSaltGetter::DidGetSystemSalt(
+    const GetSystemSaltCallback& callback,
+    DBusMethodCallStatus call_status,
+    const std::vector<uint8_t>& system_salt) {
   if (call_status == DBUS_METHOD_CALL_SUCCESS &&
       !system_salt.empty() &&
       system_salt.size() % 2 == 0U)
@@ -94,7 +97,7 @@
 
 // static
 std::string SystemSaltGetter::ConvertRawSaltToHexString(
-    const std::vector<uint8>& salt) {
+    const std::vector<uint8_t>& salt) {
   return base::ToLowerASCII(
       base::HexEncode(reinterpret_cast<const void*>(salt.data()), salt.size()));
 }
diff --git a/chromeos/cryptohome/system_salt_getter.h b/chromeos/cryptohome/system_salt_getter.h
index ee33133..8654e50 100644
--- a/chromeos/cryptohome/system_salt_getter.h
+++ b/chromeos/cryptohome/system_salt_getter.h
@@ -5,11 +5,13 @@
 #ifndef CHROMEOS_CRYPTOHOME_SYSTEM_SALT_GETTER_H_
 #define CHROMEOS_CRYPTOHOME_SYSTEM_SALT_GETTER_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/callback_forward.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/dbus_method_call_status.h"
@@ -29,7 +31,8 @@
   static SystemSaltGetter* Get();
 
   // Converts |salt| to a hex encoded string.
-  static std::string ConvertRawSaltToHexString(const std::vector<uint8>& salt);
+  static std::string ConvertRawSaltToHexString(
+      const std::vector<uint8_t>& salt);
 
   // Returns system hash in hex encoded ascii format. Note: this may return
   // an empty string (e.g. errors in D-Bus layer)
@@ -45,7 +48,7 @@
                                       bool service_is_available);
   void DidGetSystemSalt(const GetSystemSaltCallback& callback,
                         DBusMethodCallStatus call_status,
-                        const std::vector<uint8>& system_salt);
+                        const std::vector<uint8_t>& system_salt);
 
   std::string system_salt_;
 
diff --git a/chromeos/dbus/amplifier_client.cc b/chromeos/dbus/amplifier_client.cc
index 5a3ffa6..6f8cd2b 100644
--- a/chromeos/dbus/amplifier_client.cc
+++ b/chromeos/dbus/amplifier_client.cc
@@ -4,7 +4,10 @@
 
 #include "chromeos/dbus/amplifier_client.h"
 
+#include <stdint.h>
+
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/observer_list.h"
@@ -154,7 +157,7 @@
 
 void AmplifierClientImpl::OnError(dbus::Signal* signal) {
   dbus::MessageReader reader(signal);
-  int32 error_code = 0;
+  int32_t error_code = 0;
   if (!reader.PopInt32(&error_code)) {
     LOG(ERROR) << "Invalid signal: " << signal->ToString();
     return;
diff --git a/chromeos/dbus/amplifier_client.h b/chromeos/dbus/amplifier_client.h
index c63a286..4ff3ab1 100644
--- a/chromeos/dbus/amplifier_client.h
+++ b/chromeos/dbus/amplifier_client.h
@@ -5,7 +5,9 @@
 #ifndef CHROMEOS_DBUS_AMPLIFIER_CLIENT_H_
 #define CHROMEOS_DBUS_AMPLIFIER_CLIENT_H_
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/dbus_client.h"
 #include "chromeos/dbus/dbus_method_call_status.h"
@@ -20,7 +22,7 @@
    public:
     virtual ~Observer() {}
     // Called when the Error signal is received.
-    virtual void OnError(int32 error_code) = 0;
+    virtual void OnError(int32_t error_code) = 0;
   };
 
   ~AmplifierClient() override;
diff --git a/chromeos/dbus/ap_manager_client.cc b/chromeos/dbus/ap_manager_client.cc
index 1a191c7..8b31e96 100644
--- a/chromeos/dbus/ap_manager_client.cc
+++ b/chromeos/dbus/ap_manager_client.cc
@@ -7,6 +7,7 @@
 #include "base/bind.h"
 #include "base/location.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "base/single_thread_task_runner.h"
diff --git a/chromeos/dbus/ap_manager_client.h b/chromeos/dbus/ap_manager_client.h
index f160b03..9f98f30 100644
--- a/chromeos/dbus/ap_manager_client.h
+++ b/chromeos/dbus/ap_manager_client.h
@@ -4,6 +4,8 @@
 #ifndef CHROMEOS_DBUS_AP_MANAGER_CLIENT_H_
 #define CHROMEOS_DBUS_AP_MANAGER_CLIENT_H_
 
+#include <stdint.h>
+
 #include <map>
 #include <string>
 #include <vector>
diff --git a/chromeos/dbus/audio_dsp_client.cc b/chromeos/dbus/audio_dsp_client.cc
index 74a8dcd..94b3992 100644
--- a/chromeos/dbus/audio_dsp_client.cc
+++ b/chromeos/dbus/audio_dsp_client.cc
@@ -4,7 +4,10 @@
 
 #include "chromeos/dbus/audio_dsp_client.h"
 
+#include <stdint.h>
+
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/observer_list.h"
@@ -131,16 +134,16 @@
   void GetBass(const DoubleDBusMethodCallback& callback) override;
   void GetCapabilitiesOEM(
       const ThreeStringDBusMethodCallback& callback) override;
-  void SetCapabilitiesOEM(uint32 speaker_id,
+  void SetCapabilitiesOEM(uint32_t speaker_id,
                           const std::string& speaker_capabilities,
                           const std::string& driver_capabilities,
                           const VoidDBusMethodCallback& callback) override;
-  void GetFilterConfigOEM(uint32 speaker_id,
+  void GetFilterConfigOEM(uint32_t speaker_id,
                           const TwoStringDBusMethodCallback& callback) override;
   void SetFilterConfigOEM(const std::string& speaker_config,
                           const std::string& driver_config,
                           const VoidDBusMethodCallback& callback) override;
-  void SetSourceType(uint16 source_type,
+  void SetSourceType(uint16_t source_type,
                      const VoidDBusMethodCallback& callback) override;
   void AmplifierVolumeChanged(double db_spl,
                               const VoidDBusMethodCallback& callback) override;
@@ -287,7 +290,7 @@
 }
 
 void AudioDspClientImpl::SetCapabilitiesOEM(
-    uint32 speaker_id,
+    uint32_t speaker_id,
     const std::string& speaker_capabilities,
     const std::string& driver_capabilities,
     const VoidDBusMethodCallback& callback) {
@@ -303,7 +306,7 @@
 }
 
 void AudioDspClientImpl::GetFilterConfigOEM(
-    uint32 speaker_id,
+    uint32_t speaker_id,
     const TwoStringDBusMethodCallback& callback) {
   dbus::MethodCall method_call(audio_dsp::kAudioDspInterface,
                                audio_dsp::kGetFilterConfigOEMMethod);
@@ -328,7 +331,7 @@
                      base::Bind(&OnVoidDBusMethod, callback));
 }
 
-void AudioDspClientImpl::SetSourceType(uint16 source_type,
+void AudioDspClientImpl::SetSourceType(uint16_t source_type,
                                        const VoidDBusMethodCallback& callback) {
   dbus::MethodCall method_call(audio_dsp::kAudioDspInterface,
                                audio_dsp::kSetSourceTypeMethod);
@@ -353,7 +356,7 @@
 
 void AudioDspClientImpl::OnError(dbus::Signal* signal) {
   dbus::MessageReader reader(signal);
-  int32 error_code = 0;
+  int32_t error_code = 0;
   if (!reader.PopInt32(&error_code)) {
     LOG(ERROR) << "Invalid signal: " << signal->ToString();
     return;
diff --git a/chromeos/dbus/audio_dsp_client.h b/chromeos/dbus/audio_dsp_client.h
index a1aa2c4..5db7880 100644
--- a/chromeos/dbus/audio_dsp_client.h
+++ b/chromeos/dbus/audio_dsp_client.h
@@ -5,7 +5,9 @@
 #ifndef CHROMEOS_DBUS_AUDIO_DSP_CLIENT_H_
 #define CHROMEOS_DBUS_AUDIO_DSP_CLIENT_H_
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/dbus_client.h"
 #include "chromeos/dbus/dbus_method_call_status.h"
@@ -38,7 +40,7 @@
     virtual ~Observer() {}
 
     // Called when the Error signal is received.
-    virtual void OnError(int32 error_code) = 0;
+    virtual void OnError(int32_t error_code) = 0;
   };
 
   ~AudioDspClient() override;
@@ -109,7 +111,7 @@
   // Calls SetCapabilitiesOEM method.
   // |callback| will be called with a DBusMethodCallStatus indicating whether
   // the DBus method call succeeded.
-  virtual void SetCapabilitiesOEM(uint32 speaker_id,
+  virtual void SetCapabilitiesOEM(uint32_t speaker_id,
                                   const std::string& speaker_capabilities,
                                   const std::string& driver_capabilities,
                                   const VoidDBusMethodCallback& callback) = 0;
@@ -119,7 +121,7 @@
   // the DBus method call succeeded, and two std::strings that constitute
   // the return value from the DBus method.
   virtual void GetFilterConfigOEM(
-      uint32 speaker_id,
+      uint32_t speaker_id,
       const TwoStringDBusMethodCallback& callback) = 0;
 
   // Calls SetFilterConfigOEM method.
@@ -132,7 +134,7 @@
   // Calls SetSourceType method.
   // |callback| will be called with a DBusMethodCallStatus indicating whether
   // the DBus method call succeeded.
-  virtual void SetSourceType(uint16 source_type,
+  virtual void SetSourceType(uint16_t source_type,
                              const VoidDBusMethodCallback& callback) = 0;
 
   // Calls AmplifierVolumeChanged method.
diff --git a/chromeos/dbus/audio_node.cc b/chromeos/dbus/audio_node.cc
index c29ffb8..17dd697 100644
--- a/chromeos/dbus/audio_node.cc
+++ b/chromeos/dbus/audio_node.cc
@@ -4,6 +4,8 @@
 
 #include "chromeos/dbus/audio_node.h"
 
+#include <stdint.h>
+
 #include "base/format_macros.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/stringprintf.h"
@@ -18,20 +20,19 @@
 }
 
 AudioNode::AudioNode(bool is_input,
-                     uint64 id,
+                     uint64_t id,
                      std::string device_name,
                      std::string type,
                      std::string name,
                      bool active,
-                     uint64 plugged_time)
+                     uint64_t plugged_time)
     : is_input(is_input),
       id(id),
       device_name(device_name),
       type(type),
       name(name),
       active(active),
-      plugged_time(plugged_time) {
-}
+      plugged_time(plugged_time) {}
 
 AudioNode::~AudioNode() {}
 
diff --git a/chromeos/dbus/audio_node.h b/chromeos/dbus/audio_node.h
index ea48c00..5bc9fcf 100644
--- a/chromeos/dbus/audio_node.h
+++ b/chromeos/dbus/audio_node.h
@@ -5,10 +5,11 @@
 #ifndef CHROMEOS_DBUS_AUDIO_NODE_H_
 #define CHROMEOS_DBUS_AUDIO_NODE_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "chromeos/chromeos_export.h"
 
 namespace chromeos {
@@ -16,23 +17,23 @@
 // Structure to hold AudioNode data received from cras.
 struct CHROMEOS_EXPORT AudioNode {
   bool is_input;
-  uint64 id;
+  uint64_t id;
   std::string device_name;
   std::string type;
   std::string name;
   std::string mic_positions;
   bool active;
   // Time that the node was plugged in.
-  uint64 plugged_time;
+  uint64_t plugged_time;
 
   AudioNode();
   AudioNode(bool is_input,
-            uint64 id,
+            uint64_t id,
             std::string device_name,
             std::string type,
             std::string name,
             bool active,
-            uint64 plugged_time);
+            uint64_t plugged_time);
   ~AudioNode();
   std::string ToString() const;
 };
diff --git a/chromeos/dbus/blocking_method_caller.h b/chromeos/dbus/blocking_method_caller.h
index 6291f47..5d7db29 100644
--- a/chromeos/dbus/blocking_method_caller.h
+++ b/chromeos/dbus/blocking_method_caller.h
@@ -6,6 +6,7 @@
 #define CHROMEOS_DBUS_BLOCKING_METHOD_CALLER_H_
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/synchronization/waitable_event.h"
 #include "chromeos/chromeos_export.h"
 #include "dbus/message.h"
diff --git a/chromeos/dbus/cras_audio_client.cc b/chromeos/dbus/cras_audio_client.cc
index e8c3a8b..651ba44 100644
--- a/chromeos/dbus/cras_audio_client.cc
+++ b/chromeos/dbus/cras_audio_client.cc
@@ -4,8 +4,11 @@
 
 #include "chromeos/dbus/cras_audio_client.h"
 
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/format_macros.h"
+#include "base/macros.h"
 #include "base/strings/stringprintf.h"
 #include "dbus/bus.h"
 #include "dbus/message.h"
@@ -62,7 +65,7 @@
                    weak_ptr_factory_.GetWeakPtr(), error_callback));
   }
 
-  void SetOutputNodeVolume(uint64 node_id, int32 volume) override {
+  void SetOutputNodeVolume(uint64_t node_id, int32_t volume) override {
     dbus::MethodCall method_call(cras::kCrasControlInterface,
                                  cras::kSetOutputNodeVolume);
     dbus::MessageWriter writer(&method_call);
@@ -85,7 +88,7 @@
         dbus::ObjectProxy::EmptyResponseCallback());
   }
 
-  void SetInputNodeGain(uint64 node_id, int32 input_gain) override {
+  void SetInputNodeGain(uint64_t node_id, int32_t input_gain) override {
     dbus::MethodCall method_call(cras::kCrasControlInterface,
                                  cras::kSetInputNodeGain);
     dbus::MessageWriter writer(&method_call);
@@ -108,7 +111,7 @@
         dbus::ObjectProxy::EmptyResponseCallback());
   }
 
-  void SetActiveOutputNode(uint64 node_id) override {
+  void SetActiveOutputNode(uint64_t node_id) override {
     dbus::MethodCall method_call(cras::kCrasControlInterface,
                                  cras::kSetActiveOutputNode);
     dbus::MessageWriter writer(&method_call);
@@ -119,7 +122,7 @@
         dbus::ObjectProxy::EmptyResponseCallback());
   }
 
-  void SetActiveInputNode(uint64 node_id) override {
+  void SetActiveInputNode(uint64_t node_id) override {
     dbus::MethodCall method_call(cras::kCrasControlInterface,
                                  cras::kSetActiveInputNode);
     dbus::MessageWriter writer(&method_call);
@@ -130,7 +133,7 @@
         dbus::ObjectProxy::EmptyResponseCallback());
   }
 
-  void AddActiveInputNode(uint64 node_id) override {
+  void AddActiveInputNode(uint64_t node_id) override {
     dbus::MethodCall method_call(cras::kCrasControlInterface,
                                  cras::kAddActiveInputNode);
     dbus::MessageWriter writer(&method_call);
@@ -141,7 +144,7 @@
         dbus::ObjectProxy::EmptyResponseCallback());
   }
 
-  void RemoveActiveInputNode(uint64 node_id) override {
+  void RemoveActiveInputNode(uint64_t node_id) override {
     dbus::MethodCall method_call(cras::kCrasControlInterface,
                                  cras::kRemoveActiveInputNode);
     dbus::MessageWriter writer(&method_call);
@@ -152,7 +155,7 @@
         dbus::ObjectProxy::EmptyResponseCallback());
   }
 
-  void AddActiveOutputNode(uint64 node_id) override {
+  void AddActiveOutputNode(uint64_t node_id) override {
     dbus::MethodCall method_call(cras::kCrasControlInterface,
                                  cras::kAddActiveOutputNode);
     dbus::MessageWriter writer(&method_call);
@@ -162,7 +165,7 @@
                             dbus::ObjectProxy::EmptyResponseCallback());
   }
 
-  void RemoveActiveOutputNode(uint64 node_id) override {
+  void RemoveActiveOutputNode(uint64_t node_id) override {
     dbus::MethodCall method_call(cras::kCrasControlInterface,
                                  cras::kRemoveActiveOutputNode);
     dbus::MessageWriter writer(&method_call);
@@ -172,7 +175,7 @@
                             dbus::ObjectProxy::EmptyResponseCallback());
   }
 
-  void SwapLeftRight(uint64 node_id, bool swap) override {
+  void SwapLeftRight(uint64_t node_id, bool swap) override {
     dbus::MethodCall method_call(cras::kCrasControlInterface,
                                  cras::kSwapLeftRight);
     dbus::MessageWriter writer(&method_call);
@@ -283,7 +286,7 @@
 
   void ActiveOutputNodeChangedReceived(dbus::Signal* signal) {
     dbus::MessageReader reader(signal);
-    uint64 node_id;
+    uint64_t node_id;
     if (!reader.PopUint64(&node_id)) {
       LOG(ERROR) << "Error reading signal from cras:"
                  << signal->ToString();
@@ -293,7 +296,7 @@
 
   void ActiveInputNodeChangedReceived(dbus::Signal* signal) {
     dbus::MessageReader reader(signal);
-    uint64 node_id;
+    uint64_t node_id;
     if (!reader.PopUint64(&node_id)) {
       LOG(ERROR) << "Error reading signal from cras:"
                  << signal->ToString();
@@ -442,11 +445,9 @@
 void CrasAudioClient::Observer::NodesChanged() {
 }
 
-void CrasAudioClient::Observer::ActiveOutputNodeChanged(uint64 node_id){
-}
+void CrasAudioClient::Observer::ActiveOutputNodeChanged(uint64_t node_id) {}
 
-void CrasAudioClient::Observer::ActiveInputNodeChanged(uint64 node_id) {
-}
+void CrasAudioClient::Observer::ActiveInputNodeChanged(uint64_t node_id) {}
 
 CrasAudioClient::CrasAudioClient() {
 }
diff --git a/chromeos/dbus/cras_audio_client.h b/chromeos/dbus/cras_audio_client.h
index 4b2d7eb..0eff85d 100644
--- a/chromeos/dbus/cras_audio_client.h
+++ b/chromeos/dbus/cras_audio_client.h
@@ -5,7 +5,10 @@
 #ifndef CHROMEOS_DBUS_CRAS_AUDIO_CLIENT_H_
 #define CHROMEOS_DBUS_CRAS_AUDIO_CLIENT_H_
 
+#include <stdint.h>
+
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/observer_list.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/audio_node.h"
@@ -34,10 +37,10 @@
     virtual void NodesChanged();
 
     // Called when active audio output node changed to new node with |node_id|.
-    virtual void ActiveOutputNodeChanged(uint64 node_id);
+    virtual void ActiveOutputNodeChanged(uint64_t node_id);
 
     // Called when active audio input node changed to new node with |node_id|.
-    virtual void ActiveInputNodeChanged(uint64 node_id);
+    virtual void ActiveInputNodeChanged(uint64_t node_id);
 
    protected:
     virtual ~Observer();
@@ -77,50 +80,50 @@
 
   // Sets output volume of the given |node_id| to |volume|, in the rage of
   // [0, 100].
-  virtual void SetOutputNodeVolume(uint64 node_id, int32 volume) = 0;
+  virtual void SetOutputNodeVolume(uint64_t node_id, int32_t volume) = 0;
 
   // Sets output mute from user action.
   virtual void SetOutputUserMute(bool mute_on) = 0;
 
   // Sets input gain of the given |node_id| to |gain|, in the range of
   // [0, 100].
-  virtual void SetInputNodeGain(uint64 node_id, int32 gain) = 0;
+  virtual void SetInputNodeGain(uint64_t node_id, int32_t gain) = 0;
 
   // Sets input mute state to |mute_on| value.
   virtual void SetInputMute(bool mute_on) = 0;
 
   // Sets the active output node to |node_id|.
-  virtual void SetActiveOutputNode(uint64 node_id) = 0;
+  virtual void SetActiveOutputNode(uint64_t node_id) = 0;
 
   // Sets the primary active input node to |node_id|.
-  virtual void SetActiveInputNode(uint64 node_id) = 0;
+  virtual void SetActiveInputNode(uint64_t node_id) = 0;
 
   // Adds input node |node_id| to the active input list. This is used to add
   // an additional active input node besides the one set by SetActiveInputNode.
   // Note that this action will not trigger an ActiveInputNodeChanged event and
   // nothing will happen if the |node_id| has already been set as active.
-  virtual void AddActiveInputNode(uint64 node_id) = 0;
+  virtual void AddActiveInputNode(uint64_t node_id) = 0;
 
   // Removes input node |node_id| from the active input list. This is used for
   // removing an active input node added by AddActiveInputNode.
-  virtual void RemoveActiveInputNode(uint64 node_id) = 0;
+  virtual void RemoveActiveInputNode(uint64_t node_id) = 0;
 
   // Adds input node |node_id| to the active outputs list. This is used to add
   // an additional active output node besides the one set by SetActiveInputNode.
   // Note that this action will not trigger an ActiveOutputNodeChanged event
   // and nothing will happen if the |node_id| has already been set as active.
-  virtual void AddActiveOutputNode(uint64 node_id) = 0;
+  virtual void AddActiveOutputNode(uint64_t node_id) = 0;
 
   // Removes output node |node_id| from the active output list. This is used for
   // removing an active output node added by AddActiveOutputNode.
-  virtual void RemoveActiveOutputNode(uint64 node_id) = 0;
+  virtual void RemoveActiveOutputNode(uint64_t node_id) = 0;
 
   // Swaps the left and right channel of the primary active output device.
   // Swap the left and right channel if |swap| is true; otherwise, swap the left
   // and right channel back to the normal mode.
   // The dbus message will be dropped if this feature is not supported on the
   // |node_id|.
-  virtual void SwapLeftRight(uint64 node_id, bool swap) = 0;
+  virtual void SwapLeftRight(uint64_t node_id, bool swap) = 0;
 
   // Creates the instance.
   static CrasAudioClient* Create();
diff --git a/chromeos/dbus/cros_disks_client.cc b/chromeos/dbus/cros_disks_client.cc
index fafbdec..eee2f72 100644
--- a/chromeos/dbus/cros_disks_client.cc
+++ b/chromeos/dbus/cros_disks_client.cc
@@ -4,12 +4,16 @@
 
 #include "chromeos/dbus/cros_disks_client.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <map>
 
 #include "base/bind.h"
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/stl_util.h"
 #include "base/strings/stringprintf.h"
 #include "base/sys_info.h"
@@ -44,14 +48,14 @@
 const char kMountLabelOption[] = "mountlabel";
 
 // Checks if retrieved media type is in boundaries of DeviceMediaType.
-bool IsValidMediaType(uint32 type) {
-  return type < static_cast<uint32>(cros_disks::DEVICE_MEDIA_NUM_VALUES);
+bool IsValidMediaType(uint32_t type) {
+  return type < static_cast<uint32_t>(cros_disks::DEVICE_MEDIA_NUM_VALUES);
 }
 
 // Translates enum used in cros-disks to enum used in Chrome.
 // Note that we could just do static_cast, but this is less sensitive to
 // changes in cros-disks.
-DeviceType DeviceMediaTypeToDeviceType(uint32 media_type_uint32) {
+DeviceType DeviceMediaTypeToDeviceType(uint32_t media_type_uint32) {
   if (!IsValidMediaType(media_type_uint32))
     return DEVICE_TYPE_UNKNOWN;
 
@@ -77,9 +81,9 @@
 }
 
 bool ReadMountEntryFromDbus(dbus::MessageReader* reader, MountEntry* entry) {
-  uint32 error_code = 0;
+  uint32_t error_code = 0;
   std::string source_path;
-  uint32 mount_type = 0;
+  uint32_t mount_type = 0;
   std::string mount_path;
   if (!reader->PopUint32(&error_code) ||
       !reader->PopString(&source_path) ||
@@ -310,7 +314,7 @@
     // make this fail if reader is not able to read the error code value from
     // the response.
     dbus::MessageReader reader(response);
-    uint32 error_code = 0;
+    uint32_t error_code = 0;
     if (reader.PopUint32(&error_code) &&
         static_cast<MountError>(error_code) != MOUNT_ERROR_NONE) {
       error_callback.Run();
@@ -426,7 +430,7 @@
   // Handles FormatCompleted signal and calls |handler|.
   void OnFormatCompleted(FormatCompletedHandler handler, dbus::Signal* signal) {
     dbus::MessageReader reader(signal);
-    uint32 error_code = 0;
+    uint32_t error_code = 0;
     std::string device_path;
     if (!reader.PopUint32(&error_code) || !reader.PopString(&device_path)) {
       LOG(ERROR) << "Invalid signal: " << signal->ToString();
@@ -519,7 +523,7 @@
 //   }
 //   dict entry {
 //     string "DeviceMediaType"
-//     variant       uint32 1
+//     variant       uint32_t 1
 //   }
 //   dict entry {
 //     string "DeviceMountPaths"
@@ -532,7 +536,7 @@
 //   }
 //   dict entry {
 //     string "DeviceSize"
-//     variant       uint64 7998537728
+//     variant       uint64_t 7998537728
 //   }
 //   dict entry {
 //     string "DriveIsRotational"
@@ -606,15 +610,16 @@
   properties->GetStringWithoutPathExpansion(cros_disks::kIdLabel, &label_);
   properties->GetStringWithoutPathExpansion(cros_disks::kIdUuid, &uuid_);
 
-  // dbus::PopDataAsValue() pops uint64 as double.
-  // The top 11 bits of uint64 are dropped by the use of double. But, this works
+  // dbus::PopDataAsValue() pops uint64_t as double.
+  // The top 11 bits of uint64_t are dropped by the use of double. But, this
+  // works
   // unless the size exceeds 8 PB.
   double device_size_double = 0;
   if (properties->GetDoubleWithoutPathExpansion(cros_disks::kDeviceSize,
                                                 &device_size_double))
     total_size_in_bytes_ = device_size_double;
 
-  // dbus::PopDataAsValue() pops uint32 as double.
+  // dbus::PopDataAsValue() pops uint32_t as double.
   double media_type_double = 0;
   if (properties->GetDoubleWithoutPathExpansion(cros_disks::kDeviceMediaType,
                                                 &media_type_double))
diff --git a/chromeos/dbus/cros_disks_client.h b/chromeos/dbus/cros_disks_client.h
index 840b295..f5d01084 100644
--- a/chromeos/dbus/cros_disks_client.h
+++ b/chromeos/dbus/cros_disks_client.h
@@ -5,11 +5,13 @@
 #ifndef CHROMEOS_DBUS_CROS_DISKS_CLIENT_H_
 #define CHROMEOS_DBUS_CROS_DISKS_CLIENT_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/callback_forward.h"
+#include "base/macros.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/dbus_client.h"
 #include "chromeos/dbus/dbus_client_implementation_type.h"
@@ -153,7 +155,7 @@
   DeviceType device_type() const { return device_type_; }
 
   // Total size of the disk in bytes.
-  uint64 total_size_in_bytes() const { return total_size_in_bytes_; }
+  uint64_t total_size_in_bytes() const { return total_size_in_bytes_; }
 
   // Is the device read-only.
   bool is_read_only() const { return is_read_only_; }
@@ -183,7 +185,7 @@
   std::string product_name_;
   std::string drive_model_;
   DeviceType device_type_;
-  uint64 total_size_in_bytes_;
+  uint64_t total_size_in_bytes_;
   bool is_read_only_;
   bool is_hidden_;
   std::string uuid_;
diff --git a/chromeos/dbus/cros_disks_client_unittest.cc b/chromeos/dbus/cros_disks_client_unittest.cc
index fc4c23f4..82dbf33 100644
--- a/chromeos/dbus/cros_disks_client_unittest.cc
+++ b/chromeos/dbus/cros_disks_client_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "chromeos/dbus/cros_disks_client.h"
 
+#include <stdint.h>
+
 #include "base/memory/scoped_ptr.h"
 #include "dbus/message.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -45,10 +47,10 @@
   const bool kDeviceIsOnBootDevice = true;
   const bool kDeviceIsOnRemovableDevice = true;
   const bool kDeviceIsReadOnly = true;
-  const uint32 kDeviceMediaType = cros_disks::DEVICE_MEDIA_SD;
+  const uint32_t kDeviceMediaType = cros_disks::DEVICE_MEDIA_SD;
   const std::string kMountPath = "/media/removable/UNTITLED";
   const bool kDevicePresentationHide = false;
-  const uint64 kDeviceSize = 16005464064;
+  const uint64_t kDeviceSize = 16005464064;
   const std::string kDriveModel = "DriveModel";
   const std::string kIdLabel = "UNTITLED";
   const std::string kIdUuid = "XXXX-YYYY";
diff --git a/chromeos/dbus/cryptohome_client.cc b/chromeos/dbus/cryptohome_client.cc
index e816b91..c2b3e82 100644
--- a/chromeos/dbus/cryptohome_client.cc
+++ b/chromeos/dbus/cryptohome_client.cc
@@ -4,8 +4,12 @@
 
 #include "chromeos/dbus/cryptohome_client.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "chromeos/cryptohome/async_method_caller.h"
@@ -349,7 +353,7 @@
 
   // CryptohomeClient override.
   bool InstallAttributesGet(const std::string& name,
-                            std::vector<uint8>* value,
+                            std::vector<uint8_t>* value,
                             bool* successful) override {
     dbus::MethodCall method_call(cryptohome::kCryptohomeInterface,
                                  cryptohome::kCryptohomeInstallAttributesGet);
@@ -360,7 +364,7 @@
     if (!response.get())
       return false;
     dbus::MessageReader reader(response.get());
-    const uint8* bytes = NULL;
+    const uint8_t* bytes = NULL;
     size_t length = 0;
     if (!reader.PopArrayOfBytes(&bytes, &length) ||
         !reader.PopBool(successful))
@@ -371,7 +375,7 @@
 
   // CryptohomeClient override.
   bool InstallAttributesSet(const std::string& name,
-                            const std::vector<uint8>& value,
+                            const std::vector<uint8_t>& value,
                             bool* successful) override {
     dbus::MethodCall method_call(cryptohome::kCryptohomeInterface,
                                  cryptohome::kCryptohomeInstallAttributesSet);
@@ -457,7 +461,7 @@
     dbus::MessageWriter writer(&method_call);
     writer.AppendInt32(pca_type);
     writer.AppendArrayOfBytes(
-        reinterpret_cast<const uint8*>(pca_response.data()),
+        reinterpret_cast<const uint8_t*>(pca_response.data()),
         pca_response.size());
     proxy_->CallMethod(&method_call, kTpmDBusTimeoutMs ,
                        base::Bind(&CryptohomeClientImpl::OnAsyncMethodCall,
@@ -498,7 +502,7 @@
         cryptohome::kCryptohomeAsyncTpmAttestationFinishCertRequest);
     dbus::MessageWriter writer(&method_call);
     writer.AppendArrayOfBytes(
-        reinterpret_cast<const uint8*>(pca_response.data()),
+        reinterpret_cast<const uint8_t*>(pca_response.data()),
         pca_response.size());
     bool is_user_specific = (key_type == attestation::KEY_USER);
     writer.AppendBool(is_user_specific);
@@ -604,13 +608,13 @@
     writer.AppendString(user_id);
     writer.AppendString(key_name);
     writer.AppendString(domain);
-    writer.AppendArrayOfBytes(reinterpret_cast<const uint8*>(device_id.data()),
-                              device_id.size());
+    writer.AppendArrayOfBytes(
+        reinterpret_cast<const uint8_t*>(device_id.data()), device_id.size());
     bool include_signed_public_key =
         (options & attestation::CHALLENGE_INCLUDE_SIGNED_PUBLIC_KEY);
     writer.AppendBool(include_signed_public_key);
-    writer.AppendArrayOfBytes(reinterpret_cast<const uint8*>(challenge.data()),
-                              challenge.size());
+    writer.AppendArrayOfBytes(
+        reinterpret_cast<const uint8_t*>(challenge.data()), challenge.size());
     proxy_->CallMethod(&method_call, kTpmDBusTimeoutMs ,
                        base::Bind(&CryptohomeClientImpl::OnAsyncMethodCall,
                                   weak_ptr_factory_.GetWeakPtr(),
@@ -632,8 +636,8 @@
     writer.AppendBool(is_user_specific);
     writer.AppendString(user_id);
     writer.AppendString(key_name);
-    writer.AppendArrayOfBytes(reinterpret_cast<const uint8*>(challenge.data()),
-                              challenge.size());
+    writer.AppendArrayOfBytes(
+        reinterpret_cast<const uint8_t*>(challenge.data()), challenge.size());
     proxy_->CallMethod(&method_call, kTpmDBusTimeoutMs ,
                        base::Bind(&CryptohomeClientImpl::OnAsyncMethodCall,
                                   weak_ptr_factory_.GetWeakPtr(),
@@ -675,7 +679,7 @@
     writer.AppendBool(is_user_specific);
     writer.AppendString(user_id);
     writer.AppendString(key_name);
-    writer.AppendArrayOfBytes(reinterpret_cast<const uint8*>(payload.data()),
+    writer.AppendArrayOfBytes(reinterpret_cast<const uint8_t*>(payload.data()),
                               payload.size());
     CallBoolMethod(&method_call, callback);
   }
@@ -901,18 +905,18 @@
   void OnGetSystemSalt(const GetSystemSaltCallback& callback,
                        dbus::Response* response) {
     if (!response) {
-      callback.Run(DBUS_METHOD_CALL_FAILURE, std::vector<uint8>());
+      callback.Run(DBUS_METHOD_CALL_FAILURE, std::vector<uint8_t>());
       return;
     }
     dbus::MessageReader reader(response);
-    const uint8* bytes = NULL;
+    const uint8_t* bytes = NULL;
     size_t length = 0;
     if (!reader.PopArrayOfBytes(&bytes, &length)) {
-      callback.Run(DBUS_METHOD_CALL_FAILURE, std::vector<uint8>());
+      callback.Run(DBUS_METHOD_CALL_FAILURE, std::vector<uint8_t>());
       return;
     }
     callback.Run(DBUS_METHOD_CALL_SUCCESS,
-                 std::vector<uint8>(bytes, bytes + length));
+                 std::vector<uint8_t>(bytes, bytes + length));
   }
 
   // Calls a method without result values.
@@ -995,7 +999,7 @@
       return;
     }
     dbus::MessageReader reader(response);
-    const uint8* data_buffer = NULL;
+    const uint8_t* data_buffer = NULL;
     size_t data_length = 0;
     bool result = false;
     if (!reader.PopArrayOfBytes(&data_buffer, &data_length) ||
@@ -1084,7 +1088,7 @@
     dbus::MessageReader reader(signal);
     int async_id = 0;
     bool return_status = false;
-    const uint8* return_data_buffer = NULL;
+    const uint8_t* return_data_buffer = NULL;
     size_t return_data_length = 0;
     if (!reader.PopInt32(&async_id) ||
         !reader.PopBool(&return_status) ||
diff --git a/chromeos/dbus/cryptohome_client.h b/chromeos/dbus/cryptohome_client.h
index 8f9a5dc4..09116e3 100644
--- a/chromeos/dbus/cryptohome_client.h
+++ b/chromeos/dbus/cryptohome_client.h
@@ -5,11 +5,13 @@
 #ifndef CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_
 #define CHROMEOS_DBUS_CRYPTOHOME_CLIENT_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "chromeos/attestation/attestation_constants.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/dbus_client.h"
@@ -56,9 +58,9 @@
   // A callback to handle responses of AsyncXXX methods.
   typedef base::Callback<void(int async_id)> AsyncMethodCallback;
   // A callback for GetSystemSalt().
-  typedef base::Callback<void(
-      DBusMethodCallStatus call_status,
-      const std::vector<uint8>& system_salt)> GetSystemSaltCallback;
+  typedef base::Callback<void(DBusMethodCallStatus call_status,
+                              const std::vector<uint8_t>& system_salt)>
+      GetSystemSaltCallback;
   // A callback for WaitForServiceToBeAvailable().
   typedef base::Callback<void(bool service_is_ready)>
       WaitForServiceToBeAvailableCallback;
@@ -250,13 +252,13 @@
   // This method blocks until the call returns.
   // The original content of |value| is lost.
   virtual bool InstallAttributesGet(const std::string& name,
-                                    std::vector<uint8>* value,
+                                    std::vector<uint8_t>* value,
                                     bool* successful) = 0;
 
   // Calls InstallAttributesSet method and returns true when the call succeeds.
   // This method blocks until the call returns.
   virtual bool InstallAttributesSet(const std::string& name,
-                                    const std::vector<uint8>& value,
+                                    const std::vector<uint8_t>& value,
                                     bool* successful) = 0;
 
   // Calls InstallAttributesFinalize method and returns true when the call
diff --git a/chromeos/dbus/dbus_client.h b/chromeos/dbus/dbus_client.h
index d52de3e..07e6914 100644
--- a/chromeos/dbus/dbus_client.h
+++ b/chromeos/dbus/dbus_client.h
@@ -5,7 +5,6 @@
 #ifndef CHROMEOS_DBUS_DBUS_CLIENT_H_
 #define CHROMEOS_DBUS_DBUS_CLIENT_H_
 
-#include "base/basictypes.h"
 
 namespace dbus {
 class Bus;
diff --git a/chromeos/dbus/dbus_client_bundle.cc b/chromeos/dbus/dbus_client_bundle.cc
index 87e6598..dbd2b27 100644
--- a/chromeos/dbus/dbus_client_bundle.cc
+++ b/chromeos/dbus/dbus_client_bundle.cc
@@ -4,6 +4,8 @@
 
 #include "chromeos/dbus/dbus_client_bundle.h"
 
+#include <stddef.h>
+
 #include <vector>
 
 #include "base/command_line.h"
diff --git a/chromeos/dbus/dbus_client_bundle.h b/chromeos/dbus/dbus_client_bundle.h
index ea39ad9..478a5d5 100644
--- a/chromeos/dbus/dbus_client_bundle.h
+++ b/chromeos/dbus/dbus_client_bundle.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "chromeos/chromeos_export.h"
 
diff --git a/chromeos/dbus/dbus_client_bundle_unittest.cc b/chromeos/dbus/dbus_client_bundle_unittest.cc
index e7f63bd..bfc439b 100644
--- a/chromeos/dbus/dbus_client_bundle_unittest.cc
+++ b/chromeos/dbus/dbus_client_bundle_unittest.cc
@@ -4,7 +4,6 @@
 
 #include "chromeos/dbus/dbus_client_bundle.h"
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
diff --git a/chromeos/dbus/dbus_thread_manager.h b/chromeos/dbus/dbus_thread_manager.h
index 83f3c26..4566083 100644
--- a/chromeos/dbus/dbus_thread_manager.h
+++ b/chromeos/dbus/dbus_thread_manager.h
@@ -8,6 +8,7 @@
 #include <string>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "chromeos/chromeos_export.h"
diff --git a/chromeos/dbus/debug_daemon_client.cc b/chromeos/dbus/debug_daemon_client.cc
index b2f4acc..c0f05ff 100644
--- a/chromeos/dbus/debug_daemon_client.cc
+++ b/chromeos/dbus/debug_daemon_client.cc
@@ -5,6 +5,8 @@
 #include "chromeos/dbus/debug_daemon_client.h"
 
 #include <fcntl.h>
+#include <stddef.h>
+#include <stdint.h>
 #include <unistd.h>
 #include <string>
 #include <vector>
@@ -13,6 +15,7 @@
 #include "base/bind_helpers.h"
 #include "base/files/file_path.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/message_loop/message_loop.h"
 #include "base/posix/eintr_wrapper.h"
 #include "base/strings/string_util.h"
@@ -464,18 +467,18 @@
     if (!reader.PopInt32(&status))
       return;
 
-    const uint8* buffer = nullptr;
+    const uint8_t* buffer = nullptr;
     size_t buf_size = 0;
 
     if (!reader.PopArrayOfBytes(&buffer, &buf_size))
       return;
-    std::vector<uint8> perf_data;
+    std::vector<uint8_t> perf_data;
     if (buf_size > 0)
       perf_data.insert(perf_data.end(), buffer, buffer + buf_size);
 
     if (!reader.PopArrayOfBytes(&buffer, &buf_size))
       return;
-    std::vector<uint8> perf_stat;
+    std::vector<uint8_t> perf_stat;
     if (buf_size > 0)
       perf_stat.insert(perf_stat.end(), buffer, buffer + buf_size);
 
@@ -533,7 +536,7 @@
     if (callback.is_null())
       return;
 
-    int32 feature_mask = DEV_FEATURE_NONE;
+    int32_t feature_mask = DEV_FEATURE_NONE;
     if (!response || !dbus::MessageReader(response).PopInt32(&feature_mask)) {
       callback.Run(false, debugd::DevFeatureFlag::DEV_FEATURES_DISABLED);
       return;
diff --git a/chromeos/dbus/debug_daemon_client.h b/chromeos/dbus/debug_daemon_client.h
index a11d6ec..51d53314 100644
--- a/chromeos/dbus/debug_daemon_client.h
+++ b/chromeos/dbus/debug_daemon_client.h
@@ -5,10 +5,13 @@
 #ifndef CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_
 #define CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_
 
+#include <stdint.h>
+
 #include <map>
 
 #include "base/callback.h"
 #include "base/files/file.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted_memory.h"
 #include "base/task_runner.h"
 #include "base/trace_event/tracing_agent.h"
@@ -94,8 +97,8 @@
   // - Output from "perf stat", in PerfStatProto format.
   using GetPerfOutputCallback =
       base::Callback<void(int status,
-                          const std::vector<uint8>& perf_data,
-                          const std::vector<uint8>& perf_stat)>;
+                          const std::vector<uint8_t>& perf_data,
+                          const std::vector<uint8_t>& perf_stat)>;
 
   // Runs perf with arguments for |duration| seconds and returns data collected.
   virtual void GetPerfOutput(uint32_t duration,
diff --git a/chromeos/dbus/easy_unlock_client.cc b/chromeos/dbus/easy_unlock_client.cc
index c05b2573..df0a510 100644
--- a/chromeos/dbus/easy_unlock_client.cc
+++ b/chromeos/dbus/easy_unlock_client.cc
@@ -4,10 +4,14 @@
 
 #include "chromeos/dbus/easy_unlock_client.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <vector>
 
 #include "base/bind.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "dbus/bus.h"
 #include "dbus/message.h"
 #include "dbus/object_path.h"
@@ -20,7 +24,7 @@
 
 // Reads array of bytes from a dbus message reader and converts it to string.
 std::string PopResponseData(dbus::MessageReader* reader) {
-  const uint8* bytes = NULL;
+  const uint8_t* bytes = NULL;
   size_t length = 0;
   if (!reader->PopArrayOfBytes(&bytes, &length))
     return "";
@@ -31,7 +35,7 @@
 // Converts string to array of bytes and writes it using dbus meddage writer.
 void AppendStringAsByteArray(const std::string& data,
                              dbus::MessageWriter* writer) {
-  writer->AppendArrayOfBytes(reinterpret_cast<const uint8*>(data.data()),
+  writer->AppendArrayOfBytes(reinterpret_cast<const uint8_t*>(data.data()),
                              data.length());
 }
 
diff --git a/chromeos/dbus/easy_unlock_client.h b/chromeos/dbus/easy_unlock_client.h
index 56307318..9f233a3 100644
--- a/chromeos/dbus/easy_unlock_client.h
+++ b/chromeos/dbus/easy_unlock_client.h
@@ -7,8 +7,8 @@
 
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/dbus_client.h"
 
diff --git a/chromeos/dbus/fake_amplifier_client.h b/chromeos/dbus/fake_amplifier_client.h
index 48d1bb6..f5b44fd 100644
--- a/chromeos/dbus/fake_amplifier_client.h
+++ b/chromeos/dbus/fake_amplifier_client.h
@@ -5,7 +5,7 @@
 #ifndef CHROMEOS_DBUS_FAKE_AMPLIFIER_CLIENT_H_
 #define CHROMEOS_DBUS_FAKE_AMPLIFIER_CLIENT_H_
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/amplifier_client.h"
 #include "chromeos/dbus/dbus_client.h"
diff --git a/chromeos/dbus/fake_ap_manager_client.h b/chromeos/dbus/fake_ap_manager_client.h
index 24b8cc6..4998167 100644
--- a/chromeos/dbus/fake_ap_manager_client.h
+++ b/chromeos/dbus/fake_ap_manager_client.h
@@ -9,6 +9,7 @@
 #include <string>
 #include <vector>
 
+#include "base/macros.h"
 #include "chromeos/dbus/ap_manager_client.h"
 
 namespace chromeos {
diff --git a/chromeos/dbus/fake_audio_dsp_client.cc b/chromeos/dbus/fake_audio_dsp_client.cc
index f58b9f7..55e9fda 100644
--- a/chromeos/dbus/fake_audio_dsp_client.cc
+++ b/chromeos/dbus/fake_audio_dsp_client.cc
@@ -4,6 +4,8 @@
 
 #include "chromeos/dbus/fake_audio_dsp_client.h"
 
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/location.h"
 #include "base/single_thread_task_runner.h"
@@ -106,7 +108,7 @@
 }
 
 void FakeAudioDspClient::SetCapabilitiesOEM(
-    uint32 speaker_id,
+    uint32_t speaker_id,
     const std::string& speaker_capabilities,
     const std::string& driver_capabilities,
     const VoidDBusMethodCallback& callback) {
@@ -115,7 +117,7 @@
 }
 
 void FakeAudioDspClient::GetFilterConfigOEM(
-    uint32 speaker_id,
+    uint32_t speaker_id,
     const TwoStringDBusMethodCallback& callback) {
   base::ThreadTaskRunnerHandle::Get()->PostTask(
       FROM_HERE, base::Bind(&OnTwoStringDBusMethod, callback));
@@ -129,7 +131,7 @@
       FROM_HERE, base::Bind(&OnVoidDBusMethod, callback));
 }
 
-void FakeAudioDspClient::SetSourceType(uint16 source_type,
+void FakeAudioDspClient::SetSourceType(uint16_t source_type,
                                        const VoidDBusMethodCallback& callback) {
   base::ThreadTaskRunnerHandle::Get()->PostTask(
       FROM_HERE, base::Bind(&OnVoidDBusMethod, callback));
diff --git a/chromeos/dbus/fake_audio_dsp_client.h b/chromeos/dbus/fake_audio_dsp_client.h
index 05181ca..7bdab2a0 100644
--- a/chromeos/dbus/fake_audio_dsp_client.h
+++ b/chromeos/dbus/fake_audio_dsp_client.h
@@ -5,7 +5,9 @@
 #ifndef CHROMEOS_DBUS_FAKE_AUDIO_DSP_CLIENT_H_
 #define CHROMEOS_DBUS_FAKE_AUDIO_DSP_CLIENT_H_
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/audio_dsp_client.h"
 #include "chromeos/dbus/dbus_client.h"
@@ -36,16 +38,16 @@
   void GetBass(const DoubleDBusMethodCallback& callback) override;
   void GetCapabilitiesOEM(
       const ThreeStringDBusMethodCallback& callback) override;
-  void SetCapabilitiesOEM(uint32 speaker_id,
+  void SetCapabilitiesOEM(uint32_t speaker_id,
                           const std::string& speaker_capabilities,
                           const std::string& driver_capabilities,
                           const VoidDBusMethodCallback& callback) override;
-  void GetFilterConfigOEM(uint32 speaker_id,
+  void GetFilterConfigOEM(uint32_t speaker_id,
                           const TwoStringDBusMethodCallback& callback) override;
   void SetFilterConfigOEM(const std::string& speaker_config,
                           const std::string& driver_config,
                           const VoidDBusMethodCallback& callback) override;
-  void SetSourceType(uint16 source_type,
+  void SetSourceType(uint16_t source_type,
                      const VoidDBusMethodCallback& callback) override;
   void AmplifierVolumeChanged(double db_spl,
                               const VoidDBusMethodCallback& callback) override;
diff --git a/chromeos/dbus/fake_cras_audio_client.cc b/chromeos/dbus/fake_cras_audio_client.cc
index e28852b..f2e0a6142 100644
--- a/chromeos/dbus/fake_cras_audio_client.cc
+++ b/chromeos/dbus/fake_cras_audio_client.cc
@@ -98,7 +98,8 @@
   callback.Run(node_list_, true);
 }
 
-void FakeCrasAudioClient::SetOutputNodeVolume(uint64 node_id, int32 volume) {}
+void FakeCrasAudioClient::SetOutputNodeVolume(uint64_t node_id,
+                                              int32_t volume) {}
 
 void FakeCrasAudioClient::SetOutputUserMute(bool mute_on) {
   volume_state_.output_user_mute = mute_on;
@@ -106,7 +107,8 @@
                     OutputMuteChanged(volume_state_.output_user_mute));
 }
 
-void FakeCrasAudioClient::SetInputNodeGain(uint64 node_id, int32 input_gain) {}
+void FakeCrasAudioClient::SetInputNodeGain(uint64_t node_id,
+                                           int32_t input_gain) {}
 
 void FakeCrasAudioClient::SetInputMute(bool mute_on) {
   volume_state_.input_mute = mute_on;
@@ -114,7 +116,7 @@
                     InputMuteChanged(volume_state_.input_mute));
 }
 
-void FakeCrasAudioClient::SetActiveOutputNode(uint64 node_id) {
+void FakeCrasAudioClient::SetActiveOutputNode(uint64_t node_id) {
   if (active_output_node_id_ == node_id)
     return;
 
@@ -128,7 +130,7 @@
   FOR_EACH_OBSERVER(Observer, observers_, ActiveOutputNodeChanged(node_id));
 }
 
-void FakeCrasAudioClient::SetActiveInputNode(uint64 node_id) {
+void FakeCrasAudioClient::SetActiveInputNode(uint64_t node_id) {
   if (active_input_node_id_ == node_id)
     return;
 
@@ -142,31 +144,30 @@
   FOR_EACH_OBSERVER(Observer, observers_, ActiveInputNodeChanged(node_id));
 }
 
-void FakeCrasAudioClient::AddActiveInputNode(uint64 node_id) {
+void FakeCrasAudioClient::AddActiveInputNode(uint64_t node_id) {
   for (size_t i = 0; i < node_list_.size(); ++i) {
     if (node_list_[i].id == node_id)
       node_list_[i].active = true;
   }
 }
 
-void FakeCrasAudioClient::RemoveActiveInputNode(uint64 node_id) {
+void FakeCrasAudioClient::RemoveActiveInputNode(uint64_t node_id) {
   for (size_t i = 0; i < node_list_.size(); ++i) {
     if (node_list_[i].id == node_id)
       node_list_[i].active = false;
   }
 }
 
-void FakeCrasAudioClient::SwapLeftRight(uint64 node_id, bool swap) {
-}
+void FakeCrasAudioClient::SwapLeftRight(uint64_t node_id, bool swap) {}
 
-void FakeCrasAudioClient::AddActiveOutputNode(uint64 node_id) {
+void FakeCrasAudioClient::AddActiveOutputNode(uint64_t node_id) {
   for (size_t i = 0; i < node_list_.size(); ++i) {
     if (node_list_[i].id == node_id)
       node_list_[i].active = true;
   }
 }
 
-void FakeCrasAudioClient::RemoveActiveOutputNode(uint64 node_id) {
+void FakeCrasAudioClient::RemoveActiveOutputNode(uint64_t node_id) {
   for (size_t i = 0; i < node_list_.size(); ++i) {
     if (node_list_[i].id == node_id)
       node_list_[i].active = false;
@@ -182,7 +183,7 @@
   FOR_EACH_OBSERVER(Observer, observers_, NodesChanged());
 }
 
-void FakeCrasAudioClient::RemoveAudioNodeFromList(const uint64& node_id) {
+void FakeCrasAudioClient::RemoveAudioNodeFromList(const uint64_t& node_id) {
   auto iter = FindNode(node_id);
   if (iter != node_list_.end()) {
     node_list_.erase(iter);
@@ -201,7 +202,7 @@
   FOR_EACH_OBSERVER(Observer, observers_, NodesChanged());
 }
 
-AudioNodeList::iterator FakeCrasAudioClient::FindNode(uint64 node_id) {
+AudioNodeList::iterator FakeCrasAudioClient::FindNode(uint64_t node_id) {
   return std::find_if(
       node_list_.begin(), node_list_.end(),
       [node_id](const AudioNode& node) { return node_id == node.id; });
diff --git a/chromeos/dbus/fake_cras_audio_client.h b/chromeos/dbus/fake_cras_audio_client.h
index cb15ab6..7ba80ab 100644
--- a/chromeos/dbus/fake_cras_audio_client.h
+++ b/chromeos/dbus/fake_cras_audio_client.h
@@ -5,6 +5,9 @@
 #ifndef CHROMEOS_DBUS_FAKE_CRAS_AUDIO_CLIENT_H_
 #define CHROMEOS_DBUS_FAKE_CRAS_AUDIO_CLIENT_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/cras_audio_client.h"
 
@@ -26,17 +29,17 @@
   void GetVolumeState(const GetVolumeStateCallback& callback) override;
   void GetNodes(const GetNodesCallback& callback,
                 const ErrorCallback& error_callback) override;
-  void SetOutputNodeVolume(uint64 node_id, int32 volume) override;
+  void SetOutputNodeVolume(uint64_t node_id, int32_t volume) override;
   void SetOutputUserMute(bool mute_on) override;
-  void SetInputNodeGain(uint64 node_id, int32 gain) override;
+  void SetInputNodeGain(uint64_t node_id, int32_t gain) override;
   void SetInputMute(bool mute_on) override;
-  void SetActiveOutputNode(uint64 node_id) override;
-  void SetActiveInputNode(uint64 node_id) override;
-  void AddActiveInputNode(uint64 node_id) override;
-  void RemoveActiveInputNode(uint64 node_id) override;
-  void AddActiveOutputNode(uint64 node_id) override;
-  void RemoveActiveOutputNode(uint64 node_id) override;
-  void SwapLeftRight(uint64 node_id, bool swap) override;
+  void SetActiveOutputNode(uint64_t node_id) override;
+  void SetActiveInputNode(uint64_t node_id) override;
+  void AddActiveInputNode(uint64_t node_id) override;
+  void RemoveActiveInputNode(uint64_t node_id) override;
+  void AddActiveOutputNode(uint64_t node_id) override;
+  void RemoveActiveOutputNode(uint64_t node_id) override;
+  void SwapLeftRight(uint64_t node_id, bool swap) override;
 
   // Modifies an AudioNode from |node_list_| based on |audio_node.id|.
   // if the |audio_node.id| cannot be found in list, Add an
@@ -44,7 +47,7 @@
   void InsertAudioNodeToList(const AudioNode& audio_node);
 
   // Removes an AudioNode from |node_list_| based on |node_id|.
-  void RemoveAudioNodeFromList(const uint64& node_id);
+  void RemoveAudioNodeFromList(const uint64_t& node_id);
 
   // Updates |node_list_| to contain |audio_nodes|.
   void SetAudioNodesForTesting(const AudioNodeList& audio_nodes);
@@ -54,17 +57,19 @@
       const AudioNodeList& new_nodes);
 
   const AudioNodeList& node_list() const { return node_list_; }
-  const uint64& active_input_node_id() const { return active_input_node_id_; }
-  const uint64& active_output_node_id() const { return active_output_node_id_; }
+  const uint64_t& active_input_node_id() const { return active_input_node_id_; }
+  const uint64_t& active_output_node_id() const {
+    return active_output_node_id_;
+  }
 
  private:
   // Find a node in the list based on the id.
-  AudioNodeList::iterator FindNode(uint64 node_id);
+  AudioNodeList::iterator FindNode(uint64_t node_id);
 
   VolumeState volume_state_;
   AudioNodeList node_list_;
-  uint64 active_input_node_id_;
-  uint64 active_output_node_id_;
+  uint64_t active_input_node_id_;
+  uint64_t active_output_node_id_;
   base::ObserverList<Observer> observers_;
 
   DISALLOW_COPY_AND_ASSIGN(FakeCrasAudioClient);
diff --git a/chromeos/dbus/fake_cryptohome_client.cc b/chromeos/dbus/fake_cryptohome_client.cc
index 8b64fd9..236b1f9 100644
--- a/chromeos/dbus/fake_cryptohome_client.cc
+++ b/chromeos/dbus/fake_cryptohome_client.cc
@@ -4,6 +4,9 @@
 
 #include "chromeos/dbus/fake_cryptohome_client.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/files/file_util.h"
 #include "base/location.h"
@@ -231,8 +234,8 @@
 }
 
 bool FakeCryptohomeClient::InstallAttributesGet(const std::string& name,
-                                                    std::vector<uint8>* value,
-                                                    bool* successful) {
+                                                std::vector<uint8_t>* value,
+                                                bool* successful) {
   if (install_attrs_.find(name) != install_attrs_.end()) {
     *value = install_attrs_[name];
     *successful = true;
@@ -245,7 +248,7 @@
 
 bool FakeCryptohomeClient::InstallAttributesSet(
     const std::string& name,
-    const std::vector<uint8>& value,
+    const std::vector<uint8_t>& value,
     bool* successful) {
   install_attrs_[name] = value;
   *successful = true;
@@ -280,7 +283,7 @@
     const int kVarLengthTag1 = (1 << 3) | 0x2;
     const int kVarLengthTag2 = (2 << 3) | 0x2;
 
-    typedef std::map<std::string, std::vector<uint8> >::const_iterator Iter;
+    typedef std::map<std::string, std::vector<uint8_t>>::const_iterator Iter;
     for (Iter it = install_attrs_.begin(); it != install_attrs_.end(); ++it) {
       std::string attr;
       {
@@ -552,10 +555,10 @@
 }
 
 // static
-std::vector<uint8> FakeCryptohomeClient::GetStubSystemSalt() {
+std::vector<uint8_t> FakeCryptohomeClient::GetStubSystemSalt() {
   const char kStubSystemSalt[] = "stub_system_salt";
-  return std::vector<uint8>(kStubSystemSalt,
-                            kStubSystemSalt + arraysize(kStubSystemSalt) - 1);
+  return std::vector<uint8_t>(kStubSystemSalt,
+                              kStubSystemSalt + arraysize(kStubSystemSalt) - 1);
 }
 
 void FakeCryptohomeClient::ReturnProtobufMethodCallback(
diff --git a/chromeos/dbus/fake_cryptohome_client.h b/chromeos/dbus/fake_cryptohome_client.h
index 7064a2e..801faaf 100644
--- a/chromeos/dbus/fake_cryptohome_client.h
+++ b/chromeos/dbus/fake_cryptohome_client.h
@@ -5,9 +5,11 @@
 #ifndef CHROMEOS_DBUS_FAKE_CRYPTOHOME_CLIENT_H_
 #define CHROMEOS_DBUS_FAKE_CRYPTOHOME_CLIENT_H_
 
+#include <stdint.h>
+
 #include <map>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "chromeos/dbus/cryptohome_client.h"
 
@@ -71,10 +73,10 @@
       const std::string& username,
       const Pkcs11GetTpmTokenInfoCallback& callback) override;
   bool InstallAttributesGet(const std::string& name,
-                            std::vector<uint8>* value,
+                            std::vector<uint8_t>* value,
                             bool* successful) override;
   bool InstallAttributesSet(const std::string& name,
-                            const std::vector<uint8>& value,
+                            const std::vector<uint8_t>& value,
                             bool* successful) override;
   bool InstallAttributesFinalize(bool* successful) override;
   void InstallAttributesIsReady(
@@ -195,13 +197,13 @@
   // Sets the system salt which will be returned from GetSystemSalt(). By
   // default, GetSystemSalt() returns the value generated by
   // GetStubSystemSalt().
-  void set_system_salt(const std::vector<uint8>& system_salt) {
+  void set_system_salt(const std::vector<uint8_t>& system_salt) {
     system_salt_ = system_salt;
   }
 
   // Returns the stub system salt as raw bytes. (not as a string encoded in the
   // format used by SystemSaltGetter::ConvertRawSaltToHexString()).
-  static std::vector<uint8> GetStubSystemSalt();
+  static std::vector<uint8_t> GetStubSystemSalt();
 
  private:
   void ReturnProtobufMethodCallback(
@@ -221,14 +223,14 @@
   AsyncCallStatusHandler async_call_status_handler_;
   AsyncCallStatusWithDataHandler async_call_status_data_handler_;
   bool unmount_result_;
-  std::vector<uint8> system_salt_;
+  std::vector<uint8_t> system_salt_;
 
   std::vector<WaitForServiceToBeAvailableCallback>
       pending_wait_for_service_to_be_available_callbacks_;
 
   // A stub store for InstallAttributes, mapping an attribute name to the
   // associated data blob. Used to implement InstallAttributesSet and -Get.
-  std::map<std::string, std::vector<uint8> > install_attrs_;
+  std::map<std::string, std::vector<uint8_t>> install_attrs_;
   bool locked_;
   base::WeakPtrFactory<FakeCryptohomeClient> weak_ptr_factory_;
 
diff --git a/chromeos/dbus/fake_debug_daemon_client.cc b/chromeos/dbus/fake_debug_daemon_client.cc
index bdfa7aa..a2952ec 100644
--- a/chromeos/dbus/fake_debug_daemon_client.cc
+++ b/chromeos/dbus/fake_debug_daemon_client.cc
@@ -4,6 +4,9 @@
 
 #include "chromeos/dbus/fake_debug_daemon_client.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <map>
 #include <string>
 
@@ -106,8 +109,8 @@
     const std::vector<std::string>& perf_args,
     const GetPerfOutputCallback& callback) {
   int status = 0;
-  std::vector<uint8> perf_data;
-  std::vector<uint8> perf_stat;
+  std::vector<uint8_t> perf_data;
+  std::vector<uint8_t> perf_stat;
   base::ThreadTaskRunnerHandle::Get()->PostTask(
       FROM_HERE, base::Bind(callback, status, perf_data, perf_stat));
 }
diff --git a/chromeos/dbus/fake_debug_daemon_client.h b/chromeos/dbus/fake_debug_daemon_client.h
index 9c02fe2..a75edbf3 100644
--- a/chromeos/dbus/fake_debug_daemon_client.h
+++ b/chromeos/dbus/fake_debug_daemon_client.h
@@ -5,10 +5,12 @@
 #ifndef CHROMEOS_DBUS_FAKE_DEBUG_DAEMON_CLIENT_H_
 #define CHROMEOS_DBUS_FAKE_DEBUG_DAEMON_CLIENT_H_
 
+#include <stdint.h>
+
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "chromeos/dbus/debug_daemon_client.h"
 
 namespace chromeos {
diff --git a/chromeos/dbus/fake_easy_unlock_client.h b/chromeos/dbus/fake_easy_unlock_client.h
index 4f56b78..e94cc54 100644
--- a/chromeos/dbus/fake_easy_unlock_client.h
+++ b/chromeos/dbus/fake_easy_unlock_client.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "chromeos/dbus/easy_unlock_client.h"
 
 namespace chromeos {
diff --git a/chromeos/dbus/fake_gsm_sms_client.cc b/chromeos/dbus/fake_gsm_sms_client.cc
index ba1286bd..8806988 100644
--- a/chromeos/dbus/fake_gsm_sms_client.cc
+++ b/chromeos/dbus/fake_gsm_sms_client.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/location.h"
 #include "base/single_thread_task_runner.h"
@@ -45,7 +47,7 @@
 
 void FakeGsmSMSClient::Delete(const std::string& service_name,
                               const dbus::ObjectPath& object_path,
-                              uint32 index,
+                              uint32_t index,
                               const DeleteCallback& callback) {
   message_list_.Remove(index, NULL);
   callback.Run();
@@ -53,7 +55,7 @@
 
 void FakeGsmSMSClient::Get(const std::string& service_name,
                            const dbus::ObjectPath& object_path,
-                           uint32 index,
+                           uint32_t index,
                            const GetCallback& callback) {
   base::DictionaryValue* dictionary = NULL;
   if (message_list_.GetDictionary(index, &dictionary)) {
diff --git a/chromeos/dbus/fake_gsm_sms_client.h b/chromeos/dbus/fake_gsm_sms_client.h
index 69a3ebe..0df9c12 100644
--- a/chromeos/dbus/fake_gsm_sms_client.h
+++ b/chromeos/dbus/fake_gsm_sms_client.h
@@ -5,8 +5,11 @@
 #ifndef CHROMEOS_DBUS_FAKE_GSM_SMS_CLIENT_H_
 #define CHROMEOS_DBUS_FAKE_GSM_SMS_CLIENT_H_
 
+#include <stdint.h>
+
 #include <string>
 
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/values.h"
 #include "chromeos/dbus/gsm_sms_client.h"
@@ -29,11 +32,11 @@
                                const dbus::ObjectPath& object_path) override;
   void Delete(const std::string& service_name,
               const dbus::ObjectPath& object_path,
-              uint32 index,
+              uint32_t index,
               const DeleteCallback& callback) override;
   void Get(const std::string& service_name,
            const dbus::ObjectPath& object_path,
-           uint32 index,
+           uint32_t index,
            const GetCallback& callback) override;
   void List(const std::string& service_name,
             const dbus::ObjectPath& object_path,
diff --git a/chromeos/dbus/fake_image_burner_client.h b/chromeos/dbus/fake_image_burner_client.h
index 0941706..69a041e0 100644
--- a/chromeos/dbus/fake_image_burner_client.h
+++ b/chromeos/dbus/fake_image_burner_client.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "chromeos/dbus/image_burner_client.h"
 
 namespace chromeos {
diff --git a/chromeos/dbus/fake_introspectable_client.h b/chromeos/dbus/fake_introspectable_client.h
index d16a6cb..6525ec8 100644
--- a/chromeos/dbus/fake_introspectable_client.h
+++ b/chromeos/dbus/fake_introspectable_client.h
@@ -5,7 +5,6 @@
 #ifndef CHROMEOS_DBUS_FAKE_INTROSPECTABLE_CLIENT_H_
 #define CHROMEOS_DBUS_FAKE_INTROSPECTABLE_CLIENT_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
 #include "chromeos/dbus/introspectable_client.h"
 
diff --git a/chromeos/dbus/fake_lorgnette_manager_client.h b/chromeos/dbus/fake_lorgnette_manager_client.h
index a5fde7c..3fd8b27 100644
--- a/chromeos/dbus/fake_lorgnette_manager_client.h
+++ b/chromeos/dbus/fake_lorgnette_manager_client.h
@@ -5,8 +5,8 @@
 #ifndef CHROMEOS_DBUS_FAKE_LORGNETTE_MANAGER_CLIENT_H_
 #define CHROMEOS_DBUS_FAKE_LORGNETTE_MANAGER_CLIENT_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "chromeos/dbus/lorgnette_manager_client.h"
 
 namespace chromeos {
diff --git a/chromeos/dbus/fake_modem_messaging_client.h b/chromeos/dbus/fake_modem_messaging_client.h
index 8cfb17b..a01e528 100644
--- a/chromeos/dbus/fake_modem_messaging_client.h
+++ b/chromeos/dbus/fake_modem_messaging_client.h
@@ -5,8 +5,8 @@
 #ifndef CHROMEOS_DBUS_FAKE_MODEM_MESSAGING_CLIENT_H_
 #define CHROMEOS_DBUS_FAKE_MODEM_MESSAGING_CLIENT_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/modem_messaging_client.h"
 
diff --git a/chromeos/dbus/fake_nfc_adapter_client.h b/chromeos/dbus/fake_nfc_adapter_client.h
index 21e76bd..460c945 100644
--- a/chromeos/dbus/fake_nfc_adapter_client.h
+++ b/chromeos/dbus/fake_nfc_adapter_client.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/observer_list.h"
 #include "chromeos/chromeos_export.h"
diff --git a/chromeos/dbus/fake_nfc_device_client.h b/chromeos/dbus/fake_nfc_device_client.h
index 67d691c..ccb2cef 100644
--- a/chromeos/dbus/fake_nfc_device_client.h
+++ b/chromeos/dbus/fake_nfc_device_client.h
@@ -5,6 +5,7 @@
 #ifndef CHROMEOS_DBUS_FAKE_NFC_DEVICE_CLIENT_H_
 #define CHROMEOS_DBUS_FAKE_NFC_DEVICE_CLIENT_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/observer_list.h"
 #include "chromeos/chromeos_export.h"
diff --git a/chromeos/dbus/fake_nfc_manager_client.h b/chromeos/dbus/fake_nfc_manager_client.h
index 1f3f394..48ed90d 100644
--- a/chromeos/dbus/fake_nfc_manager_client.h
+++ b/chromeos/dbus/fake_nfc_manager_client.h
@@ -8,6 +8,7 @@
 #include <set>
 #include <string>
 
+#include "base/macros.h"
 #include "base/observer_list.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/nfc_manager_client.h"
diff --git a/chromeos/dbus/fake_nfc_record_client.cc b/chromeos/dbus/fake_nfc_record_client.cc
index c16b300..33b2754 100644
--- a/chromeos/dbus/fake_nfc_record_client.cc
+++ b/chromeos/dbus/fake_nfc_record_client.cc
@@ -4,6 +4,8 @@
 
 #include "chromeos/dbus/fake_nfc_record_client.h"
 
+#include <stdint.h>
+
 #include "base/logging.h"
 #include "chromeos/dbus/dbus_thread_manager.h"
 #include "chromeos/dbus/fake_nfc_device_client.h"
@@ -295,7 +297,7 @@
       GetStringValue(attributes, nfc_record::kMimeTypeProperty));
   tag_record_properties_->action.ReplaceValue(
       GetStringValue(attributes, nfc_record::kActionProperty));
-  tag_record_properties_->size.ReplaceValue(static_cast<uint32>(
+  tag_record_properties_->size.ReplaceValue(static_cast<uint32_t>(
       GetDoubleValue(attributes, nfc_record::kSizeProperty)));
 
   SetTagRecordsVisible(false);
diff --git a/chromeos/dbus/fake_nfc_record_client.h b/chromeos/dbus/fake_nfc_record_client.h
index daa6e07..5bdd635 100644
--- a/chromeos/dbus/fake_nfc_record_client.h
+++ b/chromeos/dbus/fake_nfc_record_client.h
@@ -5,6 +5,7 @@
 #ifndef CHROMEOS_DBUS_FAKE_NFC_RECORD_CLIENT_H_
 #define CHROMEOS_DBUS_FAKE_NFC_RECORD_CLIENT_H_
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/observer_list.h"
 #include "base/values.h"
diff --git a/chromeos/dbus/fake_nfc_tag_client.h b/chromeos/dbus/fake_nfc_tag_client.h
index 96f2ec8..40d79cd 100644
--- a/chromeos/dbus/fake_nfc_tag_client.h
+++ b/chromeos/dbus/fake_nfc_tag_client.h
@@ -5,6 +5,7 @@
 #ifndef CHROMEOS_DBUS_FAKE_NFC_TAG_CLIENT_H_
 #define CHROMEOS_DBUS_FAKE_NFC_TAG_CLIENT_H_
 
+#include "base/macros.h"
 #include "base/observer_list.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/nfc_client_helpers.h"
diff --git a/chromeos/dbus/fake_peer_daemon_manager_client.h b/chromeos/dbus/fake_peer_daemon_manager_client.h
index c2c2717..9d02c6b 100644
--- a/chromeos/dbus/fake_peer_daemon_manager_client.h
+++ b/chromeos/dbus/fake_peer_daemon_manager_client.h
@@ -9,6 +9,7 @@
 #include <string>
 #include <vector>
 
+#include "base/macros.h"
 #include "chromeos/dbus/peer_daemon_manager_client.h"
 
 namespace chromeos {
diff --git a/chromeos/dbus/fake_permission_broker_client.cc b/chromeos/dbus/fake_permission_broker_client.cc
index e011366..ace3479 100644
--- a/chromeos/dbus/fake_permission_broker_client.cc
+++ b/chromeos/dbus/fake_permission_broker_client.cc
@@ -5,6 +5,7 @@
 #include "chromeos/dbus/fake_permission_broker_client.h"
 
 #include <fcntl.h>
+#include <stdint.h>
 
 #include "base/bind.h"
 #include "base/callback.h"
@@ -69,7 +70,7 @@
 }
 
 void FakePermissionBrokerClient::RequestTcpPortAccess(
-    uint16 port,
+    uint16_t port,
     const std::string& interface,
     const dbus::FileDescriptor& lifeline_fd,
     const ResultCallback& callback) {
@@ -78,7 +79,7 @@
 }
 
 void FakePermissionBrokerClient::RequestUdpPortAccess(
-    uint16 port,
+    uint16_t port,
     const std::string& interface,
     const dbus::FileDescriptor& lifeline_fd,
     const ResultCallback& callback) {
@@ -87,14 +88,14 @@
 }
 
 void FakePermissionBrokerClient::ReleaseTcpPort(
-    uint16 port,
+    uint16_t port,
     const std::string& interface,
     const ResultCallback& callback) {
   callback.Run(true);
 }
 
 void FakePermissionBrokerClient::ReleaseUdpPort(
-    uint16 port,
+    uint16_t port,
     const std::string& interface,
     const ResultCallback& callback) {
   callback.Run(true);
diff --git a/chromeos/dbus/fake_permission_broker_client.h b/chromeos/dbus/fake_permission_broker_client.h
index 6a1ddee..b34d5c3 100644
--- a/chromeos/dbus/fake_permission_broker_client.h
+++ b/chromeos/dbus/fake_permission_broker_client.h
@@ -5,8 +5,10 @@
 #ifndef CHROMEOS_DBUS_FAKE_PERMISSION_BROKER_CLIENT_H_
 #define CHROMEOS_DBUS_FAKE_PERMISSION_BROKER_CLIENT_H_
 
-#include "base/basictypes.h"
+#include <stdint.h>
+
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "chromeos/dbus/permission_broker_client.h"
 
 namespace chromeos {
@@ -25,18 +27,18 @@
                          const ResultCallback& callback) override;
   void OpenPath(const std::string& path,
                 const OpenPathCallback& callback) override;
-  void RequestTcpPortAccess(uint16 port,
+  void RequestTcpPortAccess(uint16_t port,
                             const std::string& interface,
                             const dbus::FileDescriptor& lifeline_fd,
                             const ResultCallback& callback) override;
-  void RequestUdpPortAccess(uint16 port,
+  void RequestUdpPortAccess(uint16_t port,
                             const std::string& interface,
                             const dbus::FileDescriptor& lifeline_fd,
                             const ResultCallback& callback) override;
-  void ReleaseTcpPort(uint16 port,
+  void ReleaseTcpPort(uint16_t port,
                       const std::string& interface,
                       const ResultCallback& callback) override;
-  void ReleaseUdpPort(uint16 port,
+  void ReleaseUdpPort(uint16_t port,
                       const std::string& interface,
                       const ResultCallback& callback) override;
 
diff --git a/chromeos/dbus/fake_power_manager_client.h b/chromeos/dbus/fake_power_manager_client.h
index 1746a0d..c2aac634 100644
--- a/chromeos/dbus/fake_power_manager_client.h
+++ b/chromeos/dbus/fake_power_manager_client.h
@@ -7,7 +7,6 @@
 
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
diff --git a/chromeos/dbus/fake_power_manager_client_unittest.cc b/chromeos/dbus/fake_power_manager_client_unittest.cc
index 021459e..1249077 100644
--- a/chromeos/dbus/fake_power_manager_client_unittest.cc
+++ b/chromeos/dbus/fake_power_manager_client_unittest.cc
@@ -4,7 +4,6 @@
 
 #include "chromeos/dbus/fake_power_manager_client.h"
 
-#include "base/basictypes.h"
 #include "base/macros.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
diff --git a/chromeos/dbus/fake_privet_daemon_manager_client.h b/chromeos/dbus/fake_privet_daemon_manager_client.h
index f8d219c..d580832 100644
--- a/chromeos/dbus/fake_privet_daemon_manager_client.h
+++ b/chromeos/dbus/fake_privet_daemon_manager_client.h
@@ -5,6 +5,7 @@
 #ifndef CHROMEOS_DBUS_FAKE_PRIVET_DAEMON_MANAGER_CLIENT_H_
 #define CHROMEOS_DBUS_FAKE_PRIVET_DAEMON_MANAGER_CLIENT_H_
 
+#include "base/macros.h"
 #include "chromeos/dbus/privet_daemon_manager_client.h"
 
 namespace chromeos {
diff --git a/chromeos/dbus/fake_session_manager_client.h b/chromeos/dbus/fake_session_manager_client.h
index 2a96cd3..b281847 100644
--- a/chromeos/dbus/fake_session_manager_client.h
+++ b/chromeos/dbus/fake_session_manager_client.h
@@ -9,8 +9,8 @@
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/observer_list.h"
 #include "chromeos/dbus/session_manager_client.h"
 
diff --git a/chromeos/dbus/fake_shill_device_client.h b/chromeos/dbus/fake_shill_device_client.h
index 4dc0b54..56b9cf4 100644
--- a/chromeos/dbus/fake_shill_device_client.h
+++ b/chromeos/dbus/fake_shill_device_client.h
@@ -9,7 +9,7 @@
 #include <set>
 #include <string>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/shill_device_client.h"
 
diff --git a/chromeos/dbus/fake_shill_ipconfig_client.h b/chromeos/dbus/fake_shill_ipconfig_client.h
index 6552079..ba05a95 100644
--- a/chromeos/dbus/fake_shill_ipconfig_client.h
+++ b/chromeos/dbus/fake_shill_ipconfig_client.h
@@ -7,7 +7,7 @@
 
 #include <string>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/shill_ipconfig_client.h"
 
diff --git a/chromeos/dbus/fake_shill_manager_client.cc b/chromeos/dbus/fake_shill_manager_client.cc
index c50841f..9fe00b1 100644
--- a/chromeos/dbus/fake_shill_manager_client.cc
+++ b/chromeos/dbus/fake_shill_manager_client.cc
@@ -4,6 +4,8 @@
 
 #include "chromeos/dbus/fake_shill_manager_client.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/command_line.h"
 #include "base/location.h"
diff --git a/chromeos/dbus/fake_shill_manager_client.h b/chromeos/dbus/fake_shill_manager_client.h
index f677350..de47691 100644
--- a/chromeos/dbus/fake_shill_manager_client.h
+++ b/chromeos/dbus/fake_shill_manager_client.h
@@ -7,8 +7,8 @@
 
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/shill_manager_client.h"
 
diff --git a/chromeos/dbus/fake_shill_profile_client.h b/chromeos/dbus/fake_shill_profile_client.h
index 8c33bfb..3db52af 100644
--- a/chromeos/dbus/fake_shill_profile_client.h
+++ b/chromeos/dbus/fake_shill_profile_client.h
@@ -8,7 +8,7 @@
 #include <map>
 #include <string>
 
-#include "base/basictypes.h"
+#include "base/macros.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/shill_manager_client.h"
 #include "chromeos/dbus/shill_profile_client.h"
diff --git a/chromeos/dbus/fake_shill_service_client.h b/chromeos/dbus/fake_shill_service_client.h
index a9af512..8c13358 100644
--- a/chromeos/dbus/fake_shill_service_client.h
+++ b/chromeos/dbus/fake_shill_service_client.h
@@ -8,8 +8,8 @@
 #include <map>
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/shill_service_client.h"
diff --git a/chromeos/dbus/fake_shill_third_party_vpn_driver_client.cc b/chromeos/dbus/fake_shill_third_party_vpn_driver_client.cc
index b68d0b3..702da0f 100644
--- a/chromeos/dbus/fake_shill_third_party_vpn_driver_client.cc
+++ b/chromeos/dbus/fake_shill_third_party_vpn_driver_client.cc
@@ -4,6 +4,8 @@
 
 #include "chromeos/dbus/fake_shill_third_party_vpn_driver_client.h"
 
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/location.h"
 #include "base/single_thread_task_runner.h"
diff --git a/chromeos/dbus/fake_shill_third_party_vpn_driver_client.h b/chromeos/dbus/fake_shill_third_party_vpn_driver_client.h
index 18a3f21..69981c15 100644
--- a/chromeos/dbus/fake_shill_third_party_vpn_driver_client.h
+++ b/chromeos/dbus/fake_shill_third_party_vpn_driver_client.h
@@ -7,6 +7,7 @@
 
 #include <stdint.h>
 
+#include "base/macros.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/shill_third_party_vpn_driver_client.h"
 
diff --git a/chromeos/dbus/fake_sms_client.h b/chromeos/dbus/fake_sms_client.h
index c682e2b..cbb6ba1 100644
--- a/chromeos/dbus/fake_sms_client.h
+++ b/chromeos/dbus/fake_sms_client.h
@@ -5,8 +5,8 @@
 #ifndef CHROMEOS_DBUS_FAKE_SMS_CLIENT_H_
 #define CHROMEOS_DBUS_FAKE_SMS_CLIENT_H_
 
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "chromeos/dbus/sms_client.h"
 
diff --git a/chromeos/dbus/fake_system_clock_client.cc b/chromeos/dbus/fake_system_clock_client.cc
index b2ee3c6..565a314 100644
--- a/chromeos/dbus/fake_system_clock_client.cc
+++ b/chromeos/dbus/fake_system_clock_client.cc
@@ -25,8 +25,7 @@
   return false;
 }
 
-void FakeSystemClockClient::SetTime(int64 time_in_seconds) {
-}
+void FakeSystemClockClient::SetTime(int64_t time_in_seconds) {}
 
 bool FakeSystemClockClient::CanSetTime() {
   return true;
diff --git a/chromeos/dbus/fake_system_clock_client.h b/chromeos/dbus/fake_system_clock_client.h
index 6f5f847..1750515 100644
--- a/chromeos/dbus/fake_system_clock_client.h
+++ b/chromeos/dbus/fake_system_clock_client.h
@@ -5,6 +5,9 @@
 #ifndef CHROMEOS_DBUS_FAKE_SYSTEM_CLOCK_CLIENT_H_
 #define CHROMEOS_DBUS_FAKE_SYSTEM_CLOCK_CLIENT_H_
 
+#include <stdint.h>
+
+#include "base/macros.h"
 #include "chromeos/dbus/system_clock_client.h"
 
 namespace chromeos {
@@ -20,7 +23,7 @@
   void AddObserver(Observer* observer) override;
   void RemoveObserver(Observer* observer) override;
   bool HasObserver(const Observer* observer) const override;
-  void SetTime(int64 time_in_seconds) override;
+  void SetTime(int64_t time_in_seconds) override;
   bool CanSetTime() override;
 
  private:
diff --git a/chromeos/dbus/gsm_sms_client.cc b/chromeos/dbus/gsm_sms_client.cc
index 4ca1b43..c694bb0 100644
--- a/chromeos/dbus/gsm_sms_client.cc
+++ b/chromeos/dbus/gsm_sms_client.cc
@@ -3,11 +3,14 @@
 // found in the LICENSE file.
 #include "chromeos/dbus/gsm_sms_client.h"
 
+#include <stdint.h>
+
 #include <map>
 #include <utility>
 #include <vector>
 
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/message_loop/message_loop.h"
@@ -57,7 +60,7 @@
   }
 
   // Calls Delete method.
-  void Delete(uint32 index, const DeleteCallback& callback) {
+  void Delete(uint32_t index, const DeleteCallback& callback) {
     dbus::MethodCall method_call(modemmanager::kModemManagerSMSInterface,
                                  modemmanager::kSMSDeleteFunction);
     dbus::MessageWriter writer(&method_call);
@@ -69,7 +72,7 @@
   }
 
   // Calls Get method.
-  void Get(uint32 index, const GetCallback& callback) {
+  void Get(uint32_t index, const GetCallback& callback) {
     dbus::MethodCall method_call(modemmanager::kModemManagerSMSInterface,
                                  modemmanager::kSMSGetFunction);
     dbus::MessageWriter writer(&method_call);
@@ -93,7 +96,7 @@
  private:
   // Handles SmsReceived signal.
   void OnSmsReceived(dbus::Signal* signal) {
-    uint32 index = 0;
+    uint32_t index = 0;
     bool complete = false;
     dbus::MessageReader reader(signal);
     if (!reader.PopUint32(&index) ||
@@ -179,7 +182,7 @@
   // GsmSMSClient override.
   void Delete(const std::string& service_name,
               const dbus::ObjectPath& object_path,
-              uint32 index,
+              uint32_t index,
               const DeleteCallback& callback) override {
     GetProxy(service_name, object_path)->Delete(index, callback);
   }
@@ -187,7 +190,7 @@
   // GsmSMSClient override.
   void Get(const std::string& service_name,
            const dbus::ObjectPath& object_path,
-           uint32 index,
+           uint32_t index,
            const GetCallback& callback) override {
     GetProxy(service_name, object_path)->Get(index, callback);
   }
diff --git a/chromeos/dbus/gsm_sms_client.h b/chromeos/dbus/gsm_sms_client.h
index afbae38..01327e7 100644
--- a/chromeos/dbus/gsm_sms_client.h
+++ b/chromeos/dbus/gsm_sms_client.h
@@ -5,10 +5,12 @@
 #ifndef CHROMEOS_DBUS_GSM_SMS_CLIENT_H_
 #define CHROMEOS_DBUS_GSM_SMS_CLIENT_H_
 
+#include <stdint.h>
+
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/dbus_client.h"
 
@@ -29,7 +31,8 @@
 // initializes the DBusThreadManager instance.
 class CHROMEOS_EXPORT GsmSMSClient : public DBusClient {
  public:
-  typedef base::Callback<void(uint32 index, bool complete)> SmsReceivedHandler;
+  typedef base::Callback<void(uint32_t index, bool complete)>
+      SmsReceivedHandler;
   typedef base::Callback<void()> DeleteCallback;
   typedef base::Callback<void(const base::DictionaryValue& sms)> GetCallback;
   typedef base::Callback<void(const base::ListValue& result)> ListCallback;
@@ -52,13 +55,13 @@
   // Calls Delete method.  |callback| is called after the method call succeeds.
   virtual void Delete(const std::string& service_name,
                       const dbus::ObjectPath& object_path,
-                      uint32 index,
+                      uint32_t index,
                       const DeleteCallback& callback) = 0;
 
   // Calls Get method.  |callback| is called after the method call succeeds.
   virtual void Get(const std::string& service_name,
                    const dbus::ObjectPath& object_path,
-                   uint32 index,
+                   uint32_t index,
                    const GetCallback& callback) = 0;
 
   // Calls List method.  |callback| is called after the method call succeeds.
diff --git a/chromeos/dbus/gsm_sms_client_unittest.cc b/chromeos/dbus/gsm_sms_client_unittest.cc
index 8b0c46f..66ec8d2 100644
--- a/chromeos/dbus/gsm_sms_client_unittest.cc
+++ b/chromeos/dbus/gsm_sms_client_unittest.cc
@@ -4,6 +4,8 @@
 
 #include "chromeos/dbus/gsm_sms_client.h"
 
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/location.h"
 #include "base/message_loop/message_loop.h"
@@ -29,7 +31,7 @@
 // A mock SmsReceivedHandler.
 class MockSmsReceivedHandler {
  public:
-  MOCK_METHOD2(Run, void(uint32 index, bool complete));
+  MOCK_METHOD2(Run, void(uint32_t index, bool complete));
 };
 
 // A mock DeleteCallback.
@@ -114,7 +116,7 @@
     EXPECT_EQ(modemmanager::kModemManagerSMSInterface,
               method_call->GetInterface());
     EXPECT_EQ(modemmanager::kSMSDeleteFunction, method_call->GetMember());
-    uint32 index = 0;
+    uint32_t index = 0;
     dbus::MessageReader reader(method_call);
     EXPECT_TRUE(reader.PopUint32(&index));
     EXPECT_EQ(expected_index_, index);
@@ -131,7 +133,7 @@
     EXPECT_EQ(modemmanager::kModemManagerSMSInterface,
               method_call->GetInterface());
     EXPECT_EQ(modemmanager::kSMSGetFunction, method_call->GetMember());
-    uint32 index = 0;
+    uint32_t index = 0;
     dbus::MessageReader reader(method_call);
     EXPECT_TRUE(reader.PopUint32(&index));
     EXPECT_EQ(expected_index_, index);
@@ -172,7 +174,7 @@
   // The SmsReceived signal handler given by the tested client.
   dbus::ObjectProxy::SignalCallback sms_received_callback_;
   // Expected argument for Delete and Get methods.
-  uint32 expected_index_;
+  uint32_t expected_index_;
   // Response returned by mock methods.
   dbus::Response* response_;
   // Expected result of Get and List methods.
@@ -195,7 +197,7 @@
 
 TEST_F(GsmSMSClientTest, SmsReceived) {
   // Set expectations.
-  const uint32 kIndex = 42;
+  const uint32_t kIndex = 42;
   const bool kComplete = true;
   MockSmsReceivedHandler handler;
   EXPECT_CALL(handler, Run(kIndex, kComplete)).Times(1);
@@ -223,7 +225,7 @@
 
 TEST_F(GsmSMSClientTest, Delete) {
   // Set expectations.
-  const uint32 kIndex = 42;
+  const uint32_t kIndex = 42;
   expected_index_ = kIndex;
   EXPECT_CALL(*mock_proxy_.get(), CallMethod(_, _, _))
       .WillOnce(Invoke(this, &GsmSMSClientTest::OnDelete));
@@ -243,7 +245,7 @@
 
 TEST_F(GsmSMSClientTest, Get) {
   // Set expectations.
-  const uint32 kIndex = 42;
+  const uint32_t kIndex = 42;
   expected_index_ = kIndex;
   EXPECT_CALL(*mock_proxy_.get(), CallMethod(_, _, _))
       .WillOnce(Invoke(this, &GsmSMSClientTest::OnGet));
diff --git a/chromeos/dbus/image_burner_client.cc b/chromeos/dbus/image_burner_client.cc
index 91ef3aa..2a2b22d 100644
--- a/chromeos/dbus/image_burner_client.cc
+++ b/chromeos/dbus/image_burner_client.cc
@@ -4,8 +4,11 @@
 
 #include "chromeos/dbus/image_burner_client.h"
 
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/compiler_specific.h"
+#include "base/macros.h"
 #include "dbus/bus.h"
 #include "dbus/message.h"
 #include "dbus/object_path.h"
@@ -102,8 +105,8 @@
   void OnBurnProgressUpdate(dbus::Signal* signal) {
     dbus::MessageReader reader(signal);
     std::string target_path;
-    int64 num_bytes_burnt;
-    int64 total_size;
+    int64_t num_bytes_burnt;
+    int64_t total_size;
     if (!reader.PopString(&target_path) ||
         !reader.PopInt64(&num_bytes_burnt) ||
         !reader.PopInt64(&total_size)) {
diff --git a/chromeos/dbus/image_burner_client.h b/chromeos/dbus/image_burner_client.h
index 0c3f573f..35d0653 100644
--- a/chromeos/dbus/image_burner_client.h
+++ b/chromeos/dbus/image_burner_client.h
@@ -5,10 +5,12 @@
 #ifndef CHROMEOS_DBUS_IMAGE_BURNER_CLIENT_H_
 #define CHROMEOS_DBUS_IMAGE_BURNER_CLIENT_H_
 
+#include <stdint.h>
+
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/dbus_client.h"
 
@@ -31,8 +33,8 @@
 
   // A callback to handle burn_progress_update signal.
   typedef base::Callback<void(const std::string& target_path,
-                              int64 num_bytes_burnt,
-                              int64 total_size)> BurnProgressUpdateHandler;
+                              int64_t num_bytes_burnt,
+                              int64_t total_size)> BurnProgressUpdateHandler;
 
   // Burns the image |from_path| to the disk |to_path|.
   virtual void BurnImage(const std::string& from_path,
diff --git a/chromeos/dbus/introspectable_client.cc b/chromeos/dbus/introspectable_client.cc
index 71508f2..8f7754b 100644
--- a/chromeos/dbus/introspectable_client.cc
+++ b/chromeos/dbus/introspectable_client.cc
@@ -7,6 +7,7 @@
 
 #include "base/bind.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "dbus/bus.h"
 #include "dbus/message.h"
 #include "dbus/object_proxy.h"
diff --git a/chromeos/dbus/introspectable_client.h b/chromeos/dbus/introspectable_client.h
index 1a4edab..49693f2 100644
--- a/chromeos/dbus/introspectable_client.h
+++ b/chromeos/dbus/introspectable_client.h
@@ -9,6 +9,7 @@
 #include <vector>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/dbus_client.h"
 #include "dbus/object_path.h"
diff --git a/chromeos/dbus/lorgnette_manager_client.cc b/chromeos/dbus/lorgnette_manager_client.cc
index d99f59bd..55a1c34 100644
--- a/chromeos/dbus/lorgnette_manager_client.cc
+++ b/chromeos/dbus/lorgnette_manager_client.cc
@@ -9,6 +9,7 @@
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/task_runner_util.h"
 #include "base/threading/worker_pool.h"
diff --git a/chromeos/dbus/lorgnette_manager_client.h b/chromeos/dbus/lorgnette_manager_client.h
index d36cd388d..9aa0d9f 100644
--- a/chromeos/dbus/lorgnette_manager_client.h
+++ b/chromeos/dbus/lorgnette_manager_client.h
@@ -9,6 +9,7 @@
 
 #include "base/callback.h"
 #include "base/files/file.h"
+#include "base/macros.h"
 #include "base/memory/ref_counted_memory.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/dbus_client.h"
diff --git a/chromeos/dbus/mock_cryptohome_client.h b/chromeos/dbus/mock_cryptohome_client.h
index 20ccbb5..4382d354 100644
--- a/chromeos/dbus/mock_cryptohome_client.h
+++ b/chromeos/dbus/mock_cryptohome_client.h
@@ -5,6 +5,8 @@
 #ifndef CHROMEOS_DBUS_MOCK_CRYPTOHOME_CLIENT_H_
 #define CHROMEOS_DBUS_MOCK_CRYPTOHOME_CLIENT_H_
 
+#include <stdint.h>
+
 #include <string>
 
 #include "chromeos/dbus/cryptohome/rpc.pb.h"
@@ -79,11 +81,11 @@
                     const Pkcs11GetTpmTokenInfoCallback& callback));
   MOCK_METHOD3(InstallAttributesGet,
                bool(const std::string& name,
-                    std::vector<uint8>* value,
+                    std::vector<uint8_t>* value,
                     bool* successful));
   MOCK_METHOD3(InstallAttributesSet,
                bool(const std::string& name,
-                    const std::vector<uint8>& value,
+                    const std::vector<uint8_t>& value,
                     bool* successful));
   MOCK_METHOD1(InstallAttributesFinalize, bool(bool* successful));
   MOCK_METHOD1(InstallAttributesIsReady,
diff --git a/chromeos/dbus/mock_permission_broker_client.h b/chromeos/dbus/mock_permission_broker_client.h
index d5c9c02..9e45a97 100644
--- a/chromeos/dbus/mock_permission_broker_client.h
+++ b/chromeos/dbus/mock_permission_broker_client.h
@@ -5,6 +5,8 @@
 #ifndef CHROMEOS_DBUS_MOCK_PERMISSION_BROKER_CLIENT_H_
 #define CHROMEOS_DBUS_MOCK_PERMISSION_BROKER_CLIENT_H_
 
+#include <stdint.h>
+
 #include "chromeos/dbus/permission_broker_client.h"
 #include "testing/gmock/include/gmock/gmock.h"
 
@@ -29,21 +31,21 @@
   MOCK_METHOD2(OpenPath,
                void(const std::string& path, const OpenPathCallback& callback));
   MOCK_METHOD4(RequestTcpPortAccess,
-               void(uint16 port,
+               void(uint16_t port,
                     const std::string& interface,
                     const dbus::FileDescriptor& lifeline_fd,
                     const ResultCallback& callback));
   MOCK_METHOD4(RequestUdpPortAccess,
-               void(uint16 port,
+               void(uint16_t port,
                     const std::string& interface,
                     const dbus::FileDescriptor& lifeline_fd,
                     const ResultCallback& callback));
   MOCK_METHOD3(ReleaseTcpPort,
-               void(uint16 port,
+               void(uint16_t port,
                     const std::string& interface,
                     const ResultCallback& callback));
   MOCK_METHOD3(ReleaseUdpPort,
-               void(uint16 port,
+               void(uint16_t port,
                     const std::string& interface,
                     const ResultCallback& callback));
 };
diff --git a/chromeos/dbus/modem_messaging_client.cc b/chromeos/dbus/modem_messaging_client.cc
index e714542..4f5277a 100644
--- a/chromeos/dbus/modem_messaging_client.cc
+++ b/chromeos/dbus/modem_messaging_client.cc
@@ -7,6 +7,7 @@
 #include <utility>
 
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/message_loop/message_loop.h"
diff --git a/chromeos/dbus/modem_messaging_client.h b/chromeos/dbus/modem_messaging_client.h
index 879d0c2..9a9b0ae 100644
--- a/chromeos/dbus/modem_messaging_client.h
+++ b/chromeos/dbus/modem_messaging_client.h
@@ -8,8 +8,8 @@
 #include <string>
 #include <vector>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/dbus_client.h"
 
diff --git a/chromeos/dbus/nfc_adapter_client.cc b/chromeos/dbus/nfc_adapter_client.cc
index 4cde7c6..6535aa0 100644
--- a/chromeos/dbus/nfc_adapter_client.cc
+++ b/chromeos/dbus/nfc_adapter_client.cc
@@ -8,6 +8,7 @@
 #include <utility>
 
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/observer_list.h"
 #include "base/strings/stringprintf.h"
diff --git a/chromeos/dbus/nfc_adapter_client.h b/chromeos/dbus/nfc_adapter_client.h
index 51cf24d..8c6b62f0 100644
--- a/chromeos/dbus/nfc_adapter_client.h
+++ b/chromeos/dbus/nfc_adapter_client.h
@@ -9,6 +9,7 @@
 #include <vector>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/dbus_client.h"
 #include "chromeos/dbus/nfc_client_helpers.h"
diff --git a/chromeos/dbus/nfc_client_helpers.h b/chromeos/dbus/nfc_client_helpers.h
index d50db07..d6b50e8 100644
--- a/chromeos/dbus/nfc_client_helpers.h
+++ b/chromeos/dbus/nfc_client_helpers.h
@@ -9,8 +9,8 @@
 #include <string>
 #include <utility>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/values.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/nfc_property_set.h"
diff --git a/chromeos/dbus/nfc_client_unittest.cc b/chromeos/dbus/nfc_client_unittest.cc
index 12cb0b0..8b431e9 100644
--- a/chromeos/dbus/nfc_client_unittest.cc
+++ b/chromeos/dbus/nfc_client_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/location.h"
 #include "base/message_loop/message_loop.h"
diff --git a/chromeos/dbus/nfc_device_client.cc b/chromeos/dbus/nfc_device_client.cc
index c27396b..1e84048 100644
--- a/chromeos/dbus/nfc_device_client.cc
+++ b/chromeos/dbus/nfc_device_client.cc
@@ -5,6 +5,7 @@
 #include "chromeos/dbus/nfc_device_client.h"
 
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "base/strings/stringprintf.h"
diff --git a/chromeos/dbus/nfc_device_client.h b/chromeos/dbus/nfc_device_client.h
index db9b753..b694dd8 100644
--- a/chromeos/dbus/nfc_device_client.h
+++ b/chromeos/dbus/nfc_device_client.h
@@ -9,6 +9,7 @@
 #include <string>
 #include <vector>
 
+#include "base/macros.h"
 #include "base/values.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/dbus_client.h"
diff --git a/chromeos/dbus/nfc_manager_client.cc b/chromeos/dbus/nfc_manager_client.cc
index d35aadd..8029fd3 100644
--- a/chromeos/dbus/nfc_manager_client.cc
+++ b/chromeos/dbus/nfc_manager_client.cc
@@ -4,6 +4,7 @@
 
 #include "chromeos/dbus/nfc_manager_client.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/chromeos/dbus/nfc_manager_client.h b/chromeos/dbus/nfc_manager_client.h
index 7e62070..1ba39d4 100644
--- a/chromeos/dbus/nfc_manager_client.h
+++ b/chromeos/dbus/nfc_manager_client.h
@@ -7,6 +7,7 @@
 
 #include <vector>
 
+#include "base/macros.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/dbus_client.h"
 #include "chromeos/dbus/nfc_property_set.h"
diff --git a/chromeos/dbus/nfc_property_set.h b/chromeos/dbus/nfc_property_set.h
index 7aae766..ee18528 100644
--- a/chromeos/dbus/nfc_property_set.h
+++ b/chromeos/dbus/nfc_property_set.h
@@ -8,6 +8,7 @@
 #include <string>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "dbus/message.h"
 #include "dbus/object_proxy.h"
 #include "dbus/property.h"
diff --git a/chromeos/dbus/nfc_record_client.cc b/chromeos/dbus/nfc_record_client.cc
index f462d69..b829516 100644
--- a/chromeos/dbus/nfc_record_client.cc
+++ b/chromeos/dbus/nfc_record_client.cc
@@ -5,6 +5,7 @@
 #include "chromeos/dbus/nfc_record_client.h"
 
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "chromeos/dbus/nfc_device_client.h"
diff --git a/chromeos/dbus/nfc_record_client.h b/chromeos/dbus/nfc_record_client.h
index 783258b2..c602257 100644
--- a/chromeos/dbus/nfc_record_client.h
+++ b/chromeos/dbus/nfc_record_client.h
@@ -5,8 +5,11 @@
 #ifndef CHROMEOS_DBUS_NFC_RECORD_CLIENT_H_
 #define CHROMEOS_DBUS_NFC_RECORD_CLIENT_H_
 
+#include <stdint.h>
+
 #include <string>
 
+#include "base/macros.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/dbus_client.h"
 #include "chromeos/dbus/nfc_property_set.h"
@@ -60,7 +63,7 @@
     // the object or not. This is not a mandatory field and is only valid for
     // Smart Posters carrying a URI record.
     // Read-only.
-    dbus::Property<uint32> size;
+    dbus::Property<uint32_t> size;
 
     // The suggested course of action. This one is only valid for Smart Posters
     // and is a suggestion only. It can be ignored, and the possible values are
diff --git a/chromeos/dbus/nfc_tag_client.cc b/chromeos/dbus/nfc_tag_client.cc
index adbe0ae..f77b063 100644
--- a/chromeos/dbus/nfc_tag_client.cc
+++ b/chromeos/dbus/nfc_tag_client.cc
@@ -5,6 +5,7 @@
 #include "chromeos/dbus/nfc_tag_client.h"
 
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "base/strings/stringprintf.h"
diff --git a/chromeos/dbus/nfc_tag_client.h b/chromeos/dbus/nfc_tag_client.h
index 144f1dee..72d8399 100644
--- a/chromeos/dbus/nfc_tag_client.h
+++ b/chromeos/dbus/nfc_tag_client.h
@@ -9,6 +9,7 @@
 #include <string>
 #include <vector>
 
+#include "base/macros.h"
 #include "base/values.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/dbus_client.h"
diff --git a/chromeos/dbus/peer_daemon_manager_client.cc b/chromeos/dbus/peer_daemon_manager_client.cc
index e30f294..caf0852 100644
--- a/chromeos/dbus/peer_daemon_manager_client.cc
+++ b/chromeos/dbus/peer_daemon_manager_client.cc
@@ -8,6 +8,7 @@
 #include "base/callback.h"
 #include "base/location.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "base/single_thread_task_runner.h"
diff --git a/chromeos/dbus/peer_daemon_manager_client.h b/chromeos/dbus/peer_daemon_manager_client.h
index a3cad81..08603de 100644
--- a/chromeos/dbus/peer_daemon_manager_client.h
+++ b/chromeos/dbus/peer_daemon_manager_client.h
@@ -5,6 +5,8 @@
 #ifndef CHROMEOS_DBUS_PEER_DAEMON_MANAGER_CLIENT_H_
 #define CHROMEOS_DBUS_PEER_DAEMON_MANAGER_CLIENT_H_
 
+#include <stdint.h>
+
 #include <map>
 #include <string>
 #include <utility>
diff --git a/chromeos/dbus/permission_broker_client.cc b/chromeos/dbus/permission_broker_client.cc
index 4ba4d31..b862f75 100644
--- a/chromeos/dbus/permission_broker_client.cc
+++ b/chromeos/dbus/permission_broker_client.cc
@@ -4,7 +4,10 @@
 
 #include "chromeos/dbus/permission_broker_client.h"
 
+#include <stdint.h>
+
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "dbus/bus.h"
 #include "dbus/message.h"
@@ -63,7 +66,7 @@
                    weak_ptr_factory_.GetWeakPtr(), callback));
   }
 
-  void RequestTcpPortAccess(uint16 port,
+  void RequestTcpPortAccess(uint16_t port,
                             const std::string& interface,
                             const dbus::FileDescriptor& lifeline_fd,
                             const ResultCallback& callback) override {
@@ -78,7 +81,7 @@
                                   weak_ptr_factory_.GetWeakPtr(), callback));
   }
 
-  void RequestUdpPortAccess(uint16 port,
+  void RequestUdpPortAccess(uint16_t port,
                             const std::string& interface,
                             const dbus::FileDescriptor& lifeline_fd,
                             const ResultCallback& callback) override {
@@ -93,7 +96,7 @@
                                   weak_ptr_factory_.GetWeakPtr(), callback));
   }
 
-  void ReleaseTcpPort(uint16 port,
+  void ReleaseTcpPort(uint16_t port,
                       const std::string& interface,
                       const ResultCallback& callback) override {
     dbus::MethodCall method_call(kPermissionBrokerInterface, kReleaseTcpPort);
@@ -105,7 +108,7 @@
                                   weak_ptr_factory_.GetWeakPtr(), callback));
   }
 
-  void ReleaseUdpPort(uint16 port,
+  void ReleaseUdpPort(uint16_t port,
                       const std::string& interface,
                       const ResultCallback& callback) override {
     dbus::MethodCall method_call(kPermissionBrokerInterface, kReleaseUdpPort);
diff --git a/chromeos/dbus/permission_broker_client.h b/chromeos/dbus/permission_broker_client.h
index dd5ecca..87c24c8 100644
--- a/chromeos/dbus/permission_broker_client.h
+++ b/chromeos/dbus/permission_broker_client.h
@@ -5,10 +5,12 @@
 #ifndef CHROMEOS_DBUS_PERMISSION_BROKER_CLIENT_H_
 #define CHROMEOS_DBUS_PERMISSION_BROKER_CLIENT_H_
 
+#include <stdint.h>
+
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/dbus_client.h"
 #include "dbus/file_descriptor.h"
@@ -62,7 +64,7 @@
   // connections received on |interface| (an empty string indicates all
   // interfaces). An open pipe must be passed as |lifeline_fd| so that the
   // permission broker can monitor the lifetime of the calling process.
-  virtual void RequestTcpPortAccess(uint16 port,
+  virtual void RequestTcpPortAccess(uint16_t port,
                                     const std::string& interface,
                                     const dbus::FileDescriptor& lifeline_fd,
                                     const ResultCallback& callback) = 0;
@@ -71,7 +73,7 @@
   // received on |interface| (an empty string indicates all interfaces). An open
   // pipe must be passed as |lifeline_fd| so that the permission broker can
   // monitor the lifetime of the calling process.
-  virtual void RequestUdpPortAccess(uint16 port,
+  virtual void RequestUdpPortAccess(uint16_t port,
                                     const std::string& interface,
                                     const dbus::FileDescriptor& lifeline_fd,
                                     const ResultCallback& callback) = 0;
@@ -79,14 +81,14 @@
   // Releases a request for an open firewall port for TCP/IP connections. The
   // |port| and |interface| parameters must be the same as a previous call to
   // RequestTcpPortAccess.
-  virtual void ReleaseTcpPort(uint16 port,
+  virtual void ReleaseTcpPort(uint16_t port,
                               const std::string& interface,
                               const ResultCallback& callback) = 0;
 
   // Releases a request for an open firewall port for UDP packets. The |port|
   // and |interface| parameters must be the same as a previous call to
   // RequestUdpPortAccess.
-  virtual void ReleaseUdpPort(uint16 port,
+  virtual void ReleaseUdpPort(uint16_t port,
                               const std::string& interface,
                               const ResultCallback& callback) = 0;
 
diff --git a/chromeos/dbus/pipe_reader.h b/chromeos/dbus/pipe_reader.h
index ad52549..3c98457 100644
--- a/chromeos/dbus/pipe_reader.h
+++ b/chromeos/dbus/pipe_reader.h
@@ -9,6 +9,7 @@
 
 #include "base/callback.h"
 #include "base/files/file.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/chromeos/dbus/power_manager_client.cc b/chromeos/dbus/power_manager_client.cc
index f0c10f6..88b92751 100644
--- a/chromeos/dbus/power_manager_client.cc
+++ b/chromeos/dbus/power_manager_client.cc
@@ -4,12 +4,15 @@
 
 #include "chromeos/dbus/power_manager_client.h"
 
+#include <stdint.h>
+
 #include <algorithm>
 
 #include "base/bind.h"
 #include "base/command_line.h"
 #include "base/format_macros.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/message_loop/message_loop.h"
 #include "base/observer_list.h"
diff --git a/chromeos/dbus/power_manager_client.h b/chromeos/dbus/power_manager_client.h
index 4e8b8c8..59bed6a 100644
--- a/chromeos/dbus/power_manager_client.h
+++ b/chromeos/dbus/power_manager_client.h
@@ -7,8 +7,8 @@
 
 #include <string>
 
-#include "base/basictypes.h"
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/time/time.h"
 #include "chromeos/chromeos_export.h"
diff --git a/chromeos/dbus/power_policy_controller.cc b/chromeos/dbus/power_policy_controller.cc
index 49c76c2..fbad6e1 100644
--- a/chromeos/dbus/power_policy_controller.cc
+++ b/chromeos/dbus/power_policy_controller.cc
@@ -4,6 +4,8 @@
 
 #include "chromeos/dbus/power_policy_controller.h"
 
+#include <stdint.h>
+
 #include <utility>
 
 #include "base/format_macros.h"
@@ -193,7 +195,7 @@
 
   // If auto screen-locking is enabled, ensure that the screen is locked soon
   // after it's turned off due to user inactivity.
-  int64 lock_ms = delays->screen_off_ms() + kScreenLockAfterOffDelayMs;
+  int64_t lock_ms = delays->screen_off_ms() + kScreenLockAfterOffDelayMs;
   if (values.enable_auto_screen_lock && delays->screen_off_ms() > 0 &&
       (delays->screen_lock_ms() <= 0 || lock_ms < delays->screen_lock_ms()) &&
       lock_ms < delays->idle_ms()) {
diff --git a/chromeos/dbus/privet_daemon_manager_client.cc b/chromeos/dbus/privet_daemon_manager_client.cc
index de61cc8..fb04d11 100644
--- a/chromeos/dbus/privet_daemon_manager_client.cc
+++ b/chromeos/dbus/privet_daemon_manager_client.cc
@@ -4,9 +4,13 @@
 
 #include "chromeos/dbus/privet_daemon_manager_client.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/location.h"
 #include "base/logging.h"
+#include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
 #include "base/single_thread_task_runner.h"
@@ -220,7 +224,7 @@
         value_.set_mode(string_value);
       }
     } else if (field_reader.GetDataSignature() == "ay") {
-      const uint8* bytes = nullptr;
+      const uint8_t* bytes = nullptr;
       size_t length = 0;
       if (!field_reader.PopArrayOfBytes(&bytes, &length))
         return false;
diff --git a/chromeos/dbus/privet_daemon_manager_client.h b/chromeos/dbus/privet_daemon_manager_client.h
index 8c490d8..43d760c 100644
--- a/chromeos/dbus/privet_daemon_manager_client.h
+++ b/chromeos/dbus/privet_daemon_manager_client.h
@@ -5,6 +5,9 @@
 #ifndef CHROMEOS_DBUS_PRIVET_DAEMON_MANAGER_CLIENT_H_
 #define CHROMEOS_DBUS_PRIVET_DAEMON_MANAGER_CLIENT_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 
diff --git a/chromeos/dbus/privet_daemon_manager_client_unittest.cc b/chromeos/dbus/privet_daemon_manager_client_unittest.cc
index 84f31d4..68c48ea 100644
--- a/chromeos/dbus/privet_daemon_manager_client_unittest.cc
+++ b/chromeos/dbus/privet_daemon_manager_client_unittest.cc
@@ -4,6 +4,9 @@
 
 #include "chromeos/dbus/privet_daemon_manager_client.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/memory/scoped_ptr.h"
 #include "base/strings/string_number_conversions.h"
 #include "dbus/message.h"
diff --git a/chromeos/dbus/services/console_service_provider.h b/chromeos/dbus/services/console_service_provider.h
index fd9e2ab..69acd7c 100644
--- a/chromeos/dbus/services/console_service_provider.h
+++ b/chromeos/dbus/services/console_service_provider.h
@@ -7,6 +7,7 @@
 
 #include <string>
 
+#include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
 #include "chromeos/chromeos_export.h"
diff --git a/chromeos/dbus/services/cros_dbus_service.cc b/chromeos/dbus/services/cros_dbus_service.cc
index 0523c92..6f482ac 100644
--- a/chromeos/dbus/services/cros_dbus_service.cc
+++ b/chromeos/dbus/services/cros_dbus_service.cc
@@ -4,6 +4,8 @@
 
 #include "chromeos/dbus/services/cros_dbus_service.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/stl_util.h"
 #include "base/sys_info.h"
diff --git a/chromeos/dbus/services/display_power_service_provider.h b/chromeos/dbus/services/display_power_service_provider.h
index bdfc093..e09648e 100644
--- a/chromeos/dbus/services/display_power_service_provider.h
+++ b/chromeos/dbus/services/display_power_service_provider.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 "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
diff --git a/chromeos/dbus/services/liveness_service_provider.h b/chromeos/dbus/services/liveness_service_provider.h
index a261ff2..bfde7702 100644
--- a/chromeos/dbus/services/liveness_service_provider.h
+++ b/chromeos/dbus/services/liveness_service_provider.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 "base/memory/weak_ptr.h"
 #include "chromeos/chromeos_export.h"
diff --git a/chromeos/dbus/services/proxy_resolution_service_provider.cc b/chromeos/dbus/services/proxy_resolution_service_provider.cc
index 1f5ec44..8c760aa 100644
--- a/chromeos/dbus/services/proxy_resolution_service_provider.cc
+++ b/chromeos/dbus/services/proxy_resolution_service_provider.cc
@@ -6,6 +6,7 @@
 
 #include "base/bind.h"
 #include "base/bind_helpers.h"
+#include "base/macros.h"
 #include "base/thread_task_runner_handle.h"
 #include "dbus/bus.h"
 #include "dbus/message.h"
diff --git a/chromeos/dbus/services/proxy_resolution_service_provider_unittest.cc b/chromeos/dbus/services/proxy_resolution_service_provider_unittest.cc
index ff0ce4d..7514380 100644
--- a/chromeos/dbus/services/proxy_resolution_service_provider_unittest.cc
+++ b/chromeos/dbus/services/proxy_resolution_service_provider_unittest.cc
@@ -5,6 +5,7 @@
 #include "chromeos/dbus/services/proxy_resolution_service_provider.h"
 
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
diff --git a/chromeos/dbus/session_manager_client.cc b/chromeos/dbus/session_manager_client.cc
index 23ef0f6..dd9c13a 100644
--- a/chromeos/dbus/session_manager_client.cc
+++ b/chromeos/dbus/session_manager_client.cc
@@ -4,6 +4,8 @@
 
 #include "chromeos/dbus/session_manager_client.h"
 
+#include <stddef.h>
+#include <stdint.h>
 #include <sys/socket.h>
 
 #include "base/bind.h"
@@ -11,6 +13,7 @@
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
 #include "base/location.h"
+#include "base/macros.h"
 #include "base/path_service.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_util.h"
@@ -275,7 +278,8 @@
     dbus::MessageWriter writer(&method_call);
     // static_cast does not work due to signedness.
     writer.AppendArrayOfBytes(
-        reinterpret_cast<const uint8*>(policy_blob.data()), policy_blob.size());
+        reinterpret_cast<const uint8_t*>(policy_blob.data()),
+        policy_blob.size());
     session_manager_proxy_->CallMethod(
         &method_call,
         dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
@@ -445,7 +449,8 @@
     writer.AppendString(username);
     // static_cast does not work due to signedness.
     writer.AppendArrayOfBytes(
-        reinterpret_cast<const uint8*>(policy_blob.data()), policy_blob.size());
+        reinterpret_cast<const uint8_t*>(policy_blob.data()),
+        policy_blob.size());
     session_manager_proxy_->CallMethod(
         &method_call,
         dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
@@ -555,7 +560,7 @@
       return;
     }
     dbus::MessageReader reader(response);
-    const uint8* values = NULL;
+    const uint8_t* values = NULL;
     size_t length = 0;
     if (!reader.PopArrayOfBytes(&values, &length)) {
       LOG(ERROR) << "Invalid response: " << response->ToString();
@@ -649,7 +654,7 @@
         LOG(ERROR) << "Bad response: " << response->ToString();
       } else {
         while (array_reader.HasMoreData()) {
-          const uint8* data = NULL;
+          const uint8_t* data = NULL;
           size_t size = 0;
           if (!array_reader.PopArrayOfBytes(&data, &size)) {
             LOG(ERROR) << "Bad response: " << response->ToString();
diff --git a/chromeos/dbus/session_manager_client.h b/chromeos/dbus/session_manager_client.h
index c80688d..4fd4c09 100644
--- a/chromeos/dbus/session_manager_client.h
+++ b/chromeos/dbus/session_manager_client.h
@@ -10,6 +10,7 @@
 #include <vector>
 
 #include "base/callback.h"
+#include "base/macros.h"
 #include "base/observer_list.h"
 #include "chromeos/chromeos_export.h"
 #include "chromeos/dbus/dbus_client.h"
diff --git a/chromeos/dbus/shill_client_helper.cc b/chromeos/dbus/shill_client_helper.cc
index 408c3bc..f0add9a 100644
--- a/chromeos/dbus/shill_client_helper.cc
+++ b/chromeos/dbus/shill_client_helper.cc
@@ -4,6 +4,8 @@
 
 #include "chromeos/dbus/shill_client_helper.h"
 
+#include <stddef.h>
+
 #include "base/bind.h"
 #include "base/callback_helpers.h"
 #include "base/location.h"
diff --git a/chromeos/dbus/shill_client_helper.h b/chromeos/dbus/shill_client_helper.h
index 740a81c..f2cae1f 100644
--- a/chromeos/dbus/shill_client_helper.h
+++ b/chromeos/dbus/shill_client_helper.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 "base/observer_list.h"
diff --git a/chromeos/dbus/shill_client_unittest_base.cc b/chromeos/dbus/shill_client_unittest_base.cc
index c6c60f94..7c02b9a 100644
--- a/chromeos/dbus/shill_client_unittest_base.cc
+++ b/chromeos/dbus/shill_client_unittest_base.cc
@@ -4,6 +4,9 @@
 
 #include "chromeos/dbus/shill_client_unittest_base.h"
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "base/bind.h"
 #include "base/json/json_writer.h"
 #include "base/location.h"
diff --git a/chromeos/dbus/shill_client_unittest_base.h b/chromeos/dbus/shill_client_unittest_base.h
index 9b32490..24fa392 100644
--- a/chromeos/dbus/shill_client_unittest_base.h
+++ b/chromeos/dbus/shill_client_unittest_base.h
@@ -5,6 +5,8 @@
 #ifndef CHROMEOS_DBUS_SHILL_CLIENT_UNITTEST_BASE_H_
 #define CHROMEOS_DBUS_SHILL_CLIENT_UNITTEST_BASE_H_
 
+#include <stdint.h>
+
 #include <string>
 
 #include "base/memory/ref_counted.h"
diff --git a/chromeos/dbus/shill_device_client.cc b/chromeos/dbus/shill_device_client.cc
index 64fef54d..12be94d 100644
--- a/chromeos/dbus/shill_device_client.cc
+++ b/chromeos/dbus/shill_device_client.cc
@@ -5,6 +5,7 @@
 #include "chromeos/dbus/shill_device_client.h"
 
 #include "base/bind.h"
+#include "base/macros.h"
 #include "base/m