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

Unified 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: rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/cronet.gypi ('k') | components/cronet/android/chromium_url_request_error_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet/android/chromium_url_request.h
diff --git a/components/cronet/android/chromium_url_request.h b/components/cronet/android/chromium_url_request.h
index 4296738358715f3f8e970e1273ec203f8261ddc3..b63f4f8face563f0c45d7ae9e3d8c9aca6f7b772 100644
--- a/components/cronet/android/chromium_url_request.h
+++ b/components/cronet/android/chromium_url_request.h
@@ -11,18 +11,32 @@ namespace cronet {
// Define request priority values like REQUEST_PRIORITY_IDLE in a
// way that ensures they're always the same than their Java counterpart.
+//
+// A Java counterpart will be generated for this enum.
+// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.net
+// GENERATED_JAVA_CLASS_NAME_OVERRIDE: ChromiumUrlRequestPriority
+// GENERATED_JAVA_PREFIX_TO_STRIP: REQUEST_PRIORITY_
enum UrlRequestPriority {
-#define DEFINE_REQUEST_PRIORITY(x, y) REQUEST_PRIORITY_##x = y,
-#include "components/cronet/android/chromium_url_request_priority_list.h"
-#undef DEFINE_REQUEST_PRIORITY
+ REQUEST_PRIORITY_IDLE = 0,
+ REQUEST_PRIORITY_LOWEST = 1,
+ REQUEST_PRIORITY_LOW = 2,
+ REQUEST_PRIORITY_MEDIUM = 3,
+ REQUEST_PRIORITY_HIGHEST = 4,
};
// Define request priority values like REQUEST_ERROR_SUCCESS in a
// way that ensures they're always the same than their Java counterpart.
+//
+// A Java counterpart will be generated for this enum.
+// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.net
+// GENERATED_JAVA_CLASS_NAME_OVERRIDE: ChromiumUrlRequestError
+// GENERATED_JAVA_PREFIX_TO_STRIP: REQUEST_ERROR_
enum UrlRequestError {
-#define DEFINE_REQUEST_ERROR(x, y) REQUEST_ERROR_##x = y,
-#include "components/cronet/android/chromium_url_request_error_list.h"
-#undef DEFINE_REQUEST_ERROR
+ REQUEST_ERROR_SUCCESS = 0,
+ REQUEST_ERROR_UNKNOWN = 1,
+ REQUEST_ERROR_MALFORMED_URL = 2,
+ REQUEST_ERROR_CONNECTION_TIMED_OUT = 3,
+ REQUEST_ERROR_UNKNOWN_HOST = 4,
};
bool ChromiumUrlRequestRegisterJni(JNIEnv* env);
« no previous file with comments | « components/cronet.gypi ('k') | components/cronet/android/chromium_url_request_error_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698