Commit 745fc0dc authored by szager@google.com's avatar szager@google.com

Expose PostTaskAndReplyWithResult in BrowserThread

BUG=
TEST=


Review URL: http://codereview.chromium.org/10198042

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134566 0039d316-1c4b-4281-b951-d872f2087c98
parent 804039d8
......@@ -12,6 +12,7 @@
#include "base/callback.h"
#include "base/location.h"
#include "base/message_loop_proxy.h"
#include "base/task_runner_util.h"
#include "base/time.h"
#include "content/common/content_export.h"
......@@ -134,6 +135,18 @@ class CONTENT_EXPORT BrowserThread {
const base::Closure& task,
const base::Closure& reply);
template <typename ReturnType>
static bool PostTaskAndReplyWithResult(
ID identifier,
const tracked_objects::Location& from_here,
const base::Callback<ReturnType(void)>& task,
const base::Callback<void(ReturnType)>& reply) {
scoped_refptr<base::MessageLoopProxy> message_loop_proxy =
GetMessageLoopProxyForThread(identifier);
return base::PostTaskAndReplyWithResult<ReturnType>(
message_loop_proxy.get(), from_here, task, reply);
}
template <class T>
static bool DeleteSoon(ID identifier,
const tracked_objects::Location& from_here,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment