| OLD | NEW |
| 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 #ifndef COMPONENTS_CRONET_ANDROID_CHROMIUM_URL_REQUEST_H_ | 5 #ifndef COMPONENTS_CRONET_ANDROID_CHROMIUM_URL_REQUEST_H_ |
| 6 #define COMPONENTS_CRONET_ANDROID_CHROMIUM_URL_REQUEST_H_ | 6 #define COMPONENTS_CRONET_ANDROID_CHROMIUM_URL_REQUEST_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 namespace cronet { | 10 namespace cronet { |
| 11 | 11 |
| 12 // Define request priority values like REQUEST_PRIORITY_IDLE in a | 12 // Define request priority values like REQUEST_PRIORITY_IDLE in a |
| 13 // way that ensures they're always the same than their Java counterpart. | 13 // way that ensures they're always the same than their Java counterpart. |
| 14 // | 14 // |
| 15 // A Java counterpart will be generated for this enum. | 15 // A Java counterpart will be generated for this enum. |
| 16 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.net | 16 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.net |
| 17 // GENERATED_JAVA_CLASS_NAME_OVERRIDE: ChromiumUrlRequestPriority | 17 // GENERATED_JAVA_CLASS_NAME_OVERRIDE: ChromiumUrlRequestPriority |
| 18 // GENERATED_JAVA_PREFIX_TO_STRIP: REQUEST_PRIORITY_ | 18 // GENERATED_JAVA_PREFIX_TO_STRIP: REQUEST_PRIORITY_ |
| 19 enum UrlRequestPriority { | 19 enum UrlRequestPriority { |
| 20 REQUEST_PRIORITY_IDLE = 0, | 20 REQUEST_PRIORITY_IDLE = 0, |
| 21 REQUEST_PRIORITY_LOWEST = 1, | 21 REQUEST_PRIORITY_LOWEST = 1, |
| 22 REQUEST_PRIORITY_LOW = 2, | 22 REQUEST_PRIORITY_LOW = 2, |
| 23 REQUEST_PRIORITY_MEDIUM = 3, | 23 REQUEST_PRIORITY_MEDIUM = 3, |
| 24 REQUEST_PRIORITY_HIGHEST = 4, | 24 REQUEST_PRIORITY_HIGHEST = 4, |
| 25 }; | 25 }; |
| 26 | 26 |
| 27 // Define request priority values like REQUEST_ERROR_SUCCESS in a | 27 // Define request error values like REQUEST_ERROR_SUCCESS in a |
| 28 // way that ensures they're always the same than their Java counterpart. | 28 // way that ensures they're always the same than their Java counterpart. |
| 29 // | 29 // |
| 30 // A Java counterpart will be generated for this enum. | 30 // A Java counterpart will be generated for this enum. |
| 31 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.net | 31 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.net |
| 32 // GENERATED_JAVA_CLASS_NAME_OVERRIDE: ChromiumUrlRequestError | 32 // GENERATED_JAVA_CLASS_NAME_OVERRIDE: ChromiumUrlRequestError |
| 33 // GENERATED_JAVA_PREFIX_TO_STRIP: REQUEST_ERROR_ | 33 // GENERATED_JAVA_PREFIX_TO_STRIP: REQUEST_ERROR_ |
| 34 enum UrlRequestError { | 34 enum UrlRequestError { |
| 35 REQUEST_ERROR_SUCCESS = 0, | 35 REQUEST_ERROR_SUCCESS = 0, |
| 36 REQUEST_ERROR_UNKNOWN = 1, | 36 REQUEST_ERROR_UNKNOWN = 1, |
| 37 REQUEST_ERROR_MALFORMED_URL = 2, | 37 REQUEST_ERROR_MALFORMED_URL = 2, |
| 38 REQUEST_ERROR_CONNECTION_TIMED_OUT = 3, | 38 REQUEST_ERROR_CONNECTION_TIMED_OUT = 3, |
| 39 REQUEST_ERROR_UNKNOWN_HOST = 4, | 39 REQUEST_ERROR_UNKNOWN_HOST = 4, |
| 40 REQUEST_ERROR_TOO_MANY_REDIRECTS = 5, | 40 REQUEST_ERROR_TOO_MANY_REDIRECTS = 5, |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 bool ChromiumUrlRequestRegisterJni(JNIEnv* env); | 43 bool ChromiumUrlRequestRegisterJni(JNIEnv* env); |
| 44 | 44 |
| 45 } // namespace cronet | 45 } // namespace cronet |
| 46 | 46 |
| 47 #endif // COMPONENTS_CRONET_ANDROID_CHROMIUM_URL_REQUEST_H_ | 47 #endif // COMPONENTS_CRONET_ANDROID_CHROMIUM_URL_REQUEST_H_ |
| OLD | NEW |