Chromium Code Reviews| Index: net/nqe/network_quality_estimator_test_util.h |
| diff --git a/net/nqe/network_quality_estimator_test_util.h b/net/nqe/network_quality_estimator_test_util.h |
| index 1b21b6ad9a5cb1bd700c2bb6556303519e0376b1..70dab1513c036862835f192f6f7c414624aa6539 100644 |
| --- a/net/nqe/network_quality_estimator_test_util.h |
| +++ b/net/nqe/network_quality_estimator_test_util.h |
| @@ -16,6 +16,7 @@ |
| #include "base/time/time.h" |
| #include "net/base/network_change_notifier.h" |
| #include "net/log/net_log.h" |
| +#include "net/log/test_net_log.h" |
| #include "net/nqe/effective_connection_type.h" |
| #include "net/nqe/network_quality_estimator.h" |
| #include "net/test/embedded_test_server/embedded_test_server.h" |
| @@ -24,7 +25,6 @@ |
| namespace net { |
| -class BoundTestNetLog; |
| class ExternalEstimateProvider; |
| // Helps in setting the current network type and id. |
| @@ -48,6 +48,15 @@ class TestNetworkQualityEstimator : public NetworkQualityEstimator { |
| bool add_default_platform_observations, |
| std::unique_ptr<BoundTestNetLog> net_log); |
| + TestNetworkQualityEstimator( |
| + std::unique_ptr<net::ExternalEstimateProvider> external_estimate_provider, |
| + const std::map<std::string, std::string>& variation_params, |
| + bool allow_local_host_requests_for_tests, |
| + bool allow_smaller_responses_for_tests, |
| + bool add_default_platform_observations, |
| + bool suppress_notifications_for_testing, |
|
dcheng
2017/05/17 12:27:46
FWIW, this is a lot of bools. I guess it's just ex
tbansal1
2017/05/18 00:10:29
Agreed. I will fix it, but I will prefer to do tha
|
| + std::unique_ptr<BoundTestNetLog> net_log); |
| + |
| ~TestNetworkQualityEstimator() override; |
| // Runs one URL request to completion. |
| @@ -109,6 +118,11 @@ class TestNetworkQualityEstimator : public NetworkQualityEstimator { |
| base::TimeDelta* transport_rtt, |
| int32_t* downstream_throughput_kbps) const override; |
| + void NotifyObserversOfRTTOrThroughputComputed() const override; |
| + |
| + void NotifyRTTAndThroughputEstimatesObserverIfPresent( |
| + RTTAndThroughputEstimatesObserver* observer) const override; |
| + |
| void set_start_time_null_http_rtt(const base::TimeDelta& http_rtt) { |
| // Callers should not set effective connection type along with the |
| // lower-layer metrics. |
| @@ -260,6 +274,9 @@ class TestNetworkQualityEstimator : public NetworkQualityEstimator { |
| LocalHttpTestServer embedded_test_server_; |
| + // If true, notifications are not sent to any of the observers. |
| + const bool suppress_notifications_for_testing_; |
| + |
| // Net log provided to network quality estimator. |
| std::unique_ptr<net::BoundTestNetLog> net_log_; |