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

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

Issue 185053006: Refactor of QUIC's rtt storage and calculation to have a single RttStats (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | 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/send_algorithm_interface.h" 5 #include "net/quic/congestion_control/send_algorithm_interface.h"
6 6
7 #include "net/quic/congestion_control/fix_rate_sender.h" 7 #include "net/quic/congestion_control/fix_rate_sender.h"
8 #include "net/quic/congestion_control/inter_arrival_sender.h" 8 #include "net/quic/congestion_control/inter_arrival_sender.h"
9 #include "net/quic/congestion_control/tcp_cubic_sender.h" 9 #include "net/quic/congestion_control/tcp_cubic_sender.h"
10 #include "net/quic/quic_protocol.h" 10 #include "net/quic/quic_protocol.h"
11 11
12 namespace net { 12 namespace net {
13 13
14 const bool kUseReno = false; 14 const bool kUseReno = false;
15 15
16 class RttStats;
17
16 // Factory for send side congestion control algorithm. 18 // Factory for send side congestion control algorithm.
17 SendAlgorithmInterface* SendAlgorithmInterface::Create( 19 SendAlgorithmInterface* SendAlgorithmInterface::Create(
18 const QuicClock* clock, 20 const QuicClock* clock,
21 const RttStats* rtt_stats,
19 CongestionFeedbackType type, 22 CongestionFeedbackType type,
20 QuicConnectionStats* stats) { 23 QuicConnectionStats* stats) {
21 switch (type) { 24 switch (type) {
22 case kTCP: 25 case kTCP:
23 return new TcpCubicSender(clock, kUseReno, kMaxTcpCongestionWindow, 26 return new TcpCubicSender(clock, rtt_stats, kUseReno,
24 stats); 27 kMaxTcpCongestionWindow, stats);
25 case kInterArrival: 28 case kInterArrival:
26 return new InterArrivalSender(clock); 29 return new InterArrivalSender(clock, rtt_stats);
27 case kFixRate: 30 case kFixRate:
28 return new FixRateSender(clock); 31 return new FixRateSender(clock);
29 } 32 }
30 return NULL; 33 return NULL;
31 } 34 }
32 35
33 } // namespace net 36 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/send_algorithm_interface.h ('k') | net/quic/congestion_control/tcp_cubic_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698