Commit 8ef25f4c authored by Greg Kraynov's avatar Greg Kraynov Committed by Commit Bot

Remove PostTask methods in TestTaskQueue.

TaskQueues shouldn't be confused with task runners.

Bug: 865411
Change-Id: Ibc37eb30de002f126a76231122f77c16fc3e8e35
Reviewed-on: https://chromium-review.googlesource.com/c/1336470Reviewed-by: default avatarSami Kyöstilä <skyostil@chromium.org>
Reviewed-by: default avatarAlexander Timin <altimin@chromium.org>
Commit-Queue: Greg Kraynov <kraynov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609007}
parent 9b7dbb42
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -16,34 +16,6 @@ class TestTaskQueue : public TaskQueue { ...@@ -16,34 +16,6 @@ class TestTaskQueue : public TaskQueue {
explicit TestTaskQueue(std::unique_ptr<internal::TaskQueueImpl> impl, explicit TestTaskQueue(std::unique_ptr<internal::TaskQueueImpl> impl,
const TaskQueue::Spec& spec); const TaskQueue::Spec& spec);
// TODO(kraynov): Remove PostTask methods after TaskQueue refactoring.
bool PostTask(const Location& location, OnceClosure callback) {
return PostDelayedTask(location, std::move(callback), TimeDelta());
}
bool PostDelayedTask(const Location& location,
OnceClosure callback,
TimeDelta delay) {
return task_runner()->PostDelayedTask(location, std::move(callback), delay);
}
bool PostNonNestableTask(const Location& location, OnceClosure callback) {
return PostNonNestableDelayedTask(location, std::move(callback),
TimeDelta());
}
bool PostNonNestableDelayedTask(const Location& location,
OnceClosure callback,
TimeDelta delay) {
return task_runner()->PostNonNestableDelayedTask(
location, std::move(callback), delay);
}
bool RunsTasksInCurrentSequence() const {
return task_runner()->RunsTasksInCurrentSequence();
}
using TaskQueue::GetTaskQueueImpl; using TaskQueue::GetTaskQueueImpl;
WeakPtr<TestTaskQueue> GetWeakPtr(); WeakPtr<TestTaskQueue> GetWeakPtr();
......
...@@ -202,7 +202,7 @@ void ThreadManager::PostDelayedTask( ...@@ -202,7 +202,7 @@ void ThreadManager::PostDelayedTask(
// TODO(farahcharab) After adding non-nestable/nestable tasks, fix this to // TODO(farahcharab) After adding non-nestable/nestable tasks, fix this to
// PostNonNestableDelayedTask for the former and PostDelayedTask for the // PostNonNestableDelayedTask for the former and PostDelayedTask for the
// latter. // latter.
chosen_task_queue->PostDelayedTask( chosen_task_queue->task_runner()->PostDelayedTask(
FROM_HERE, FROM_HERE,
BindOnce(&Task::Execute, pending_task->weak_ptr_factory_.GetWeakPtr(), BindOnce(&Task::Execute, pending_task->weak_ptr_factory_.GetWeakPtr(),
task), task),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment