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

Side by Side 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: rebased and turned into methods 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/message_loop_proxy.h" 5 #include "base/message_loop_proxy.h"
6 6
7 #include "base/bind.h"
8
7 namespace base { 9 namespace base {
8 10
9 MessageLoopProxy::MessageLoopProxy() { 11 MessageLoopProxy::MessageLoopProxy() {
10 } 12 }
11 13
12 MessageLoopProxy::~MessageLoopProxy() { 14 MessageLoopProxy::~MessageLoopProxy() {
13 } 15 }
14 16
17 bool MessageLoopProxy::PostTaskAndReply(
18 const tracked_objects::Location& from_here,
19 const Closure& task,
20 const Closure& reply) {
21 internal::PostTaskAndReplyRelay* relay =
22 new internal::PostTaskAndReplyRelay(from_here, task, reply);
23 return PostTask(from_here, base::Bind(&internal::PostTaskAndReplyRelay::Run,
24 base::Unretained(relay)));
25 }
26
15 void MessageLoopProxy::OnDestruct() const { 27 void MessageLoopProxy::OnDestruct() const {
16 delete this; 28 delete this;
17 } 29 }
18 30
19 } // namespace base 31 } // namespace base
OLDNEW
« no previous file with comments | « base/message_loop_proxy.h ('k') | base/task.h » ('j') | base/task.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698