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

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

Issue 945843003: [Cronet] Do not call into native adapter after it is destroyed in ChromiumUrlRequest.java (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: check getAllHeaders() throw exception Created 5 years, 9 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.net; 5 package org.chromium.net;
6 6
7 import java.io.IOException; 7 import java.io.IOException;
8 import java.nio.ByteBuffer; 8 import java.nio.ByteBuffer;
9 import java.nio.channels.ReadableByteChannel; 9 import java.nio.channels.ReadableByteChannel;
10 import java.util.List; 10 import java.util.List;
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 /** 137 /**
138 * Returns the HTTP status code. It may be 0 if the request has not started 138 * Returns the HTTP status code. It may be 0 if the request has not started
139 * or failed before getting the status code from the server. If the status 139 * or failed before getting the status code from the server. If the status
140 * code is 206 (partial response) after {@link #setOffset} is called, the 140 * code is 206 (partial response) after {@link #setOffset} is called, the
141 * method returns 200. 141 * method returns 200.
142 */ 142 */
143 int getHttpStatusCode(); 143 int getHttpStatusCode();
144 144
145 /** 145 /**
146 * Returns the HTTP status text of the status line. For example, if the 146 * Returns the HTTP status text of the status line. For example, if the
147 * request has a "HTTP/1.1 200 OK" response, this method returns "OK". 147 * request has a "HTTP/1.1 200 OK" response, this method returns "OK". It
148 * returns null if the request has not started.
148 */ 149 */
149 String getHttpStatusText(); 150 String getHttpStatusText();
150 151
151 /** 152 /**
152 * Returns the response header value for the given name or {@code null} if 153 * Returns the response header value for the given name or {@code null} if
153 * not found. 154 * not found.
154 */ 155 */
155 String getHeader(String name); 156 String getHeader(String name);
156 157
157 /** 158 /**
158 * Returns an unmodifiable map of the response-header fields and values. 159 * Returns an unmodifiable map of the response-header fields and values.
159 * The null key is mapped to the HTTP status line for compatibility with 160 * The null key is mapped to the HTTP status line for compatibility with
160 * HttpUrlConnection. 161 * HttpUrlConnection.
161 */ 162 */
162 Map<String, List<String>> getAllHeaders(); 163 Map<String, List<String>> getAllHeaders();
163 164
164 /** 165 /**
165 * Returns the exception that occurred while executing the request of null 166 * Returns the exception that occurred while executing the request of null
166 * if the request was successful. 167 * if the request was successful.
167 */ 168 */
168 IOException getException(); 169 IOException getException();
169 } 170 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698