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

Unified Diff: net/nqe/network_quality_estimator.h

Issue 2487883002: NQE: Use cached estimates (Closed)
Patch Set: Rebase, handle comment 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
« no previous file with comments | « net/nqe/network_qualities_prefs_manager_unittest.cc ('k') | net/nqe/network_quality_estimator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..50ae4285978871bb18144da40b8b0b237088dce3 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_;
« no previous file with comments | « net/nqe/network_qualities_prefs_manager_unittest.cc ('k') | net/nqe/network_quality_estimator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698