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

Side by Side Diff: net/quic/congestion_control/tcp_cubic_sender.cc

Issue 15937012: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Small bug fixes Created 7 years, 6 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 | Annotate | Revision Log
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/congestion_control/tcp_cubic_sender.h" 5 #include "net/quic/congestion_control/tcp_cubic_sender.h"
6 6
7 namespace net { 7 namespace net {
8 8
9 namespace { 9 namespace {
10 // Constants based on TCP defaults. 10 // Constants based on TCP defaults.
(...skipping 17 matching lines...) Expand all
28 update_end_sequence_number_(true), 28 update_end_sequence_number_(true),
29 end_sequence_number_(0), 29 end_sequence_number_(0),
30 congestion_window_(kInitialCongestionWindow), 30 congestion_window_(kInitialCongestionWindow),
31 slowstart_threshold_(kMaxCongestionWindow), 31 slowstart_threshold_(kMaxCongestionWindow),
32 delay_min_(QuicTime::Delta::Zero()) { 32 delay_min_(QuicTime::Delta::Zero()) {
33 } 33 }
34 34
35 void TcpCubicSender::OnIncomingQuicCongestionFeedbackFrame( 35 void TcpCubicSender::OnIncomingQuicCongestionFeedbackFrame(
36 const QuicCongestionFeedbackFrame& feedback, 36 const QuicCongestionFeedbackFrame& feedback,
37 QuicTime feedback_receive_time, 37 QuicTime feedback_receive_time,
38 QuicBandwidth /*sent_bandwidth*/,
39 const SentPacketsMap& /*sent_packets*/) { 38 const SentPacketsMap& /*sent_packets*/) {
40 if (last_received_accumulated_number_of_lost_packets_ != 39 if (last_received_accumulated_number_of_lost_packets_ !=
41 feedback.tcp.accumulated_number_of_lost_packets) { 40 feedback.tcp.accumulated_number_of_lost_packets) {
42 int recovered_lost_packets = 41 int recovered_lost_packets =
43 last_received_accumulated_number_of_lost_packets_ - 42 last_received_accumulated_number_of_lost_packets_ -
44 feedback.tcp.accumulated_number_of_lost_packets; 43 feedback.tcp.accumulated_number_of_lost_packets;
45 last_received_accumulated_number_of_lost_packets_ = 44 last_received_accumulated_number_of_lost_packets_ =
46 feedback.tcp.accumulated_number_of_lost_packets; 45 feedback.tcp.accumulated_number_of_lost_packets;
47 if (recovered_lost_packets > 0) { 46 if (recovered_lost_packets > 0) {
48 OnIncomingLoss(feedback_receive_time); 47 OnIncomingLoss(feedback_receive_time);
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 hybrid_slow_start_.Reset(end_sequence_number_); 226 hybrid_slow_start_.Reset(end_sequence_number_);
228 } 227 }
229 hybrid_slow_start_.Update(rtt, delay_min_); 228 hybrid_slow_start_.Update(rtt, delay_min_);
230 if (hybrid_slow_start_.Exit()) { 229 if (hybrid_slow_start_.Exit()) {
231 slowstart_threshold_ = congestion_window_; 230 slowstart_threshold_ = congestion_window_;
232 } 231 }
233 } 232 }
234 } 233 }
235 234
236 } // namespace net 235 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698