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

Unified Diff: content/child/worker_thread_registry.cc

Issue 2637843002: Migrate base::TaskRunner from Closure to OnceClosure (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
« no previous file with comments | « content/child/worker_thread_registry.h ('k') | content/public/browser/browser_thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/worker_thread_registry.cc
diff --git a/content/child/worker_thread_registry.cc b/content/child/worker_thread_registry.cc
index 8eae43869cb59e142d3c9bf92ee2e7014f200796..80fe5980931441df196bde216ad70786b9eb2698 100644
--- a/content/child/worker_thread_registry.cc
+++ b/content/child/worker_thread_registry.cc
@@ -38,7 +38,7 @@ class DoNothingTaskRunner : public base::TaskRunner {
~DoNothingTaskRunner() override {}
bool PostDelayedTask(const tracked_objects::Location& from_here,
- base::Closure task,
+ base::OnceClosure task,
base::TimeDelta delay) override {
return false;
}
@@ -56,7 +56,7 @@ int WorkerThread::GetCurrentId() {
return base::PlatformThread::CurrentId();
}
-void WorkerThread::PostTask(int id, base::Closure task) {
+void WorkerThread::PostTask(int id, base::OnceClosure task) {
WorkerThreadRegistry::Instance()->PostTask(id, std::move(task));
}
@@ -125,7 +125,7 @@ base::TaskRunner* WorkerThreadRegistry::GetTaskRunnerFor(int worker_id) {
: task_runner_for_dead_worker_.get();
}
-bool WorkerThreadRegistry::PostTask(int id, base::Closure closure) {
+bool WorkerThreadRegistry::PostTask(int id, base::OnceClosure closure) {
DCHECK(id > 0);
base::AutoLock locker(task_runner_map_lock_);
IDToTaskRunnerMap::iterator found = task_runner_map_.find(id);
« no previous file with comments | « content/child/worker_thread_registry.h ('k') | content/public/browser/browser_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698