blob: aa0dab3b03c9476a8d099bde13e15e9b65668850 (
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
26
27
28
29
30
31
32
33
34
|
// Copyright 2015 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/base/socket_performance_watcher.h"
#include "base/logging.h"
namespace net {
SocketPerformanceWatcher::SocketPerformanceWatcher(
const SocketPerformanceWatcherFactory::Protocol protocol,
SocketPerformanceWatcherFactory* socket_performance_watcher_factory)
: protocol_(protocol),
socket_performance_watcher_factory_(socket_performance_watcher_factory) {
DCHECK(socket_performance_watcher_factory_);
switch (protocol) {
case SocketPerformanceWatcherFactory::PROTOCOL_TCP:
case SocketPerformanceWatcherFactory::PROTOCOL_QUIC:
return;
default:
NOTREACHED();
}
}
SocketPerformanceWatcher::~SocketPerformanceWatcher() {}
void SocketPerformanceWatcher::OnUpdatedRTTAvailable(
const base::TimeDelta& rtt) const {
socket_performance_watcher_factory_->OnUpdatedRTTAvailable(protocol_, rtt);
}
} // namespace net
|