Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1172)

Unified Diff: base/timer/timer.cc

Issue 2514293004: Modernize TimerTests prior to https://codereview.chromium.org/2491613004 (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/timer/timer_unittest.cc » ('j') | base/timer/timer_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/timer/timer.cc
diff --git a/base/timer/timer.cc b/base/timer/timer.cc
index aba8fc8d9fbca7d6c22097c7c5230d682733469f..6ec18f181488c3a5b533abe93cf9b793914e6451 100644
--- a/base/timer/timer.cc
+++ b/base/timer/timer.cc
@@ -181,10 +181,8 @@ void Timer::PostNewScheduledTask(TimeDelta delay) {
}
// Remember the thread ID that posts the first task -- this will be verified
// later when the task is abandoned to detect misuse from multiple threads.
- if (!thread_id_) {
- DCHECK(GetTaskRunner()->BelongsToCurrentThread());
+ if (!thread_id_)
thread_id_ = static_cast<int>(PlatformThread::CurrentId());
- }
}
scoped_refptr<SingleThreadTaskRunner> Timer::GetTaskRunner() {
« no previous file with comments | « no previous file | base/timer/timer_unittest.cc » ('j') | base/timer/timer_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698