| 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 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 SpdySession::PushedStreamInfo::~PushedStreamInfo() {} | 552 SpdySession::PushedStreamInfo::~PushedStreamInfo() {} |
| 553 | 553 |
| 554 // static | 554 // static |
| 555 bool SpdySession::CanPool(TransportSecurityState* transport_security_state, | 555 bool SpdySession::CanPool(TransportSecurityState* transport_security_state, |
| 556 const SSLInfo& ssl_info, | 556 const SSLInfo& ssl_info, |
| 557 const std::string& old_hostname, | 557 const std::string& old_hostname, |
| 558 const std::string& new_hostname) { | 558 const std::string& new_hostname) { |
| 559 // Pooling is prohibited if the server cert is not valid for the new domain, | 559 // Pooling is prohibited if the server cert is not valid for the new domain, |
| 560 // and for connections on which client certs were sent. It is also prohibited | 560 // and for connections on which client certs were sent. It is also prohibited |
| 561 // when channel ID was sent if the hosts are from different eTLDs+1. | 561 // when channel ID was sent if the hosts are from different eTLDs+1. |
| 562 if (IsCertStatusError(ssl_info.cert_status)) | 562 if (IsCertStatusError(ssl_info.cert_status) && |
| 563 !IsCertStatusMinorError(ssl_info.cert_status)) { |
| 563 return false; | 564 return false; |
| 565 } |
| 564 | 566 |
| 565 if (ssl_info.client_cert_sent) | 567 if (ssl_info.client_cert_sent) |
| 566 return false; | 568 return false; |
| 567 | 569 |
| 568 if (ssl_info.channel_id_sent && | 570 if (ssl_info.channel_id_sent && |
| 569 ChannelIDService::GetDomainForHost(new_hostname) != | 571 ChannelIDService::GetDomainForHost(new_hostname) != |
| 570 ChannelIDService::GetDomainForHost(old_hostname)) { | 572 ChannelIDService::GetDomainForHost(old_hostname)) { |
| 571 return false; | 573 return false; |
| 572 } | 574 } |
| 573 | 575 |
| (...skipping 2679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3253 if (!queue->empty()) { | 3255 if (!queue->empty()) { |
| 3254 SpdyStreamId stream_id = queue->front(); | 3256 SpdyStreamId stream_id = queue->front(); |
| 3255 queue->pop_front(); | 3257 queue->pop_front(); |
| 3256 return stream_id; | 3258 return stream_id; |
| 3257 } | 3259 } |
| 3258 } | 3260 } |
| 3259 return 0; | 3261 return 0; |
| 3260 } | 3262 } |
| 3261 | 3263 |
| 3262 } // namespace net | 3264 } // namespace net |
| OLD | NEW |