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

Unified Diff: base/task_runner_util.h

Issue 2535843002: Move PostTaskAndReplyWithResult() adapters to a separate header. (Closed)
Patch Set: add missing header Created 4 years 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/task/cancelable_task_tracker.h ('k') | components/history/core/browser/history_service.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 3b6feee753c50fea46413575a04776ae98c5bf88..e57d07769fa7ef66ae599490b75c4e8bcc4826a3 100644
--- a/base/task_runner_util.h
+++ b/base/task_runner_util.h
@@ -8,29 +8,11 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/logging.h"
+#include "base/post_task_and_reply_with_result_internal.h"
#include "base/task_runner.h"
namespace base {
-namespace internal {
-
-// Adapts a function that produces a result via a return value to
-// one that returns via an output parameter.
-template <typename ReturnType>
-void ReturnAsParamAdapter(const Callback<ReturnType(void)>& func,
- ReturnType* result) {
- *result = func.Run();
-}
-
-// Adapts a T* result to a callblack that expects a T.
-template <typename TaskReturnType, typename ReplyArgType>
-void ReplyAdapter(const Callback<void(ReplyArgType)>& callback,
- TaskReturnType* result) {
- callback.Run(std::move(*result));
-}
-
-} // namespace internal
-
// When you have these methods
//
// R DoWorkAndReturn();
« no previous file with comments | « base/task/cancelable_task_tracker.h ('k') | components/history/core/browser/history_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698