| 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 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 | 618 |
| 619 if (availability_state_ == STATE_CLOSED) | 619 if (availability_state_ == STATE_CLOSED) |
| 620 return false; | 620 return false; |
| 621 | 621 |
| 622 SSLInfo ssl_info; | 622 SSLInfo ssl_info; |
| 623 bool was_npn_negotiated; | 623 bool was_npn_negotiated; |
| 624 NextProto protocol_negotiated = kProtoUnknown; | 624 NextProto protocol_negotiated = kProtoUnknown; |
| 625 if (!GetSSLInfo(&ssl_info, &was_npn_negotiated, &protocol_negotiated)) | 625 if (!GetSSLInfo(&ssl_info, &was_npn_negotiated, &protocol_negotiated)) |
| 626 return true; // This is not a secure session, so all domains are okay. | 626 return true; // This is not a secure session, so all domains are okay. |
| 627 | 627 |
| 628 // Disable pooling for secure sessions. |
| 629 // TODO(rch): re-enable this. |
| 630 return false; |
| 631 #if 0 |
| 628 bool unused = false; | 632 bool unused = false; |
| 629 return | 633 return |
| 630 !ssl_info.client_cert_sent && | 634 !ssl_info.client_cert_sent && |
| 631 (!ssl_info.channel_id_sent || | 635 (!ssl_info.channel_id_sent || |
| 632 (ServerBoundCertService::GetDomainForHost(domain) == | 636 (ServerBoundCertService::GetDomainForHost(domain) == |
| 633 ServerBoundCertService::GetDomainForHost(host_port_pair().host()))) && | 637 ServerBoundCertService::GetDomainForHost(host_port_pair().host()))) && |
| 634 ssl_info.cert->VerifyNameMatch(domain, &unused); | 638 ssl_info.cert->VerifyNameMatch(domain, &unused); |
| 639 #endif |
| 635 } | 640 } |
| 636 | 641 |
| 637 int SpdySession::GetPushStream( | 642 int SpdySession::GetPushStream( |
| 638 const GURL& url, | 643 const GURL& url, |
| 639 base::WeakPtr<SpdyStream>* stream, | 644 base::WeakPtr<SpdyStream>* stream, |
| 640 const BoundNetLog& stream_net_log) { | 645 const BoundNetLog& stream_net_log) { |
| 641 CHECK(!in_io_loop_); | 646 CHECK(!in_io_loop_); |
| 642 | 647 |
| 643 stream->reset(); | 648 stream->reset(); |
| 644 | 649 |
| (...skipping 2405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3050 if (!queue->empty()) { | 3055 if (!queue->empty()) { |
| 3051 SpdyStreamId stream_id = queue->front(); | 3056 SpdyStreamId stream_id = queue->front(); |
| 3052 queue->pop_front(); | 3057 queue->pop_front(); |
| 3053 return stream_id; | 3058 return stream_id; |
| 3054 } | 3059 } |
| 3055 } | 3060 } |
| 3056 return 0; | 3061 return 0; |
| 3057 } | 3062 } |
| 3058 | 3063 |
| 3059 } // namespace net | 3064 } // namespace net |
| OLD | NEW |