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

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

Issue 8801004: base::Bind: Convert StreamSocket::Connect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes 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
« no previous file with comments | « no previous file | content/browser/renderer_host/p2p/socket_host_test_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7a04efe53b54f83a26da4d667eb47c23dd6eb65f..10dbf4820701f060b3a6fbd69ad4799e7a3efc25 100644
--- a/chrome/browser/chromeos/web_socket_proxy.cc
+++ b/chrome/browser/chromeos/web_socket_proxy.cc
@@ -26,6 +26,7 @@
#include "base/base64.h"
#include "base/basictypes.h"
#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/memory/ref_counted.h"
@@ -554,9 +555,11 @@ class SSLChan : public MessageLoopForIO::Watcher {
read_pipe_(read_pipe),
write_pipe_(write_pipe),
method_factory_(this),
- socket_connect_callback_(NewCallback(this, &SSLChan::OnSocketConnect)),
+ socket_connect_callback_(
+ base::Bind(&SSLChan::OnSocketConnect, base::Unretained(this))),
ssl_handshake_callback_(
- NewCallback(this, &SSLChan::OnSSLHandshakeCompleted)),
+ base::Bind(&SSLChan::OnSSLHandshakeCompleted,
+ base::Unretained(this))),
socket_read_callback_(NewCallback(this, &SSLChan::OnSocketRead)),
socket_write_callback_(NewCallback(this, &SSLChan::OnSocketWrite)) {
if (!SetNonBlock(read_pipe_) || !SetNonBlock(write_pipe_)) {
@@ -571,7 +574,7 @@ class SSLChan : public MessageLoopForIO::Watcher {
Shut(net::ERR_FAILED);
return;
}
- int result = socket_->Connect(socket_connect_callback_.get());
+ int result = socket_->Connect(socket_connect_callback_);
if (result != net::ERR_IO_PENDING)
OnSocketConnect(result);
}
@@ -631,7 +634,7 @@ class SSLChan : public MessageLoopForIO::Watcher {
OnSSLHandshakeCompleted(net::ERR_UNEXPECTED);
return;
}
- result = socket_->Connect(ssl_handshake_callback_.get());
+ result = socket_->Connect(ssl_handshake_callback_);
if (result != net::ERR_IO_PENDING)
OnSSLHandshakeCompleted(result);
}
@@ -792,8 +795,8 @@ class SSLChan : public MessageLoopForIO::Watcher {
bool is_read_pipe_blocked_;
bool is_write_pipe_blocked_;
ScopedRunnableMethodFactory<SSLChan> method_factory_;
- scoped_ptr<net::OldCompletionCallback> socket_connect_callback_;
- scoped_ptr<net::OldCompletionCallback> ssl_handshake_callback_;
+ net::CompletionCallback socket_connect_callback_;
+ net::CompletionCallback ssl_handshake_callback_;
scoped_ptr<net::OldCompletionCallback> socket_read_callback_;
scoped_ptr<net::OldCompletionCallback> socket_write_callback_;
MessageLoopForIO::FileDescriptorWatcher read_pipe_controller_;
« no previous file with comments | « no previous file | content/browser/renderer_host/p2p/socket_host_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698