| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_NQE_NETWORK_QUALITY_ESTIMATOR_TEST_UTIL_H_ | 5 #ifndef NET_NQE_NETWORK_QUALITY_ESTIMATOR_TEST_UTIL_H_ |
| 6 #define NET_NQE_NETWORK_QUALITY_ESTIMATOR_TEST_UTIL_H_ | 6 #define NET_NQE_NETWORK_QUALITY_ESTIMATOR_TEST_UTIL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/optional.h" | 15 #include "base/optional.h" |
| 16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
| 17 #include "net/base/network_change_notifier.h" | 17 #include "net/base/network_change_notifier.h" |
| 18 #include "net/nqe/effective_connection_type.h" | 18 #include "net/nqe/effective_connection_type.h" |
| 19 #include "net/nqe/network_quality_estimator.h" | 19 #include "net/nqe/network_quality_estimator.h" |
| 20 #include "net/test/embedded_test_server/embedded_test_server.h" | 20 #include "net/test/embedded_test_server/embedded_test_server.h" |
| 21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
| 22 #include "url/gurl.h" | 22 #include "url/gurl.h" |
| 23 | 23 |
| 24 namespace net { | 24 namespace net { |
| 25 | 25 |
| 26 class ExternalEstimateProvider; | 26 class ExternalEstimateProvider; |
| 27 | 27 |
| 28 namespace test_server { | |
| 29 struct HttpRequest; | |
| 30 class HttpResponse; | |
| 31 } | |
| 32 | |
| 33 // Helps in setting the current network type and id. | 28 // Helps in setting the current network type and id. |
| 34 class TestNetworkQualityEstimator : public NetworkQualityEstimator { | 29 class TestNetworkQualityEstimator : public NetworkQualityEstimator { |
| 35 public: | 30 public: |
| 36 TestNetworkQualityEstimator( | 31 TestNetworkQualityEstimator( |
| 37 const std::map<std::string, std::string>& variation_params, | 32 const std::map<std::string, std::string>& variation_params, |
| 38 std::unique_ptr<net::ExternalEstimateProvider> | 33 std::unique_ptr<net::ExternalEstimateProvider> |
| 39 external_estimate_provider); | 34 external_estimate_provider); |
| 40 | 35 |
| 41 TestNetworkQualityEstimator( | 36 TestNetworkQualityEstimator( |
| 42 std::unique_ptr<net::ExternalEstimateProvider> external_estimate_provider, | 37 std::unique_ptr<net::ExternalEstimateProvider> external_estimate_provider, |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 double rand_double_; | 219 double rand_double_; |
| 225 | 220 |
| 226 LocalHttpTestServer embedded_test_server_; | 221 LocalHttpTestServer embedded_test_server_; |
| 227 | 222 |
| 228 DISALLOW_COPY_AND_ASSIGN(TestNetworkQualityEstimator); | 223 DISALLOW_COPY_AND_ASSIGN(TestNetworkQualityEstimator); |
| 229 }; | 224 }; |
| 230 | 225 |
| 231 } // namespace net | 226 } // namespace net |
| 232 | 227 |
| 233 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_TEST_UTIL_H_ | 228 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_TEST_UTIL_H_ |
| OLD | NEW |