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

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

Issue 411823002: Land Recent QUIC Changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase TOT Created 6 years, 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_sent_packet_manager.h" 5 #include "net/quic/quic_sent_packet_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // TODO(ianswett): BBR is currently a server only feature. 102 // TODO(ianswett): BBR is currently a server only feature.
103 if (config.HasReceivedConnectionOptions() && 103 if (config.HasReceivedConnectionOptions() &&
104 ContainsQuicTag(config.ReceivedConnectionOptions(), kTBBR)) { 104 ContainsQuicTag(config.ReceivedConnectionOptions(), kTBBR)) {
105 if (FLAGS_quic_recent_min_rtt_window_s > 0) { 105 if (FLAGS_quic_recent_min_rtt_window_s > 0) {
106 rtt_stats_.set_recent_min_rtt_window( 106 rtt_stats_.set_recent_min_rtt_window(
107 QuicTime::Delta::FromSeconds(FLAGS_quic_recent_min_rtt_window_s)); 107 QuicTime::Delta::FromSeconds(FLAGS_quic_recent_min_rtt_window_s));
108 } 108 }
109 send_algorithm_.reset( 109 send_algorithm_.reset(
110 SendAlgorithmInterface::Create(clock_, &rtt_stats_, kBBR, stats_)); 110 SendAlgorithmInterface::Create(clock_, &rtt_stats_, kBBR, stats_));
111 } 111 }
112 if (config.HasReceivedConnectionOptions() &&
113 ContainsQuicTag(config.ReceivedConnectionOptions(), kRENO)) {
114 send_algorithm_.reset(
115 SendAlgorithmInterface::Create(clock_, &rtt_stats_, kReno, stats_));
116 }
112 if (config.congestion_feedback() == kPACE || 117 if (config.congestion_feedback() == kPACE ||
113 (config.HasReceivedConnectionOptions() && 118 (config.HasReceivedConnectionOptions() &&
114 ContainsQuicTag(config.ReceivedConnectionOptions(), kPACE))) { 119 ContainsQuicTag(config.ReceivedConnectionOptions(), kPACE))) {
115 MaybeEnablePacing(); 120 MaybeEnablePacing();
116 } 121 }
117 // TODO(ianswett): Remove the "HasReceivedLossDetection" branch once 122 // TODO(ianswett): Remove the "HasReceivedLossDetection" branch once
118 // the ConnectionOptions code is live everywhere. 123 // the ConnectionOptions code is live everywhere.
119 if ((config.HasReceivedLossDetection() && 124 if ((config.HasReceivedLossDetection() &&
120 config.ReceivedLossDetection() == kTIME) || 125 config.ReceivedLossDetection() == kTIME) ||
121 (config.HasReceivedConnectionOptions() && 126 (config.HasReceivedConnectionOptions() &&
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 863
859 // Set up a pacing sender with a 5 millisecond alarm granularity. 864 // Set up a pacing sender with a 5 millisecond alarm granularity.
860 using_pacing_ = true; 865 using_pacing_ = true;
861 send_algorithm_.reset( 866 send_algorithm_.reset(
862 new PacingSender(send_algorithm_.release(), 867 new PacingSender(send_algorithm_.release(),
863 QuicTime::Delta::FromMilliseconds(5), 868 QuicTime::Delta::FromMilliseconds(5),
864 kInitialUnpacedBurst)); 869 kInitialUnpacedBurst));
865 } 870 }
866 871
867 } // namespace net 872 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_received_packet_manager_test.cc ('k') | net/quic/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698