| OLD | NEW |
| 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 // Factory for send side congestion control algorithm. | 16 // Factory for send side congestion control algorithm. |
| 17 SendAlgorithmInterface* SendAlgorithmInterface::Create( | 17 SendAlgorithmInterface* SendAlgorithmInterface::Create( |
| 18 const QuicClock* clock, | 18 const QuicClock* clock, |
| 19 CongestionFeedbackType type) { | 19 CongestionFeedbackType type, |
| 20 QuicConnectionStats* stats) { |
| 20 switch (type) { | 21 switch (type) { |
| 21 case kTCP: | 22 case kTCP: |
| 22 return new TcpCubicSender(clock, kUseReno, kMaxTcpCongestionWindow); | 23 return new TcpCubicSender(clock, kUseReno, kMaxTcpCongestionWindow, |
| 24 stats); |
| 23 case kInterArrival: | 25 case kInterArrival: |
| 24 return new InterArrivalSender(clock); | 26 return new InterArrivalSender(clock); |
| 25 case kFixRate: | 27 case kFixRate: |
| 26 return new FixRateSender(clock); | 28 return new FixRateSender(clock); |
| 27 } | 29 } |
| 28 return NULL; | 30 return NULL; |
| 29 } | 31 } |
| 30 | 32 |
| 31 } // namespace net | 33 } // namespace net |
| OLD | NEW |