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

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

Issue 586143002: Initial implementation of Cronet Async API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make UrlRequestFactory into a class that can create factories. Created 6 years, 3 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/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..a61ca9668ab9b5911f759b76890b36bb973a4a82 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,19 +11,19 @@ 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).
*/
- 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.
@@ -45,14 +44,15 @@ public abstract interface ResponseInfo {
boolean wasCached();
/**
- *
- * @return
+ * Returns 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.
*/
- boolean wasFetchedOverSPDY();
+ String getNegotiatedProtocol();
/**
- *
- * @return
+ * Returns the total amount of data received from network after SSL
+ * decoding and proxy handling if available.
*/
- boolean wasFetchedOverQUIC();
+ long getTotalReceivedBytes();
Charles 2014/09/26 22:52:26 Does this include uploaded bytes? I think getTotal
mef 2014/09/29 17:57:37 Judging by the name it is just number of received
};

Powered by Google App Engine
This is Rietveld 408576698