summaryrefslogtreecommitdiffstats
path: root/base/watchdog.cc
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-06 12:11:18 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-06 12:11:18 +0000
commit04c8f4e473a35eac3be2f34ca3971eb950f20fba (patch)
treec0537c64a855db7a06378225b8e93cca458827fe /base/watchdog.cc
parentbb23ae41ecdea50de1a00ddf6bd58f78e5ffb3b5 (diff)
downloadchromium_src-04c8f4e473a35eac3be2f34ca3971eb950f20fba.zip
chromium_src-04c8f4e473a35eac3be2f34ca3971eb950f20fba.tar.gz
chromium_src-04c8f4e473a35eac3be2f34ca3971eb950f20fba.tar.bz2
Cleanup base/watchdog thread delegate.
Review URL: http://codereview.chromium.org/17038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7585 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/watchdog.cc')
-rw-r--r--base/watchdog.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/base/watchdog.cc b/base/watchdog.cc
index 0049fec..76662b2 100644
--- a/base/watchdog.cc
+++ b/base/watchdog.cc
@@ -21,8 +21,9 @@ Watchdog::Watchdog(const TimeDelta& duration,
lock_(),
condition_variable_(&lock_),
state_(DISARMED),
+ duration_(duration),
thread_watched_name_(thread_watched_name),
- ALLOW_THIS_IN_INITIALIZER_LIST(delegate_(this, duration)) {
+ ALLOW_THIS_IN_INITIALIZER_LIST(delegate_(this)) {
if (!enabled)
return; // Don't start thread, or doing anything really.
init_successful_ = PlatformThread::Create(0, // Default stack size.
@@ -84,7 +85,7 @@ void Watchdog::ThreadDelegate::ThreadMain() {
if (SHUTDOWN == watchdog_->state_)
return;
DCHECK(ARMED == watchdog_->state_);
- remaining_duration = duration_ -
+ remaining_duration = watchdog_->duration_ -
(TimeTicks::Now() - watchdog_->start_time_);
if (remaining_duration.InMilliseconds() > 0) {
// Spurios wake? Timer drifts? Go back to sleep for remaining time.