Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(576)

Unified Diff: net/base/network_quality.h

Issue 1144163008: Add in-memory caching of network quality estimates across network changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed bengr comments Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/base/network_quality_estimator.h » ('j') | net/base/network_quality_estimator.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/network_quality.h
diff --git a/net/base/network_quality.h b/net/base/network_quality.h
index 4e2985776e0f4a8430b80c7523751391b4b0c0b7..25cc66d26adc3608c16fa1cf8bed400696beee5c 100644
--- a/net/base/network_quality.h
+++ b/net/base/network_quality.h
@@ -23,27 +23,42 @@ struct NET_EXPORT_PRIVATE NetworkQuality {
peak_throughput_kbps(peak_throughput_kbps),
peak_throughput_kbps_confidence(peak_throughput_kbps_confidence) {}
+ NetworkQuality(const NetworkQuality& other)
+ : fastest_rtt(other.fastest_rtt),
+ fastest_rtt_confidence(other.fastest_rtt_confidence),
+ peak_throughput_kbps(other.peak_throughput_kbps),
+ peak_throughput_kbps_confidence(other.peak_throughput_kbps_confidence) {
+ }
+
+ NetworkQuality& operator=(const NetworkQuality& other) {
+ fastest_rtt = other.fastest_rtt;
+ fastest_rtt_confidence = other.fastest_rtt_confidence;
+ peak_throughput_kbps = other.peak_throughput_kbps;
+ peak_throughput_kbps_confidence = other.peak_throughput_kbps_confidence;
+ return *this;
+ }
+
~NetworkQuality() {}
// The fastest round trip time observed for the current connection.
- const base::TimeDelta fastest_rtt;
+ 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;
+ double fastest_rtt_confidence;
// Peak throughput in Kbps observed for the current connection.
- const uint64_t peak_throughput_kbps;
+ uint64_t peak_throughput_kbps;
// Confidence of the |peak_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;
+ double peak_throughput_kbps_confidence;
};
} // namespace net
« no previous file with comments | « no previous file | net/base/network_quality_estimator.h » ('j') | net/base/network_quality_estimator.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698