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

Unified Diff: content/browser/browser_thread_impl.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/browser/browser_thread_impl.h ('k') | content/browser/compositor/reflector_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_thread_impl.cc
diff --git a/content/browser/browser_thread_impl.cc b/content/browser/browser_thread_impl.cc
index f4e03833b91ebea808e9695334eb4091be856967..8df7974b7ee91922119b4d1ab7292c8f0af0c68a 100644
--- a/content/browser/browser_thread_impl.cc
+++ b/content/browser/browser_thread_impl.cc
@@ -62,14 +62,14 @@ class BrowserThreadTaskRunner : public base::SingleThreadTaskRunner {
// SingleThreadTaskRunner implementation.
bool PostDelayedTask(const tracked_objects::Location& from_here,
- base::Closure task,
+ base::OnceClosure task,
base::TimeDelta delay) override {
return BrowserThread::PostDelayedTask(id_, from_here, std::move(task),
delay);
}
bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
- base::Closure task,
+ base::OnceClosure task,
base::TimeDelta delay) override {
return BrowserThread::PostNonNestableDelayedTask(id_, from_here,
std::move(task), delay);
@@ -490,7 +490,7 @@ void BrowserThreadImpl::StopRedirectionOfThreadID(
bool BrowserThreadImpl::PostTaskHelper(
BrowserThread::ID identifier,
const tracked_objects::Location& from_here,
- base::Closure task,
+ base::OnceClosure task,
base::TimeDelta delay,
bool nestable) {
DCHECK_GE(identifier, 0);
@@ -534,7 +534,7 @@ bool BrowserThreadImpl::PostTaskHelper(
// static
bool BrowserThread::PostBlockingPoolTask(
const tracked_objects::Location& from_here,
- base::Closure task) {
+ base::OnceClosure task) {
return g_globals.Get().blocking_pool->PostWorkerTask(from_here,
std::move(task));
}
@@ -542,8 +542,8 @@ bool BrowserThread::PostBlockingPoolTask(
// static
bool BrowserThread::PostBlockingPoolTaskAndReply(
const tracked_objects::Location& from_here,
- base::Closure task,
- base::Closure reply) {
+ base::OnceClosure task,
+ base::OnceClosure reply) {
return g_globals.Get().blocking_pool->PostTaskAndReply(
from_here, std::move(task), std::move(reply));
}
@@ -552,7 +552,7 @@ bool BrowserThread::PostBlockingPoolTaskAndReply(
bool BrowserThread::PostBlockingPoolSequencedTask(
const std::string& sequence_token_name,
const tracked_objects::Location& from_here,
- base::Closure task) {
+ base::OnceClosure task) {
return g_globals.Get().blocking_pool->PostNamedSequencedWorkerTask(
sequence_token_name, from_here, std::move(task));
}
@@ -561,7 +561,7 @@ bool BrowserThread::PostBlockingPoolSequencedTask(
void BrowserThread::PostAfterStartupTask(
const tracked_objects::Location& from_here,
const scoped_refptr<base::TaskRunner>& task_runner,
- base::Closure task) {
+ base::OnceClosure task) {
GetContentClient()->browser()->PostAfterStartupTask(from_here, task_runner,
std::move(task));
}
@@ -623,7 +623,7 @@ bool BrowserThread::IsMessageLoopValid(ID identifier) {
// static
bool BrowserThread::PostTask(ID identifier,
const tracked_objects::Location& from_here,
- base::Closure task) {
+ base::OnceClosure task) {
return BrowserThreadImpl::PostTaskHelper(
identifier, from_here, std::move(task), base::TimeDelta(), true);
}
@@ -631,7 +631,7 @@ bool BrowserThread::PostTask(ID identifier,
// static
bool BrowserThread::PostDelayedTask(ID identifier,
const tracked_objects::Location& from_here,
- base::Closure task,
+ base::OnceClosure task,
base::TimeDelta delay) {
return BrowserThreadImpl::PostTaskHelper(identifier, from_here,
std::move(task), delay, true);
@@ -641,7 +641,7 @@ bool BrowserThread::PostDelayedTask(ID identifier,
bool BrowserThread::PostNonNestableTask(
ID identifier,
const tracked_objects::Location& from_here,
- base::Closure task) {
+ base::OnceClosure task) {
return BrowserThreadImpl::PostTaskHelper(
identifier, from_here, std::move(task), base::TimeDelta(), false);
}
@@ -650,7 +650,7 @@ bool BrowserThread::PostNonNestableTask(
bool BrowserThread::PostNonNestableDelayedTask(
ID identifier,
const tracked_objects::Location& from_here,
- base::Closure task,
+ base::OnceClosure task,
base::TimeDelta delay) {
return BrowserThreadImpl::PostTaskHelper(identifier, from_here,
std::move(task), delay, false);
@@ -659,8 +659,8 @@ bool BrowserThread::PostNonNestableDelayedTask(
// static
bool BrowserThread::PostTaskAndReply(ID identifier,
const tracked_objects::Location& from_here,
- base::Closure task,
- base::Closure reply) {
+ base::OnceClosure task,
+ base::OnceClosure reply) {
return GetTaskRunnerForThread(identifier)
->PostTaskAndReply(from_here, std::move(task), std::move(reply));
}
« no previous file with comments | « content/browser/browser_thread_impl.h ('k') | content/browser/compositor/reflector_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698