summaryrefslogtreecommitdiffstats
path: root/remoting/protocol/pepper_stream_channel.cc
diff options
context:
space:
mode:
authorajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-09 18:43:55 +0000
committerajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-09 18:43:55 +0000
commit83039bbf2f2ec0e918f7000b5212d104f60f2bb7 (patch)
treeb22dbd0051b57a437a588772a874271f0d02ffdb /remoting/protocol/pepper_stream_channel.cc
parente7456a206fe5b50aeb322ebabd6c26adc869a5fd (diff)
downloadchromium_src-83039bbf2f2ec0e918f7000b5212d104f60f2bb7.zip
chromium_src-83039bbf2f2ec0e918f7000b5212d104f60f2bb7.tar.gz
chromium_src-83039bbf2f2ec0e918f7000b5212d104f60f2bb7.tar.bz2
Migrate net/socket/socket.h, net/socket/stream_socket.h to base::Bind().
This changes Socket::Read(), Socket::Write, and StreamSocket::Connect() to use CompletionCallback and fixes all users. BUG=none TEST=existing. Review URL: http://codereview.chromium.org/8824006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113825 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol/pepper_stream_channel.cc')
-rw-r--r--remoting/protocol/pepper_stream_channel.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/remoting/protocol/pepper_stream_channel.cc b/remoting/protocol/pepper_stream_channel.cc
index e51d265..48d3a33 100644
--- a/remoting/protocol/pepper_stream_channel.cc
+++ b/remoting/protocol/pepper_stream_channel.cc
@@ -45,9 +45,7 @@ PepperStreamChannel::PepperStreamChannel(
name_(name),
callback_(callback),
channel_(NULL),
- connected_(false),
- ALLOW_THIS_IN_INITIALIZER_LIST(p2p_connect_callback_(
- this, &PepperStreamChannel::OnP2PConnect)) {
+ connected_(false) {
}
PepperStreamChannel::~PepperStreamChannel() {
@@ -122,7 +120,8 @@ void PepperStreamChannel::Connect(pp::Instance* pp_instance,
channel_ = new PepperTransportSocketAdapter(transport, name_, this);
owned_channel_.reset(channel_);
- int result = channel_->Connect(&p2p_connect_callback_);
+ int result = channel_->Connect(base::Bind(&PepperStreamChannel::OnP2PConnect,
+ base::Unretained(this)));
if (result != net::ERR_IO_PENDING)
OnP2PConnect(result);
}