Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Side by Side Diff: net/nqe/network_quality_estimator_test_util.h

Issue 2643213003: NQE: Add net log events when there is a significant change in metrics (Closed)
Patch Set: ryansturm comments Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/nqe/network_quality_estimator.cc ('k') | net/nqe/network_quality_estimator_test_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 const std::vector<base::TimeDelta>& GetAccuracyRecordingIntervals() 174 const std::vector<base::TimeDelta>& GetAccuracyRecordingIntervals()
175 const override; 175 const override;
176 176
177 void set_rand_double(double rand_double) { rand_double_ = rand_double; } 177 void set_rand_double(double rand_double) { rand_double_ = rand_double; }
178 178
179 double RandDouble() const override; 179 double RandDouble() const override;
180 180
181 // Returns the number of entries in |net_log_| that have type set to |type|. 181 // Returns the number of entries in |net_log_| that have type set to |type|.
182 int GetEntriesCount(NetLogEventType type) const; 182 int GetEntriesCount(NetLogEventType type) const;
183 183
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
186 // values of different types.
187 std::string GetNetLogLastStringValue(NetLogEventType type,
188 const std::string& key) const;
189 int GetNetLogLastIntegerValue(NetLogEventType type,
190 const std::string& key) const;
191
184 using NetworkQualityEstimator::SetTickClockForTesting; 192 using NetworkQualityEstimator::SetTickClockForTesting;
185 using NetworkQualityEstimator::OnConnectionTypeChanged; 193 using NetworkQualityEstimator::OnConnectionTypeChanged;
186 194
187 private: 195 private:
188 class LocalHttpTestServer : public EmbeddedTestServer { 196 class LocalHttpTestServer : public EmbeddedTestServer {
189 public: 197 public:
190 explicit LocalHttpTestServer(const base::FilePath& document_root); 198 explicit LocalHttpTestServer(const base::FilePath& document_root);
191 }; 199 };
192 200
193 // NetworkQualityEstimator implementation that returns the overridden 201 // NetworkQualityEstimator implementation that returns the overridden
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 239
232 // Net log provided to network quality estimator. 240 // Net log provided to network quality estimator.
233 std::unique_ptr<net::BoundTestNetLog> net_log_; 241 std::unique_ptr<net::BoundTestNetLog> net_log_;
234 242
235 DISALLOW_COPY_AND_ASSIGN(TestNetworkQualityEstimator); 243 DISALLOW_COPY_AND_ASSIGN(TestNetworkQualityEstimator);
236 }; 244 };
237 245
238 } // namespace net 246 } // namespace net
239 247
240 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_TEST_UTIL_H_ 248 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « net/nqe/network_quality_estimator.cc ('k') | net/nqe/network_quality_estimator_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698