| OLD | NEW |
| (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 |
| OLD | NEW |