| 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 // TODO(ukai): code is similar with http_network_transaction.cc. We should | 5 // TODO(ukai): code is similar with http_network_transaction.cc. We should |
| 6 // think about ways to share code, if possible. | 6 // think about ways to share code, if possible. |
| 7 | 7 |
| 8 #include "net/socket_stream/socket_stream.h" | 8 #include "net/socket_stream/socket_stream.h" |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> |
| 12 | 13 |
| 13 #include "base/bind.h" | 14 #include "base/bind.h" |
| 14 #include "base/bind_helpers.h" | 15 #include "base/bind_helpers.h" |
| 15 #include "base/compiler_specific.h" | 16 #include "base/compiler_specific.h" |
| 16 #include "base/logging.h" | 17 #include "base/logging.h" |
| 17 #include "base/message_loop.h" | 18 #include "base/message_loop.h" |
| 18 #include "base/string_util.h" | 19 #include "base/string_util.h" |
| 19 #include "base/stringprintf.h" | 20 #include "base/stringprintf.h" |
| 20 #include "base/utf_string_conversions.h" | 21 #include "base/utf_string_conversions.h" |
| 21 #include "net/base/auth.h" | 22 #include "net/base/auth.h" |
| (...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1198 SSLClientSocket* ssl_socket = static_cast<SSLClientSocket*>(socket_.get()); | 1199 SSLClientSocket* ssl_socket = static_cast<SSLClientSocket*>(socket_.get()); |
| 1199 DCHECK(ssl_socket); | 1200 DCHECK(ssl_socket); |
| 1200 SSLInfo ssl_info; | 1201 SSLInfo ssl_info; |
| 1201 ssl_socket->GetSSLInfo(&ssl_info); | 1202 ssl_socket->GetSSLInfo(&ssl_info); |
| 1202 | 1203 |
| 1203 TransportSecurityState::DomainState domain_state; | 1204 TransportSecurityState::DomainState domain_state; |
| 1204 DCHECK(context_); | 1205 DCHECK(context_); |
| 1205 const bool fatal = | 1206 const bool fatal = |
| 1206 context_->transport_security_state() && | 1207 context_->transport_security_state() && |
| 1207 context_->transport_security_state()->GetDomainState( | 1208 context_->transport_security_state()->GetDomainState( |
| 1208 &domain_state, url_.host(), | 1209 url_.host(), |
| 1209 SSLConfigService::IsSNIAvailable(context_->ssl_config_service())); | 1210 SSLConfigService::IsSNIAvailable(context_->ssl_config_service()), |
| 1211 &domain_state); |
| 1210 | 1212 |
| 1211 delegate_->OnSSLCertificateError(this, ssl_info, fatal); | 1213 delegate_->OnSSLCertificateError(this, ssl_info, fatal); |
| 1212 return ERR_IO_PENDING; | 1214 return ERR_IO_PENDING; |
| 1213 } | 1215 } |
| 1214 | 1216 |
| 1215 SSLConfigService* SocketStream::ssl_config_service() const { | 1217 SSLConfigService* SocketStream::ssl_config_service() const { |
| 1216 return context_->ssl_config_service(); | 1218 return context_->ssl_config_service(); |
| 1217 } | 1219 } |
| 1218 | 1220 |
| 1219 ProxyService* SocketStream::proxy_service() const { | 1221 ProxyService* SocketStream::proxy_service() const { |
| 1220 return context_->proxy_service(); | 1222 return context_->proxy_service(); |
| 1221 } | 1223 } |
| 1222 | 1224 |
| 1223 } // namespace net | 1225 } // namespace net |
| OLD | NEW |