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

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

Issue 268353013: Upstream changes to HttpUrlRequest for querying response headers and closing ReadableByteChannel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comment. Created 6 years, 7 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
Index: components/cronet/android/java/src/org/chromium/net/HttpUrlRequest.java
diff --git a/components/cronet/android/java/src/org/chromium/net/HttpUrlRequest.java b/components/cronet/android/java/src/org/chromium/net/HttpUrlRequest.java
index 71901a822c3bf316d418bd5fa503934338df587e..cefb95ea65cb9aa5f3daad34d40fdbe83d4bc88f 100644
--- a/components/cronet/android/java/src/org/chromium/net/HttpUrlRequest.java
+++ b/components/cronet/android/java/src/org/chromium/net/HttpUrlRequest.java
@@ -58,6 +58,9 @@ public interface HttpUrlRequest {
/**
* Sets a readable byte channel to upload as part of a POST request.
*
+ * <p>Once {@link #start()} is called, this channel is guaranteed to be
+ * closed, either when the upload completes, or when it is canceled.
+ *
* @param contentType MIME type of the post content or null if this is not a
* POST.
* @param channel The channel to read to read upload data from if this is a
@@ -113,6 +116,13 @@ public interface HttpUrlRequest {
int getHttpStatusCode();
/**
+ * Returns the response header value for the given name or {@code null} if
+ * not found.
+ */
+ String getHeader(String name);
+
+
+ /**
* Returns the exception that occurred while executing the request of null
* if the request was successful.
*/

Powered by Google App Engine
This is Rietveld 408576698