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

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

Issue 591323003: Remove loss detection from QuicConfig now that connection options has (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Do_not_timeout_QUIC_connections_75927669
Patch Set: reverted Patch Set 2 changes Created 6 years, 2 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_config_test.cc ('k') | net/quic/quic_sent_packet_manager_test.cc » ('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 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 if (config.HasReceivedConnectionOptions() && 121 if (config.HasReceivedConnectionOptions() &&
122 ContainsQuicTag(config.ReceivedConnectionOptions(), kPACE)) { 122 ContainsQuicTag(config.ReceivedConnectionOptions(), kPACE)) {
123 EnablePacing(); 123 EnablePacing();
124 } 124 }
125 } else if (config.HasSendConnectionOptions() && 125 } else if (config.HasSendConnectionOptions() &&
126 ContainsQuicTag(config.SendConnectionOptions(), kPACE)) { 126 ContainsQuicTag(config.SendConnectionOptions(), kPACE)) {
127 EnablePacing(); 127 EnablePacing();
128 } 128 }
129 // TODO(ianswett): Remove the "HasReceivedLossDetection" branch once 129 // TODO(ianswett): Remove the "HasReceivedLossDetection" branch once
130 // the ConnectionOptions code is live everywhere. 130 // the ConnectionOptions code is live everywhere.
131 if ((config.HasReceivedLossDetection() && 131 if (config.HasReceivedConnectionOptions() &&
132 config.ReceivedLossDetection() == kTIME) || 132 ContainsQuicTag(config.ReceivedConnectionOptions(), kTIME)) {
133 (config.HasReceivedConnectionOptions() &&
134 ContainsQuicTag(config.ReceivedConnectionOptions(), kTIME))) {
135 loss_algorithm_.reset(LossDetectionInterface::Create(kTime)); 133 loss_algorithm_.reset(LossDetectionInterface::Create(kTime));
136 } 134 }
137 send_algorithm_->SetFromConfig(config, is_server_); 135 send_algorithm_->SetFromConfig(config, is_server_);
138 136
139 if (network_change_visitor_ != NULL) { 137 if (network_change_visitor_ != NULL) {
140 network_change_visitor_->OnCongestionWindowChange(GetCongestionWindow()); 138 network_change_visitor_->OnCongestionWindowChange(GetCongestionWindow());
141 } 139 }
142 } 140 }
143 141
144 // TODO(ianswett): Combine this method with OnPacketSent once packets are always 142 // TODO(ianswett): Combine this method with OnPacketSent once packets are always
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 885
888 // Set up a pacing sender with a 5 millisecond alarm granularity. 886 // Set up a pacing sender with a 5 millisecond alarm granularity.
889 using_pacing_ = true; 887 using_pacing_ = true;
890 send_algorithm_.reset( 888 send_algorithm_.reset(
891 new PacingSender(send_algorithm_.release(), 889 new PacingSender(send_algorithm_.release(),
892 QuicTime::Delta::FromMilliseconds(5), 890 QuicTime::Delta::FromMilliseconds(5),
893 kInitialUnpacedBurst)); 891 kInitialUnpacedBurst));
894 } 892 }
895 893
896 } // namespace net 894 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_config_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