| 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> |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 // Returns the value of the parameter with name |key| from the last net log | 184 // Returns the value of the parameter with name |key| from the last net log |
| 185 // entry that has type set to |type|. Different methods are provided for | 185 // entry that has type set to |type|. Different methods are provided for |
| 186 // values of different types. | 186 // values of different types. |
| 187 std::string GetNetLogLastStringValue(NetLogEventType type, | 187 std::string GetNetLogLastStringValue(NetLogEventType type, |
| 188 const std::string& key) const; | 188 const std::string& key) const; |
| 189 int GetNetLogLastIntegerValue(NetLogEventType type, | 189 int GetNetLogLastIntegerValue(NetLogEventType type, |
| 190 const std::string& key) const; | 190 const std::string& key) const; |
| 191 | 191 |
| 192 using NetworkQualityEstimator::SetTickClockForTesting; | 192 using NetworkQualityEstimator::SetTickClockForTesting; |
| 193 using NetworkQualityEstimator::OnConnectionTypeChanged; | 193 using NetworkQualityEstimator::OnConnectionTypeChanged; |
| 194 using NetworkQualityEstimator::OnUpdatedRTTAvailable; |
| 194 | 195 |
| 195 private: | 196 private: |
| 196 class LocalHttpTestServer : public EmbeddedTestServer { | 197 class LocalHttpTestServer : public EmbeddedTestServer { |
| 197 public: | 198 public: |
| 198 explicit LocalHttpTestServer(const base::FilePath& document_root); | 199 explicit LocalHttpTestServer(const base::FilePath& document_root); |
| 199 }; | 200 }; |
| 200 | 201 |
| 201 // NetworkQualityEstimator implementation that returns the overridden | 202 // NetworkQualityEstimator implementation that returns the overridden |
| 202 // network | 203 // network |
| 203 // id (instead of invoking platform APIs). | 204 // id (instead of invoking platform APIs). |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 | 240 |
| 240 // Net log provided to network quality estimator. | 241 // Net log provided to network quality estimator. |
| 241 std::unique_ptr<net::BoundTestNetLog> net_log_; | 242 std::unique_ptr<net::BoundTestNetLog> net_log_; |
| 242 | 243 |
| 243 DISALLOW_COPY_AND_ASSIGN(TestNetworkQualityEstimator); | 244 DISALLOW_COPY_AND_ASSIGN(TestNetworkQualityEstimator); |
| 244 }; | 245 }; |
| 245 | 246 |
| 246 } // namespace net | 247 } // namespace net |
| 247 | 248 |
| 248 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_TEST_UTIL_H_ | 249 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_TEST_UTIL_H_ |
| OLD | NEW |