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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 void SSLConnectJob::GetAdditionalErrorState(ClientSocketHandle* handle) { | 153 void SSLConnectJob::GetAdditionalErrorState(ClientSocketHandle* handle) { |
154 // Headers in |error_response_info_| indicate a proxy tunnel setup | 154 // Headers in |error_response_info_| indicate a proxy tunnel setup |
155 // problem. See DoTunnelConnectComplete. | 155 // problem. See DoTunnelConnectComplete. |
156 if (error_response_info_.headers.get()) { | 156 if (error_response_info_.headers.get()) { |
157 handle->set_pending_http_proxy_connection( | 157 handle->set_pending_http_proxy_connection( |
158 transport_socket_handle_.release()); | 158 transport_socket_handle_.release()); |
159 } | 159 } |
160 handle->set_ssl_error_response_info(error_response_info_); | 160 handle->set_ssl_error_response_info(error_response_info_); |
161 if (!connect_timing_.ssl_start.is_null()) | 161 if (!connect_timing_.ssl_start.is_null()) |
162 handle->set_is_ssl_error(true); | 162 handle->set_is_ssl_error(true); |
163 if (ssl_socket_) | |
164 handle->set_ssl_failure_state(ssl_socket_->GetSSLFailureState()); | |
165 | 163 |
166 handle->set_connection_attempts(connection_attempts_); | 164 handle->set_connection_attempts(connection_attempts_); |
167 } | 165 } |
168 | 166 |
169 void SSLConnectJob::OnIOComplete(int result) { | 167 void SSLConnectJob::OnIOComplete(int result) { |
170 int rv = DoLoop(result); | 168 int rv = DoLoop(result); |
171 if (rv != ERR_IO_PENDING) | 169 if (rv != ERR_IO_PENDING) |
172 NotifyDelegateOfCompletion(rv); // Deletes |this|. | 170 NotifyDelegateOfCompletion(rv); // Deletes |this|. |
173 } | 171 } |
174 | 172 |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
670 if (base_.CloseOneIdleSocket()) | 668 if (base_.CloseOneIdleSocket()) |
671 return true; | 669 return true; |
672 return base_.CloseOneIdleConnectionInHigherLayeredPool(); | 670 return base_.CloseOneIdleConnectionInHigherLayeredPool(); |
673 } | 671 } |
674 | 672 |
675 void SSLClientSocketPool::OnSSLConfigChanged() { | 673 void SSLClientSocketPool::OnSSLConfigChanged() { |
676 FlushWithError(ERR_NETWORK_CHANGED); | 674 FlushWithError(ERR_NETWORK_CHANGED); |
677 } | 675 } |
678 | 676 |
679 } // namespace net | 677 } // namespace net |
OLD | NEW |