Index: net/base/network_quality.h |
diff --git a/net/base/network_quality.h b/net/base/network_quality.h |
index 4e2985776e0f4a8430b80c7523751391b4b0c0b7..d382335257449a5f118dfd7a4d5616fa02c551ec 100644 |
--- a/net/base/network_quality.h |
+++ b/net/base/network_quality.h |
@@ -8,42 +8,48 @@ |
#include <stdint.h> |
#include "base/time/time.h" |
+#include "net/base/net_export.h" |
namespace net { |
// API that is used to report the current network quality as estimated by the |
// NetworkQualityEstimator. |
-struct NET_EXPORT_PRIVATE NetworkQuality { |
- NetworkQuality(const base::TimeDelta& fastest_rtt, |
- double fastest_rtt_confidence, |
- uint64_t peak_throughput_kbps, |
- double peak_throughput_kbps_confidence) |
- : fastest_rtt(fastest_rtt), |
- fastest_rtt_confidence(fastest_rtt_confidence), |
- peak_throughput_kbps(peak_throughput_kbps), |
- peak_throughput_kbps_confidence(peak_throughput_kbps_confidence) {} |
- |
- ~NetworkQuality() {} |
- |
- // The fastest round trip time observed for the current connection. |
- const base::TimeDelta fastest_rtt; |
- |
- // Confidence of the |fastest_rtt| estimate. Value lies between 0.0 and 1.0 |
- // with 0.0 being no confidence and 1.0 implying that estimates are same as |
- // ground truth. |
- // TODO(tbansal): Define units so values intermediate between 0.0 and 1.0 are |
- // meaningful. |
- const double fastest_rtt_confidence; |
- |
- // Peak throughput in Kbps observed for the current connection. |
- const uint64_t peak_throughput_kbps; |
- |
- // Confidence of the |peak_throughput_kbps| estimate. Value lies between 0.0 |
+class NET_EXPORT_PRIVATE NetworkQuality { |
+ public: |
+ // |rtt| is the estimate of the round trip time for the current connection. |
+ // |downlink_throughput_kbps| is the estimate of the downlink throughput for |
+ // the current connection. |
+ // |confidence| is the confidence of the estimates. |
+ NetworkQuality(const base::TimeDelta& rtt, |
+ uint64_t downlink_throughput_kbps, |
+ double confidence); |
+ |
+ ~NetworkQuality(); |
+ |
+ // Returns the round trip time observed for the current connection. |
+ base::TimeDelta rtt() const { return rtt_; } |
+ |
+ // Returns the downlink throughput in Kbps observed for the current |
+ // connection. |
+ uint64_t downlink_throughput_kbps() const { |
mmenke
2015/06/08 17:30:16
Believe this should be downstream (Or download)
tbansal1
2015/06/08 20:27:52
Done.
|
+ return downlink_throughput_kbps_; |
+ } |
+ |
+ private: |
+ // The round trip time observed for the current connection. |
+ const base::TimeDelta rtt_; |
+ |
+ // Downlink throughput in Kbps observed for the current connection. |
+ // TODO(tbansal): Change this to int32_t. |
+ const uint64_t downlink_throughput_kbps_; |
+ |
+ // Confidence of this network estimate. Value lies between 0.0 |
// and 1.0 with 0.0 being no confidence and 1.0 implying that estimates are |
// same as ground truth. |
// TODO(tbansal): Define units so values intermediate between 0.0 and 1.0 are |
// meaningful. |
- const double peak_throughput_kbps_confidence; |
+ // TODO(tbansal): Change it to an enum. |
+ const double confidence_; |
mmenke
2015/06/08 16:07:04
Actually, can we just get rid of all this until it
tbansal1
2015/06/08 20:27:51
Done.
|
}; |
} // namespace net |