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

Unified Diff: base/task_runner_util.h

Issue 10344012: For types that support Pass(), e.g. scoped_ptr and friends, use Passed in PostTaskAndReplyWithResul… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 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 | « base/callback_internal.h ('k') | base/task_runner_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_runner_util.h
diff --git a/base/task_runner_util.h b/base/task_runner_util.h
index 9d20ef255ba0d0c2716d39aab019da9d88a8d01d..67e223e5f5d2ecb11071f18ce62d8d844170e31a 100644
--- a/base/task_runner_util.h
+++ b/base/task_runner_util.h
@@ -8,6 +8,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
+#include "base/callback_internal.h"
#include "base/logging.h"
#include "base/task_runner.h"
@@ -37,7 +38,7 @@ void ReplyAdapter(const Callback<void(ReturnType)>& callback,
ReturnType* result) {
DCHECK(result);
if(!callback.is_null())
- callback.Run(*result);
+ callback.Run(CallbackForward(*result));
}
// Helper class for TaskRunner::PostTaskAndReplyWithResult.
« no previous file with comments | « base/callback_internal.h ('k') | base/task_runner_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698