| 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/socket/ssl_client_socket_pool.h" | 5 #include "net/socket/ssl_client_socket_pool.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 } | 327 } |
| 328 | 328 |
| 329 int SSLConnectJob::DoSSLConnectComplete(int result) { | 329 int SSLConnectJob::DoSSLConnectComplete(int result) { |
| 330 // TODO(rvargas): Remove ScopedTracker below once crbug.com/462784 is fixed. | 330 // TODO(rvargas): Remove ScopedTracker below once crbug.com/462784 is fixed. |
| 331 tracked_objects::ScopedTracker tracking_profile( | 331 tracked_objects::ScopedTracker tracking_profile( |
| 332 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 332 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 333 "462784 SSLConnectJob::DoSSLConnectComplete")); | 333 "462784 SSLConnectJob::DoSSLConnectComplete")); |
| 334 | 334 |
| 335 connect_timing_.ssl_end = base::TimeTicks::Now(); | 335 connect_timing_.ssl_end = base::TimeTicks::Now(); |
| 336 | 336 |
| 337 if (result != OK && !server_address_.address().empty()) { | 337 if (result != OK && !server_address_.address_number().empty()) { |
| 338 connection_attempts_.push_back(ConnectionAttempt(server_address_, result)); | 338 connection_attempts_.push_back(ConnectionAttempt(server_address_, result)); |
| 339 server_address_ = IPEndPoint(); | 339 server_address_ = IPEndPoint(); |
| 340 } | 340 } |
| 341 | 341 |
| 342 // If we want SPDY over ALPN/NPN, make sure it succeeded. | 342 // If we want SPDY over ALPN/NPN, make sure it succeeded. |
| 343 if (params_->expect_spdy() && | 343 if (params_->expect_spdy() && |
| 344 !NextProtoIsSPDY(ssl_socket_->GetNegotiatedProtocol())) { | 344 !NextProtoIsSPDY(ssl_socket_->GetNegotiatedProtocol())) { |
| 345 return ERR_NPN_NEGOTIATION_FAILED; | 345 return ERR_NPN_NEGOTIATION_FAILED; |
| 346 } | 346 } |
| 347 | 347 |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 681 if (base_.CloseOneIdleSocket()) | 681 if (base_.CloseOneIdleSocket()) |
| 682 return true; | 682 return true; |
| 683 return base_.CloseOneIdleConnectionInHigherLayeredPool(); | 683 return base_.CloseOneIdleConnectionInHigherLayeredPool(); |
| 684 } | 684 } |
| 685 | 685 |
| 686 void SSLClientSocketPool::OnSSLConfigChanged() { | 686 void SSLClientSocketPool::OnSSLConfigChanged() { |
| 687 FlushWithError(ERR_NETWORK_CHANGED); | 687 FlushWithError(ERR_NETWORK_CHANGED); |
| 688 } | 688 } |
| 689 | 689 |
| 690 } // namespace net | 690 } // namespace net |
| OLD | NEW |