Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: net/quic/quic_server_session.cc

Issue 1037633002: Add a QUIC connection option(BWMX) to resume to the max bandwidth (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Populate_RTT_info_89043159
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/quic_sent_packet_manager_test.cc ('k') | net/quic/test_tools/quic_test_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 const bool max_bandwidth_resumption =
51 ContainsQuicTag(config()->ReceivedConnectionOptions(), kBWMX);
50 if (cached_network_params != nullptr && 52 if (cached_network_params != nullptr &&
51 ContainsQuicTag(config()->ReceivedConnectionOptions(), kBWRE) && 53 (ContainsQuicTag(config()->ReceivedConnectionOptions(), kBWRE) ||
54 max_bandwidth_resumption) &&
52 cached_network_params->serving_region() == serving_region_) { 55 cached_network_params->serving_region() == serving_region_) {
53 connection()->ResumeConnectionState(*cached_network_params); 56 connection()->ResumeConnectionState(*cached_network_params,
57 max_bandwidth_resumption);
54 } 58 }
55 59
56 if (FLAGS_enable_quic_fec && 60 if (FLAGS_enable_quic_fec &&
57 ContainsQuicTag(config()->ReceivedConnectionOptions(), kFHDR)) { 61 ContainsQuicTag(config()->ReceivedConnectionOptions(), kFHDR)) {
58 // kFHDR config maps to FEC protection always for headers stream. 62 // kFHDR config maps to FEC protection always for headers stream.
59 // TODO(jri): Add crypto stream in addition to headers for kHDR. 63 // TODO(jri): Add crypto stream in addition to headers for kHDR.
60 headers_stream_->set_fec_policy(FEC_PROTECT_ALWAYS); 64 headers_stream_->set_fec_policy(FEC_PROTECT_ALWAYS);
61 } 65 }
62 } 66 }
63 67
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 QuicDataStream* QuicServerSession::CreateOutgoingDataStream() { 194 QuicDataStream* QuicServerSession::CreateOutgoingDataStream() {
191 DLOG(ERROR) << "Server push not yet supported"; 195 DLOG(ERROR) << "Server push not yet supported";
192 return nullptr; 196 return nullptr;
193 } 197 }
194 198
195 QuicCryptoServerStream* QuicServerSession::GetCryptoStream() { 199 QuicCryptoServerStream* QuicServerSession::GetCryptoStream() {
196 return crypto_stream_.get(); 200 return crypto_stream_.get();
197 } 201 }
198 202
199 } // namespace net 203 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_sent_packet_manager_test.cc ('k') | net/quic/test_tools/quic_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698