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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 void SSLConnectJob::GetAdditionalErrorState(ClientSocketHandle* handle) { | 156 void SSLConnectJob::GetAdditionalErrorState(ClientSocketHandle* handle) { |
157 // Headers in |error_response_info_| indicate a proxy tunnel setup | 157 // Headers in |error_response_info_| indicate a proxy tunnel setup |
158 // problem. See DoTunnelConnectComplete. | 158 // problem. See DoTunnelConnectComplete. |
159 if (error_response_info_.headers.get()) { | 159 if (error_response_info_.headers.get()) { |
160 handle->set_pending_http_proxy_connection( | 160 handle->set_pending_http_proxy_connection( |
161 transport_socket_handle_.release()); | 161 transport_socket_handle_.release()); |
162 } | 162 } |
163 handle->set_ssl_error_response_info(error_response_info_); | 163 handle->set_ssl_error_response_info(error_response_info_); |
164 if (!connect_timing_.ssl_start.is_null()) | 164 if (!connect_timing_.ssl_start.is_null()) |
165 handle->set_is_ssl_error(true); | 165 handle->set_is_ssl_error(true); |
| 166 if (ssl_socket_) |
| 167 handle->set_ssl_failure_state(ssl_socket_->GetSSLFailureState()); |
166 | 168 |
167 handle->set_connection_attempts(connection_attempts_); | 169 handle->set_connection_attempts(connection_attempts_); |
168 } | 170 } |
169 | 171 |
170 void SSLConnectJob::OnIOComplete(int result) { | 172 void SSLConnectJob::OnIOComplete(int result) { |
171 int rv = DoLoop(result); | 173 int rv = DoLoop(result); |
172 if (rv != ERR_IO_PENDING) | 174 if (rv != ERR_IO_PENDING) |
173 NotifyDelegateOfCompletion(rv); // Deletes |this|. | 175 NotifyDelegateOfCompletion(rv); // Deletes |this|. |
174 } | 176 } |
175 | 177 |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 if (base_.CloseOneIdleSocket()) | 665 if (base_.CloseOneIdleSocket()) |
664 return true; | 666 return true; |
665 return base_.CloseOneIdleConnectionInHigherLayeredPool(); | 667 return base_.CloseOneIdleConnectionInHigherLayeredPool(); |
666 } | 668 } |
667 | 669 |
668 void SSLClientSocketPool::OnSSLConfigChanged() { | 670 void SSLClientSocketPool::OnSSLConfigChanged() { |
669 FlushWithError(ERR_NETWORK_CHANGED); | 671 FlushWithError(ERR_NETWORK_CHANGED); |
670 } | 672 } |
671 | 673 |
672 } // namespace net | 674 } // namespace net |
OLD | NEW |