Index: net/base/network_quality.h |
diff --git a/net/base/network_quality.h b/net/base/network_quality.h |
index 4e2985776e0f4a8430b80c7523751391b4b0c0b7..882aab05246f6cbe876ea89ef368862040b5ae7a 100644 |
--- a/net/base/network_quality.h |
+++ b/net/base/network_quality.h |
@@ -8,42 +8,52 @@ |
#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 |
+class NET_EXPORT_PRIVATE NetworkQuality { |
+ public: |
+ // |rtt| is the estimate of the round trip time for the current connection. |
+ // |rtt_confidence| is the confidence of the |rtt| estimate. |
+ // |throughput_kbps| is the estimate of the Kbps for the current connection. |
+ // |throughput_kbps_confidence| is the confidence of the |throughput_kbps| |
+ // estimate. |
+ NetworkQuality(const base::TimeDelta& rtt, |
+ double rtt_confidence, |
+ uint64_t throughput_kbps, |
bengr
2015/06/05 20:44:13
Be clear that this is downlink throuput.
tbansal1
2015/06/05 23:45:57
Done.
|
+ double throughput_kbps_confidence); |
bengr
2015/06/05 20:44:13
Follow the design and make this an enum, and don't
tbansal1
2015/06/05 23:45:57
Will do this in next CL, added TODO
|
+ |
+ ~NetworkQuality(); |
+ |
+ // Returns the round trip time observed for the current connection. |
+ base::TimeDelta GetRtt() const; |
+ |
+ // Returns the throughput in Kbps observed for the current connection. |
+ uint64_t GetThroughputKbps() const; |
bengr
2015/06/05 20:44:13
GetDownlinkThroughputKbps?
Should this be an int3
tbansal1
2015/06/05 23:45:57
Added TODO.
|
+ |
+ private: |
+ // The round trip time observed for the current connection. |
+ const base::TimeDelta rtt_; |
+ |
+ // Confidence of the |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; |
+ const double rtt_confidence_; |
bengr
2015/06/05 20:44:13
I would assign one confidence to the NetworkQualit
tbansal1
2015/06/05 23:45:57
Done.
|
- // Peak throughput in Kbps observed for the current connection. |
- const uint64_t peak_throughput_kbps; |
+ // Throughput in Kbps observed for the current connection. |
+ const uint64_t throughput_kbps_; |
- // Confidence of the |peak_throughput_kbps| estimate. Value lies between 0.0 |
+ // Confidence of the |throughput_kbps_| 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; |
+ const double throughput_kbps_confidence_; |
}; |
} // namespace net |