summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authoralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-30 06:38:38 +0000
committeralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-30 06:38:38 +0000
commitff448ed4de3e2d0a1304ed5645f7d5c287f54d38 (patch)
tree4aaa58a9ffc32f53b1d6a7b9701c251f62443a36 /base
parent80fd53e7c076e6ae4a7170146ecf84b909621f3d (diff)
downloadchromium_src-ff448ed4de3e2d0a1304ed5645f7d5c287f54d38.zip
chromium_src-ff448ed4de3e2d0a1304ed5645f7d5c287f54d38.tar.gz
chromium_src-ff448ed4de3e2d0a1304ed5645f7d5c287f54d38.tar.bz2
Switched PostTaskAndReplyRelay to use ThreadTaskRunnerHandle::Get() instead of MessageLoopProxy::current().
This allows PostTaskAndReplyRelay to be used with non-standard implementations of TaskRunner interface. One such example is remoting::PluginThreadTaskRunner that allows to posts tasks to the main thread of Chromoting Host plugin. BUG=281750 Review URL: https://chromiumcodereview.appspot.com/23642004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220518 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/threading/post_task_and_reply_impl.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/base/threading/post_task_and_reply_impl.cc b/base/threading/post_task_and_reply_impl.cc
index f464c6a..a82a4fd 100644
--- a/base/threading/post_task_and_reply_impl.cc
+++ b/base/threading/post_task_and_reply_impl.cc
@@ -6,7 +6,8 @@
#include "base/bind.h"
#include "base/location.h"
-#include "base/message_loop/message_loop_proxy.h"
+#include "base/single_thread_task_runner.h"
+#include "base/thread_task_runner_handle.h"
namespace base {
@@ -26,7 +27,7 @@ class PostTaskAndReplyRelay {
PostTaskAndReplyRelay(const tracked_objects::Location& from_here,
const Closure& task, const Closure& reply)
: from_here_(from_here),
- origin_loop_(MessageLoopProxy::current()) {
+ origin_loop_(ThreadTaskRunnerHandle::Get()) {
task_ = task;
reply_ = reply;
}
@@ -61,7 +62,7 @@ class PostTaskAndReplyRelay {
}
tracked_objects::Location from_here_;
- scoped_refptr<MessageLoopProxy> origin_loop_;
+ scoped_refptr<SingleThreadTaskRunner> origin_loop_;
Closure reply_;
Closure task_;
};