| Index: components/cronet/android/api/src/org/chromium/net/CronetEngine.java
|
| diff --git a/components/cronet/android/api/src/org/chromium/net/CronetEngine.java b/components/cronet/android/api/src/org/chromium/net/CronetEngine.java
|
| index e386b670818795ac45ad4087aafae7d93410e0ff..ee84537b78418585dac8debb87b37ff6d6837d89 100644
|
| --- a/components/cronet/android/api/src/org/chromium/net/CronetEngine.java
|
| +++ b/components/cronet/android/api/src/org/chromium/net/CronetEngine.java
|
| @@ -780,6 +780,12 @@ public abstract class CronetEngine {
|
| }
|
| }
|
|
|
| + /**
|
| + * Value used for RTT and throughput estimates if a valid value is unavailable.
|
| + */
|
| + public static final int INVALID_RTT_THROUGHPUT =
|
| + RttThroughputValues.INVALID_RTT_THROUGHPUT_VALUE;
|
| +
|
| private static final String TAG = "UrlRequestFactory";
|
| private static final String CRONET_URL_REQUEST_CONTEXT =
|
| "org.chromium.net.impl.CronetUrlRequestContext";
|
| @@ -993,6 +999,39 @@ public abstract class CronetEngine {
|
| public abstract int getEffectiveConnectionType();
|
|
|
| /**
|
| + * Returns the HTTP RTT estimate (in milliseconds) computed by the network
|
| + * quality estimator. Set to {@link INVALID_RTT_THROUGHPUT} if a valid value
|
| + * is unavailable. This must be called after
|
| + * {@link #enableNetworkQualityEstimator}, and will throw an
|
| + * exception otherwise.
|
| + * @hide as it's a prototype.
|
| + * @return Estimate of the HTTP RTT in milliseconds.
|
| + */
|
| + public abstract int getHttpRttMs();
|
| +
|
| + /**
|
| + * Returns the transport RTT estimate (in milliseconds) computed by the
|
| + * network quality estimator. Set to {@link INVALID_RTT_THROUGHPUT} if a
|
| + * valid value is unavailable. This must be called after
|
| + * {@link #enableNetworkQualityEstimator}, and will throw an
|
| + * exception otherwise.
|
| + * @hide as it's a prototype.
|
| + * @return Estimate of the transport RTT in milliseconds.
|
| + */
|
| + public abstract int getTransportRttMs();
|
| +
|
| + /**
|
| + * Returns the downstream throughput estimate (in kilobits per second)
|
| + * computed by the network quality estimator. Set to
|
| + * {@link INVALID_RTT_THROUGHPUT} if a valid value is unavailable. This
|
| + * must be called after {@link #enableNetworkQualityEstimator}, and will
|
| + * throw an exception otherwise.
|
| + * @hide as it's a prototype.
|
| + * @return Estimate of the downstream throughput in kilobits per second.
|
| + */
|
| + public abstract int getDownstreamThroughputKbps();
|
| +
|
| + /**
|
| * Configures the network quality estimator for testing. This must be called
|
| * before round trip time and throughput listeners are added, and after the
|
| * network quality estimator has been enabled.
|
|
|