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

Unified Diff: base/test/test_simple_task_runner.cc

Issue 2823103003: Introduce TaskRunner::RunsTasksInCurrentSequence() (Closed)
Patch Set: rebase Created 3 years, 8 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
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;

Powered by Google App Engine
This is Rietveld 408576698