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

Unified Diff: net/nqe/network_quality_estimator.h

Issue 2487883002: NQE: Use cached estimates (Closed)
Patch Set: bengr comments Created 4 years 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/nqe/network_quality_estimator.h
diff --git a/net/nqe/network_quality_estimator.h b/net/nqe/network_quality_estimator.h
index 6bd701911ee1efad103ebf7362e6339a027e40e7..5d7486b9facb5f1f73753cb7c067d559c179c821 100644
--- a/net/nqe/network_quality_estimator.h
+++ b/net/nqe/network_quality_estimator.h
@@ -489,8 +489,12 @@ class NET_EXPORT NetworkQualityEstimator
// Virtualized for testing.
virtual nqe::internal::NetworkID GetCurrentNetworkID() const;
+ // Notifies RTT observers of |observation|. May also trigger recomputation
+ // of effective connection type.
void NotifyObserversOfRTT(const RttObservation& observation);
+ // Notifies throughput observers of |observation|. May also trigger
+ // recomputation of effective connection type.
void NotifyObserversOfThroughput(const ThroughputObservation& observation);
// Returns true only if the |request| can be used for RTT estimation.
@@ -579,6 +583,13 @@ class NET_EXPORT NetworkQualityEstimator
// if there is a change in its value.
void ComputeEffectiveConnectionType();
+ // May update the network quality of the current network if |network_id|
+ // matches the ID of the current network. |cached_network_quality| is the
+ // cached network quality of the network with id |network_id|.
+ void MaybeUpdateNetworkQualityFromCache(
+ const nqe::internal::NetworkID& network_id,
+ const nqe::internal::CachedNetworkQuality cached_network_quality);
+
// Determines if the requests to local host can be used in estimating the
// network quality. Set to true only for tests.
bool use_localhost_requests_;

Powered by Google App Engine
This is Rietveld 408576698