summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_channel_win.cc
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-12 21:16:41 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-12 21:16:41 +0000
commit72b6f8e29c17e3752847dd318821f18968b23dc8 (patch)
tree6c42c429354a669b48522219a8d386026365bc43 /ipc/ipc_channel_win.cc
parent4af95959968ce9b309f91fc504bca97762b9e8f5 (diff)
downloadchromium_src-72b6f8e29c17e3752847dd318821f18968b23dc8.zip
chromium_src-72b6f8e29c17e3752847dd318821f18968b23dc8.tar.gz
chromium_src-72b6f8e29c17e3752847dd318821f18968b23dc8.tar.bz2
base:Bind: Convert ipc/.
BUG=none TEST=none R=csilv@chromium.org Review URL: http://codereview.chromium.org/8539036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109810 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_channel_win.cc')
-rw-r--r--ipc/ipc_channel_win.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/ipc/ipc_channel_win.cc b/ipc/ipc_channel_win.cc
index 3a85a16..cd313d2 100644
--- a/ipc/ipc_channel_win.cc
+++ b/ipc/ipc_channel_win.cc
@@ -7,6 +7,7 @@
#include <windows.h>
#include "base/auto_reset.h"
+#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/logging.h"
#include "base/threading/non_thread_safe.h"
@@ -35,7 +36,7 @@ Channel::ChannelImpl::ChannelImpl(const IPC::ChannelHandle &channel_handle,
listener_(listener),
waiting_connect_(mode & MODE_SERVER_FLAG),
processing_incoming_(false),
- ALLOW_THIS_IN_INITIALIZER_LIST(factory_(this)) {
+ ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
CreatePipe(channel_handle, mode);
}
@@ -177,8 +178,10 @@ bool Channel::ChannelImpl::Connect() {
// Complete setup asynchronously. By not setting input_state_.is_pending
// to true, we indicate to OnIOCompleted that this is the special
// initialization signal.
- MessageLoopForIO::current()->PostTask(FROM_HERE, factory_.NewRunnableMethod(
- &Channel::ChannelImpl::OnIOCompleted, &input_state_.context, 0, 0));
+ MessageLoopForIO::current()->PostTask(
+ FROM_HERE, base::Bind(&Channel::ChannelImpl::OnIOCompleted,
+ weak_factory_.GetWeakPtr(), &input_state_.context,
+ 0, 0));
}
if (!waiting_connect_)