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/nqe/network_quality.cc

Issue 1942893002: Split NQE to multiple files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 7 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/nqe/network_quality.h ('k') | net/nqe/network_quality_estimator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 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/nqe/network_quality.h"
6
7 namespace net {
8
9 namespace nqe {
10
11 namespace internal {
12
13 base::TimeDelta InvalidRTT() {
14 return base::TimeDelta::Max();
15 }
16
17 NetworkQuality::NetworkQuality()
18 : NetworkQuality(InvalidRTT(), kInvalidThroughput) {}
19
20 NetworkQuality::NetworkQuality(const base::TimeDelta& rtt,
21 int32_t downstream_throughput_kbps)
22 : rtt_(rtt), downstream_throughput_kbps_(downstream_throughput_kbps) {
23 DCHECK_GE(rtt_, base::TimeDelta());
24 DCHECK_GE(downstream_throughput_kbps_, 0);
25 }
26
27 NetworkQuality::NetworkQuality(const NetworkQuality& other)
28 : NetworkQuality(other.rtt_, other.downstream_throughput_kbps_) {}
29
30 NetworkQuality::~NetworkQuality() {}
31
32 NetworkQuality& NetworkQuality::operator=(const NetworkQuality& other) {
33 rtt_ = other.rtt_;
34 downstream_throughput_kbps_ = other.downstream_throughput_kbps_;
35 return *this;
36 }
37
38 } // namespace internal
39
40 } // namespace nqe
41
42 } // namespace net
OLDNEW
« no previous file with comments | « net/nqe/network_quality.h ('k') | net/nqe/network_quality_estimator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698