| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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_NQE_NETWORK_QUALITY_H_ | 5 #ifndef NET_NQE_NETWORK_QUALITY_H_ |
| 6 #define NET_NQE_NETWORK_QUALITY_H_ | 6 #define NET_NQE_NETWORK_QUALITY_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 NetworkQuality(const base::TimeDelta& http_rtt, | 36 NetworkQuality(const base::TimeDelta& http_rtt, |
| 37 const base::TimeDelta& transport_rtt, | 37 const base::TimeDelta& transport_rtt, |
| 38 int32_t downstream_throughput_kbps); | 38 int32_t downstream_throughput_kbps); |
| 39 NetworkQuality(const NetworkQuality& other); | 39 NetworkQuality(const NetworkQuality& other); |
| 40 ~NetworkQuality(); | 40 ~NetworkQuality(); |
| 41 | 41 |
| 42 NetworkQuality& operator=(const NetworkQuality& other); | 42 NetworkQuality& operator=(const NetworkQuality& other); |
| 43 | 43 |
| 44 bool operator==(const NetworkQuality& other) const; | 44 bool operator==(const NetworkQuality& other) const; |
| 45 | 45 |
| 46 // Returns true if |this| is at least as fast as |other| for all parameters |
| 47 // (HTTP RTT, transport RTT etc.) |
| 48 bool IsFaster(const NetworkQuality& other) const; |
| 49 |
| 46 // Returns the estimate of the round trip time at the HTTP layer. | 50 // Returns the estimate of the round trip time at the HTTP layer. |
| 47 const base::TimeDelta& http_rtt() const { return http_rtt_; } | 51 const base::TimeDelta& http_rtt() const { return http_rtt_; } |
| 48 | 52 |
| 49 void set_http_rtt(const base::TimeDelta& http_rtt) { http_rtt_ = http_rtt; } | 53 void set_http_rtt(const base::TimeDelta& http_rtt) { http_rtt_ = http_rtt; } |
| 50 | 54 |
| 51 // Returns the estimate of the round trip time at the transport layer. | 55 // Returns the estimate of the round trip time at the transport layer. |
| 52 const base::TimeDelta& transport_rtt() const { return transport_rtt_; } | 56 const base::TimeDelta& transport_rtt() const { return transport_rtt_; } |
| 53 | 57 |
| 54 void set_transport_rtt(const base::TimeDelta& transport_rtt) { | 58 void set_transport_rtt(const base::TimeDelta& transport_rtt) { |
| 55 transport_rtt_ = transport_rtt; | 59 transport_rtt_ = transport_rtt; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 74 | 78 |
| 75 // Estimated downstream throughput in kilobits per second. | 79 // Estimated downstream throughput in kilobits per second. |
| 76 int32_t downstream_throughput_kbps_; | 80 int32_t downstream_throughput_kbps_; |
| 77 }; | 81 }; |
| 78 | 82 |
| 79 } // namespace internal | 83 } // namespace internal |
| 80 } // namespace nqe | 84 } // namespace nqe |
| 81 } // namespace net | 85 } // namespace net |
| 82 | 86 |
| 83 #endif // NET_NQE_NETWORK_QUALITY_H_ | 87 #endif // NET_NQE_NETWORK_QUALITY_H_ |
| OLD | NEW |