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/time.h" | 9 #include "base/time.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 } | 231 } |
232 if (result < 0) { | 232 if (result < 0) { |
233 if (transport_socket_handle_->socket()) | 233 if (transport_socket_handle_->socket()) |
234 transport_socket_handle_->socket()->Disconnect(); | 234 transport_socket_handle_->socket()->Disconnect(); |
235 return ERR_PROXY_CONNECTION_FAILED; | 235 return ERR_PROXY_CONNECTION_FAILED; |
236 } | 236 } |
237 | 237 |
238 SSLClientSocket* ssl = | 238 SSLClientSocket* ssl = |
239 static_cast<SSLClientSocket*>(transport_socket_handle_->socket()); | 239 static_cast<SSLClientSocket*>(transport_socket_handle_->socket()); |
240 using_spdy_ = ssl->was_spdy_negotiated(); | 240 using_spdy_ = ssl->was_spdy_negotiated(); |
241 protocol_negotiated_ = ssl->protocol_negotiated(); | 241 protocol_negotiated_ = ssl->GetNegotiatedProtocol(); |
242 | 242 |
243 // Reset the timer to just the length of time allowed for HttpProxy handshake | 243 // Reset the timer to just the length of time allowed for HttpProxy handshake |
244 // so that a fast SSL connection plus a slow HttpProxy failure doesn't take | 244 // so that a fast SSL connection plus a slow HttpProxy failure doesn't take |
245 // longer to timeout than it should. | 245 // longer to timeout than it should. |
246 ResetTimer(base::TimeDelta::FromSeconds( | 246 ResetTimer(base::TimeDelta::FromSeconds( |
247 kHttpProxyConnectJobTimeoutInSeconds)); | 247 kHttpProxyConnectJobTimeoutInSeconds)); |
248 // TODO(rch): If we ever decide to implement a "trusted" SPDY proxy | 248 // TODO(rch): If we ever decide to implement a "trusted" SPDY proxy |
249 // (one that we speak SPDY over SSL to, but to which we send HTTPS | 249 // (one that we speak SPDY over SSL to, but to which we send HTTPS |
250 // request directly instead of through CONNECT tunnels, then we | 250 // request directly instead of through CONNECT tunnels, then we |
251 // need to add a predicate to this if statement so we fall through | 251 // need to add a predicate to this if statement so we fall through |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 | 480 |
481 base::TimeDelta HttpProxyClientSocketPool::ConnectionTimeout() const { | 481 base::TimeDelta HttpProxyClientSocketPool::ConnectionTimeout() const { |
482 return base_.ConnectionTimeout(); | 482 return base_.ConnectionTimeout(); |
483 } | 483 } |
484 | 484 |
485 ClientSocketPoolHistograms* HttpProxyClientSocketPool::histograms() const { | 485 ClientSocketPoolHistograms* HttpProxyClientSocketPool::histograms() const { |
486 return base_.histograms(); | 486 return base_.histograms(); |
487 } | 487 } |
488 | 488 |
489 } // namespace net | 489 } // namespace net |
OLD | NEW |