Chromium Code Reviews| Index: components/cronet/android/java/src/org/chromium/net/UrlRequestContext.java |
| diff --git a/components/cronet/android/java/src/org/chromium/net/UrlRequestContext.java b/components/cronet/android/java/src/org/chromium/net/UrlRequestContext.java |
| index 3ed4106847cd8b989a84a32d38267655d98f8c2b..b4332c1694d20c59a02446cce66f015393c0ce91 100644 |
| --- a/components/cronet/android/java/src/org/chromium/net/UrlRequestContext.java |
| +++ b/components/cronet/android/java/src/org/chromium/net/UrlRequestContext.java |
| @@ -94,6 +94,53 @@ public abstract class UrlRequestContext { |
| public abstract void stopNetLog(); |
| /** |
| + * Enables the network quality estimator. This must be called before round |
|
pauljensen
2015/09/18 16:07:52
Please provide a verbose description of what the N
bengr
2015/09/18 23:13:42
Done.
|
| + * trip time and throughput observers are added. |
|
pauljensen
2015/09/18 16:07:52
include @link's to specific methods to add observe
bengr
2015/09/18 23:13:42
Done.
|
| + * @param executor An executor on which all observers will be called. |
|
pauljensen
2015/09/18 16:07:52
"all observers" is a too broad, please clarify.
bengr
2015/09/18 23:13:42
Done.
|
| + */ |
| + public abstract void enableNetworkQualityEstimator(Executor executor); |
| + |
| + /** |
| + * Enables the network quality estimator for testing. This must be called |
| + * before round trip time and throughput observers are added. Set both |
| + * boolean parameters to false for default behavior. |
| + * @param useLocalHostRequests Include requests to localhost in estimates. |
|
pauljensen
2015/09/18 16:07:52
all your param descriptions are capitalized. This
bengr
2015/09/18 23:13:42
Ah. Thanks. Done.
|
| + * @param useSmallerResponses Include small responses in throughput estimates. |
| + * @param executor An executor on which all observers will be called. |
|
pauljensen
2015/09/18 16:07:52
@link Executor
bengr
2015/09/18 23:13:42
Done.
|
| + */ |
| + abstract void enableNetworkQualityEstimator( |
| + boolean useLocalHostRequests, boolean useSmallerResponses, Executor executor); |
| + |
| + /** |
| + * Adds an observer of round trip time observations. This must be called |
|
pauljensen
2015/09/18 16:07:52
we need to clarify what round trip times we're tal
pauljensen
2015/09/18 16:07:52
This first sentence is mostly redundant with the n
bengr
2015/09/18 23:13:42
Done.
bengr
2015/09/18 23:13:42
Done.
|
| + * after {@link #enableNetworkQualityEstimator}. |
| + * @param observer The observer of round trip times. |
|
pauljensen
2015/09/18 16:07:52
need to mention the Executor that this is called b
bengr
2015/09/18 23:13:42
Done.
|
| + */ |
| + public abstract void addRttObserver(NetworkQualityRttObserver observer); |
| + |
| + /** |
| + * Removes an observer of round trip times if on the observer list. This |
| + * should be called after an RttObserver is added in order to stop |
| + * receiving observations. |
| + * @param observer The observer of round trip times. |
| + */ |
| + public abstract void removeRttObserver(NetworkQualityRttObserver observer); |
| + |
| + /** |
| + * Adds an observer of throughout. This must be called after |
|
pauljensen
2015/09/18 16:07:52
need to clarify what "throughput" we're talking ab
bengr
2015/09/18 23:13:42
Done.
|
| + * {@link #enableNetworkQualityEstimator}. |
| + * @param observer The observer of throughput. |
| + */ |
| + public abstract void addThroughputObserver(NetworkQualityThroughputObserver observer); |
| + |
| + /** |
| + * Removes an observer of throughput. This should be called after a |
| + * ThroughputObserver is added in order to stop receiving observations. |
| + * @param observer The observer of throughput. |
| + */ |
| + public abstract void removeThroughputObserver(NetworkQualityThroughputObserver observer); |
| + |
| + /** |
| * Creates a {@link UrlRequestContext} with the given |
| * {@link UrlRequestContextConfig}. |
| * @param context Android {@link Context}. |