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

Unified Diff: net/nqe/network_quality_estimator.h

Issue 2032443003: NQE: Allow algorithm to be set using variation params (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 2abc9fd7d6f7bffbcea10f7262ff497dbeb225c8..cdc83c7911b171e7b9b8c69c4303bbd3e7646007 100644
--- a/net/nqe/network_quality_estimator.h
+++ b/net/nqe/network_quality_estimator.h
@@ -317,6 +317,8 @@ class NET_EXPORT_PRIVATE NetworkQualityEstimator
FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, StoreObservations);
FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, TestAddObservation);
FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, ObtainOperatingParams);
+ FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest,
+ ObtainAlgorithmToUseFromParams);
FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, HalfLifeParam);
FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, ComputedPercentiles);
FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, TestCaching);
@@ -439,6 +441,14 @@ class NET_EXPORT_PRIVATE NetworkQualityEstimator
// Notify observers of a change in effective connection type.
void NotifyObserversOfEffectiveConnectionTypeChanged();
+ // Returns the effective type of the current connection based on only the
+ // samples observed after |start_time|. Uses algorithm 0 to compute the
+ // effective connection type. This algorithm uses HTTP RTT and downlink
+ // throughput as inputs, and requires both inputs to have a valid value.
+ // This method should be called only if |algorithm_| is 0.
+ EffectiveConnectionType GetRecentEffectiveConnectionTypeAlgorithm0(
+ const base::TimeTicks& start_time) const;
+
// Values of external estimate provider status. This enum must remain
// synchronized with the enum of the same name in
// metrics/histograms/histograms.xml.
@@ -469,6 +479,11 @@ class NET_EXPORT_PRIVATE NetworkQualityEstimator
// The factor by which the weight of an observation reduces every second.
const double weight_multiplier_per_second_;
+ // Algorithm to use for computing effective connection type. The value is
+ // obtained from field trial parameters. If the value from field trial
+ // parameters is unavailable, it is set to default value of 0.
+ const int32_t algorithm_;
bengr 2016/06/02 22:59:43 Letters are more intuitive than numbers for experi
tbansal1 2016/06/03 00:50:10 Done.
+
// Tick clock used by the network quality estimator.
std::unique_ptr<base::TickClock> tick_clock_;
« 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