Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 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 #ifndef COMPONENTS_CRONET_ANDROID_URL_REQUEST_ERROR_H_ | |
| 6 #define COMPONENTS_CRONET_ANDROID_URL_REQUEST_ERROR_H_ | |
| 7 | |
| 8 namespace cronet { | |
| 9 | |
| 10 // Error codes for the most popular network stack error codes. | |
| 11 // For descriptions see corresponding constants in UrlRequestException.java. | |
| 12 // A Java counterpart will be generated for this enum. | |
| 13 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.net | |
| 14 enum UrlRequestError { | |
|
xunjieli
2016/04/23 10:37:15
It turns out that there is already a java class wi
pauljensen
2016/04/29 14:39:05
I don't see a benefit to doing it Java-side. I th
| |
| 15 LISTENER_EXCEPTION_THROWN, | |
| 16 HOSTNAME_NOT_RESOLVED, | |
| 17 INTERNET_DISCONNECTED, | |
| 18 NETWORK_CHANGED, | |
| 19 TIMED_OUT, | |
| 20 CONNECTION_CLOSED, | |
| 21 CONNECTION_TIMED_OUT, | |
| 22 CONNECTION_REFUSED, | |
| 23 CONNECTION_RESET, | |
| 24 ADDRESS_UNREACHABLE, | |
| 25 OTHER, | |
| 26 }; | |
| 27 | |
| 28 // Converts most popular net::ERR_* values to counterparts accessible in Java. | |
| 29 UrlRequestError NetErrorToUrlRequestError(int net_error); | |
| 30 | |
| 31 } // namespace cronet | |
| 32 | |
| 33 #endif // COMPONENTS_CRONET_ANDROID_URL_REQUEST_ERROR_H_ | |
| OLD | NEW |