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

Unified Diff: net/base/network_quality.cc

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 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
Index: net/base/network_quality.cc
diff --git a/net/base/network_quality.cc b/net/base/network_quality.cc
index a1a1ee04a1b2b0da88258fb99e0060fd72bce00e..cb75f3df7b36bbb8703cebe92280850cce4b38e5 100644
--- a/net/base/network_quality.cc
+++ b/net/base/network_quality.cc
@@ -15,6 +15,17 @@ NetworkQuality::NetworkQuality(const base::TimeDelta& rtt,
DCHECK_GE(downstream_throughput_kbps_, 0);
}
+NetworkQuality::NetworkQuality(const NetworkQuality& other)
+ : rtt_(other.rtt_),
+ downstream_throughput_kbps_(other.downstream_throughput_kbps_) {
+}
+
+NetworkQuality& NetworkQuality::operator=(const NetworkQuality& other) {
+ rtt_ = other.rtt_;
+ downstream_throughput_kbps_ = other.downstream_throughput_kbps_;
+ return *this;
+}
+
NetworkQuality::~NetworkQuality() {
}

Powered by Google App Engine
This is Rietveld 408576698