Chromium Code Reviews| 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_; |