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

Unified Diff: chrome/browser/chromeos/web_socket_proxy.cc

Issue 8801005: base::Bind: Convert Socket::Read. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 9 years 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
Index: chrome/browser/chromeos/web_socket_proxy.cc
diff --git a/chrome/browser/chromeos/web_socket_proxy.cc b/chrome/browser/chromeos/web_socket_proxy.cc
index 10dbf4820701f060b3a6fbd69ad4799e7a3efc25..154ff71349a4c552f6d7f2f785a64483e0fc2b1b 100644
--- a/chrome/browser/chromeos/web_socket_proxy.cc
+++ b/chrome/browser/chromeos/web_socket_proxy.cc
@@ -555,12 +555,13 @@ class SSLChan : public MessageLoopForIO::Watcher {
read_pipe_(read_pipe),
write_pipe_(write_pipe),
method_factory_(this),
- socket_connect_callback_(
- base::Bind(&SSLChan::OnSocketConnect, base::Unretained(this))),
- ssl_handshake_callback_(
+ ALLOW_THIS_IN_INITIALIZER_LIST(socket_connect_callback_(
+ base::Bind(&SSLChan::OnSocketConnect, base::Unretained(this)))),
+ ALLOW_THIS_IN_INITIALIZER_LIST(ssl_handshake_callback_(
base::Bind(&SSLChan::OnSSLHandshakeCompleted,
- base::Unretained(this))),
- socket_read_callback_(NewCallback(this, &SSLChan::OnSocketRead)),
+ base::Unretained(this)))),
+ ALLOW_THIS_IN_INITIALIZER_LIST(socket_read_callback_(
+ base::Bind(&SSLChan::OnSocketRead, base::Unretained(this)))),
socket_write_callback_(NewCallback(this, &SSLChan::OnSocketWrite)) {
if (!SetNonBlock(read_pipe_) || !SetNonBlock(write_pipe_)) {
Shut(net::ERR_UNEXPECTED);
@@ -732,7 +733,7 @@ class SSLChan : public MessageLoopForIO::Watcher {
scoped_refptr<net::IOBufferWithSize> buf =
inbound_stream_.GetIOBufferToFill();
if (buf && buf->size() > 0) {
- int rv = socket_->Read(buf, buf->size(), socket_read_callback_.get());
+ int rv = socket_->Read(buf, buf->size(), socket_read_callback_);
is_socket_read_pending_ = true;
if (rv != net::ERR_IO_PENDING) {
MessageLoop::current()->PostTask(FROM_HERE,
@@ -797,7 +798,7 @@ class SSLChan : public MessageLoopForIO::Watcher {
ScopedRunnableMethodFactory<SSLChan> method_factory_;
net::CompletionCallback socket_connect_callback_;
James Hawkins 2011/12/07 00:01:57 #include "net/base/completion_callback.h"
James Hawkins 2011/12/07 00:08:11 Done.
net::CompletionCallback ssl_handshake_callback_;
- scoped_ptr<net::OldCompletionCallback> socket_read_callback_;
+ net::CompletionCallback socket_read_callback_;
scoped_ptr<net::OldCompletionCallback> socket_write_callback_;
MessageLoopForIO::FileDescriptorWatcher read_pipe_controller_;
MessageLoopForIO::FileDescriptorWatcher write_pipe_controller_;
« no previous file with comments | « no previous file | content/browser/renderer_host/p2p/socket_host_test_utils.h » ('j') | jingle/glue/channel_socket_adapter.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698