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 #include "net/android/net_jni_registrar.h" | 5 #include "net/android/net_jni_registrar.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_registrar.h" | 8 #include "base/android/jni_registrar.h" |
9 #include "net/android/gurl_utils.h" | 9 #include "net/android/gurl_utils.h" |
10 #include "net/android/http_auth_negotiate_android.h" | 10 #include "net/android/http_auth_negotiate_android.h" |
11 #include "net/android/keystore.h" | 11 #include "net/android/keystore.h" |
12 #include "net/android/network_change_notifier_android.h" | 12 #include "net/android/network_change_notifier_android.h" |
13 #include "net/android/network_library.h" | 13 #include "net/android/network_library.h" |
14 #include "net/android/traffic_stats.h" | 14 #include "net/android/traffic_stats.h" |
15 #include "net/cert/x509_util_android.h" | 15 #include "net/cert/x509_util_android.h" |
16 #include "net/proxy/proxy_config_service_android.h" | 16 #include "net/proxy/proxy_config_service_android.h" |
| 17 #include "url/url_features.h" |
17 | 18 |
18 #if defined(USE_ICU_ALTERNATIVES_ON_ANDROID) | 19 #if BUILDFLAG(USE_PLATFORM_ICU_ALTERNATIVES) |
19 #include "net/base/net_string_util_icu_alternatives_android.h" // nogncheck | 20 #include "net/base/net_string_util_icu_alternatives_android.h" // nogncheck |
20 #endif | 21 #endif |
21 | 22 |
22 namespace net { | 23 namespace net { |
23 namespace android { | 24 namespace android { |
24 | 25 |
25 static base::android::RegistrationMethod kNetRegisteredMethods[] = { | 26 static base::android::RegistrationMethod kNetRegisteredMethods[] = { |
26 {"AndroidCertVerifyResult", RegisterCertVerifyResult}, | 27 {"AndroidCertVerifyResult", RegisterCertVerifyResult}, |
27 {"AndroidKeyStore", RegisterKeyStore}, | 28 {"AndroidKeyStore", RegisterKeyStore}, |
28 {"AndroidNetworkLibrary", RegisterNetworkLibrary}, | 29 {"AndroidNetworkLibrary", RegisterNetworkLibrary}, |
29 {"AndroidTrafficStats", traffic_stats::Register}, | 30 {"AndroidTrafficStats", traffic_stats::Register}, |
30 {"GURLUtils", RegisterGURLUtils}, | 31 {"GURLUtils", RegisterGURLUtils}, |
31 {"HttpAuthNegotiateAndroid", HttpAuthNegotiateAndroid::Register}, | 32 {"HttpAuthNegotiateAndroid", HttpAuthNegotiateAndroid::Register}, |
32 {"NetworkChangeNotifierAndroid", NetworkChangeNotifierAndroid::Register}, | 33 {"NetworkChangeNotifierAndroid", NetworkChangeNotifierAndroid::Register}, |
33 {"ProxyConfigService", ProxyConfigServiceAndroid::Register}, | 34 {"ProxyConfigService", ProxyConfigServiceAndroid::Register}, |
34 {"X509Util", RegisterX509Util}, | 35 {"X509Util", RegisterX509Util}, |
35 #if defined(USE_ICU_ALTERNATIVES_ON_ANDROID) | 36 #if BUILDFLAG(USE_PLATFORM_ICU_ALTERNATIVES) |
36 {"NetStringUtils", RegisterNetStringUtils} | 37 {"NetStringUtils", RegisterNetStringUtils} |
37 #endif | 38 #endif |
38 }; | 39 }; |
39 | 40 |
40 bool RegisterJni(JNIEnv* env) { | 41 bool RegisterJni(JNIEnv* env) { |
41 return base::android::RegisterNativeMethods( | 42 return base::android::RegisterNativeMethods( |
42 env, kNetRegisteredMethods, arraysize(kNetRegisteredMethods)); | 43 env, kNetRegisteredMethods, arraysize(kNetRegisteredMethods)); |
43 } | 44 } |
44 | 45 |
45 } // namespace android | 46 } // namespace android |
46 } // namespace net | 47 } // namespace net |
OLD | NEW |