Index: components/cronet/android/cronet_url_request.h |
diff --git a/components/cronet/android/cronet_url_request.h b/components/cronet/android/cronet_url_request.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2e0d5ed537e468a7e20b3b49d88f3e33f9a9863e |
--- /dev/null |
+++ b/components/cronet/android/cronet_url_request.h |
@@ -0,0 +1,46 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_H_ |
+#define COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_H_ |
+ |
+#include <jni.h> |
+ |
+namespace cronet { |
+ |
+// Define request priority values like CRONET_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: CronetUrlRequestPriority |
+// GENERATED_JAVA_PREFIX_TO_STRIP: CRONET_REQUEST_PRIORITY_ |
+enum CronetUrlRequestPriority { |
+ CRONET_REQUEST_PRIORITY_IDLE = 0, |
+ CRONET_REQUEST_PRIORITY_LOWEST = 1, |
+ CRONET_REQUEST_PRIORITY_LOW = 2, |
+ CRONET_REQUEST_PRIORITY_MEDIUM = 3, |
+ CRONET_REQUEST_PRIORITY_HIGHEST = 4, |
+}; |
+ |
+// Define request priority values like CRONET_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: CronetUrlRequestError |
+// GENERATED_JAVA_PREFIX_TO_STRIP: CRONET_REQUEST_ERROR_ |
+enum CronetUrlRequestError { |
+ CRONET_REQUEST_ERROR_SUCCESS = 0, |
+ CRONET_REQUEST_ERROR_UNKNOWN = 1, |
+ CRONET_REQUEST_ERROR_MALFORMED_URL = 2, |
+ CRONET_REQUEST_ERROR_CONNECTION_TIMED_OUT = 3, |
+ CRONET_REQUEST_ERROR_UNKNOWN_HOST = 4, |
+}; |
+ |
+bool CronetUrlRequestRegisterJni(JNIEnv* env); |
+ |
+} // namespace cronet |
+ |
+#endif // COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_H_ |