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

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

Issue 2193073003: Move shared files in net/quic/ into net/quic/core/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: io_thread_unittest.cc Created 4 years, 4 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "net/quic/congestion_control/send_algorithm_interface.h"
6
7 #include "net/quic/congestion_control/tcp_cubic_sender_bytes.h"
8 #include "net/quic/congestion_control/tcp_cubic_sender_packets.h"
9 #include "net/quic/quic_flags.h"
10 #include "net/quic/quic_protocol.h"
11
12 namespace net {
13
14 class RttStats;
15
16 // Factory for send side congestion control algorithm.
17 SendAlgorithmInterface* SendAlgorithmInterface::Create(
18 const QuicClock* clock,
19 const RttStats* rtt_stats,
20 CongestionControlType congestion_control_type,
21 QuicConnectionStats* stats,
22 QuicPacketCount initial_congestion_window) {
23 QuicPacketCount max_congestion_window = kDefaultMaxCongestionWindowPackets;
24 switch (congestion_control_type) {
25 case kCubic:
26 return new TcpCubicSenderPackets(
27 clock, rtt_stats, false /* don't use Reno */,
28 initial_congestion_window, max_congestion_window, stats);
29 case kCubicBytes:
30 return new TcpCubicSenderBytes(
31 clock, rtt_stats, false /* don't use Reno */,
32 initial_congestion_window, max_congestion_window, stats);
33 case kReno:
34 return new TcpCubicSenderPackets(clock, rtt_stats, true /* use Reno */,
35 initial_congestion_window,
36 max_congestion_window, stats);
37 case kRenoBytes:
38 return new TcpCubicSenderBytes(clock, rtt_stats, true /* use Reno */,
39 initial_congestion_window,
40 max_congestion_window, stats);
41 case kBBR:
42 // TODO(rtenneti): Enable BbrTcpSender.
43 #if 0
44 return new BbrTcpSender(clock, rtt_stats, initial_congestion_window,
45 max_congestion_window, stats, true);
46 #endif
47 LOG(DFATAL) << "BbrTcpSender is not supported.";
48 return nullptr;
49 }
50 return nullptr;
51 }
52
53 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/send_algorithm_interface.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