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

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

Issue 520093002: Initial declaration of Cronet Async API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments, add to cronet.gyp 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.net;
6
7 import java.net.URL;
8 import java.util.List;
9 import java.util.Map;
10
11 /**
12 * I'm sure I've left out a lot of things we may want here,
13 * this list is not intended to be complete, though comments are welcome.
mmenke 2014/09/03 21:19:20 Should clean up these comments. Maybe something l
mef 2014/09/03 21:55:39 Done.
14 */
15 public abstract interface ResponseInfo {
16 /**
17 * Return the url the response is for (Not the original URL - after
18 * redirects, it's the new URL).
19 */
20 URL getUrl();
21
22 /**
23 *
24 * @return the url chain, including all redirects. The originally
25 * requested URL is first.
26 */
27 URL[] getUrlChain();
28
29 /**
30 * Returns the HTTP status code.
31 */
32 int getHttpStatusCode();
33
34 /**
35 * Returns an unmodifiable map of the response-header fields and values.
36 * The null key is mapped to the HTTP status line for compatibility with
37 * HttpUrlConnection.
38 */
39 Map<String, List<String>> getAllHeaders();
40
41 /** True if the response came from the cache. Requests that were
42 * revalidated over the network before being retrieved from the cache are
43 * considered cached.
44 */
mmenke 2014/09/03 21:19:20 nit: Fix indent.
mef 2014/09/03 21:55:39 Done.
45 boolean wasCached();
46
47 /**
48 *
49 * @return
50 */
51 boolean wasFetchedOverSPDY();
52
53 /**
54 *
55 * @return
56 */
57 boolean wasFetchedOverQUIC();
58 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698