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

Unified Diff: cc/test/task_graph_runner_test_template.cc

Issue 1854723002: cc: Simplify task and its derived classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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: cc/test/task_graph_runner_test_template.cc
diff --git a/cc/test/task_graph_runner_test_template.cc b/cc/test/task_graph_runner_test_template.cc
index 6797de2e665d0acca0a23fc6a8559bc96aafd367..67c1d21a12c29158d96a0c110639d76a89359028 100644
--- a/cc/test/task_graph_runner_test_template.cc
+++ b/cc/test/task_graph_runner_test_template.cc
@@ -22,13 +22,13 @@ void TaskGraphRunnerTestBase::RunAllTasks(int namespace_index) {
task_graph_runner_->WaitForTasksToFinishRunning(
namespace_token_[namespace_index]);
- Task::Vector completed_tasks;
+ DependencyTask::Vector completed_tasks;
task_graph_runner_->CollectCompletedTasks(namespace_token_[namespace_index],
&completed_tasks);
- for (Task::Vector::const_iterator it = completed_tasks.begin();
+ for (DependencyTask::Vector::const_iterator it = completed_tasks.begin();
it != completed_tasks.end(); ++it) {
FakeTaskImpl* task = static_cast<FakeTaskImpl*>(it->get());
- task->CompleteOnOriginThread();
+ task->CompleteOnOriginThread(nullptr);
}
}
@@ -56,8 +56,8 @@ const std::vector<unsigned>& TaskGraphRunnerTestBase::on_task_completed_ids(
void TaskGraphRunnerTestBase::ScheduleTasks(
int namespace_index,
const std::vector<TaskInfo>& tasks) {
- Task::Vector new_tasks;
- Task::Vector new_dependents;
+ DependencyTask::Vector new_tasks;
+ DependencyTask::Vector new_dependents;
TaskGraph new_graph;
for (std::vector<TaskInfo>::const_iterator it = tasks.begin();
@@ -92,7 +92,8 @@ void TaskGraphRunnerTestBase::FakeTaskImpl::RunOnWorkerThread() {
test_->RunTaskOnWorkerThread(namespace_index_, id_);
}
-void TaskGraphRunnerTestBase::FakeTaskImpl::CompleteOnOriginThread() {
+void TaskGraphRunnerTestBase::FakeTaskImpl::CompleteOnOriginThread(
+ DependencyTaskClient* client) {
test_->OnTaskCompleted(namespace_index_, id_);
}

Powered by Google App Engine
This is Rietveld 408576698