diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-01 23:16:20 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-01 23:16:20 +0000 |
commit | bc581a6829fe49e43f4869075781d6dc94843f09 (patch) | |
tree | a94363488dadff28fe2c03f3a169b6ad2eeb02e8 /base/threading | |
parent | 10f33b1bd6c6adb6306759a45bf3a5c18221d878 (diff) | |
download | chromium_src-bc581a6829fe49e43f4869075781d6dc94843f09.zip chromium_src-bc581a6829fe49e43f4869075781d6dc94843f09.tar.gz chromium_src-bc581a6829fe49e43f4869075781d6dc94843f09.tar.bz2 |
Move base/lock and base/condition_variable to base/synchronization/
I kept a base/lock.h in place with a using statement to avoid updating
all callers in one CL.
TEST=it compiles
BUG=none
Review URL: http://codereview.chromium.org/6018013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70363 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/threading')
-rw-r--r-- | base/threading/watchdog.h | 18 | ||||
-rw-r--r-- | base/threading/worker_pool_posix.h | 4 | ||||
-rw-r--r-- | base/threading/worker_pool_posix_unittest.cc | 2 |
3 files changed, 12 insertions, 12 deletions
diff --git a/base/threading/watchdog.h b/base/threading/watchdog.h index 8641f04..bf95639 100644 --- a/base/threading/watchdog.h +++ b/base/threading/watchdog.h @@ -21,8 +21,8 @@ #include <string> -#include "base/condition_variable.h" -#include "base/lock.h" +#include "base/synchronization/condition_variable.h" +#include "base/synchronization/lock.h" #include "base/threading/platform_thread.h" #include "base/time.h" @@ -31,15 +31,15 @@ namespace base { class Watchdog { public: // Constructor specifies how long the Watchdog will wait before alarming. - Watchdog(const base::TimeDelta& duration, + Watchdog(const TimeDelta& duration, const std::string& thread_watched_name, bool enabled); virtual ~Watchdog(); // Start timing, and alarm when time expires (unless we're disarm()ed.) void Arm(); // Arm starting now. - void ArmSomeTimeDeltaAgo(const base::TimeDelta& time_delta); - void ArmAtStartTime(const base::TimeTicks start_time); + void ArmSomeTimeDeltaAgo(const TimeDelta& time_delta); + void ArmAtStartTime(const TimeTicks start_time); // Reset time, and do not set off the alarm. void Disarm(); @@ -71,12 +71,12 @@ class Watchdog { Lock lock_; // Mutex for state_. ConditionVariable condition_variable_; State state_; - const base::TimeDelta duration_; // How long after start_time_ do we alarm? + const TimeDelta duration_; // How long after start_time_ do we alarm? const std::string thread_watched_name_; PlatformThreadHandle handle_; ThreadDelegate delegate_; // Store it, because it must outlive the thread. - base::TimeTicks start_time_; // Start of epoch, and alarm after duration_. + TimeTicks start_time_; // Start of epoch, and alarm after duration_. // When the debugger breaks (when we alarm), all the other alarms that are // armed will expire (also alarm). To diminish this effect, we track any @@ -86,9 +86,9 @@ class Watchdog { // on alarms from callers that specify old times. static Lock static_lock_; // Lock for access of static data... // When did we last alarm and get stuck (for a while) in a debugger? - static base::TimeTicks last_debugged_alarm_time_; + static TimeTicks last_debugged_alarm_time_; // How long did we sit on a break in the debugger? - static base::TimeDelta last_debugged_alarm_delay_; + static TimeDelta last_debugged_alarm_delay_; DISALLOW_COPY_AND_ASSIGN(Watchdog); }; diff --git a/base/threading/worker_pool_posix.h b/base/threading/worker_pool_posix.h index 44f0208..1b68aef 100644 --- a/base/threading/worker_pool_posix.h +++ b/base/threading/worker_pool_posix.h @@ -29,10 +29,10 @@ #include <string> #include "base/basictypes.h" -#include "base/condition_variable.h" -#include "base/lock.h" #include "base/ref_counted.h" #include "base/scoped_ptr.h" +#include "base/synchronization/condition_variable.h" +#include "base/synchronization/lock.h" #include "base/threading/platform_thread.h" class Task; diff --git a/base/threading/worker_pool_posix_unittest.cc b/base/threading/worker_pool_posix_unittest.cc index 25509bf..9be82c0 100644 --- a/base/threading/worker_pool_posix_unittest.cc +++ b/base/threading/worker_pool_posix_unittest.cc @@ -6,8 +6,8 @@ #include <set> -#include "base/condition_variable.h" #include "base/lock.h" +#include "base/synchronization/condition_variable.h" #include "base/task.h" #include "base/threading/platform_thread.h" #include "base/waitable_event.h" |