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

Unified Diff: net/http/http_proxy_client_socket_pool.cc

Issue 3058013: Fix late binding induced mismatch of Socket and AuthController (Closed)
Patch Set: Address comments Created 10 years, 5 months 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: net/http/http_proxy_client_socket_pool.cc
diff --git a/net/http/http_proxy_client_socket_pool.cc b/net/http/http_proxy_client_socket_pool.cc
index a142576e3498a2d390b1345a7e117142fc778564..783c10f0ea82342484cdf79e2432a1de85b68cc8 100644
--- a/net/http/http_proxy_client_socket_pool.cc
+++ b/net/http/http_proxy_client_socket_pool.cc
@@ -7,6 +7,7 @@
#include "base/time.h"
#include "googleurl/src/gurl.h"
#include "net/base/net_errors.h"
+#include "net/http/http_network_session.h"
#include "net/http/http_proxy_client_socket.h"
#include "net/socket/client_socket_factory.h"
#include "net/socket/client_socket_handle.h"
@@ -18,12 +19,12 @@ HttpProxySocketParams::HttpProxySocketParams(
const scoped_refptr<TCPSocketParams>& proxy_server,
const GURL& request_url,
HostPortPair endpoint,
- scoped_refptr<HttpAuthController> auth_controller,
+ scoped_refptr<HttpNetworkSession> session,
bool tunnel)
: tcp_params_(proxy_server),
request_url_(request_url),
endpoint_(endpoint),
- auth_controller_(auth_controller),
+ session_(session),
tunnel_(tunnel) {
}
@@ -133,19 +134,22 @@ int HttpProxyConnectJob::DoTCPConnectComplete(int result) {
int HttpProxyConnectJob::DoHttpProxyConnect() {
next_state_ = kStateHttpProxyConnectComplete;
+ const HostResolver::RequestInfo& tcp_destination =
+ params_->tcp_params()->destination();
+ HostPortPair proxy_server(tcp_destination.hostname(),
+ tcp_destination.port());
// Add a HttpProxy connection on top of the tcp socket.
socket_.reset(new HttpProxyClientSocket(tcp_socket_handle_.release(),
params_->request_url(),
params_->endpoint(),
- params_->auth_controller(),
+ proxy_server,
+ params_->session(),
params_->tunnel()));
return socket_->Connect(&callback_);
}
int HttpProxyConnectJob::DoHttpProxyConnectComplete(int result) {
- DCHECK_NE(result, ERR_RETRY_CONNECTION);
-
if (result == OK || result == ERR_PROXY_AUTH_REQUESTED)
set_socket(socket_.release());

Powered by Google App Engine
This is Rietveld 408576698