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

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 Ryan's comments Created 4 years, 4 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') | net/nqe/network_quality_estimator.cc » ('J')
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 80c7feb6703eb7999e95c9db5e55583680abe5bb..d7ea8e5b819db561f5268bb4a8964576c6773e29 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 network quality estimator at
bengr 2016/08/25 22:51:24 by -> by the
tbansal1 2016/09/07 18:33:26 Done.
+ // 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
@@ -286,6 +288,10 @@ class NET_EXPORT NetworkQualityEstimator
// Returns a random double in the range [0.0, 1.0). Virtualized for testing.
virtual double RandDouble() const;
+ // Forces recomputation of effective connection type, and notifies observers
+ // if there is a change in its value.
+ void RecomputeEffectiveConnectionType();
bengr 2016/08/25 22:51:24 Why is this not private?
tbansal1 2016/09/07 18:33:26 Done.
+
private:
FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest,
AdaptiveRecomputationEffectiveConnectionType);
« no previous file with comments | « no previous file | net/nqe/network_quality_estimator.cc » ('j') | net/nqe/network_quality_estimator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698