OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 NET_ANDROID_NETWORK_LIBRARY_H_ | 5 #ifndef NET_ANDROID_NETWORK_LIBRARY_H_ |
6 #define NET_ANDROID_NETWORK_LIBRARY_H_ | 6 #define NET_ANDROID_NETWORK_LIBRARY_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "net/base/net_export.h" |
14 | 15 |
15 namespace net { | 16 namespace net { |
16 namespace android { | 17 namespace android { |
17 | 18 |
18 enum VerifyResult { | 19 enum VerifyResult { |
19 // Certificate verification was successful. | 20 // Certificate verification was successful. |
20 VERIFY_OK, | 21 VERIFY_OK, |
21 // Certificate verification was failed. There is no detail error information | 22 // Certificate verification was failed. There is no detail error information |
22 // given by Android API. | 23 // given by Android API. |
23 VERIFY_NO_TRUSTED_ROOT, | 24 VERIFY_NO_TRUSTED_ROOT, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 // e.g. "eth0,10.0.0.2;eth0,fe80::5054:ff:fe12:3456" is a result string | 57 // e.g. "eth0,10.0.0.2;eth0,fe80::5054:ff:fe12:3456" is a result string |
57 // containing two items. | 58 // containing two items. |
58 std::string GetNetworkList(); | 59 std::string GetNetworkList(); |
59 | 60 |
60 // Get the mime type (if any) that is associated with the file extension. | 61 // Get the mime type (if any) that is associated with the file extension. |
61 // Returns true if a corresponding mime type exists. | 62 // Returns true if a corresponding mime type exists. |
62 bool GetMimeTypeFromExtension(const std::string& extension, | 63 bool GetMimeTypeFromExtension(const std::string& extension, |
63 std::string* result); | 64 std::string* result); |
64 | 65 |
65 // Register JNI methods | 66 // Register JNI methods |
66 bool RegisterNetworkLibrary(JNIEnv* env); | 67 NET_EXPORT bool RegisterNetworkLibrary(JNIEnv* env); |
67 | 68 |
68 } // namespace android | 69 } // namespace android |
69 } // namespace net | 70 } // namespace net |
70 | 71 |
71 #endif // NET_ANDROID_NETWORK_LIBRARY_H_ | 72 #endif // NET_ANDROID_NETWORK_LIBRARY_H_ |
OLD | NEW |