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

Unified Diff: net/socket/socks_client_socket_pool.cc

Issue 8898036: base::Bind: Convert proxy_resolving_client_socket.[cc,h] and deps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Possible test fix. 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 | « net/socket/socks_client_socket_pool.h ('k') | net/socket/socks_client_socket_pool_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/socks_client_socket_pool.cc
diff --git a/net/socket/socks_client_socket_pool.cc b/net/socket/socks_client_socket_pool.cc
index 2602a3ee119c3029d8c9638b86dc0ef343bf044f..ec47341afb88e1d4ed86a23b13fccc122be25a35 100644
--- a/net/socket/socks_client_socket_pool.cc
+++ b/net/socket/socks_client_socket_pool.cc
@@ -4,6 +4,8 @@
#include "net/socket/socks_client_socket_pool.h"
+#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "base/time.h"
#include "base/values.h"
#include "net/base/net_errors.h"
@@ -50,8 +52,8 @@ SOCKSConnectJob::SOCKSConnectJob(
socks_params_(socks_params),
transport_pool_(transport_pool),
resolver_(host_resolver),
- ALLOW_THIS_IN_INITIALIZER_LIST(
- callback_old_(this, &SOCKSConnectJob::OnIOComplete)) {
+ ALLOW_THIS_IN_INITIALIZER_LIST(callback_(
+ base::Bind(&SOCKSConnectJob::OnIOComplete, base::Unretained(this)))) {
}
SOCKSConnectJob::~SOCKSConnectJob() {
@@ -115,12 +117,10 @@ int SOCKSConnectJob::DoLoop(int result) {
int SOCKSConnectJob::DoTransportConnect() {
next_state_ = STATE_TRANSPORT_CONNECT_COMPLETE;
transport_socket_handle_.reset(new ClientSocketHandle());
- return transport_socket_handle_->Init(group_name(),
- socks_params_->transport_params(),
- socks_params_->destination().priority(),
- &callback_old_,
- transport_pool_,
- net_log());
+ return transport_socket_handle_->Init(
+ group_name(), socks_params_->transport_params(),
+ socks_params_->destination().priority(), callback_, transport_pool_,
+ net_log());
}
int SOCKSConnectJob::DoTransportConnectComplete(int result) {
« no previous file with comments | « net/socket/socks_client_socket_pool.h ('k') | net/socket/socks_client_socket_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698