OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_server_session.h" | 5 #include "net/quic/quic_server_session.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "net/quic/crypto/cached_network_parameters.h" | 8 #include "net/quic/crypto/cached_network_parameters.h" |
9 #include "net/quic/quic_connection.h" | 9 #include "net/quic/quic_connection.h" |
10 #include "net/quic/quic_flags.h" | 10 #include "net/quic/quic_flags.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 if (!config()->HasReceivedConnectionOptions()) { | 41 if (!config()->HasReceivedConnectionOptions()) { |
42 return; | 42 return; |
43 } | 43 } |
44 | 44 |
45 // If the client has provided a bandwidth estimate from the same serving | 45 // If the client has provided a bandwidth estimate from the same serving |
46 // region, then pass it to the sent packet manager in preparation for possible | 46 // region, then pass it to the sent packet manager in preparation for possible |
47 // bandwidth resumption. | 47 // bandwidth resumption. |
48 const CachedNetworkParameters* cached_network_params = | 48 const CachedNetworkParameters* cached_network_params = |
49 crypto_stream_->previous_cached_network_params(); | 49 crypto_stream_->previous_cached_network_params(); |
50 if (FLAGS_quic_enable_bandwidth_resumption_experiment && | 50 if (cached_network_params != nullptr && |
51 cached_network_params != nullptr && | |
52 ContainsQuicTag(config()->ReceivedConnectionOptions(), kBWRE) && | 51 ContainsQuicTag(config()->ReceivedConnectionOptions(), kBWRE) && |
53 cached_network_params->serving_region() == serving_region_) { | 52 cached_network_params->serving_region() == serving_region_) { |
54 connection()->ResumeConnectionState(*cached_network_params); | 53 connection()->ResumeConnectionState(*cached_network_params); |
55 } | 54 } |
56 | 55 |
57 if (FLAGS_enable_quic_fec && | 56 if (FLAGS_enable_quic_fec && |
58 ContainsQuicTag(config()->ReceivedConnectionOptions(), kFHDR)) { | 57 ContainsQuicTag(config()->ReceivedConnectionOptions(), kFHDR)) { |
59 // kFHDR config maps to FEC protection always for headers stream. | 58 // kFHDR config maps to FEC protection always for headers stream. |
60 // TODO(jri): Add crypto stream in addition to headers for kHDR. | 59 // TODO(jri): Add crypto stream in addition to headers for kHDR. |
61 headers_stream_->set_fec_policy(FEC_PROTECT_ALWAYS); | 60 headers_stream_->set_fec_policy(FEC_PROTECT_ALWAYS); |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 QuicDataStream* QuicServerSession::CreateOutgoingDataStream() { | 190 QuicDataStream* QuicServerSession::CreateOutgoingDataStream() { |
192 DLOG(ERROR) << "Server push not yet supported"; | 191 DLOG(ERROR) << "Server push not yet supported"; |
193 return nullptr; | 192 return nullptr; |
194 } | 193 } |
195 | 194 |
196 QuicCryptoServerStream* QuicServerSession::GetCryptoStream() { | 195 QuicCryptoServerStream* QuicServerSession::GetCryptoStream() { |
197 return crypto_stream_.get(); | 196 return crypto_stream_.get(); |
198 } | 197 } |
199 | 198 |
200 } // namespace net | 199 } // namespace net |
OLD | NEW |