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

Side by Side Diff: cc/test/task_graph_runner_test_template.cc

Issue 2021023002: cc: Rename CompleteOnOriginThread() -> OnTaskCompleted() in tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_notify_schedule_1
Patch Set: rebase Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « cc/test/task_graph_runner_test_template.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/test/task_graph_runner_test_template.h" 5 #include "cc/test/task_graph_runner_test_template.h"
6 6
7 namespace cc { 7 namespace cc {
8 8
9 const int TaskGraphRunnerTestBase::kNamespaceCount; 9 const int TaskGraphRunnerTestBase::kNamespaceCount;
10 10
(...skipping 10 matching lines...) Expand all
21 void TaskGraphRunnerTestBase::RunAllTasks(int namespace_index) { 21 void TaskGraphRunnerTestBase::RunAllTasks(int namespace_index) {
22 task_graph_runner_->WaitForTasksToFinishRunning( 22 task_graph_runner_->WaitForTasksToFinishRunning(
23 namespace_token_[namespace_index]); 23 namespace_token_[namespace_index]);
24 24
25 Task::Vector completed_tasks; 25 Task::Vector completed_tasks;
26 task_graph_runner_->CollectCompletedTasks(namespace_token_[namespace_index], 26 task_graph_runner_->CollectCompletedTasks(namespace_token_[namespace_index],
27 &completed_tasks); 27 &completed_tasks);
28 for (Task::Vector::const_iterator it = completed_tasks.begin(); 28 for (Task::Vector::const_iterator it = completed_tasks.begin();
29 it != completed_tasks.end(); ++it) { 29 it != completed_tasks.end(); ++it) {
30 FakeTaskImpl* task = static_cast<FakeTaskImpl*>(it->get()); 30 FakeTaskImpl* task = static_cast<FakeTaskImpl*>(it->get());
31 task->CompleteOnOriginThread(); 31 task->OnTaskCompleted();
32 } 32 }
33 } 33 }
34 34
35 void TaskGraphRunnerTestBase::RunTaskOnWorkerThread(int namespace_index, 35 void TaskGraphRunnerTestBase::RunTaskOnWorkerThread(int namespace_index,
36 unsigned id) { 36 unsigned id) {
37 base::AutoLock lock(run_task_ids_lock_); 37 base::AutoLock lock(run_task_ids_lock_);
38 run_task_ids_[namespace_index].push_back(id); 38 run_task_ids_[namespace_index].push_back(id);
39 } 39 }
40 40
41 void TaskGraphRunnerTestBase::OnTaskCompleted(int namespace_index, 41 void TaskGraphRunnerTestBase::OnTaskCompleted(int namespace_index,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 &new_graph); 85 &new_graph);
86 86
87 dependents_[namespace_index].swap(new_dependents); 87 dependents_[namespace_index].swap(new_dependents);
88 tasks_[namespace_index].swap(new_tasks); 88 tasks_[namespace_index].swap(new_tasks);
89 } 89 }
90 90
91 void TaskGraphRunnerTestBase::FakeTaskImpl::RunOnWorkerThread() { 91 void TaskGraphRunnerTestBase::FakeTaskImpl::RunOnWorkerThread() {
92 test_->RunTaskOnWorkerThread(namespace_index_, id_); 92 test_->RunTaskOnWorkerThread(namespace_index_, id_);
93 } 93 }
94 94
95 void TaskGraphRunnerTestBase::FakeTaskImpl::CompleteOnOriginThread() { 95 void TaskGraphRunnerTestBase::FakeTaskImpl::OnTaskCompleted() {
96 test_->OnTaskCompleted(namespace_index_, id_); 96 test_->OnTaskCompleted(namespace_index_, id_);
97 } 97 }
98 98
99 } // namespace cc 99 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/task_graph_runner_test_template.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698