| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/base/network_quality.h" | 5 #include "net/base/network_quality.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 namespace net { | 9 namespace net { |
| 10 | 10 |
| 11 NetworkQuality::NetworkQuality(const base::TimeDelta& rtt, | 11 NetworkQuality::NetworkQuality(const base::TimeDelta& rtt, |
| 12 int32_t downstream_throughput_kbps) | 12 int32_t downstream_throughput_kbps) |
| 13 : rtt_(rtt), downstream_throughput_kbps_(downstream_throughput_kbps) { | 13 : rtt_(rtt), downstream_throughput_kbps_(downstream_throughput_kbps) { |
| 14 DCHECK_GE(rtt_, base::TimeDelta()); | 14 DCHECK_GE(rtt_, base::TimeDelta()); |
| 15 DCHECK_GE(downstream_throughput_kbps_, 0); | 15 DCHECK_GE(downstream_throughput_kbps_, 0); |
| 16 } | 16 } |
| 17 | 17 |
| 18 NetworkQuality::NetworkQuality(const NetworkQuality& other) |
| 19 : rtt_(other.rtt_), |
| 20 downstream_throughput_kbps_(other.downstream_throughput_kbps_) { |
| 21 } |
| 22 |
| 23 NetworkQuality& NetworkQuality::operator=(const NetworkQuality& other) { |
| 24 rtt_ = other.rtt_; |
| 25 downstream_throughput_kbps_ = other.downstream_throughput_kbps_; |
| 26 return *this; |
| 27 } |
| 28 |
| 18 NetworkQuality::~NetworkQuality() { | 29 NetworkQuality::~NetworkQuality() { |
| 19 } | 30 } |
| 20 | 31 |
| 21 } // namespace net | 32 } // namespace net |
| OLD | NEW |