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

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

Issue 586143002: Initial implementation of Cronet Async API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Helen's comments, add CronetUrlRequestContextTest. Created 6 years, 1 month 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_H_
6 #define COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_H_
7
8 #include <jni.h>
9
10 namespace cronet {
11
12 // Define request priority values like CRONET_REQUEST_PRIORITY_IDLE in a
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: CronetUrlRequestPriority
18 // GENERATED_JAVA_PREFIX_TO_STRIP: CRONET_REQUEST_PRIORITY_
19 enum CronetUrlRequestPriority {
20 CRONET_REQUEST_PRIORITY_IDLE = 0,
21 CRONET_REQUEST_PRIORITY_LOWEST = 1,
22 CRONET_REQUEST_PRIORITY_LOW = 2,
23 CRONET_REQUEST_PRIORITY_MEDIUM = 3,
24 CRONET_REQUEST_PRIORITY_HIGHEST = 4,
25 };
26
27 // Define request priority values like CRONET_REQUEST_ERROR_SUCCESS in a
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: CronetUrlRequestError
33 // GENERATED_JAVA_PREFIX_TO_STRIP: CRONET_REQUEST_ERROR_
34 enum CronetUrlRequestError {
35 CRONET_REQUEST_ERROR_SUCCESS = 0,
36 CRONET_REQUEST_ERROR_UNKNOWN = 1,
37 CRONET_REQUEST_ERROR_MALFORMED_URL = 2,
38 CRONET_REQUEST_ERROR_CONNECTION_TIMED_OUT = 3,
39 CRONET_REQUEST_ERROR_UNKNOWN_HOST = 4,
40 };
41
42 bool CronetUrlRequestRegisterJni(JNIEnv* env);
43
44 } // namespace cronet
45
46 #endif // COMPONENTS_CRONET_ANDROID_CRONET_URL_REQUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698