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

Unified Diff: net/nqe/network_quality_estimator.h

Issue 2266663002: NQE: Change GetEffectiveConnectionType to return last ECT (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed bengr comments Created 4 years, 3 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/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 7fd3f38edd17376822a05e4586918f138916cce7..45554e85481e3f43783b167f5e40c46bea29ca41 100644
--- a/net/nqe/network_quality_estimator.h
+++ b/net/nqe/network_quality_estimator.h
@@ -148,8 +148,10 @@ class NET_EXPORT NetworkQualityEstimator
~NetworkQualityEstimator() override;
- // Returns the effective type of the current connection. Virtualized for
- // testing.
+ // Returns the last computed effective type of the current connection. The
+ // effective connection type is computed by the network quality estimator at
+ // regular intervals and at certain events (e.g., connection change).
+ // Virtualized for testing.
virtual EffectiveConnectionType GetEffectiveConnectionType() const;
// Returns the effective type of the current connection based on only the
@@ -426,7 +428,7 @@ class NET_EXPORT NetworkQualityEstimator
// Recomputes effective connection type, if it was computed more than the
// specified duration ago, or if there has been a connection change recently.
- void MaybeRecomputeEffectiveConnectionType();
+ void MaybeComputeEffectiveConnectionType();
// Notify observers of a change in effective connection type.
void NotifyObserversOfEffectiveConnectionTypeChanged();
@@ -483,6 +485,10 @@ class NET_EXPORT NetworkQualityEstimator
// connection type.
bool UseTransportRTT() const;
+ // Forces computation of effective connection type, and notifies observers
+ // if there is a change in its value.
+ void ComputeEffectiveConnectionType();
+
// 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 | « no previous file | net/nqe/network_quality_estimator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698