| 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 int GetEntriesCount(NetLogEventType type) const; | 196 int GetEntriesCount(NetLogEventType type) const; |
| 197 | 197 |
| 198 // Returns the value of the parameter with name |key| from the last net log | 198 // Returns the value of the parameter with name |key| from the last net log |
| 199 // entry that has type set to |type|. Different methods are provided for | 199 // entry that has type set to |type|. Different methods are provided for |
| 200 // values of different types. | 200 // values of different types. |
| 201 std::string GetNetLogLastStringValue(NetLogEventType type, | 201 std::string GetNetLogLastStringValue(NetLogEventType type, |
| 202 const std::string& key) const; | 202 const std::string& key) const; |
| 203 int GetNetLogLastIntegerValue(NetLogEventType type, | 203 int GetNetLogLastIntegerValue(NetLogEventType type, |
| 204 const std::string& key) const; | 204 const std::string& key) const; |
| 205 | 205 |
| 206 // Notifies the registered observers that the network quality estimate has |
| 207 // changed to |network_quality|. |
| 208 void NotifyObserversOfRTTOrThroughputEstimatesComputed( |
| 209 const net::nqe::internal::NetworkQuality& network_quality); |
| 210 |
| 206 using NetworkQualityEstimator::SetTickClockForTesting; | 211 using NetworkQualityEstimator::SetTickClockForTesting; |
| 207 using NetworkQualityEstimator::OnConnectionTypeChanged; | 212 using NetworkQualityEstimator::OnConnectionTypeChanged; |
| 208 using NetworkQualityEstimator::OnUpdatedRTTAvailable; | 213 using NetworkQualityEstimator::OnUpdatedRTTAvailable; |
| 209 | 214 |
| 210 private: | 215 private: |
| 211 class LocalHttpTestServer : public EmbeddedTestServer { | 216 class LocalHttpTestServer : public EmbeddedTestServer { |
| 212 public: | 217 public: |
| 213 explicit LocalHttpTestServer(const base::FilePath& document_root); | 218 explicit LocalHttpTestServer(const base::FilePath& document_root); |
| 214 }; | 219 }; |
| 215 | 220 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 | 262 |
| 258 // Net log provided to network quality estimator. | 263 // Net log provided to network quality estimator. |
| 259 std::unique_ptr<net::BoundTestNetLog> net_log_; | 264 std::unique_ptr<net::BoundTestNetLog> net_log_; |
| 260 | 265 |
| 261 DISALLOW_COPY_AND_ASSIGN(TestNetworkQualityEstimator); | 266 DISALLOW_COPY_AND_ASSIGN(TestNetworkQualityEstimator); |
| 262 }; | 267 }; |
| 263 | 268 |
| 264 } // namespace net | 269 } // namespace net |
| 265 | 270 |
| 266 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_TEST_UTIL_H_ | 271 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_TEST_UTIL_H_ |
| OLD | NEW |