| Index: content/public/browser/browser_thread.h
|
| diff --git a/content/public/browser/browser_thread.h b/content/public/browser/browser_thread.h
|
| index fe82220c1e58fd5c0ed6c5c3f234efe46c276afe..8422091d3024087800f8365e034083b05cc3a6f0 100644
|
| --- a/content/public/browser/browser_thread.h
|
| +++ b/content/public/browser/browser_thread.h
|
| @@ -142,14 +142,32 @@ class CONTENT_EXPORT BrowserThread {
|
| static bool PostTaskAndReplyWithResult(
|
| ID identifier,
|
| const tracked_objects::Location& from_here,
|
| - base::Callback<ReturnType()> task,
|
| - base::Callback<void(ReplyArgType)> reply) {
|
| + base::OnceCallback<ReturnType()> task,
|
| + base::OnceCallback<void(ReplyArgType)> reply) {
|
| scoped_refptr<base::SingleThreadTaskRunner> task_runner =
|
| GetTaskRunnerForThread(identifier);
|
| return base::PostTaskAndReplyWithResult(task_runner.get(), from_here,
|
| std::move(task), std::move(reply));
|
| }
|
|
|
| + // Callback version of PostTaskAndReplyWithResult above.
|
| + // Though RepeatingCallback is convertible to OnceCallback, we need this since
|
| + // we cannot use template deduction and object conversion at once on the
|
| + // overload resolution.
|
| + // TODO(crbug.com/714018): Update all callers of the Callback version to use
|
| + // OnceCallback.
|
| + template <typename ReturnType, typename ReplyArgType>
|
| + static bool PostTaskAndReplyWithResult(
|
| + ID identifier,
|
| + const tracked_objects::Location& from_here,
|
| + base::Callback<ReturnType()> task,
|
| + base::Callback<void(ReplyArgType)> reply) {
|
| + return PostTaskAndReplyWithResult(
|
| + identifier, from_here,
|
| + base::OnceCallback<ReturnType()>(std::move(task)),
|
| + base::OnceCallback<void(ReplyArgType)>(std::move(reply)));
|
| + }
|
| +
|
| template <class T>
|
| static bool DeleteSoon(ID identifier,
|
| const tracked_objects::Location& from_here,
|
|
|