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

Side by Side Diff: components/cronet/android/chromium_url_request.h

Issue 659493003: Final step of the java_cpp_template -> java_cpp_enum migration. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mmenke+yfriedman feedback + more aosp fixes + don't run tests as part of the build Created 6 years, 2 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 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 //
15 // A Java counterpart will be generated for this enum.
16 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.net
17 // GENERATED_JAVA_CLASS_NAME_OVERRIDE: ChromiumUrlRequestPriority
18 // GENERATED_JAVA_PREFIX_TO_STRIP: REQUEST_PRIORITY_
14 enum UrlRequestPriority { 19 enum UrlRequestPriority {
15 #define DEFINE_REQUEST_PRIORITY(x, y) REQUEST_PRIORITY_##x = y, 20 REQUEST_PRIORITY_IDLE = 0,
16 #include "components/cronet/android/chromium_url_request_priority_list.h" 21 REQUEST_PRIORITY_LOWEST = 1,
17 #undef DEFINE_REQUEST_PRIORITY 22 REQUEST_PRIORITY_LOW = 2,
23 REQUEST_PRIORITY_MEDIUM = 3,
24 REQUEST_PRIORITY_HIGHEST = 4,
18 }; 25 };
19 26
20 // Define request priority values like REQUEST_ERROR_SUCCESS in a 27 // Define request priority values like REQUEST_ERROR_SUCCESS in a
21 // 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 //
30 // A Java counterpart will be generated for this enum.
31 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.net
32 // GENERATED_JAVA_CLASS_NAME_OVERRIDE: ChromiumUrlRequestError
33 // GENERATED_JAVA_PREFIX_TO_STRIP: REQUEST_ERROR_
22 enum UrlRequestError { 34 enum UrlRequestError {
23 #define DEFINE_REQUEST_ERROR(x, y) REQUEST_ERROR_##x = y, 35 REQUEST_ERROR_SUCCESS = 0,
24 #include "components/cronet/android/chromium_url_request_error_list.h" 36 REQUEST_ERROR_UNKNOWN = 1,
25 #undef DEFINE_REQUEST_ERROR 37 REQUEST_ERROR_MALFORMED_URL = 2,
38 REQUEST_ERROR_CONNECTION_TIMED_OUT = 3,
39 REQUEST_ERROR_UNKNOWN_HOST = 4,
26 }; 40 };
27 41
28 bool ChromiumUrlRequestRegisterJni(JNIEnv* env); 42 bool ChromiumUrlRequestRegisterJni(JNIEnv* env);
29 43
30 } // namespace cronet 44 } // namespace cronet
31 45
32 #endif // COMPONENTS_CRONET_ANDROID_CHROMIUM_URL_REQUEST_H_ 46 #endif // COMPONENTS_CRONET_ANDROID_CHROMIUM_URL_REQUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698