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

Unified Diff: components/cronet/android/java/src/org/chromium/net/impl/CronetUrlRequestContext.java

Issue 2188553002: Delete old NetworkQualityEstimator Cronet API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metrics-executor
Patch Set: rebase again. ugh. Created 4 years, 5 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/android/cronet_url_request_context_adapter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet/android/java/src/org/chromium/net/impl/CronetUrlRequestContext.java
diff --git a/components/cronet/android/java/src/org/chromium/net/impl/CronetUrlRequestContext.java b/components/cronet/android/java/src/org/chromium/net/impl/CronetUrlRequestContext.java
index 50b02275104a449126ea04d188265ecee621242c..c0aa6e54dfd0b5427aa34a52ba13d15d80943cad 100644
--- a/components/cronet/android/java/src/org/chromium/net/impl/CronetUrlRequestContext.java
+++ b/components/cronet/android/java/src/org/chromium/net/impl/CronetUrlRequestContext.java
@@ -63,7 +63,6 @@ public class CronetUrlRequestContext extends CronetEngine {
private long mUrlRequestContextAdapter = 0;
private Thread mNetworkThread;
- private Executor mNetworkQualityExecutor;
private boolean mNetworkQualityEstimatorEnabled;
/**
@@ -261,46 +260,6 @@ public class CronetUrlRequestContext extends CronetEngine {
return nativeGetHistogramDeltas();
}
- /**
- * TODO(tbansal): http://crbug.com/618034 Remove this API once all
- * embedders have switched to using a request finished listener that
- * provides its own executor.
- */
- @Override
- public void setRequestFinishedListenerExecutor(Executor executor) {
- if (!mNetworkQualityEstimatorEnabled) {
- throw new IllegalStateException("Network quality estimator not enabled");
- }
- if (executor == null) {
- throw new NullPointerException("Request finished listener requires an executor");
- }
- if (mNetworkQualityExecutor != null) {
- throw new NullPointerException("Request finished listener executor already set");
- }
- mNetworkQualityExecutor = executor;
- }
-
- /**
- * TODO(tbansal): http://crbug.com/618034 Remove this API once all
- * embedders have switched to using CronetEngine builder for enabling
- * network quality estimator.
- */
- @Override
- public void enableNetworkQualityEstimator(Executor executor) {
- if (mNetworkQualityEstimatorEnabled) {
- throw new IllegalStateException("Network quality estimator already enabled");
- }
- mNetworkQualityEstimatorEnabled = true;
- if (executor == null) {
- throw new NullPointerException("Network quality estimator requires an executor");
- }
- mNetworkQualityExecutor = executor;
- synchronized (mLock) {
- checkHaveAdapter();
- nativeEnableNetworkQualityEstimator(mUrlRequestContextAdapter);
- }
- }
-
@VisibleForTesting
@Override
public void configureNetworkQualityEstimatorForTesting(
@@ -379,11 +338,6 @@ public class CronetUrlRequestContext extends CronetEngine {
}
}
- /**
- * TODO(tbansal): http://crbug.com/618034 Remove this API once all
- * embedders have switched to using a request finished listener that
- * provides its own executor.
- */
@Override
public void addRequestFinishedListener(RequestFinishedListener listener) {
synchronized (mFinishedListenerLock) {
@@ -391,9 +345,6 @@ public class CronetUrlRequestContext extends CronetEngine {
}
}
- /**
- * TODO(tbansal): http://crbug.com/618034 Remove this API.
- */
@Override
public void removeRequestFinishedListener(RequestFinishedListener listener) {
synchronized (mFinishedListenerLock) {
@@ -592,9 +543,6 @@ public class CronetUrlRequestContext extends CronetEngine {
long nativePtr, boolean useLocalHostRequests, boolean useSmallerResponses);
@NativeClassQualifiedName("CronetURLRequestContextAdapter")
- private native void nativeEnableNetworkQualityEstimator(long nativePtr);
-
- @NativeClassQualifiedName("CronetURLRequestContextAdapter")
private native void nativeProvideRTTObservations(long nativePtr, boolean should);
@NativeClassQualifiedName("CronetURLRequestContextAdapter")
« no previous file with comments | « components/cronet/android/cronet_url_request_context_adapter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698