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

Unified Diff: base/test/test_simple_task_runner.cc

Issue 2823103003: Introduce TaskRunner::RunsTasksInCurrentSequence() (Closed)
Patch Set: rebase & remove inline keyword Created 3 years, 7 months 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 | « base/test/test_simple_task_runner.h ('k') | base/threading/sequenced_worker_pool.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/test_simple_task_runner.cc
diff --git a/base/test/test_simple_task_runner.cc b/base/test/test_simple_task_runner.cc
index 4280a0de62502a059fec11a315a2cafdb46cbf6d..bdb4aacb2856a7a4b9d79f9f6390a057ba590096 100644
--- a/base/test/test_simple_task_runner.cc
+++ b/base/test/test_simple_task_runner.cc
@@ -41,7 +41,7 @@ bool TestSimpleTaskRunner::PostNonNestableDelayedTask(
// TODO(gab): Use SequenceToken here to differentiate between tasks running in
// the scope of this TestSimpleTaskRunner and other task runners sharing this
// thread. http://crbug.com/631186
-bool TestSimpleTaskRunner::RunsTasksOnCurrentThread() const {
+bool TestSimpleTaskRunner::RunsTasksInCurrentSequence() const {
return thread_ref_ == PlatformThread::CurrentRef();
}
@@ -76,7 +76,7 @@ void TestSimpleTaskRunner::ClearPendingTasks() {
}
void TestSimpleTaskRunner::RunPendingTasks() {
- DCHECK(RunsTasksOnCurrentThread());
+ DCHECK(RunsTasksInCurrentSequence());
// Swap with a local variable to avoid re-entrancy problems.
std::deque<TestPendingTask> tasks_to_run;
« no previous file with comments | « base/test/test_simple_task_runner.h ('k') | base/threading/sequenced_worker_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698