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

Unified Diff: components/cronet/android/cronet_url_request_context_adapter.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
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 19be851659a788b3e1c05883ba25d2ad88865dff..49c2c76fb78eb9e93cc56af87c41c2ed1be47135 100644
--- a/components/cronet/android/cronet_url_request_context_adapter.h
+++ b/components/cronet/android/cronet_url_request_context_adapter.h
@@ -93,11 +93,17 @@ 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.
+ // Enables the network quality estimator.
+ // TODO(tbansal): http://crbug.com/618034 Remove this API.
void EnableNetworkQualityEstimator(
JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& jcaller);
+
+ // 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);
@@ -130,11 +136,14 @@ 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(
+ // Instantiate and configure the network quality estimator.
+ // TODO(tbansal): http://crbug.com/618034 Remove this API.
+ void EnableNetworkQualityEstimatorOnNetworkThread();
+
+ // Configures the network quality estimator to observe requests to localhost,
+ // as well as to use smaller responses when estimating throughput. This
+ // should only be used for testing.
+ void ConfigureNetworkQualityEstimatorOnNetworkThreadForTesting(
bool use_local_host_requests,
bool use_smaller_responses);

Powered by Google App Engine
This is Rietveld 408576698