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

Unified Diff: net/http/http_stream_factory_impl_job.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/http/http_stream_factory_impl_job.h ('k') | net/proxy/proxy_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory_impl_job.cc
diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc
index 4bd782cb8c2bff7fa025fe2d570fb4b3d25d4bb1..8a1f69ff54349295d92c741211c623c9b94bd7d7 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -5,6 +5,7 @@
#include "net/http/http_stream_factory_impl_job.h"
#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "base/logging.h"
#include "base/stl_util.h"
#include "base/string_util.h"
@@ -114,7 +115,10 @@ HttpStreamFactoryImpl::Job::Job(HttpStreamFactoryImpl* stream_factory,
proxy_ssl_config_(proxy_ssl_config),
net_log_(BoundNetLog::Make(net_log.net_log(),
NetLog::SOURCE_HTTP_STREAM_JOB)),
- ALLOW_THIS_IN_INITIALIZER_LIST(io_callback_(this, &Job::OnIOComplete)),
+ ALLOW_THIS_IN_INITIALIZER_LIST(old_io_callback_(
+ this, &Job::OnIOComplete)),
+ ALLOW_THIS_IN_INITIALIZER_LIST(io_callback_(
+ base::Bind(&Job::OnIOComplete, base::Unretained(this)))),
connection_(new ClientSocketHandle),
session_(session),
stream_factory_(stream_factory),
@@ -572,8 +576,7 @@ int HttpStreamFactoryImpl::Job::DoResolveProxy() {
}
return session_->proxy_service()->ResolveProxy(
- request_info_.url, &proxy_info_, &io_callback_, &pac_request_,
- net_log_);
+ request_info_.url, &proxy_info_, io_callback_, &pac_request_, net_log_);
}
int HttpStreamFactoryImpl::Job::DoResolveProxyComplete(int result) {
@@ -715,19 +718,10 @@ int HttpStreamFactoryImpl::Job::DoInitConnection() {
num_streams_);
} else {
return InitSocketHandleForHttpRequest(
- origin_url_,
- request_info_.extra_headers,
- request_info_.load_flags,
- request_info_.priority,
- session_,
- proxy_info_,
- ShouldForceSpdySSL(),
- want_spdy_over_npn,
- server_ssl_config_,
- proxy_ssl_config_,
- net_log_,
- connection_.get(),
- &io_callback_);
+ origin_url_, request_info_.extra_headers, request_info_.load_flags,
+ request_info_.priority, session_, proxy_info_, ShouldForceSpdySSL(),
+ want_spdy_over_npn, server_ssl_config_, proxy_ssl_config_, net_log_,
+ connection_.get(), io_callback_);
}
}
@@ -956,7 +950,7 @@ int HttpStreamFactoryImpl::Job::DoRestartTunnelAuth() {
next_state_ = STATE_RESTART_TUNNEL_AUTH_COMPLETE;
HttpProxyClientSocket* http_proxy_socket =
static_cast<HttpProxyClientSocket*>(connection_->socket());
- return http_proxy_socket->RestartWithAuth(&io_callback_);
+ return http_proxy_socket->RestartWithAuth(&old_io_callback_);
}
int HttpStreamFactoryImpl::Job::DoRestartTunnelAuthComplete(int result) {
@@ -1090,8 +1084,7 @@ int HttpStreamFactoryImpl::Job::ReconsiderProxyAfterError(int error) {
}
int rv = session_->proxy_service()->ReconsiderProxyAfterError(
- request_info_.url, &proxy_info_, &io_callback_, &pac_request_,
- net_log_);
+ request_info_.url, &proxy_info_, io_callback_, &pac_request_, net_log_);
if (rv == OK || rv == ERR_IO_PENDING) {
// If the error was during connection setup, there is no socket to
// disconnect.
« no previous file with comments | « net/http/http_stream_factory_impl_job.h ('k') | net/proxy/proxy_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698