| 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/spdy/spdy_session.h" | 5 #include "net/spdy/spdy_session.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 #include "net/http/http_log_util.h" | 32 #include "net/http/http_log_util.h" |
| 33 #include "net/http/http_network_session.h" | 33 #include "net/http/http_network_session.h" |
| 34 #include "net/http/http_server_properties.h" | 34 #include "net/http/http_server_properties.h" |
| 35 #include "net/http/http_util.h" | 35 #include "net/http/http_util.h" |
| 36 #include "net/spdy/spdy_buffer_producer.h" | 36 #include "net/spdy/spdy_buffer_producer.h" |
| 37 #include "net/spdy/spdy_frame_builder.h" | 37 #include "net/spdy/spdy_frame_builder.h" |
| 38 #include "net/spdy/spdy_http_utils.h" | 38 #include "net/spdy/spdy_http_utils.h" |
| 39 #include "net/spdy/spdy_protocol.h" | 39 #include "net/spdy/spdy_protocol.h" |
| 40 #include "net/spdy/spdy_session_pool.h" | 40 #include "net/spdy/spdy_session_pool.h" |
| 41 #include "net/spdy/spdy_stream.h" | 41 #include "net/spdy/spdy_stream.h" |
| 42 #include "net/ssl/server_bound_cert_service.h" | 42 #include "net/ssl/channel_id_service.h" |
| 43 #include "net/ssl/ssl_cipher_suite_names.h" | 43 #include "net/ssl/ssl_cipher_suite_names.h" |
| 44 #include "net/ssl/ssl_connection_status_flags.h" | 44 #include "net/ssl/ssl_connection_status_flags.h" |
| 45 | 45 |
| 46 namespace net { | 46 namespace net { |
| 47 | 47 |
| 48 namespace { | 48 namespace { |
| 49 | 49 |
| 50 const int kReadBufferSize = 8 * 1024; | 50 const int kReadBufferSize = 8 * 1024; |
| 51 const int kDefaultConnectionAtRiskOfLossSeconds = 10; | 51 const int kDefaultConnectionAtRiskOfLossSeconds = 10; |
| 52 const int kHungIntervalSeconds = 10; | 52 const int kHungIntervalSeconds = 10; |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 SSLInfo ssl_info; | 711 SSLInfo ssl_info; |
| 712 bool was_npn_negotiated; | 712 bool was_npn_negotiated; |
| 713 NextProto protocol_negotiated = kProtoUnknown; | 713 NextProto protocol_negotiated = kProtoUnknown; |
| 714 if (!GetSSLInfo(&ssl_info, &was_npn_negotiated, &protocol_negotiated)) | 714 if (!GetSSLInfo(&ssl_info, &was_npn_negotiated, &protocol_negotiated)) |
| 715 return true; // This is not a secure session, so all domains are okay. | 715 return true; // This is not a secure session, so all domains are okay. |
| 716 | 716 |
| 717 bool unused = false; | 717 bool unused = false; |
| 718 return | 718 return |
| 719 !ssl_info.client_cert_sent && | 719 !ssl_info.client_cert_sent && |
| 720 (!ssl_info.channel_id_sent || | 720 (!ssl_info.channel_id_sent || |
| 721 (ServerBoundCertService::GetDomainForHost(domain) == | 721 (ChannelIDService::GetDomainForHost(domain) == |
| 722 ServerBoundCertService::GetDomainForHost(host_port_pair().host()))) && | 722 ChannelIDService::GetDomainForHost(host_port_pair().host()))) && |
| 723 ssl_info.cert->VerifyNameMatch(domain, &unused); | 723 ssl_info.cert->VerifyNameMatch(domain, &unused); |
| 724 } | 724 } |
| 725 | 725 |
| 726 int SpdySession::GetPushStream( | 726 int SpdySession::GetPushStream( |
| 727 const GURL& url, | 727 const GURL& url, |
| 728 base::WeakPtr<SpdyStream>* stream, | 728 base::WeakPtr<SpdyStream>* stream, |
| 729 const BoundNetLog& stream_net_log) { | 729 const BoundNetLog& stream_net_log) { |
| 730 CHECK(!in_io_loop_); | 730 CHECK(!in_io_loop_); |
| 731 | 731 |
| 732 stream->reset(); | 732 stream->reset(); |
| (...skipping 2426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3159 if (!queue->empty()) { | 3159 if (!queue->empty()) { |
| 3160 SpdyStreamId stream_id = queue->front(); | 3160 SpdyStreamId stream_id = queue->front(); |
| 3161 queue->pop_front(); | 3161 queue->pop_front(); |
| 3162 return stream_id; | 3162 return stream_id; |
| 3163 } | 3163 } |
| 3164 } | 3164 } |
| 3165 return 0; | 3165 return 0; |
| 3166 } | 3166 } |
| 3167 | 3167 |
| 3168 } // namespace net | 3168 } // namespace net |
| OLD | NEW |