Chromium Code Reviews| Index: components/cronet/android/java/src/org/chromium/net/ResponseInfo.java |
| diff --git a/components/cronet/android/java/src/org/chromium/net/ResponseInfo.java b/components/cronet/android/java/src/org/chromium/net/ResponseInfo.java |
| index e6679d97ec2f80d0db38f0931e7324041cf9147e..2f9fb1030bb9e1a8936ea4fb1e01b05798d71aad 100644 |
| --- a/components/cronet/android/java/src/org/chromium/net/ResponseInfo.java |
| +++ b/components/cronet/android/java/src/org/chromium/net/ResponseInfo.java |
| @@ -4,7 +4,6 @@ |
| package org.chromium.net; |
| -import java.net.URL; |
| import java.util.List; |
| import java.util.Map; |
| @@ -12,47 +11,47 @@ import java.util.Map; |
| * Contains basic information about a response. Sent to the embedder whenever |
| * headers are received. |
| */ |
| -public abstract interface ResponseInfo { |
| +public interface ResponseInfo { |
| /** |
| - * Return the url the response is for (Not the original URL - after |
| - * redirects, it's the new URL). |
| + * @return the URL the response is for (Not the original URL - after |
| + * redirects, it's the new URL). Includes scheme, path, and query. |
| */ |
| - URL getUrl(); |
| + String getUrl(); |
| /** |
| * |
| * @return the url chain, including all redirects. The originally |
| * requested URL is first. |
| */ |
| - URL[] getUrlChain(); |
| + String[] getUrlChain(); |
| /** |
| - * Returns the HTTP status code. |
| + * @return the HTTP status code. |
| */ |
| int getHttpStatusCode(); |
| /** |
| - * Returns an unmodifiable map of the response-header fields and values. |
| + * @return an unmodifiable map of the response-header fields and values. |
| * The null key is mapped to the HTTP status line for compatibility with |
| * HttpUrlConnection. |
| */ |
| Map<String, List<String>> getAllHeaders(); |
| - /** True if the response came from the cache. Requests that were |
| + /** |
| + * @return True if the response came from the cache. Requests that were |
|
xunjieli
2014/10/23 14:04:33
nit: there are two spaces after "."
mef
2014/10/24 03:31:45
Done.
|
| * revalidated over the network before being retrieved from the cache are |
| - * considered cached. |
| + * considered cached. When a resource is retrieved from the cache |
| + * (Whether it was revalidated or not), getHttpStatusCode returns the |
| + * original status code. |
| */ |
| boolean wasCached(); |
| /** |
| - * |
| - * @return |
| - */ |
| - boolean wasFetchedOverSPDY(); |
| - |
| - /** |
| - * |
| - * @return |
| + * @return protocol (e.g. "quic/1+spdy/3") negotiated with server. Returns |
| + * empty string if no protocol was negotiated, or the protocol is not known. |
| + * Returns empty when using plain http or https. |
| + * TODO(mef): Figure out what this returns in the cached case, both with |
| + * and without a revalidation request. |
| */ |
| - boolean wasFetchedOverQUIC(); |
| + String getNegotiatedProtocol(); |
| }; |