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

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

Issue 1393713005: [Cronet] Add error code and immediatelyRetryable() to UrlRequestException (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix missing test annotation Created 4 years, 10 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 android.support.annotation.IntDef; 7 import android.support.annotation.IntDef;
8 8
9 import java.lang.annotation.Retention; 9 import java.lang.annotation.Retention;
10 import java.lang.annotation.RetentionPolicy; 10 import java.lang.annotation.RetentionPolicy;
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 * methods will be invoked. 254 * methods will be invoked.
255 * 255 *
256 * @param stream the stream which is closed successfully 256 * @param stream the stream which is closed successfully
257 * @param info the response information 257 * @param info the response information
258 */ 258 */
259 public abstract void onSucceeded(BidirectionalStream stream, UrlResponse Info info); 259 public abstract void onSucceeded(BidirectionalStream stream, UrlResponse Info info);
260 260
261 /** 261 /**
262 * Invoked if the stream failed for any reason after {@link Bidirectiona lStream#start}. 262 * Invoked if the stream failed for any reason after {@link Bidirectiona lStream#start}.
263 * <a href="https://tools.ietf.org/html/rfc7540#section-7">HTTP/2 error codes</a> are 263 * <a href="https://tools.ietf.org/html/rfc7540#section-7">HTTP/2 error codes</a> are
264 * mapped to {@link CronetException#netError} codes. Once invoked, no fu rther 264 * mapped to {@link UrlRequestException#getCronetInternalErrorCode} code s. Once invoked,
265 * {@link BidirectionalStream.Callback} methods will be invoked. 265 * no further {@link BidirectionalStream.Callback} methods will be invok ed.
266 * 266 *
267 * @param stream the stream which has failed 267 * @param stream the stream which has failed
268 * @param info the response information. May be {@code null} if no respo nse was 268 * @param info the response information. May be {@code null} if no respo nse was
269 * received. 269 * received.
270 * @param error information about the failure 270 * @param error information about the failure
271 */ 271 */
272 public abstract void onFailed( 272 public abstract void onFailed(
273 BidirectionalStream stream, UrlResponseInfo info, CronetExceptio n error); 273 BidirectionalStream stream, UrlResponseInfo info, CronetExceptio n error);
274 274
275 /** 275 /**
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 /** 398 /**
399 * Returns {@code true} if the stream was successfully started and is now 399 * Returns {@code true} if the stream was successfully started and is now
400 * done (succeeded, canceled, or failed). 400 * done (succeeded, canceled, or failed).
401 * 401 *
402 * @return {@code true} if the stream was successfully started and is now 402 * @return {@code true} if the stream was successfully started and is now
403 * done (completed, canceled, or failed), otherwise returns {@code f alse} 403 * done (completed, canceled, or failed), otherwise returns {@code f alse}
404 * to indicate stream is not yet started or is in progress. 404 * to indicate stream is not yet started or is in progress.
405 */ 405 */
406 public abstract boolean isDone(); 406 public abstract boolean isDone();
407 } 407 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698