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 enum UrlRequestPriority { | 14 enum UrlRequestPriority { |
Yaron
2014/10/15 02:36:49
Doesn't this need a directive to call it ChromiumU
Yaron
2014/10/15 18:31:57
bump
mkosiba (inactive)
2014/10/16 12:45:07
yup. Completely missed this as cronet does not bui
| |
15 #define DEFINE_REQUEST_PRIORITY(x, y) REQUEST_PRIORITY_##x = y, | 15 REQUEST_PRIORITY_IDLE = 0, |
16 #include "components/cronet/android/chromium_url_request_priority_list.h" | 16 REQUEST_PRIORITY_LOWEST = 1, |
17 #undef DEFINE_REQUEST_PRIORITY | 17 REQUEST_PRIORITY_LOW = 2, |
18 REQUEST_PRIORITY_MEDIUM = 3, | |
19 REQUEST_PRIORITY_HIGHEST = 4, | |
18 }; | 20 }; |
19 | 21 |
20 // Define request priority values like REQUEST_ERROR_SUCCESS in a | 22 // Define request priority values like REQUEST_ERROR_SUCCESS in a |
21 // way that ensures they're always the same than their Java counterpart. | 23 // way that ensures they're always the same than their Java counterpart. |
22 enum UrlRequestError { | 24 enum UrlRequestError { |
Yaron
2014/10/15 02:36:49
same here
| |
23 #define DEFINE_REQUEST_ERROR(x, y) REQUEST_ERROR_##x = y, | 25 REQUEST_ERROR_SUCCESS = 1, |
24 #include "components/cronet/android/chromium_url_request_error_list.h" | 26 REQUEST_ERROR_UNKNOWN = 1, |
25 #undef DEFINE_REQUEST_ERROR | 27 REQUEST_ERROR_MALFORMED_URL = 2, |
28 REQUEST_ERROR_CONNECTION_TIMED_OUT = 3, | |
29 REQUEST_ERROR_UNKNOWN_HOST = 4, | |
26 }; | 30 }; |
27 | 31 |
28 bool ChromiumUrlRequestRegisterJni(JNIEnv* env); | 32 bool ChromiumUrlRequestRegisterJni(JNIEnv* env); |
29 | 33 |
30 } // namespace cronet | 34 } // namespace cronet |
31 | 35 |
32 #endif // COMPONENTS_CRONET_ANDROID_CHROMIUM_URL_REQUEST_H_ | 36 #endif // COMPONENTS_CRONET_ANDROID_CHROMIUM_URL_REQUEST_H_ |
OLD | NEW |