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

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

Issue 1159343003: Expose Cronet Url requests with priorities. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added period Created 5 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
« no previous file with comments | « components/cronet/android/java/src/org/chromium/net/CronetUrlRequestContext.java ('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/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..3394269c9b3d3eb0463e1bdb517dcadf6a9de049 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 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 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.
+ *
+ * @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 {@link UrlRequest}.
+ * @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();
« no previous file with comments | « components/cronet/android/java/src/org/chromium/net/CronetUrlRequestContext.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698