| 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.h" | 10 #include "base/time.h" |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 // Create a session direct to the proxy itself | 315 // Create a session direct to the proxy itself |
| 316 int rv = spdy_pool->GetSpdySessionFromSocket( | 316 int rv = spdy_pool->GetSpdySessionFromSocket( |
| 317 key, transport_socket_handle_.release(), | 317 key, transport_socket_handle_.release(), |
| 318 net_log(), OK, &spdy_session, /*using_ssl_*/ true); | 318 net_log(), OK, &spdy_session, /*using_ssl_*/ true); |
| 319 if (rv < 0) | 319 if (rv < 0) |
| 320 return rv; | 320 return rv; |
| 321 } | 321 } |
| 322 | 322 |
| 323 next_state_ = STATE_SPDY_PROXY_CREATE_STREAM_COMPLETE; | 323 next_state_ = STATE_SPDY_PROXY_CREATE_STREAM_COMPLETE; |
| 324 return spdy_stream_request_.StartRequest( | 324 return spdy_stream_request_.StartRequest( |
| 325 spdy_session, params_->request_url(), params_->destination().priority(), | 325 SPDY_BIDIRECTIONAL_STREAM, spdy_session, params_->request_url(), |
| 326 spdy_session->net_log(), callback_); | 326 params_->destination().priority(), spdy_session->net_log(), callback_); |
| 327 } | 327 } |
| 328 | 328 |
| 329 int HttpProxyConnectJob::DoSpdyProxyCreateStreamComplete(int result) { | 329 int HttpProxyConnectJob::DoSpdyProxyCreateStreamComplete(int result) { |
| 330 if (result < 0) | 330 if (result < 0) |
| 331 return result; | 331 return result; |
| 332 | 332 |
| 333 next_state_ = STATE_HTTP_PROXY_CONNECT_COMPLETE; | 333 next_state_ = STATE_HTTP_PROXY_CONNECT_COMPLETE; |
| 334 base::WeakPtr<SpdyStream> stream = spdy_stream_request_.ReleaseStream(); | 334 base::WeakPtr<SpdyStream> stream = spdy_stream_request_.ReleaseStream(); |
| 335 DCHECK(stream); | 335 DCHECK(stream); |
| 336 // |transport_socket_| will set itself as |stream|'s delegate. | 336 // |transport_socket_| will set itself as |stream|'s delegate. |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 return base_.histograms(); | 532 return base_.histograms(); |
| 533 } | 533 } |
| 534 | 534 |
| 535 bool HttpProxyClientSocketPool::CloseOneIdleConnection() { | 535 bool HttpProxyClientSocketPool::CloseOneIdleConnection() { |
| 536 if (base_.CloseOneIdleSocket()) | 536 if (base_.CloseOneIdleSocket()) |
| 537 return true; | 537 return true; |
| 538 return base_.CloseOneIdleConnectionInLayeredPool(); | 538 return base_.CloseOneIdleConnectionInLayeredPool(); |
| 539 } | 539 } |
| 540 | 540 |
| 541 } // namespace net | 541 } // namespace net |
| OLD | NEW |