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/quic/quic_chromium_client_session.h" | 5 #include "net/quic/quic_chromium_client_session.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 | 559 |
560 bool QuicChromiumClientSession::CanPool(const std::string& hostname, | 560 bool QuicChromiumClientSession::CanPool(const std::string& hostname, |
561 PrivacyMode privacy_mode) const { | 561 PrivacyMode privacy_mode) const { |
562 DCHECK(connection()->connected()); | 562 DCHECK(connection()->connected()); |
563 if (privacy_mode != server_id_.privacy_mode()) { | 563 if (privacy_mode != server_id_.privacy_mode()) { |
564 // Privacy mode must always match. | 564 // Privacy mode must always match. |
565 return false; | 565 return false; |
566 } | 566 } |
567 SSLInfo ssl_info; | 567 SSLInfo ssl_info; |
568 if (!GetSSLInfo(&ssl_info) || !ssl_info.cert.get()) { | 568 if (!GetSSLInfo(&ssl_info) || !ssl_info.cert.get()) { |
569 // We can always pool with insecure QUIC sessions. | 569 NOTREACHED() << "QUIC should always have certificates."; |
570 return true; | 570 return false; |
571 } | 571 } |
572 | 572 |
573 return SpdySession::CanPool(transport_security_state_, ssl_info, | 573 return SpdySession::CanPool(transport_security_state_, ssl_info, |
574 server_id_.host(), hostname); | 574 server_id_.host(), hostname); |
575 } | 575 } |
576 | 576 |
577 QuicSpdyStream* QuicChromiumClientSession::CreateIncomingDynamicStream( | 577 QuicSpdyStream* QuicChromiumClientSession::CreateIncomingDynamicStream( |
578 QuicStreamId id) { | 578 QuicStreamId id) { |
579 DLOG(ERROR) << "Server push not supported"; | 579 DLOG(ERROR) << "Server push not supported"; |
580 return nullptr; | 580 return nullptr; |
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
983 return; | 983 return; |
984 | 984 |
985 // TODO(rch): re-enable this code once beta is cut. | 985 // TODO(rch): re-enable this code once beta is cut. |
986 // if (stream_factory_) | 986 // if (stream_factory_) |
987 // stream_factory_->OnSessionConnectTimeout(this); | 987 // stream_factory_->OnSessionConnectTimeout(this); |
988 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); | 988 // CloseAllStreams(ERR_QUIC_HANDSHAKE_FAILED); |
989 // DCHECK_EQ(0u, GetNumOpenOutgoingStreams()); | 989 // DCHECK_EQ(0u, GetNumOpenOutgoingStreams()); |
990 } | 990 } |
991 | 991 |
992 } // namespace net | 992 } // namespace net |
OLD | NEW |