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

Unified Diff: net/nqe/throughput_analyzer.h

Issue 2045703003: Enable NQE when Cronet Engine is built (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mef comments Created 4 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
Index: net/nqe/throughput_analyzer.h
diff --git a/net/nqe/throughput_analyzer.h b/net/nqe/throughput_analyzer.h
index 649d76bb68d2fcfbb8e320a20e0a1f81beb70483..3ef78592b0c466fd97591611eb1583435c3ad300 100644
--- a/net/nqe/throughput_analyzer.h
+++ b/net/nqe/throughput_analyzer.h
@@ -70,6 +70,18 @@ class NET_EXPORT_PRIVATE ThroughputAnalyzer {
// Notifies |this| of a change in connection type.
void OnConnectionTypeChanged();
+ // |use_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.
+ void SetUseLocalHostRequestsForTesting(
+ bool use_local_host_requests_for_tests);
mef 2016/06/24 20:10:37 nit: drop '_for_tests' for consistency.
tbansal1 2016/06/24 22:41:39 Done.
+
+ // |use_smaller_responses_for_tests| should only be true when testing, and
+ // allows the responses smaller than |kMinTransferSizeInBits| or shorter than
+ // |kMinRequestDurationMicroseconds| to be used for network quality
+ // estimation.
+ void SetUseSmallResponsesForTesting(bool use_small_responses);
+
protected:
// Exposed for testing.
bool disable_throughput_measurements() const {
@@ -155,12 +167,12 @@ class NET_EXPORT_PRIVATE ThroughputAnalyzer {
// Determines if the requests to local host can be used in estimating the
// network quality. Set to true only for tests.
- const bool use_localhost_requests_for_tests_;
+ bool use_localhost_requests_for_tests_;
// Determines if the responses smaller than |kMinTransferSizeInBits|
// or shorter than |kMinTransferSizeInBits| can be used in estimating the
// network quality. Set to true only for tests.
- const bool use_small_responses_for_tests_;
+ bool use_small_responses_for_tests_;
base::ThreadChecker thread_checker_;

Powered by Google App Engine
This is Rietveld 408576698