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

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

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

Powered by Google App Engine
This is Rietveld 408576698