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 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1194 SSLClientSocket* ssl_socket = static_cast<SSLClientSocket*>(socket_.get()); | 1195 SSLClientSocket* ssl_socket = static_cast<SSLClientSocket*>(socket_.get()); |
1195 DCHECK(ssl_socket); | 1196 DCHECK(ssl_socket); |
1196 SSLInfo ssl_info; | 1197 SSLInfo ssl_info; |
1197 ssl_socket->GetSSLInfo(&ssl_info); | 1198 ssl_socket->GetSSLInfo(&ssl_info); |
1198 | 1199 |
1199 TransportSecurityState::DomainState domain_state; | 1200 TransportSecurityState::DomainState domain_state; |
1200 DCHECK(context_); | 1201 DCHECK(context_); |
1201 const bool fatal = | 1202 const bool fatal = |
1202 context_->transport_security_state() && | 1203 context_->transport_security_state() && |
1203 context_->transport_security_state()->GetDomainState( | 1204 context_->transport_security_state()->GetDomainState( |
1204 &domain_state, url_.host(), | 1205 url_.host(), |
1205 SSLConfigService::IsSNIAvailable(context_->ssl_config_service())); | 1206 SSLConfigService::IsSNIAvailable(context_->ssl_config_service()), |
| 1207 &domain_state); |
1206 | 1208 |
1207 delegate_->OnSSLCertificateError(this, ssl_info, fatal); | 1209 delegate_->OnSSLCertificateError(this, ssl_info, fatal); |
1208 return ERR_IO_PENDING; | 1210 return ERR_IO_PENDING; |
1209 } | 1211 } |
1210 | 1212 |
1211 SSLConfigService* SocketStream::ssl_config_service() const { | 1213 SSLConfigService* SocketStream::ssl_config_service() const { |
1212 return context_->ssl_config_service(); | 1214 return context_->ssl_config_service(); |
1213 } | 1215 } |
1214 | 1216 |
1215 ProxyService* SocketStream::proxy_service() const { | 1217 ProxyService* SocketStream::proxy_service() const { |
1216 return context_->proxy_service(); | 1218 return context_->proxy_service(); |
1217 } | 1219 } |
1218 | 1220 |
1219 } // namespace net | 1221 } // namespace net |
OLD | NEW |