diff options
author | jbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-02 18:23:02 +0000 |
---|---|---|
committer | jbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-02 18:23:02 +0000 |
commit | d323a176fa8c2ef474ce41dd8a1cddacb4fc67ff (patch) | |
tree | 5a6b91bcea70978cbf9b63000ed5f798d532f9b7 /base/timer_unittest.cc | |
parent | b1bb86d4d58f736fb980b8611ccf43d79e7b5b2b (diff) | |
download | chromium_src-d323a176fa8c2ef474ce41dd8a1cddacb4fc67ff.zip chromium_src-d323a176fa8c2ef474ce41dd8a1cddacb4fc67ff.tar.gz chromium_src-d323a176fa8c2ef474ce41dd8a1cddacb4fc67ff.tar.bz2 |
Update base/timer.h code to pass through Location from call sites. (reland) original CL w/LGTMs: http://codereview.chromium.org/7812036/
Review URL: http://codereview.chromium.org/7824041
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99409 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/timer_unittest.cc')
-rw-r--r-- | base/timer_unittest.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/base/timer_unittest.cc b/base/timer_unittest.cc index bb0eade..0013bcc 100644 --- a/base/timer_unittest.cc +++ b/base/timer_unittest.cc @@ -19,7 +19,7 @@ class OneShotTimerTester { delay_ms_(milliseconds) { } void Start() { - timer_.Start(TimeDelta::FromMilliseconds(delay_ms_), this, + timer_.Start(FROM_HERE, TimeDelta::FromMilliseconds(delay_ms_), this, &OneShotTimerTester::Run); } private: @@ -39,7 +39,7 @@ class OneShotSelfDeletingTimerTester { timer_(new base::OneShotTimer<OneShotSelfDeletingTimerTester>()) { } void Start() { - timer_->Start(TimeDelta::FromMilliseconds(10), this, + timer_->Start(FROM_HERE, TimeDelta::FromMilliseconds(10), this, &OneShotSelfDeletingTimerTester::Run); } private: @@ -59,7 +59,7 @@ class RepeatingTimerTester { } void Start() { - timer_.Start(TimeDelta::FromMilliseconds(10), this, + timer_.Start(FROM_HERE, TimeDelta::FromMilliseconds(10), this, &RepeatingTimerTester::Run); } private: @@ -176,7 +176,7 @@ void RunTest_DelayTimer_NoCall(MessageLoop::Type message_loop_type) { // If Delay is never called, the timer shouldn't go off. DelayTimerTarget target; - base::DelayTimer<DelayTimerTarget> timer( + base::DelayTimer<DelayTimerTarget> timer(FROM_HERE, TimeDelta::FromMilliseconds(1), &target, &DelayTimerTarget::Signal); bool did_run = false; @@ -191,7 +191,7 @@ void RunTest_DelayTimer_OneCall(MessageLoop::Type message_loop_type) { MessageLoop loop(message_loop_type); DelayTimerTarget target; - base::DelayTimer<DelayTimerTarget> timer( + base::DelayTimer<DelayTimerTarget> timer(FROM_HERE, TimeDelta::FromMilliseconds(1), &target, &DelayTimerTarget::Signal); timer.Reset(); @@ -225,7 +225,7 @@ void RunTest_DelayTimer_Reset(MessageLoop::Type message_loop_type) { // If Delay is never called, the timer shouldn't go off. DelayTimerTarget target; - base::DelayTimer<DelayTimerTarget> timer( + base::DelayTimer<DelayTimerTarget> timer(FROM_HERE, TimeDelta::FromMilliseconds(50), &target, &DelayTimerTarget::Signal); timer.Reset(); @@ -233,8 +233,8 @@ void RunTest_DelayTimer_Reset(MessageLoop::Type message_loop_type) { base::OneShotTimer<ResetHelper> timers[20]; for (size_t i = 0; i < arraysize(timers); ++i) { - timers[i].Start(TimeDelta::FromMilliseconds(i * 10), &reset_helper, - &ResetHelper::Reset); + timers[i].Start(FROM_HERE, TimeDelta::FromMilliseconds(i * 10), + &reset_helper, &ResetHelper::Reset); } bool did_run = false; @@ -260,7 +260,7 @@ void RunTest_DelayTimer_Deleted(MessageLoop::Type message_loop_type) { { base::DelayTimer<DelayTimerFatalTarget> timer( - TimeDelta::FromMilliseconds(50), &target, + FROM_HERE, TimeDelta::FromMilliseconds(50), &target, &DelayTimerFatalTarget::Signal); timer.Reset(); } |