blob: 035848c9c01201ba3f7c7977c14348be8f201f21 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/quic/congestion_control/loss_detection_interface.h"
#include "net/quic/congestion_control/tcp_loss_algorithm.h"
#include "net/quic/congestion_control/time_loss_algorithm.h"
namespace net {
// Factory for loss detection algorithm.
LossDetectionInterface* LossDetectionInterface::Create(
LossDetectionType loss_type) {
switch (loss_type) {
case kNack:
return new TCPLossAlgorithm();
case kTime:
return new TimeLossAlgorithm();
}
LOG(DFATAL) << "Unknown loss detection algorithm:" << loss_type;
return NULL;
}
} // namespace net
|