Commit fbf68c4d authored by tzik's avatar tzik Committed by Commit Bot

Migrate base::TestIOThread to OnceCallback

base::TestIOThread::PostTask is a left-over of the OnceCallback support
of TaskRunner::PostTask, that is needed by its user to migrate to
OnceCallback.

Bug: 714018
Change-Id: Iceb18fb84bde555e4fa217c32e463e01adf034a1
Reviewed-on: https://chromium-review.googlesource.com/997313Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550135}
parent aa22b502
......@@ -38,9 +38,8 @@ void TestIOThread::Stop() {
io_thread_started_ = false;
}
void TestIOThread::PostTask(const Location& from_here,
const base::Closure& task) {
task_runner()->PostTask(from_here, task);
void TestIOThread::PostTask(const Location& from_here, base::OnceClosure task) {
task_runner()->PostTask(from_here, std::move(task));
}
} // namespace base
......@@ -38,7 +38,7 @@ class TestIOThread {
void Stop();
// Post |task| to the IO thread.
void PostTask(const Location& from_here, const base::Closure& task);
void PostTask(const Location& from_here, base::OnceClosure task);
base::MessageLoopForIO* message_loop() {
return static_cast<base::MessageLoopForIO*>(io_thread_.message_loop());
......
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