| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/http/http_proxy_client_socket_pool.h" | 5 #include "net/http/http_proxy_client_socket_pool.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 using_spdy_, | 295 using_spdy_, |
| 296 protocol_negotiated_, | 296 protocol_negotiated_, |
| 297 params_->proxy_delegate(), | 297 params_->proxy_delegate(), |
| 298 params_->ssl_params().get() != NULL)); | 298 params_->ssl_params().get() != NULL)); |
| 299 return transport_socket_->Connect(callback_); | 299 return transport_socket_->Connect(callback_); |
| 300 } | 300 } |
| 301 | 301 |
| 302 int HttpProxyConnectJob::DoHttpProxyConnectComplete(int result) { | 302 int HttpProxyConnectJob::DoHttpProxyConnectComplete(int result) { |
| 303 if (result == OK || result == ERR_PROXY_AUTH_REQUESTED || | 303 if (result == OK || result == ERR_PROXY_AUTH_REQUESTED || |
| 304 result == ERR_HTTPS_PROXY_TUNNEL_RESPONSE) { | 304 result == ERR_HTTPS_PROXY_TUNNEL_RESPONSE) { |
| 305 SetSocket(transport_socket_.PassAs<StreamSocket>()); | 305 SetSocket(transport_socket_.Pass()); |
| 306 } | 306 } |
| 307 | 307 |
| 308 return result; | 308 return result; |
| 309 } | 309 } |
| 310 | 310 |
| 311 int HttpProxyConnectJob::DoSpdyProxyCreateStream() { | 311 int HttpProxyConnectJob::DoSpdyProxyCreateStream() { |
| 312 DCHECK(using_spdy_); | 312 DCHECK(using_spdy_); |
| 313 DCHECK(params_->tunnel()); | 313 DCHECK(params_->tunnel()); |
| 314 SpdySessionKey key(params_->destination().host_port_pair(), | 314 SpdySessionKey key(params_->destination().host_port_pair(), |
| 315 ProxyServer::Direct(), | 315 ProxyServer::Direct(), |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 base_.RemoveHigherLayeredPool(higher_pool); | 551 base_.RemoveHigherLayeredPool(higher_pool); |
| 552 } | 552 } |
| 553 | 553 |
| 554 bool HttpProxyClientSocketPool::CloseOneIdleConnection() { | 554 bool HttpProxyClientSocketPool::CloseOneIdleConnection() { |
| 555 if (base_.CloseOneIdleSocket()) | 555 if (base_.CloseOneIdleSocket()) |
| 556 return true; | 556 return true; |
| 557 return base_.CloseOneIdleConnectionInHigherLayeredPool(); | 557 return base_.CloseOneIdleConnectionInHigherLayeredPool(); |
| 558 } | 558 } |
| 559 | 559 |
| 560 } // namespace net | 560 } // namespace net |
| OLD | NEW |