Chromium Code Reviews| 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 #ifndef NET_BASE_NETWORK_QUALITY_H_ | 5 #ifndef NET_BASE_NETWORK_QUALITY_H_ |
| 6 #define NET_BASE_NETWORK_QUALITY_H_ | 6 #define NET_BASE_NETWORK_QUALITY_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| 11 #include "net/base/net_export.h" | 11 #include "net/base/net_export.h" |
| 12 | 12 |
| 13 namespace net { | 13 namespace net { |
| 14 | 14 |
| 15 // API that is used to report the network quality of a network connection as | 15 // API that is used to report the network quality of a network connection as |
| 16 // estimated by the NetworkQualityEstimator. | 16 // estimated by the NetworkQualityEstimator. |
| 17 class NET_EXPORT_PRIVATE NetworkQuality { | 17 class NET_EXPORT_PRIVATE NetworkQuality { |
| 18 public: | 18 public: |
| 19 // |rtt| is the estimate of the round trip time. | 19 // |rtt| is the estimate of the round trip time. |
| 20 // |downstream_throughput_kbps| is the estimate of the downstream throughput. | 20 // |downstream_throughput_kbps| is the estimate of the downstream throughput. |
| 21 NetworkQuality(const base::TimeDelta& rtt, | 21 NetworkQuality(const base::TimeDelta& rtt, |
| 22 int32_t downstream_throughput_kbps); | 22 int32_t downstream_throughput_kbps); |
| 23 | 23 |
|
pauljensen
2015/06/23 11:52:10
remove new line
tbansal1
2015/07/13 21:21:26
Done.
| |
| 24 NetworkQuality(const NetworkQuality& other); | |
| 25 | |
|
pauljensen
2015/06/23 11:52:10
remove new line
| |
| 24 ~NetworkQuality(); | 26 ~NetworkQuality(); |
| 25 | 27 |
| 28 NetworkQuality& operator=(const NetworkQuality& other); | |
| 29 | |
| 26 // Returns the estimate of the round trip time. | 30 // Returns the estimate of the round trip time. |
| 27 const base::TimeDelta& rtt() const { return rtt_; } | 31 const base::TimeDelta& rtt() const { return rtt_; } |
| 28 | 32 |
| 29 // Returns the estimate of the downstream throughput in Kbps (Kilo bits per | 33 // Returns the estimate of the downstream throughput in Kbps (Kilo bits per |
| 30 // second). | 34 // second). |
| 31 int32_t downstream_throughput_kbps() const { | 35 int32_t downstream_throughput_kbps() const { |
| 32 return downstream_throughput_kbps_; | 36 return downstream_throughput_kbps_; |
| 33 } | 37 } |
| 34 | 38 |
| 35 private: | 39 private: |
| 36 // Estimated round trip time. | 40 // Estimated round trip time. |
| 37 const base::TimeDelta rtt_; | 41 base::TimeDelta rtt_; |
| 38 | 42 |
| 39 // Estimated downstream throughput in Kbps. | 43 // Estimated downstream throughput in Kbps. |
| 40 const int32_t downstream_throughput_kbps_; | 44 int32_t downstream_throughput_kbps_; |
| 41 }; | 45 }; |
| 42 | 46 |
| 43 } // namespace net | 47 } // namespace net |
| 44 | 48 |
| 45 #endif // NET_BASE_NETWORK_QUALITY_H_ | 49 #endif // NET_BASE_NETWORK_QUALITY_H_ |
| OLD | NEW |