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

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

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

Powered by Google App Engine
This is Rietveld 408576698