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

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

Issue 968233004: Land Recent QUIC Changes until 03/02/2015. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup
Patch Set: Created 5 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
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/tcp_cubic_sender.h" 7 #include "net/quic/congestion_control/tcp_cubic_sender.h"
8 #include "net/quic/quic_protocol.h" 8 #include "net/quic/quic_protocol.h"
9 9
10 namespace net { 10 namespace net {
11 11
12 class RttStats; 12 class RttStats;
13 13
14 // Factory for send side congestion control algorithm. 14 // Factory for send side congestion control algorithm.
15 SendAlgorithmInterface* SendAlgorithmInterface::Create( 15 SendAlgorithmInterface* SendAlgorithmInterface::Create(
16 const QuicClock* clock, 16 const QuicClock* clock,
17 const RttStats* rtt_stats, 17 const RttStats* rtt_stats,
18 CongestionControlType congestion_control_type, 18 CongestionControlType congestion_control_type,
19 QuicConnectionStats* stats, 19 QuicConnectionStats* stats,
20 QuicPacketCount initial_congestion_window) { 20 QuicPacketCount initial_congestion_window) {
21 switch (congestion_control_type) { 21 switch (congestion_control_type) {
22 case kCubic: 22 case kCubic:
23 return new TcpCubicSender(clock, rtt_stats, false /* don't use Reno */, 23 return new TcpCubicSender(clock, rtt_stats, false /* don't use Reno */,
24 initial_congestion_window, 24 initial_congestion_window, stats);
25 kMaxTcpCongestionWindow, stats);
26 case kReno: 25 case kReno:
27 return new TcpCubicSender(clock, rtt_stats, true /* use Reno */, 26 return new TcpCubicSender(clock, rtt_stats, true /* use Reno */,
28 initial_congestion_window, 27 initial_congestion_window, stats);
29 kMaxTcpCongestionWindow, stats);
30 case kBBR: 28 case kBBR:
31 // TODO(rtenneti): Enable BbrTcpSender. 29 // TODO(rtenneti): Enable BbrTcpSender.
32 #if 0 30 #if 0
33 return new BbrTcpSender(clock, rtt_stats, initial_congestion_window, 31 return new BbrTcpSender(clock, rtt_stats, initial_congestion_window,
34 kMaxTcpCongestionWindow, stats); 32 stats);
35 #endif 33 #endif
36 LOG(DFATAL) << "BbrTcpSender is not supported."; 34 LOG(DFATAL) << "BbrTcpSender is not supported.";
37 return nullptr; 35 return nullptr;
38 } 36 }
39 return nullptr; 37 return nullptr;
40 } 38 }
41 39
42 } // namespace net 40 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/rtt_stats.h ('k') | net/quic/congestion_control/send_algorithm_simulator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698