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

Unified Diff: base/message_loop_proxy.cc

Issue 7210053: Implementation of PostTaskAndReply() in MessageLoopProxy and BrowserThread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added unittests Created 9 years, 4 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/message_loop_proxy.h ('k') | base/task.h » ('j') | base/task_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop_proxy.cc
diff --git a/base/message_loop_proxy.cc b/base/message_loop_proxy.cc
index a38db393f6e4aa63412455d435804b608f86c682..bff6f320aa51e10f27182862cf4e02bf2f6e3b97 100644
--- a/base/message_loop_proxy.cc
+++ b/base/message_loop_proxy.cc
@@ -4,6 +4,8 @@
#include "base/message_loop_proxy.h"
+#include "base/bind.h"
+
namespace base {
MessageLoopProxy::MessageLoopProxy() {
@@ -12,6 +14,16 @@ MessageLoopProxy::MessageLoopProxy() {
MessageLoopProxy::~MessageLoopProxy() {
}
+bool MessageLoopProxy::PostTaskAndReply(
+ const tracked_objects::Location& from_here,
+ const Closure& task,
+ const Closure& reply) {
+ internal::PostTaskAndReplyRelay* relay =
+ new internal::PostTaskAndReplyRelay(from_here, task, reply);
+ return PostTask(from_here, base::Bind(&internal::PostTaskAndReplyRelay::Run,
+ base::Unretained(relay)));
+}
+
void MessageLoopProxy::OnDestruct() const {
delete this;
}
« no previous file with comments | « base/message_loop_proxy.h ('k') | base/task.h » ('j') | base/task_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698