summaryrefslogtreecommitdiffstats
path: root/base/message_loop.cc
diff options
context:
space:
mode:
authordarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-20 01:13:40 +0000
committerdarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-20 01:13:40 +0000
commit3816f46725f7b8e42e352a063efd5206a46dbe9a (patch)
treed64edfcf741dcd927ce404f66dab723e8a0914c8 /base/message_loop.cc
parentbda05798c0609582075a3b872c37ad56021920c4 (diff)
downloadchromium_src-3816f46725f7b8e42e352a063efd5206a46dbe9a.zip
chromium_src-3816f46725f7b8e42e352a063efd5206a46dbe9a.tar.gz
chromium_src-3816f46725f7b8e42e352a063efd5206a46dbe9a.tar.bz2
rollback r1075 to see if it helps resolve test failures
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1078 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_loop.cc')
-rw-r--r--base/message_loop.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/base/message_loop.cc b/base/message_loop.cc
index eb10ca7..4964dfe 100644
--- a/base/message_loop.cc
+++ b/base/message_loop.cc
@@ -386,16 +386,16 @@ void MessageLoop::DeletePendingTasks() {
}
void MessageLoop::DidChangeNextTimerExpiry() {
- Time next_delayed_work_time = timer_manager_.GetNextFireTime();
- if (next_delayed_work_time.is_null())
+ int delay = timer_manager_.GetCurrentDelay();
+ if (delay == -1)
return;
// Simulates malfunctioning, early firing timers. Pending tasks should only
// be invoked when the delay they specify has elapsed.
if (timer_manager_.use_broken_delay())
- next_delayed_work_time = Time::Now() + TimeDelta::FromMilliseconds(10);
+ delay = 10;
- pump_->ScheduleDelayedWork(next_delayed_work_time);
+ pump_->ScheduleDelayedWork(TimeDelta::FromMilliseconds(delay));
}
bool MessageLoop::DoWork() {
@@ -403,12 +403,12 @@ bool MessageLoop::DoWork() {
return QueueOrRunTask(NULL);
}
-bool MessageLoop::DoDelayedWork(Time* next_delayed_work_time) {
+bool MessageLoop::DoDelayedWork(TimeDelta* next_delay) {
bool did_work = timer_manager_.RunSomePendingTimers();
// We may not have run any timers, but we may still have future timers to
// run, so we need to inform the pump again of pending timers.
- *next_delayed_work_time = timer_manager_.GetNextFireTime();
+ *next_delay = TimeDelta::FromMilliseconds(timer_manager_.GetCurrentDelay());
return did_work;
}