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

Unified Diff: net/base/network_quality_estimator.h

Issue 1162293004: Use request start time for estimating network quality. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More fixes to flaky tests Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/base/network_quality_estimator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/network_quality_estimator.h
diff --git a/net/base/network_quality_estimator.h b/net/base/network_quality_estimator.h
index 824bf4d6a448cc7cbf963e4c0008ee74e7fdbbc1..6f3a4674cfcf3509d3b0004eac010fcb5988f4ee 100644
--- a/net/base/network_quality_estimator.h
+++ b/net/base/network_quality_estimator.h
@@ -114,7 +114,12 @@ class NET_EXPORT_PRIVATE NetworkQualityEstimator
// |allow_local_host_requests_for_tests| should only be true when testing
// against local HTTP server and allows the requests to local host to be
// used for network quality estimation.
- explicit NetworkQualityEstimator(bool allow_local_host_requests_for_tests);
+ // |allow_smaller_responses_for_tests| should only be true when testing
+ // against local HTTP server and allows the responses smaller than
+ // |kMinTransferSizeInBytes| or shorter than |kMinRequestDurationMicroseconds|
+ // to be used for network quality estimation.
+ NetworkQualityEstimator(bool allow_local_host_requests_for_tests,
+ bool allow_smaller_responses_for_tests);
// Returns the maximum size of the observation buffer.
// Used for testing.
@@ -132,6 +137,11 @@ class NET_EXPORT_PRIVATE NetworkQualityEstimator
// network quality. Set to true only for tests.
const bool allow_localhost_requests_;
+ // Determines if the responses smaller than |kMinTransferSizeInBytes|
+ // or shorter than |kMinTransferSizeInBytes| can be used in estimating the
+ // network quality. Set to true only for tests.
+ const bool allow_small_responses_;
+
// Time when last connection change was observed.
base::TimeTicks last_connection_change_;
« no previous file with comments | « no previous file | net/base/network_quality_estimator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698