Index: content/browser/browser_thread_impl.cc |
diff --git a/content/browser/browser_thread_impl.cc b/content/browser/browser_thread_impl.cc |
index 895fba219d74d755af9da7bd47394e3e62351e4d..f4e03833b91ebea808e9695334eb4091be856967 100644 |
--- a/content/browser/browser_thread_impl.cc |
+++ b/content/browser/browser_thread_impl.cc |
@@ -62,16 +62,17 @@ class BrowserThreadTaskRunner : public base::SingleThreadTaskRunner { |
// SingleThreadTaskRunner implementation. |
bool PostDelayedTask(const tracked_objects::Location& from_here, |
- const base::Closure& task, |
+ base::Closure task, |
base::TimeDelta delay) override { |
- return BrowserThread::PostDelayedTask(id_, from_here, task, delay); |
+ return BrowserThread::PostDelayedTask(id_, from_here, std::move(task), |
+ delay); |
} |
bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, |
- const base::Closure& task, |
+ base::Closure task, |
base::TimeDelta delay) override { |
- return BrowserThread::PostNonNestableDelayedTask(id_, from_here, task, |
- delay); |
+ return BrowserThread::PostNonNestableDelayedTask(id_, from_here, |
+ std::move(task), delay); |
} |
bool RunsTasksOnCurrentThread() const override { |
@@ -489,7 +490,7 @@ void BrowserThreadImpl::StopRedirectionOfThreadID( |
bool BrowserThreadImpl::PostTaskHelper( |
BrowserThread::ID identifier, |
const tracked_objects::Location& from_here, |
- const base::Closure& task, |
+ base::Closure task, |
base::TimeDelta delay, |
bool nestable) { |
DCHECK_GE(identifier, 0); |
@@ -517,9 +518,10 @@ bool BrowserThreadImpl::PostTaskHelper( |
globals.task_runners[identifier].get(); |
DCHECK(task_runner); |
if (nestable) { |
- task_runner->PostDelayedTask(from_here, task, delay); |
+ task_runner->PostDelayedTask(from_here, std::move(task), delay); |
} else { |
- task_runner->PostNonNestableDelayedTask(from_here, task, delay); |
+ task_runner->PostNonNestableDelayedTask(from_here, std::move(task), |
+ delay); |
} |
} |
@@ -532,8 +534,9 @@ bool BrowserThreadImpl::PostTaskHelper( |
// static |
bool BrowserThread::PostBlockingPoolTask( |
const tracked_objects::Location& from_here, |
- const base::Closure& task) { |
- return g_globals.Get().blocking_pool->PostWorkerTask(from_here, task); |
+ base::Closure task) { |
+ return g_globals.Get().blocking_pool->PostWorkerTask(from_here, |
+ std::move(task)); |
} |
// static |
@@ -549,18 +552,18 @@ bool BrowserThread::PostBlockingPoolTaskAndReply( |
bool BrowserThread::PostBlockingPoolSequencedTask( |
const std::string& sequence_token_name, |
const tracked_objects::Location& from_here, |
- const base::Closure& task) { |
+ base::Closure task) { |
return g_globals.Get().blocking_pool->PostNamedSequencedWorkerTask( |
- sequence_token_name, from_here, task); |
+ sequence_token_name, from_here, std::move(task)); |
} |
// static |
void BrowserThread::PostAfterStartupTask( |
const tracked_objects::Location& from_here, |
const scoped_refptr<base::TaskRunner>& task_runner, |
- const base::Closure& task) { |
+ base::Closure task) { |
GetContentClient()->browser()->PostAfterStartupTask(from_here, task_runner, |
- task); |
+ std::move(task)); |
} |
// static |
@@ -620,37 +623,37 @@ bool BrowserThread::IsMessageLoopValid(ID identifier) { |
// static |
bool BrowserThread::PostTask(ID identifier, |
const tracked_objects::Location& from_here, |
- const base::Closure& task) { |
+ base::Closure task) { |
return BrowserThreadImpl::PostTaskHelper( |
- identifier, from_here, task, base::TimeDelta(), true); |
+ identifier, from_here, std::move(task), base::TimeDelta(), true); |
} |
// static |
bool BrowserThread::PostDelayedTask(ID identifier, |
const tracked_objects::Location& from_here, |
- const base::Closure& task, |
+ base::Closure task, |
base::TimeDelta delay) { |
- return BrowserThreadImpl::PostTaskHelper( |
- identifier, from_here, task, delay, true); |
+ return BrowserThreadImpl::PostTaskHelper(identifier, from_here, |
+ std::move(task), delay, true); |
} |
// static |
bool BrowserThread::PostNonNestableTask( |
ID identifier, |
const tracked_objects::Location& from_here, |
- const base::Closure& task) { |
+ base::Closure task) { |
return BrowserThreadImpl::PostTaskHelper( |
- identifier, from_here, task, base::TimeDelta(), false); |
+ identifier, from_here, std::move(task), base::TimeDelta(), false); |
} |
// static |
bool BrowserThread::PostNonNestableDelayedTask( |
ID identifier, |
const tracked_objects::Location& from_here, |
- const base::Closure& task, |
+ base::Closure task, |
base::TimeDelta delay) { |
- return BrowserThreadImpl::PostTaskHelper( |
- identifier, from_here, task, delay, false); |
+ return BrowserThreadImpl::PostTaskHelper(identifier, from_here, |
+ std::move(task), delay, false); |
} |
// static |