| Index: components/cronet/android/api/src/org/chromium/net/UrlRequestException.java
|
| diff --git a/components/cronet/android/api/src/org/chromium/net/UrlRequestException.java b/components/cronet/android/api/src/org/chromium/net/UrlRequestException.java
|
| index 92201aa32471128ce721a81cab80fbf8b061f73b..10d8a9ca574842f8cb4323a91e72d376e8115ca0 100644
|
| --- a/components/cronet/android/api/src/org/chromium/net/UrlRequestException.java
|
| +++ b/components/cronet/android/api/src/org/chromium/net/UrlRequestException.java
|
| @@ -73,6 +73,8 @@ public class UrlRequestException extends IOException {
|
| private final int mErrorCode;
|
| // Cronet internal error code.
|
| private final int mCronetInternalErrorCode;
|
| + // Cronet internal error details.
|
| + private final int mCronetInternalErrorDetails;
|
|
|
| /**
|
| * Constructs an exception with a specific error.
|
| @@ -82,11 +84,17 @@ public class UrlRequestException extends IOException {
|
| * @param cronetInternalErrorCode Cronet internal error code, one of
|
| * <a href=https://chromium.googlesource.com/chromium/src/+/master/net/base/net_error_list.h>
|
| * these</a>.
|
| + * @param cronetInternalErrorDetails Cronet internal error code details when the error code
|
| + * is QUIC_PROTOCOL_ERROR, from
|
| + * <a href=https://chromium.googlesource.com/chromium/src/+/master/net/quic/quic_protocol.h#503>
|
| + * this file</a>.
|
| */
|
| - public UrlRequestException(String message, int errorCode, int cronetInternalErrorCode) {
|
| + public UrlRequestException(String message, int errorCode, int cronetInternalErrorCode,
|
| + int cronetInternalErrorDetails) {
|
| super(message, null);
|
| mErrorCode = errorCode;
|
| mCronetInternalErrorCode = cronetInternalErrorCode;
|
| + mCronetInternalErrorDetails = cronetInternalErrorDetails;
|
| }
|
|
|
| /**
|
| @@ -99,6 +107,7 @@ public class UrlRequestException extends IOException {
|
| super(message, cause);
|
| mErrorCode = ERROR_LISTENER_EXCEPTION_THROWN;
|
| mCronetInternalErrorCode = 0;
|
| + mCronetInternalErrorDetails = 0;
|
| }
|
|
|
| /**
|
| @@ -124,6 +133,17 @@ public class UrlRequestException extends IOException {
|
| }
|
|
|
| /**
|
| + * Returns detailed information related to the Cronet internal error code. Currently this is a
|
| + * code from
|
| + * <a href=https://chromium.googlesource.com/chromium/src/+/master/net/quic/quic_protocol.h>
|
| + * QuicErrorCode</a> and is only meaningful if the Cronet internal error code is
|
| + * QUIC_PROTOCOL_ERROR.
|
| + */
|
| + public int getCronetInternalErrorDetails() {
|
| + return mCronetInternalErrorDetails;
|
| + }
|
| +
|
| + /**
|
| * Returns {@code true} if retrying this request right away might succeed, {@code false}
|
| * otherwise. For example returns {@code true} when {@link #getErrorCode} returns
|
| * {@link #ERROR_NETWORK_CHANGED} because trying the request might succeed using the new
|
|
|