From 9b6f42934e5a1e65ebfc668d91a28a6e2678a14c Mon Sep 17 00:00:00 2001 From: avi Date: Sat, 26 Dec 2015 14:15:14 -0800 Subject: Switch to standard integer types in base/. BUG=138542 TBR=mark@chromium.org NOPRESUBMIT=true Review URL: https://codereview.chromium.org/1538743002 Cr-Commit-Position: refs/heads/master@{#366910} --- base/synchronization/cancellation_flag.h | 3 ++- base/synchronization/condition_variable.h | 9 ++++----- base/synchronization/condition_variable_posix.cc | 4 +++- base/synchronization/condition_variable_unittest.cc | 1 + base/synchronization/condition_variable_win.cc | 1 + base/synchronization/lock.h | 2 ++ base/synchronization/lock_impl.h | 5 ++--- base/synchronization/lock_unittest.cc | 1 + base/synchronization/waitable_event.h | 5 ++++- base/synchronization/waitable_event_posix.cc | 4 +++- base/synchronization/waitable_event_unittest.cc | 3 +++ base/synchronization/waitable_event_watcher_posix.cc | 1 + base/synchronization/waitable_event_watcher_unittest.cc | 2 ++ base/synchronization/waitable_event_win.cc | 1 + 14 files changed, 30 insertions(+), 12 deletions(-) (limited to 'base/synchronization') diff --git a/base/synchronization/cancellation_flag.h b/base/synchronization/cancellation_flag.h index 0f0f08e..f2f83f4 100644 --- a/base/synchronization/cancellation_flag.h +++ b/base/synchronization/cancellation_flag.h @@ -5,8 +5,9 @@ #ifndef BASE_SYNCHRONIZATION_CANCELLATION_FLAG_H_ #define BASE_SYNCHRONIZATION_CANCELLATION_FLAG_H_ -#include "base/base_export.h" #include "base/atomicops.h" +#include "base/base_export.h" +#include "base/macros.h" #include "base/threading/platform_thread.h" namespace base { diff --git a/base/synchronization/condition_variable.h b/base/synchronization/condition_variable.h index 91e4d13..a41b2ba 100644 --- a/base/synchronization/condition_variable.h +++ b/base/synchronization/condition_variable.h @@ -65,17 +65,16 @@ #ifndef BASE_SYNCHRONIZATION_CONDITION_VARIABLE_H_ #define BASE_SYNCHRONIZATION_CONDITION_VARIABLE_H_ +#include "base/base_export.h" +#include "base/logging.h" +#include "base/macros.h" +#include "base/synchronization/lock.h" #include "build/build_config.h" #if defined(OS_POSIX) #include #endif -#include "base/base_export.h" -#include "base/basictypes.h" -#include "base/logging.h" -#include "base/synchronization/lock.h" - namespace base { class ConditionVarImpl; diff --git a/base/synchronization/condition_variable_posix.cc b/base/synchronization/condition_variable_posix.cc index 0e4668f..d86fd18 100644 --- a/base/synchronization/condition_variable_posix.cc +++ b/base/synchronization/condition_variable_posix.cc @@ -5,11 +5,13 @@ #include "base/synchronization/condition_variable.h" #include +#include #include #include "base/synchronization/lock.h" #include "base/threading/thread_restrictions.h" #include "base/time/time.h" +#include "build/build_config.h" namespace base { @@ -73,7 +75,7 @@ void ConditionVariable::Wait() { void ConditionVariable::TimedWait(const TimeDelta& max_time) { base::ThreadRestrictions::AssertWaitAllowed(); - int64 usecs = max_time.InMicroseconds(); + int64_t usecs = max_time.InMicroseconds(); struct timespec relative_time; relative_time.tv_sec = usecs / Time::kMicrosecondsPerSecond; relative_time.tv_nsec = diff --git a/base/synchronization/condition_variable_unittest.cc b/base/synchronization/condition_variable_unittest.cc index e63a723..4503922 100644 --- a/base/synchronization/condition_variable_unittest.cc +++ b/base/synchronization/condition_variable_unittest.cc @@ -20,6 +20,7 @@ #include "base/threading/thread.h" #include "base/threading/thread_collision_warner.h" #include "base/time/time.h" +#include "build/build_config.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/platform_test.h" diff --git a/base/synchronization/condition_variable_win.cc b/base/synchronization/condition_variable_win.cc index 4256ac8..6812eb9 100644 --- a/base/synchronization/condition_variable_win.cc +++ b/base/synchronization/condition_variable_win.cc @@ -8,6 +8,7 @@ #include #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/synchronization/lock.h" #include "base/threading/thread_restrictions.h" #include "base/time/time.h" diff --git a/base/synchronization/lock.h b/base/synchronization/lock.h index 81e2748..f7dd35d 100644 --- a/base/synchronization/lock.h +++ b/base/synchronization/lock.h @@ -7,8 +7,10 @@ #include "base/base_export.h" #include "base/logging.h" +#include "base/macros.h" #include "base/synchronization/lock_impl.h" #include "base/threading/platform_thread.h" +#include "build/build_config.h" namespace base { diff --git a/base/synchronization/lock_impl.h b/base/synchronization/lock_impl.h index 42e2f99..ed85987 100644 --- a/base/synchronization/lock_impl.h +++ b/base/synchronization/lock_impl.h @@ -5,6 +5,8 @@ #ifndef BASE_SYNCHRONIZATION_LOCK_IMPL_H_ #define BASE_SYNCHRONIZATION_LOCK_IMPL_H_ +#include "base/base_export.h" +#include "base/macros.h" #include "build/build_config.h" #if defined(OS_WIN) @@ -13,9 +15,6 @@ #include #endif -#include "base/base_export.h" -#include "base/basictypes.h" - namespace base { namespace internal { diff --git a/base/synchronization/lock_unittest.cc b/base/synchronization/lock_unittest.cc index 967efb8..27f335e 100644 --- a/base/synchronization/lock_unittest.cc +++ b/base/synchronization/lock_unittest.cc @@ -7,6 +7,7 @@ #include #include "base/compiler_specific.h" +#include "base/macros.h" #include "base/threading/platform_thread.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/base/synchronization/waitable_event.h b/base/synchronization/waitable_event.h index c35af54..b5d91d0 100644 --- a/base/synchronization/waitable_event.h +++ b/base/synchronization/waitable_event.h @@ -5,8 +5,11 @@ #ifndef BASE_SYNCHRONIZATION_WAITABLE_EVENT_H_ #define BASE_SYNCHRONIZATION_WAITABLE_EVENT_H_ +#include + #include "base/base_export.h" -#include "base/basictypes.h" +#include "base/macros.h" +#include "build/build_config.h" #if defined(OS_WIN) #include "base/win/scoped_handle.h" diff --git a/base/synchronization/waitable_event_posix.cc b/base/synchronization/waitable_event_posix.cc index 696ffc7..64d4376 100644 --- a/base/synchronization/waitable_event_posix.cc +++ b/base/synchronization/waitable_event_posix.cc @@ -2,13 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include + #include #include #include "base/logging.h" -#include "base/synchronization/waitable_event.h" #include "base/synchronization/condition_variable.h" #include "base/synchronization/lock.h" +#include "base/synchronization/waitable_event.h" #include "base/threading/thread_restrictions.h" // ----------------------------------------------------------------------------- diff --git a/base/synchronization/waitable_event_unittest.cc b/base/synchronization/waitable_event_unittest.cc index be56cf1..2930409 100644 --- a/base/synchronization/waitable_event_unittest.cc +++ b/base/synchronization/waitable_event_unittest.cc @@ -4,9 +4,12 @@ #include "base/synchronization/waitable_event.h" +#include + #include "base/compiler_specific.h" #include "base/threading/platform_thread.h" #include "base/time/time.h" +#include "build/build_config.h" #include "testing/gtest/include/gtest/gtest.h" namespace base { diff --git a/base/synchronization/waitable_event_watcher_posix.cc b/base/synchronization/waitable_event_watcher_posix.cc index ad66a4c..aa425f2 100644 --- a/base/synchronization/waitable_event_watcher_posix.cc +++ b/base/synchronization/waitable_event_watcher_posix.cc @@ -6,6 +6,7 @@ #include "base/bind.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" diff --git a/base/synchronization/waitable_event_watcher_unittest.cc b/base/synchronization/waitable_event_watcher_unittest.cc index 5319d1e..58444b3 100644 --- a/base/synchronization/waitable_event_watcher_unittest.cc +++ b/base/synchronization/waitable_event_watcher_unittest.cc @@ -6,10 +6,12 @@ #include "base/bind.h" #include "base/callback.h" +#include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "base/synchronization/waitable_event.h" #include "base/threading/platform_thread.h" +#include "build/build_config.h" #include "testing/gtest/include/gtest/gtest.h" namespace base { diff --git a/base/synchronization/waitable_event_win.cc b/base/synchronization/waitable_event_win.cc index 2d6d734..6674cdb 100644 --- a/base/synchronization/waitable_event_win.cc +++ b/base/synchronization/waitable_event_win.cc @@ -5,6 +5,7 @@ #include "base/synchronization/waitable_event.h" #include +#include #include "base/logging.h" #include "base/numerics/safe_conversions.h" -- cgit v1.1