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 80f2df81ea9d5b9e833995eeee3a9fa67969ffef..748f9fb0d5a772632e0fb597b247e9a6425a4ac4 100644 |
| --- a/components/cronet/android/java/src/org/chromium/net/UrlRequestContext.java |
| +++ b/components/cronet/android/java/src/org/chromium/net/UrlRequestContext.java |
| @@ -20,12 +20,10 @@ public abstract class UrlRequestContext { |
| "org.chromium.net.CronetUrlRequestContext"; |
| /** |
| - * Creates an UrlRequest object. All UrlRequest functions must |
| - * be called on the Executor's thread, and all callbacks will be called |
| - * on the Executor's thread as well. Executor must not run tasks on the |
| + * Creates a {@link org.chromium.net.UrlRequest} object. All callbacks will |
| + * be called on the Executor's thread. Executor must not run tasks on the |
| * current thread to prevent network jank and exception during shutdown. |
| * |
| - * createRequest itself may be called on any thread. |
| * @param url URL for the request. |
| * @param listener Callback interface that gets called on different events. |
| * @param executor Executor on which all callbacks will be called. |
| @@ -35,6 +33,21 @@ public abstract class UrlRequestContext { |
| UrlRequestListener listener, Executor executor); |
| /** |
| + * Creates a {@link org.chromium.net.UrlRequest} object. All callbacks will |
|
xunjieli
2015/06/05 15:29:50
nit: I think if we are refering to the class in th
mkirsche
2015/06/05 15:43:55
Done.
|
| + * be called on the Executor's thread. Executor must not run tasks on the |
| + * current thread to prevent network jank and exception during shutdown. |
| + * |
| + * @param url URL for the request. |
| + * @param listener Callback interface that gets called on different events. |
| + * @param executor Executor on which all callbacks will be called. |
| + * @param priority Priority of the request which should be one of the |
| + REQUEST_PRIORITY_* values in UrlRequest.java |
|
xunjieli
2015/06/05 15:29:50
nit: Use "{@link UrlRequest}"
mkirsche
2015/06/05 15:43:55
Done.
|
| + * @return new request. |
| + */ |
| + public abstract UrlRequest createRequest(String url, |
| + UrlRequestListener listener, Executor executor, int priority); |
| + |
| + /** |
| * @return true if the context is enabled. |
| */ |
| public abstract boolean isEnabled(); |