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

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

Issue 1419033006: [Cronet] Make UrlResponseInfo constuctor public for testing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address nits Created 5 years, 2 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 | « no previous file | components/cronet/android/test/javatests/src/org/chromium/net/UrlResponseInfoTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet/android/api/src/org/chromium/net/UrlResponseInfo.java
diff --git a/components/cronet/android/api/src/org/chromium/net/UrlResponseInfo.java b/components/cronet/android/api/src/org/chromium/net/UrlResponseInfo.java
index d1f26b8948d3053f5895a444283b74b761b980a1..73e55ae4b02912d2bdaf50ca34b8a2617dacb890 100644
--- a/components/cronet/android/api/src/org/chromium/net/UrlResponseInfo.java
+++ b/components/cronet/android/api/src/org/chromium/net/UrlResponseInfo.java
@@ -76,7 +76,20 @@ public final class UrlResponseInfo {
}
}
- UrlResponseInfo(List<String> urlChain, int httpStatusCode, String httpStatusText,
+ /**
+ * Creates a {@link UrlResponseInfo} object. Provided to facilitate testing.
+ *
+ * @param urlChain the URL chain. The first entry is the originally requested URL;
+ * the following entries are redirects followed.
+ * @param httpStatusCode the HTTP status code.
+ * @param httpStatusText the HTTP status text of the status line.
+ * @param allHeadersList list of response header field and value pairs.
+ * @param wasCached {@code true} if the response came from the cache, {@code false}
+ * otherwise.
+ * @param negotiatedProtocol the protocol negotiated with the server.
+ * @param proxyServer the proxy server that was used for the request.
+ */
+ public UrlResponseInfo(List<String> urlChain, int httpStatusCode, String httpStatusText,
List<Map.Entry<String, String>> allHeadersList, boolean wasCached,
String negotiatedProtocol, String proxyServer) {
mResponseInfoUrlChain = Collections.unmodifiableList(urlChain);
@@ -99,7 +112,7 @@ public final class UrlResponseInfo {
}
/**
- * Returns the URL chain. The first entry is the origianlly requested URL;
+ * Returns the URL chain. The first entry is the originally requested URL;
* the following entries are redirects followed.
* @return the URL chain.
*/
« no previous file with comments | « no previous file | components/cronet/android/test/javatests/src/org/chromium/net/UrlResponseInfoTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698