| Index: components/cronet/android/cronet_url_request_context_adapter.h
|
| diff --git a/components/cronet/android/cronet_url_request_context_adapter.h b/components/cronet/android/cronet_url_request_context_adapter.h
|
| index f76b097bb94face9a9bfe6cbbaf82b6444943d05..8d8be4607abd9be2d82c60bf4164e3ff45e55082 100644
|
| --- a/components/cronet/android/cronet_url_request_context_adapter.h
|
| +++ b/components/cronet/android/cronet_url_request_context_adapter.h
|
| @@ -90,15 +90,21 @@ class CronetURLRequestContextAdapter
|
| // Called on main Java thread to initialize URLRequestContext.
|
| void InitRequestContextOnMainThread();
|
|
|
| - // Enables the network quality estimator and optionally configures it to
|
| - // observe localhost requests, and to consider smaller responses when
|
| - // observing throughput. It is recommended that both options be set to false.
|
| - void EnableNetworkQualityEstimator(
|
| + // Configures the network quality estimator to observe localhost requests, and
|
| + // to consider smaller responses when observing throughput for testing. This
|
| + // should be called after the network quality estimator has been enabled.
|
| + void ConfigureNetworkQualityEstimatorForTesting(
|
| JNIEnv* env,
|
| const base::android::JavaParamRef<jobject>& jcaller,
|
| jboolean use_local_host_requests,
|
| jboolean use_smaller_responses);
|
|
|
| + // Enables the network quality estimator.
|
| + // TODO(tbansal): http://crbug.com/618034 Remove this API.
|
| + void EnableNetworkQualityEstimator(
|
| + JNIEnv* env,
|
| + const base::android::JavaParamRef<jobject>& jcaller);
|
| +
|
| // Request that RTT and/or throughput observations should or should not be
|
| // provided by the network quality estimator.
|
| void ProvideRTTObservations(
|
| @@ -132,14 +138,16 @@ class CronetURLRequestContextAdapter
|
| // Gets the file thread. Create one if there is none.
|
| base::Thread* GetFileThread();
|
|
|
| - // Instantiate and configure the network quality estimator. For default
|
| - // behavior, parameters should be set to false; otherwise the estimator
|
| - // can be configured to observe requests to localhost, as well as to use
|
| - // observe smaller responses when estimating throughput.
|
| - void EnableNetworkQualityEstimatorOnNetworkThread(
|
| + // Configure the network quality estimator to observe requests to localhost,
|
| + // as well as to use smaller responses when estimating throughput.
|
| + void ConfigureNetworkQualityEstimatorOnNetworkThreadForTesting(
|
| bool use_local_host_requests,
|
| bool use_smaller_responses);
|
|
|
| + // Instantiate and configure the network quality estimator.
|
| + // TODO(tbansal): http://crbug.com/618034 Remove this API.
|
| + void EnableNetworkQualityEstimatorOnNetworkThread();
|
| +
|
| void ProvideRTTObservationsOnNetworkThread(bool should);
|
| void ProvideThroughputObservationsOnNetworkThread(bool should);
|
|
|
|
|