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

Unified Diff: net/nqe/network_quality_estimator.h

Issue 2045703003: Enable NQE when Cronet Engine is built (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed 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
« no previous file with comments | « components/cronet/url_request_context_config_unittest.cc ('k') | net/nqe/network_quality_estimator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/nqe/network_quality_estimator.h
diff --git a/net/nqe/network_quality_estimator.h b/net/nqe/network_quality_estimator.h
index 576484299f603e75492e43b431c772b5564134ca..c13ae601061a48b6c536a81b12f53ba7cc71ba39 100644
--- a/net/nqe/network_quality_estimator.h
+++ b/net/nqe/network_quality_estimator.h
@@ -269,6 +269,16 @@ class NET_EXPORT_PRIVATE NetworkQualityEstimator
static EffectiveConnectionType GetEffectiveConnectionTypeForName(
const std::string& connection_type_name);
+ // |use_localhost_requests| 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_localhost_requests);
+
+ // |use_smaller_responses_for_tests| should only be true when testing.
+ // Allows the responses smaller than |kMinTransferSizeInBits| to be used for
+ // network quality estimation.
+ void SetUseSmallResponsesForTesting(bool use_small_responses);
+
protected:
// NetworkID is used to uniquely identify a network.
// For the purpose of network quality estimation and caching, a network is
@@ -494,12 +504,12 @@ class NET_EXPORT_PRIVATE NetworkQualityEstimator
// 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_;
+ bool use_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 use_small_responses_;
+ bool use_small_responses_;
// The factor by which the weight of an observation reduces every second.
const double weight_multiplier_per_second_;
« no previous file with comments | « components/cronet/url_request_context_config_unittest.cc ('k') | net/nqe/network_quality_estimator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698