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

Side by Side Diff: net/quic/quic_connection.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_connection.h ('k') | net/quic/quic_sent_packet_manager.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 (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_connection.h" 5 #include "net/quic/quic_connection.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <sys/types.h> 8 #include <sys/types.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 } 317 }
318 318
319 void QuicConnection::OnSendConnectionState( 319 void QuicConnection::OnSendConnectionState(
320 const CachedNetworkParameters& cached_network_params) { 320 const CachedNetworkParameters& cached_network_params) {
321 if (debug_visitor_ != nullptr) { 321 if (debug_visitor_ != nullptr) {
322 debug_visitor_->OnSendConnectionState(cached_network_params); 322 debug_visitor_->OnSendConnectionState(cached_network_params);
323 } 323 }
324 } 324 }
325 325
326 bool QuicConnection::ResumeConnectionState( 326 bool QuicConnection::ResumeConnectionState(
327 const CachedNetworkParameters& cached_network_params) { 327 const CachedNetworkParameters& cached_network_params,
328 bool max_bandwidth_resumption) {
328 if (debug_visitor_ != nullptr) { 329 if (debug_visitor_ != nullptr) {
329 debug_visitor_->OnResumeConnectionState(cached_network_params); 330 debug_visitor_->OnResumeConnectionState(cached_network_params);
330 } 331 }
331 return sent_packet_manager_.ResumeConnectionState(cached_network_params); 332 return sent_packet_manager_.ResumeConnectionState(cached_network_params,
333 max_bandwidth_resumption);
332 } 334 }
333 335
334 void QuicConnection::SetNumOpenStreams(size_t num_streams) { 336 void QuicConnection::SetNumOpenStreams(size_t num_streams) {
335 sent_packet_manager_.SetNumOpenStreams(num_streams); 337 sent_packet_manager_.SetNumOpenStreams(num_streams);
336 } 338 }
337 339
338 bool QuicConnection::SelectMutualVersion( 340 bool QuicConnection::SelectMutualVersion(
339 const QuicVersionVector& available_versions) { 341 const QuicVersionVector& available_versions) {
340 // Try to find the highest mutual version by iterating over supported 342 // Try to find the highest mutual version by iterating over supported
341 // versions, starting with the highest, and breaking out of the loop once we 343 // versions, starting with the highest, and breaking out of the loop once we
(...skipping 1784 matching lines...) Expand 10 before | Expand all | Expand 10 after
2126 } 2128 }
2127 for (const QuicFrame& frame : retransmittable_frames->frames()) { 2129 for (const QuicFrame& frame : retransmittable_frames->frames()) {
2128 if (frame.type == CONNECTION_CLOSE_FRAME) { 2130 if (frame.type == CONNECTION_CLOSE_FRAME) {
2129 return true; 2131 return true;
2130 } 2132 }
2131 } 2133 }
2132 return false; 2134 return false;
2133 } 2135 }
2134 2136
2135 } // namespace net 2137 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection.h ('k') | net/quic/quic_sent_packet_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698