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

Unified Diff: ios/web/web_thread_impl.cc

Issue 2678303002: Pass Callback by value on PostTaskAndReply family (Closed)
Patch Set: rebase Created 3 years, 10 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 | « ios/web/public/web_thread.h ('k') | storage/browser/quota/quota_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_thread_impl.cc
diff --git a/ios/web/web_thread_impl.cc b/ios/web/web_thread_impl.cc
index 2a28556be4567f046cf6e19adab71aef600b04e7..eaab3d9e3ff54132b15fa085a3400fa303df422b 100644
--- a/ios/web/web_thread_impl.cc
+++ b/ios/web/web_thread_impl.cc
@@ -5,6 +5,7 @@
#include "ios/web/web_thread_impl.h"
#include <string>
+#include <utility>
#include "base/atomicops.h"
#include "base/bind.h"
@@ -335,10 +336,10 @@ bool WebThread::PostBlockingPoolTask(const tracked_objects::Location& from_here,
// static
bool WebThread::PostBlockingPoolTaskAndReply(
const tracked_objects::Location& from_here,
- const base::Closure& task,
- const base::Closure& reply) {
- return g_globals.Get().blocking_pool->PostTaskAndReply(from_here, task,
- reply);
+ base::Closure task,
+ base::Closure reply) {
+ return g_globals.Get().blocking_pool->PostTaskAndReply(
+ from_here, std::move(task), std::move(reply));
}
// static
@@ -440,10 +441,10 @@ bool WebThread::PostNonNestableDelayedTask(
// static
bool WebThread::PostTaskAndReply(ID identifier,
const tracked_objects::Location& from_here,
- const base::Closure& task,
- const base::Closure& reply) {
+ base::Closure task,
+ base::Closure reply) {
return GetTaskRunnerForThread(identifier)
- ->PostTaskAndReply(from_here, task, reply);
+ ->PostTaskAndReply(from_here, std::move(task), std::move(reply));
}
// static
« no previous file with comments | « ios/web/public/web_thread.h ('k') | storage/browser/quota/quota_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698