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

Side by Side Diff: net/android/net_jni_registrar.cc

Issue 2146753002: Android: Remove unneeded RegisterNatives() calls (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android: Don't require RegisterNatives if there are none Created 4 years, 4 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 unified diff | Download patch
OLDNEW
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/cellular_signal_strength.h"
10 #include "net/android/gurl_utils.h" 9 #include "net/android/gurl_utils.h"
11 #include "net/android/http_auth_negotiate_android.h" 10 #include "net/android/http_auth_negotiate_android.h"
12 #include "net/android/keystore.h" 11 #include "net/android/keystore.h"
13 #include "net/android/network_change_notifier_android.h" 12 #include "net/android/network_change_notifier_android.h"
14 #include "net/android/network_library.h"
15 #include "net/android/traffic_stats.h"
16 #include "net/cert/x509_util_android.h" 13 #include "net/cert/x509_util_android.h"
17 #include "net/proxy/proxy_config_service_android.h" 14 #include "net/proxy/proxy_config_service_android.h"
18 #include "url/url_features.h" 15 #include "url/url_features.h"
19 16
20 #if BUILDFLAG(USE_PLATFORM_ICU_ALTERNATIVES) 17 #if BUILDFLAG(USE_PLATFORM_ICU_ALTERNATIVES)
21 #include "net/base/net_string_util_icu_alternatives_android.h" // nogncheck 18 #include "net/base/net_string_util_icu_alternatives_android.h" // nogncheck
22 #endif 19 #endif
23 20
24 namespace net { 21 namespace net {
25 namespace android { 22 namespace android {
26 23
27 static base::android::RegistrationMethod kNetRegisteredMethods[] = { 24 static base::android::RegistrationMethod kNetRegisteredMethods[] = {
28 {"AndroidCellularSignalStrength", cellular_signal_strength::Register},
29 {"AndroidCertVerifyResult", RegisterCertVerifyResult},
30 {"AndroidKeyStore", RegisterKeyStore},
31 {"AndroidNetworkLibrary", RegisterNetworkLibrary},
32 {"AndroidTrafficStats", traffic_stats::Register},
33 {"GURLUtils", RegisterGURLUtils}, 25 {"GURLUtils", RegisterGURLUtils},
34 {"HttpAuthNegotiateAndroid", HttpAuthNegotiateAndroid::Register}, 26 {"HttpAuthNegotiateAndroid", HttpAuthNegotiateAndroid::Register},
35 {"NetworkChangeNotifierAndroid", NetworkChangeNotifierAndroid::Register}, 27 {"NetworkChangeNotifierAndroid", NetworkChangeNotifierAndroid::Register},
36 {"ProxyConfigService", ProxyConfigServiceAndroid::Register}, 28 {"ProxyConfigService", ProxyConfigServiceAndroid::Register},
37 {"X509Util", RegisterX509Util}, 29 {"X509Util", RegisterX509Util},
38 #if BUILDFLAG(USE_PLATFORM_ICU_ALTERNATIVES) 30 #if BUILDFLAG(USE_PLATFORM_ICU_ALTERNATIVES)
39 {"NetStringUtils", RegisterNetStringUtils} 31 {"NetStringUtils", RegisterNetStringUtils}
40 #endif 32 #endif
41 }; 33 };
42 34
43 bool RegisterJni(JNIEnv* env) { 35 bool RegisterJni(JNIEnv* env) {
44 return base::android::RegisterNativeMethods( 36 return base::android::RegisterNativeMethods(
45 env, kNetRegisteredMethods, arraysize(kNetRegisteredMethods)); 37 env, kNetRegisteredMethods, arraysize(kNetRegisteredMethods));
46 } 38 }
47 39
48 } // namespace android 40 } // namespace android
49 } // namespace net 41 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698