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

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

Issue 1660593004: Landing Recent QUIC changes until 01/28/2016 18:41 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0202
Patch Set: Created 4 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/loss_detection_interface.h" 5 #include "net/quic/congestion_control/loss_detection_interface.h"
6 6
7 #include "net/quic/congestion_control/general_loss_algorithm.h" 7 #include "net/quic/congestion_control/general_loss_algorithm.h"
8 #include "net/quic/congestion_control/tcp_loss_algorithm.h"
9 #include "net/quic/congestion_control/time_loss_algorithm.h"
10 #include "net/quic/quic_bug_tracker.h" 8 #include "net/quic/quic_bug_tracker.h"
11 #include "net/quic/quic_flags.h" 9 #include "net/quic/quic_flags.h"
12 10
13 namespace net { 11 namespace net {
14 12
15 // Factory for loss detection algorithm. 13 // Factory for loss detection algorithm.
16 LossDetectionInterface* LossDetectionInterface::Create( 14 LossDetectionInterface* LossDetectionInterface::Create(
17 LossDetectionType loss_type) { 15 LossDetectionType loss_type) {
18 if (FLAGS_quic_general_loss_algorithm) { 16 return new GeneralLossAlgorithm(loss_type);
19 return new GeneralLossAlgorithm(loss_type);
20 }
21 switch (loss_type) {
22 case kNack:
23 return new TCPLossAlgorithm();
24 case kTime:
25 return new TimeLossAlgorithm();
26 }
27 QUIC_BUG << "Unknown loss detection algorithm:" << loss_type;
28 return nullptr;
29 } 17 }
30 18
31 } // namespace net 19 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/general_loss_algorithm_test.cc ('k') | net/quic/congestion_control/tcp_cubic_bytes_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698