From c99e905516a43b083f57672a256aade7cb09b872 Mon Sep 17 00:00:00 2001 From: Aiden Benner Date: Fri, 30 Nov 2018 20:50:50 +0000 Subject: [PATCH] JNI: Remove jclass from JNI static methods MASS REFACTOR - please consider fixing rather than reverting. The jclass parameter is never used in static JNI functions because we generate bindings ourselves for functions that are called by native. This CL removes the jclass parameter from all JNI methods by refactoring all current JNI method declarations that contain a jclass and stops the JNI generator from generating stubs that pass jclass to our implementation. This change is also being done to support the conversion of all non-static native methods to static native methods and then all static natives to the new JNI interface. When this is done proguard will be able to obfuscate classes that contain native methods. And native methods that don't rely on native TBR=agrieve # wide-reaching mechanical refactor Bug: 898660 Change-Id: Ie2932564d58933a2f4bcd23fe47723e147cf87d8 Reviewed-on: https://chromium-review.googlesource.com/c/1352518 Commit-Queue: agrieve Reviewed-by: agrieve Cr-Commit-Position: refs/heads/master@{#612772} --- .../browser/android_protocol_handler.cc | 8 +- android_webview/browser/aw_contents.cc | 18 +-- .../browser/aw_contents_statics.cc | 16 +-- android_webview/browser/aw_debug.cc | 13 +-- android_webview/browser/aw_feature_list.cc | 1 - android_webview/browser/aw_form_database.cc | 4 +- android_webview/browser/aw_gl_functor.cc | 8 +- .../browser/aw_metrics_service_client.cc | 1 - .../browser/aw_quota_manager_bridge.cc | 3 +- android_webview/browser/aw_settings.cc | 3 +- .../browser/aw_web_contents_delegate.cc | 1 - .../aw_embedded_test_server.cc | 3 +- base/android/application_status_listener.cc | 1 - base/android/child_process_service.cc | 5 +- base/android/command_line_android.cc | 6 - base/android/cpu_features.cc | 4 +- base/android/early_trace_event_binding.cc | 3 - base/android/field_trial_list.cc | 7 +- base/android/important_file_writer_android.cc | 1 - base/android/java_exception_reporter.cc | 2 - ...hedSampleForAnnotationProcessor_jni.golden | 109 ++++++------------ .../SampleForAnnotationProcessor_jni.golden | 109 ++++++------------ .../golden/SampleForTests_jni.golden | 11 +- .../testMultipleJNIAdditionalImport.golden | 6 +- .../jni_generator/golden/testNatives.golden | 28 ++--- .../golden/testProxyNatives.golden | 17 ++- .../golden/testProxyNativesWithNatives.golden | 20 ++-- .../testSingleJNIAdditionalImport.golden | 6 +- .../jni_generator/golden/testTracing.golden | 4 +- base/android/jni_generator/jni_generator.py | 25 ++-- .../android/jni_generator/sample_for_tests.cc | 60 +++------- .../library_loader/library_loader_hooks.cc | 11 +- .../memory_pressure_listener_android.cc | 1 - base/android/path_service_android.cc | 1 - base/android/record_histogram.cc | 8 -- base/android/record_user_action.cc | 3 - base/android/statistics_recorder_android.cc | 1 - base/android/sys_utils.cc | 4 +- .../task_scheduler/post_task_android.cc | 1 - .../sequenced_task_runner_android.cc | 1 - .../single_thread_task_runner_android.cc | 1 - .../task_scheduler/task_runner_android.cc | 1 - base/android/time_utils.cc | 4 +- base/android/trace_event_binding.cc | 19 +-- .../power_monitor_device_source_android.cc | 4 +- .../task_scheduler_test_helpers_android.cc | 6 +- .../after_startup_task_utils_android.cc | 4 +- .../bookmarks/partner_bookmarks_reader.cc | 4 +- .../android/browserservices/ukm_recorder.cc | 1 - .../browsing_data/browsing_data_bridge.cc | 6 +- .../cached_image_fetcher_bridge.cc | 1 - chrome/browser/android/chrome_feature_list.cc | 9 +- .../compositor/resources/resource_factory.cc | 1 - .../browser/android/content/content_utils.cc | 5 +- .../contextual_suggestions_bridge.cc | 3 +- .../android/cookies/cookies_fetcher_util.cc | 4 +- .../detached_resource_request_android.cc | 1 - .../android/download/download_controller.cc | 1 - .../download/download_manager_service.cc | 5 +- .../android/download/download_utils.cc | 2 - ...line_content_aggregator_factory_android.cc | 1 - .../explore_sites/explore_sites_bridge.cc | 8 +- .../explore_sites_bridge_experimental.cc | 5 +- chrome/browser/android/favicon_helper.cc | 3 +- .../tracker_factory_android.cc | 1 - chrome/browser/android/feature_utilities.cc | 2 - .../android/feedback/connectivity_checker.cc | 2 - .../feedback/process_id_feedback_source.cc | 5 +- .../android/feedback/screenshot_task.cc | 1 - .../feedback/system_info_feedback_source.cc | 17 +-- .../browser/android/foreign_session_helper.cc | 1 - chrome/browser/android/headers_classifier.cc | 1 - .../instant_apps_infobar_delegate.cc | 1 - .../instantapps/instant_apps_settings.cc | 3 - chrome/browser/android/large_icon_bridge.cc | 3 +- .../locale/locale_template_url_loader.cc | 1 - .../browser/android/location_settings_impl.cc | 1 - .../browser/android/metrics/launch_metrics.cc | 2 - .../android/metrics/ukm_utils_for_test.cc | 8 +- .../android/metrics/uma_session_stats.cc | 21 +--- chrome/browser/android/metrics/uma_utils.cc | 5 +- .../android_content_suggestions_notifier.cc | 3 - .../android/ntp/ntp_snippets_bridge.cc | 10 +- .../android/ntp/recent_tabs_page_prefs.cc | 1 - .../ntp/suggestions_event_reporter_bridge.cc | 18 +-- .../android/omnibox/answers_image_bridge.cc | 2 - .../autocomplete_controller_android.cc | 5 +- .../omnibox/query_in_omnibox_android.cc | 1 - .../android/password_ui_view_android.cc | 3 +- .../service_worker_payment_app_bridge.cc | 8 -- .../android/photo_picker_sandbox_bridge.cc | 4 +- .../browser/android/policy/policy_auditor.cc | 1 - .../autofill/autofill_profile_bridge.cc | 7 +- .../preferences/website_preference_bridge.cc | 41 +------ .../profiles/profile_downloader_android.cc | 4 - .../android/profiles/profile_manager_utils.cc | 6 +- .../android/rappor/rappor_service_bridge.cc | 2 - chrome/browser/android/rlz/revenue_stats.cc | 2 - .../browser/android/rlz/rlz_ping_handler.cc | 1 - ...earch_geolocation_disclosure_tab_helper.cc | 4 +- .../browser/android/service_tab_launcher.cc | 1 - .../sessions/session_tab_helper_android.cc | 1 - chrome/browser/android/shortcut_helper.cc | 2 - .../account_management_screen_helper.cc | 1 - .../signin/account_tracker_service_android.cc | 2 - .../signin/signin_investigator_android.cc | 1 - .../android/signin/signin_manager_android.cc | 3 - .../signin/unified_consent_service_bridge.cc | 5 - chrome/browser/android/tab_state.cc | 12 +- chrome/browser/android/tab_state.h | 1 - .../tab_web_contents_delegate_android.cc | 7 -- chrome/browser/android/url_utilities.cc | 10 -- .../vr/arcore_device/arcore_java_utils.cc | 3 +- .../browser/android/vr/vr_module_provider.cc | 8 +- .../browser/android/vr/vr_shell_delegate.cc | 8 +- chrome/browser/android/warmup_manager.cc | 3 - .../browser/android/web_contents_factory.cc | 1 - .../webapk_post_share_target_navigator.cc | 1 - .../android/webapk/webapk_update_manager.cc | 2 - .../android/personal_data_manager_android.cc | 18 +-- .../android/phone_number_util_android.cc | 3 - .../banners/app_banner_manager_android.cc | 8 +- .../dom_distiller_service_factory_android.cc | 1 - .../dom_distiller/tab_utils_android.cc | 9 +- .../site_engagement_service_android.cc | 5 +- .../invalidation_service_factory_android.cc | 4 +- .../android/remote/record_cast_action.cc | 9 +- ...eduction_promo_infobar_delegate_android.cc | 1 - .../notification_platform_bridge_android.cc | 3 +- .../android/background_scheduler_bridge.cc | 5 +- .../downloads/offline_page_download_bridge.cc | 1 - .../android/offline_page_bridge.cc | 10 +- .../prefetch_configuration_impl_android.cc | 2 - .../android/prefetch_test_bridge.cc | 9 +- .../android/can_make_payment_query_android.cc | 1 - .../android/ssl_validity_checker_android.cc | 1 - .../external_prerender_handler_android.cc | 7 +- chrome/browser/profiles/profile_android.cc | 9 +- chrome/browser/profiles/profile_android.h | 3 +- .../search_engines/template_url_android.cc | 5 - .../oauth2_token_service_delegate_android.cc | 2 - .../ssl/captive_portal_helper_android.cc | 2 - .../ssl/security_state_model_android.cc | 1 - .../child_account_service_android.cc | 2 - .../translate/android/translate_bridge.cc | 3 - .../infobars/download_progress_infobar.cc | 1 - .../android/infobars/reader_mode_infobar.cc | 1 - .../simple_confirm_infobar_builder.cc | 1 - .../ui/android/infobars/survey_infobar.cc | 1 - .../javascript_app_modal_dialog_android.cc | 3 +- .../android/omnibox/omnibox_url_emphasizer.cc | 1 - .../ui/android/omnibox/omnibox_view_util.cc | 1 - .../page_info/certificate_chain_helper.cc | 1 - .../page_info/certificate_viewer_android.cc | 44 +++---- .../connection_info_popup_android.cc | 1 - .../page_info/page_info_controller_android.cc | 1 - .../android/ssl_client_certificate_request.cc | 4 +- .../ui/android/tab_model/single_tab_model.cc | 1 - .../android/tab_model/tab_model_jni_bridge.cc | 4 - .../android/cast_metrics_helper_android.cc | 6 +- components/about_ui/credit_utils.cc | 4 +- .../cronet/android/cronet_library_loader.cc | 7 +- .../cronet_url_request_context_adapter.cc | 9 +- .../cronet/android/test/cronet_test_util.cc | 4 - .../cronet_url_request_context_config_test.cc | 1 - .../android/test/cronet_url_request_test.cc | 3 +- .../android/test/experimental_options_test.cc | 1 - .../cronet/android/test/mock_cert_verifier.cc | 1 - .../test/mock_url_request_job_factory.cc | 15 +-- .../cronet/android/test/native_test_server.cc | 31 ++--- .../cronet/android/test/quic_test_server.cc | 8 +- .../browser/distillable_page_utils_android.cc | 1 - .../dom_distiller/core/url_utils_android.cc | 4 - .../android_language_metrics_bridge.cc | 1 - .../android/geo_language_provider_bridge.cc | 1 - .../rewrite_minidumps_as_mimes.cc | 1 - .../origin_security_checker_android.cc | 3 - .../payment_manifest_downloader_android.cc | 1 - .../payment_manifest_parser_android.cc | 1 - .../android/payment_validator_android.cc | 2 - .../safe_browsing_api_handler_bridge.cc | 5 +- .../child_account_info_fetcher_android.cc | 1 - components/sync/android/model_type_helper.cc | 1 - .../url_formatter/url_formatter_android.cc | 6 - .../variations_associated_data_android.cc | 4 +- content/app/android/content_main.cc | 1 - .../browser/android/app_web_message_port.cc | 2 - .../android/browser_startup_controller.cc | 9 +- .../browser/android/content_feature_list.cc | 1 - .../browser/android/content_view_statics.cc | 1 - .../browser/android/dialog_overlay_impl.cc | 3 - .../browser/android/gpu_process_callback.cc | 2 - .../browser/android/ime_adapter_android.cc | 3 - content/browser/android/load_url_params.cc | 1 - .../child_process_launcher_helper_android.cc | 1 - .../media/session/media_session_android.cc | 1 - .../browser/memory/memory_monitor_android.cc | 2 - .../web_contents/web_contents_android.cc | 2 - .../use_zoom_for_dsf_policy_android.cc | 4 +- .../service_manager_connection_impl.cc | 3 +- .../common/resource_request_body_android.cc | 1 - content/public/test/android/dom_utils.cc | 1 - .../public/test/android/web_contents_utils.cc | 3 - .../chromium_linker_test_linker_tests.cc | 2 - content/shell/android/shell_manager.cc | 2 - content/shell/browser/shell_android.cc | 1 - .../java/system/javatests/mojo_test_rule.cc | 3 +- .../system/javatests/validation_test_util.cc | 1 - net/android/android_http_util.cc | 1 - net/android/gurl_utils.cc | 2 - net/cert/x509_util_android.cc | 3 +- remoting/client/jni/jni_oauth_token_getter.cc | 1 - remoting/client/jni/jni_runtime_delegate.cc | 3 +- .../public/cpp/json_sanitizer_android.cc | 2 - .../location_api_adapter_android.cc | 2 - testing/android/native_test/main_runner.cc | 1 - ui/android/resources/resource_factory.cc | 5 +- ui/base/l10n/l10n_util_android.cc | 2 - 218 files changed, 291 insertions(+), 995 deletions(-) diff --git a/android_webview/browser/android_protocol_handler.cc b/android_webview/browser/android_protocol_handler.cc index 08e8cdac96f4cb..25f6f79b2440aa 100644 --- a/android_webview/browser/android_protocol_handler.cc +++ b/android_webview/browser/android_protocol_handler.cc @@ -233,16 +233,12 @@ CreateAssetFileRequestInterceptor() { } static ScopedJavaLocalRef -JNI_AndroidProtocolHandler_GetAndroidAssetPath( - JNIEnv* env, - const JavaParamRef& /*clazz*/) { +JNI_AndroidProtocolHandler_GetAndroidAssetPath(JNIEnv* env) { return ConvertUTF8ToJavaString(env, android_webview::kAndroidAssetPath); } static ScopedJavaLocalRef -JNI_AndroidProtocolHandler_GetAndroidResourcePath( - JNIEnv* env, - const JavaParamRef& /*clazz*/) { +JNI_AndroidProtocolHandler_GetAndroidResourcePath(JNIEnv* env) { return ConvertUTF8ToJavaString(env, android_webview::kAndroidResourcePath); } diff --git a/android_webview/browser/aw_contents.cc b/android_webview/browser/aw_contents.cc index 021e475ddde235..7c0928e50193d5 100644 --- a/android_webview/browser/aw_contents.cc +++ b/android_webview/browser/aw_contents.cc @@ -194,7 +194,6 @@ AwContents* AwContents::FromID(int render_process_id, int render_view_id) { // static void JNI_AwContents_UpdateDefaultLocale( JNIEnv* env, - const JavaParamRef&, const JavaParamRef& locale, const JavaParamRef& locale_list) { *g_locale() = ConvertJavaStringToUTF8(env, locale); @@ -423,7 +422,6 @@ void AwContents::Destroy(JNIEnv* env, const JavaParamRef& obj) { } static jlong JNI_AwContents_Init(JNIEnv* env, - const JavaParamRef&, const JavaParamRef& browser_context) { // TODO(joth): Use |browser_context| to get the native BrowserContext, rather // than hard-code the default instance lookup here. @@ -434,9 +432,7 @@ static jlong JNI_AwContents_Init(JNIEnv* env, return reinterpret_cast(new AwContents(std::move(web_contents))); } -static jboolean JNI_AwContents_HasRequiredHardwareExtensions( - JNIEnv* env, - const JavaParamRef&) { +static jboolean JNI_AwContents_HasRequiredHardwareExtensions(JNIEnv* env) { ScopedAllowInitGLBindings scoped_allow_init_gl_bindings; // Make sure GPUInfo is collected. This will initialize GL bindings, // collect GPUInfo, and compute GpuFeatureInfo if they have not been @@ -446,26 +442,22 @@ static jboolean JNI_AwContents_HasRequiredHardwareExtensions( } static void JNI_AwContents_SetAwDrawSWFunctionTable(JNIEnv* env, - const JavaParamRef&, jlong function_table) { RasterHelperSetAwDrawSWFunctionTable( reinterpret_cast(function_table)); } static void JNI_AwContents_SetAwDrawGLFunctionTable(JNIEnv* env, - const JavaParamRef&, jlong function_table) {} // static -jint JNI_AwContents_GetNativeInstanceCount(JNIEnv* env, - const JavaParamRef&) { +jint JNI_AwContents_GetNativeInstanceCount(JNIEnv* env) { return base::subtle::NoBarrier_Load(&g_instance_count); } // static ScopedJavaLocalRef JNI_AwContents_GetSafeBrowsingLocaleForTesting( - JNIEnv* env, - const JavaParamRef&) { + JNIEnv* env) { ScopedJavaLocalRef locale = ConvertUTF8ToJavaString(env, base::i18n::GetConfiguredLocale()); return locale; @@ -1356,9 +1348,7 @@ jlong AwContents::GetAutofillProvider( return reinterpret_cast(autofill_provider_.get()); } -void JNI_AwContents_SetShouldDownloadFavicons( - JNIEnv* env, - const JavaParamRef& jclazz) { +void JNI_AwContents_SetShouldDownloadFavicons(JNIEnv* env) { g_should_download_favicons = true; } diff --git a/android_webview/browser/aw_contents_statics.cc b/android_webview/browser/aw_contents_statics.cc index 47952182369b24..299881ee70fea3 100644 --- a/android_webview/browser/aw_contents_statics.cc +++ b/android_webview/browser/aw_contents_statics.cc @@ -65,9 +65,7 @@ void ProxyOverrideChanged(const JavaRef& callback) { // static ScopedJavaLocalRef -JNI_AwContentsStatics_GetSafeBrowsingPrivacyPolicyUrl( - JNIEnv* env, - const JavaParamRef&) { +JNI_AwContentsStatics_GetSafeBrowsingPrivacyPolicyUrl(JNIEnv* env) { DCHECK_CURRENTLY_ON(BrowserThread::UI); GURL privacy_policy_url( security_interstitials::kSafeBrowsingPrivacyPolicyUrl); @@ -81,7 +79,6 @@ JNI_AwContentsStatics_GetSafeBrowsingPrivacyPolicyUrl( // static void JNI_AwContentsStatics_ClearClientCertPreferences( JNIEnv* env, - const JavaParamRef&, const JavaParamRef& callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); base::PostTaskWithTraitsAndReply( @@ -93,16 +90,14 @@ void JNI_AwContentsStatics_ClearClientCertPreferences( // static ScopedJavaLocalRef JNI_AwContentsStatics_GetUnreachableWebDataUrl( - JNIEnv* env, - const JavaParamRef&) { + JNIEnv* env) { return base::android::ConvertUTF8ToJavaString( env, content::kUnreachableWebDataURL); } // static ScopedJavaLocalRef JNI_AwContentsStatics_GetProductVersion( - JNIEnv* env, - const JavaParamRef&) { + JNIEnv* env) { return base::android::ConvertUTF8ToJavaString( env, version_info::GetVersionNumber()); } @@ -110,7 +105,6 @@ ScopedJavaLocalRef JNI_AwContentsStatics_GetProductVersion( // static void JNI_AwContentsStatics_SetSafeBrowsingWhitelist( JNIEnv* env, - const JavaParamRef&, const JavaParamRef& jrules, const JavaParamRef& callback) { std::vector rules; @@ -126,7 +120,6 @@ void JNI_AwContentsStatics_SetSafeBrowsingWhitelist( // static void JNI_AwContentsStatics_SetServiceWorkerIoThreadClient( JNIEnv* env, - const JavaParamRef&, const base::android::JavaParamRef& io_thread_client, const base::android::JavaParamRef& browser_context) { AwContentsIoThreadClient::SetServiceWorkerIoThreadClient(io_thread_client, @@ -136,7 +129,6 @@ void JNI_AwContentsStatics_SetServiceWorkerIoThreadClient( // static void JNI_AwContentsStatics_SetCheckClearTextPermitted( JNIEnv* env, - const JavaParamRef&, jboolean permitted) { AwURLRequestContextGetter::set_check_cleartext_permitted(permitted); } @@ -144,7 +136,6 @@ void JNI_AwContentsStatics_SetCheckClearTextPermitted( // static void JNI_AwContentsStatics_SetProxyOverride( JNIEnv* env, - const JavaParamRef&, const base::android::JavaParamRef& jhost, jint port, const base::android::JavaParamRef& jexclusion_list, @@ -163,7 +154,6 @@ void JNI_AwContentsStatics_SetProxyOverride( // static void JNI_AwContentsStatics_ClearProxyOverride( JNIEnv* env, - const JavaParamRef&, const JavaParamRef& callback) { AwBrowserContext::GetDefault()->GetAwURLRequestContext()->ClearProxyOverride( base::BindOnce(&ProxyOverrideChanged, diff --git a/android_webview/browser/aw_debug.cc b/android_webview/browser/aw_debug.cc index 7b3abafe8d9e21..2a04126618aeea 100644 --- a/android_webview/browser/aw_debug.cc +++ b/android_webview/browser/aw_debug.cc @@ -22,7 +22,6 @@ namespace android_webview { static jboolean JNI_AwDebug_DumpWithoutCrashing( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& dump_path) { // This may be called from any thread, and we might be in a state // where it is impossible to post tasks, so we have to be prepared @@ -37,23 +36,17 @@ static jboolean JNI_AwDebug_DumpWithoutCrashing( return crash_reporter::DumpWithoutCrashingToFd(target.TakePlatformFile()); } -static void JNI_AwDebug_InitCrashKeysForWebViewTesting( - JNIEnv* env, - const JavaParamRef& clazz) { +static void JNI_AwDebug_InitCrashKeysForWebViewTesting(JNIEnv* env) { crash_keys::InitCrashKeysForWebViewTesting(); } -static void JNI_AwDebug_SetWhiteListedKeyForTesting( - JNIEnv* env, - const JavaParamRef& clazz) { +static void JNI_AwDebug_SetWhiteListedKeyForTesting(JNIEnv* env) { static ::crash_reporter::CrashKeyString<32> crash_key( "AW_WHITELISTED_DEBUG_KEY"); crash_key.Set("AW_DEBUG_VALUE"); } -static void JNI_AwDebug_SetNonWhiteListedKeyForTesting( - JNIEnv* env, - const JavaParamRef& clazz) { +static void JNI_AwDebug_SetNonWhiteListedKeyForTesting(JNIEnv* env) { static ::crash_reporter::CrashKeyString<32> crash_key( "AW_NONWHITELISTED_DEBUG_KEY"); crash_key.Set("AW_DEBUG_VALUE"); diff --git a/android_webview/browser/aw_feature_list.cc b/android_webview/browser/aw_feature_list.cc index 982e8abf33e674..c37a0351a0410e 100644 --- a/android_webview/browser/aw_feature_list.cc +++ b/android_webview/browser/aw_feature_list.cc @@ -61,7 +61,6 @@ const base::Feature kWebViewUmaLogAppPackageName{ static jboolean JNI_AwFeatureList_IsEnabled( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jfeature_name) { const base::Feature* feature = FindFeatureExposedToJava(ConvertJavaStringToUTF8(env, jfeature_name)); diff --git a/android_webview/browser/aw_form_database.cc b/android_webview/browser/aw_form_database.cc index 8da2a07457cde4..4c1a675210f996 100644 --- a/android_webview/browser/aw_form_database.cc +++ b/android_webview/browser/aw_form_database.cc @@ -25,12 +25,12 @@ AwFormDatabaseService* GetFormDatabaseService() { } // anonymous namespace // static -jboolean JNI_AwFormDatabase_HasFormData(JNIEnv*, const JavaParamRef&) { +jboolean JNI_AwFormDatabase_HasFormData(JNIEnv*) { return GetFormDatabaseService()->HasFormData(); } // static -void JNI_AwFormDatabase_ClearFormData(JNIEnv*, const JavaParamRef&) { +void JNI_AwFormDatabase_ClearFormData(JNIEnv*) { GetFormDatabaseService()->ClearFormData(); } diff --git a/android_webview/browser/aw_gl_functor.cc b/android_webview/browser/aw_gl_functor.cc index a306d495bf7c58..19bbe23d77ee81 100644 --- a/android_webview/browser/aw_gl_functor.cc +++ b/android_webview/browser/aw_gl_functor.cc @@ -92,21 +92,17 @@ jlong AwGLFunctor::GetCompositorFrameConsumer( return reinterpret_cast(GetCompositorFrameConsumer()); } -static jint JNI_AwGLFunctor_GetNativeInstanceCount( - JNIEnv* env, - const JavaParamRef&) { +static jint JNI_AwGLFunctor_GetNativeInstanceCount(JNIEnv* env) { DCHECK_CURRENTLY_ON(BrowserThread::UI); return g_instance_count; } -static jlong JNI_AwGLFunctor_GetAwDrawGLFunction(JNIEnv* env, - const JavaParamRef&) { +static jlong JNI_AwGLFunctor_GetAwDrawGLFunction(JNIEnv* env) { return reinterpret_cast(&DrawGLFunction); } static jlong JNI_AwGLFunctor_Create( JNIEnv* env, - const JavaParamRef&, const base::android::JavaParamRef& obj) { DCHECK_CURRENTLY_ON(BrowserThread::UI); return reinterpret_cast( diff --git a/android_webview/browser/aw_metrics_service_client.cc b/android_webview/browser/aw_metrics_service_client.cc index 8f027422c111fa..53193d8ceb7cdb 100644 --- a/android_webview/browser/aw_metrics_service_client.cc +++ b/android_webview/browser/aw_metrics_service_client.cc @@ -294,7 +294,6 @@ AwMetricsServiceClient::~AwMetricsServiceClient() {} // static void JNI_AwMetricsServiceClient_SetHaveMetricsConsent( JNIEnv* env, - const base::android::JavaParamRef& jcaller, jboolean consent) { g_lazy_instance_.Pointer()->SetHaveMetricsConsent(consent); } diff --git a/android_webview/browser/aw_quota_manager_bridge.cc b/android_webview/browser/aw_quota_manager_bridge.cc index bd559337e9a80f..a43ab3d3c8021f 100644 --- a/android_webview/browser/aw_quota_manager_bridge.cc +++ b/android_webview/browser/aw_quota_manager_bridge.cc @@ -153,8 +153,7 @@ void RunOnUIThread(base::OnceClosure task) { // static jlong JNI_AwQuotaManagerBridge_GetDefaultNativeAwQuotaManagerBridge( - JNIEnv* env, - const JavaParamRef& clazz) { + JNIEnv* env) { AwBrowserContext* browser_context = AwContentBrowserClient::GetAwBrowserContext(); diff --git a/android_webview/browser/aw_settings.cc b/android_webview/browser/aw_settings.cc index 93031b3d9a9aaf..b0791fdf6ebfa2 100644 --- a/android_webview/browser/aw_settings.cc +++ b/android_webview/browser/aw_settings.cc @@ -502,8 +502,7 @@ static jlong JNI_AwSettings_Init(JNIEnv* env, } static ScopedJavaLocalRef JNI_AwSettings_GetDefaultUserAgent( - JNIEnv* env, - const JavaParamRef& clazz) { + JNIEnv* env) { return base::android::ConvertUTF8ToJavaString(env, GetUserAgent()); } diff --git a/android_webview/browser/aw_web_contents_delegate.cc b/android_webview/browser/aw_web_contents_delegate.cc index f2366f95365594..c0c6604b510672 100644 --- a/android_webview/browser/aw_web_contents_delegate.cc +++ b/android_webview/browser/aw_web_contents_delegate.cc @@ -319,7 +319,6 @@ AwWebContentsDelegate::TakeFileSelectListener() { static void JNI_AwWebContentsDelegate_FilesSelectedInChooser( JNIEnv* env, - const JavaParamRef& clazz, jint process_id, jint render_id, jint mode_flags, diff --git a/android_webview/test/embedded_test_server/aw_embedded_test_server.cc b/android_webview/test/embedded_test_server/aw_embedded_test_server.cc index 26342c642ffe92..781384b8965c8d 100644 --- a/android_webview/test/embedded_test_server/aw_embedded_test_server.cc +++ b/android_webview/test/embedded_test_server/aw_embedded_test_server.cc @@ -219,8 +219,7 @@ std::unique_ptr HandleImageOnloadHtml( // static ScopedJavaLocalRef JNI_AwEmbeddedTestServerImpl_GetHandlers( - JNIEnv* env, - const JavaParamRef&) { + JNIEnv* env) { std::vector handlers = { reinterpret_cast(&HandleClickRedirect), reinterpret_cast(&HandleEchoHeaderAndSetData), diff --git a/base/android/application_status_listener.cc b/base/android/application_status_listener.cc index 9eea2d4759495a..885edb81184e01 100644 --- a/base/android/application_status_listener.cc +++ b/base/android/application_status_listener.cc @@ -92,7 +92,6 @@ ApplicationState ApplicationStatusListener::GetState() { static void JNI_ApplicationStatus_OnApplicationStateChange( JNIEnv* env, - const JavaParamRef& clazz, jint new_state) { ApplicationState application_state = static_cast(new_state); ApplicationStatusListener::NotifyApplicationStateChange(application_state); diff --git a/base/android/child_process_service.cc b/base/android/child_process_service.cc index 013a70b564d2e2..93c03d412f06c0 100644 --- a/base/android/child_process_service.cc +++ b/base/android/child_process_service.cc @@ -20,7 +20,6 @@ namespace android { void JNI_ChildProcessService_RegisterFileDescriptors( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_keys, const JavaParamRef& j_ids, const JavaParamRef& j_fds, @@ -67,9 +66,7 @@ void JNI_ChildProcessService_RegisterFileDescriptors( } } -void JNI_ChildProcessService_ExitChildProcess( - JNIEnv* env, - const JavaParamRef& clazz) { +void JNI_ChildProcessService_ExitChildProcess(JNIEnv* env) { VLOG(0) << "ChildProcessService: Exiting child process."; base::android::LibraryLoaderExitHook(); _exit(0); diff --git a/base/android/command_line_android.cc b/base/android/command_line_android.cc index fd1cd2457699ae..4fbf14faae7d12 100644 --- a/base/android/command_line_android.cc +++ b/base/android/command_line_android.cc @@ -34,7 +34,6 @@ void JNI_CommandLine_AppendJavaStringArrayToCommandLine( static jboolean JNI_CommandLine_HasSwitch( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jswitch) { std::string switch_string(ConvertJavaStringToUTF8(env, jswitch)); return CommandLine::ForCurrentProcess()->HasSwitch(switch_string); @@ -42,7 +41,6 @@ static jboolean JNI_CommandLine_HasSwitch( static ScopedJavaLocalRef JNI_CommandLine_GetSwitchValue( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jswitch) { std::string switch_string(ConvertJavaStringToUTF8(env, jswitch)); std::string value(CommandLine::ForCurrentProcess()->GetSwitchValueNative( @@ -53,7 +51,6 @@ static ScopedJavaLocalRef JNI_CommandLine_GetSwitchValue( } static void JNI_CommandLine_AppendSwitch(JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jswitch) { std::string switch_string(ConvertJavaStringToUTF8(env, jswitch)); CommandLine::ForCurrentProcess()->AppendSwitch(switch_string); @@ -61,7 +58,6 @@ static void JNI_CommandLine_AppendSwitch(JNIEnv* env, static void JNI_CommandLine_AppendSwitchWithValue( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jswitch, const JavaParamRef& jvalue) { std::string switch_string(ConvertJavaStringToUTF8(env, jswitch)); @@ -72,14 +68,12 @@ static void JNI_CommandLine_AppendSwitchWithValue( static void JNI_CommandLine_AppendSwitchesAndArguments( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& array) { JNI_CommandLine_AppendJavaStringArrayToCommandLine(env, array, false); } static void JNI_CommandLine_Init( JNIEnv* env, - const JavaParamRef& jclazz, const JavaParamRef& init_command_line) { // TODO(port): Make an overload of Init() that takes StringVector rather than // have to round-trip via AppendArguments. diff --git a/base/android/cpu_features.cc b/base/android/cpu_features.cc index 7c1dbe314cbd21..0040e6cf4b648f 100644 --- a/base/android/cpu_features.cc +++ b/base/android/cpu_features.cc @@ -10,11 +10,11 @@ namespace base { namespace android { -jint JNI_CpuFeatures_GetCoreCount(JNIEnv*, const JavaParamRef&) { +jint JNI_CpuFeatures_GetCoreCount(JNIEnv*) { return android_getCpuCount(); } -jlong JNI_CpuFeatures_GetCpuFeatures(JNIEnv*, const JavaParamRef&) { +jlong JNI_CpuFeatures_GetCpuFeatures(JNIEnv*) { return android_getCpuFeatures(); } diff --git a/base/android/early_trace_event_binding.cc b/base/android/early_trace_event_binding.cc index 93369d93175aee..94611e381d5adc 100644 --- a/base/android/early_trace_event_binding.cc +++ b/base/android/early_trace_event_binding.cc @@ -18,7 +18,6 @@ constexpr const char kEarlyJavaCategory[] = "EarlyJava"; static void JNI_EarlyTraceEvent_RecordEarlyEvent( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jname, jlong begin_time_ns, jlong end_time_ns, @@ -39,7 +38,6 @@ static void JNI_EarlyTraceEvent_RecordEarlyEvent( static void JNI_EarlyTraceEvent_RecordEarlyStartAsyncEvent( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jname, jlong id, jlong timestamp_ns) { @@ -53,7 +51,6 @@ static void JNI_EarlyTraceEvent_RecordEarlyStartAsyncEvent( static void JNI_EarlyTraceEvent_RecordEarlyFinishAsyncEvent( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jname, jlong id, jlong timestamp_ns) { diff --git a/base/android/field_trial_list.cc b/base/android/field_trial_list.cc index cc66af14c717c8..9f69f479ce826b 100644 --- a/base/android/field_trial_list.cc +++ b/base/android/field_trial_list.cc @@ -51,7 +51,6 @@ base::LazyInstance::Leaky g_trial_logger = static ScopedJavaLocalRef JNI_FieldTrialList_FindFullName( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jtrial_name) { std::string trial_name(ConvertJavaStringToUTF8(env, jtrial_name)); return ConvertUTF8ToJavaString( @@ -60,7 +59,6 @@ static ScopedJavaLocalRef JNI_FieldTrialList_FindFullName( static jboolean JNI_FieldTrialList_TrialExists( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jtrial_name) { std::string trial_name(ConvertJavaStringToUTF8(env, jtrial_name)); return base::FieldTrialList::TrialExists(trial_name); @@ -68,7 +66,6 @@ static jboolean JNI_FieldTrialList_TrialExists( static ScopedJavaLocalRef JNI_FieldTrialList_GetVariationParameter( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jtrial_name, const JavaParamRef& jparameter_key) { std::map parameters; @@ -78,9 +75,7 @@ static ScopedJavaLocalRef JNI_FieldTrialList_GetVariationParameter( env, parameters[ConvertJavaStringToUTF8(env, jparameter_key)]); } -static void JNI_FieldTrialList_LogActiveTrials( - JNIEnv* env, - const base::android::JavaParamRef& clazz) { +static void JNI_FieldTrialList_LogActiveTrials(JNIEnv* env) { DCHECK(!g_trial_logger.IsCreated()); // This need only be called once. LOG(INFO) << "Logging active field trials..."; diff --git a/base/android/important_file_writer_android.cc b/base/android/important_file_writer_android.cc index 8d9e8dc0df099a..ed48a90259be85 100644 --- a/base/android/important_file_writer_android.cc +++ b/base/android/important_file_writer_android.cc @@ -15,7 +15,6 @@ namespace android { static jboolean JNI_ImportantFileWriterAndroid_WriteFileAtomically( JNIEnv* env, - const JavaParamRef& /* clazz */, const JavaParamRef& file_name, const JavaParamRef& data) { // This is called on the UI thread during shutdown to save tab data, so diff --git a/base/android/java_exception_reporter.cc b/base/android/java_exception_reporter.cc index 96eb38e5811dbf..1705eaa00fb5c3 100644 --- a/base/android/java_exception_reporter.cc +++ b/base/android/java_exception_reporter.cc @@ -44,7 +44,6 @@ void SetJavaException(const char* exception) { void JNI_JavaExceptionReporter_ReportJavaException( JNIEnv* env, - const JavaParamRef& jcaller, jboolean crash_after_report, const JavaParamRef& e) { std::string exception_info = base::android::GetJavaExceptionInfo(env, e); @@ -59,7 +58,6 @@ void JNI_JavaExceptionReporter_ReportJavaException( void JNI_JavaExceptionReporter_ReportJavaStackTrace( JNIEnv* env, - const JavaParamRef& jcaller, const JavaParamRef& stackTrace) { SetJavaException(ConvertJavaStringToUTF8(stackTrace).c_str()); base::debug::DumpWithoutCrashing(); diff --git a/base/android/jni_generator/golden/HashedSampleForAnnotationProcessor_jni.golden b/base/android/jni_generator/golden/HashedSampleForAnnotationProcessor_jni.golden index 545c0508e401ee..ce5b642f7614ea 100644 --- a/base/android/jni_generator/golden/HashedSampleForAnnotationProcessor_jni.golden +++ b/base/android/jni_generator/golden/HashedSampleForAnnotationProcessor_jni.golden @@ -23,81 +23,70 @@ // Step 3: Method stubs. -static void JNI_SampleForAnnotationProcessor_Foo(JNIEnv* env, const - base::android::JavaParamRef& jcaller); +static void JNI_SampleForAnnotationProcessor_Foo(JNIEnv* env); JNI_GENERATOR_EXPORT void Java_J_N_MygCV2jQ( JNIEnv* env, jclass jcaller) { - return JNI_SampleForAnnotationProcessor_Foo(env, base::android::JavaParamRef(env, - jcaller)); + return JNI_SampleForAnnotationProcessor_Foo(env); } static base::android::ScopedJavaLocalRef JNI_SampleForAnnotationProcessor_Bar(JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& sample); JNI_GENERATOR_EXPORT jobject Java_J_N_MHuqnmXT( JNIEnv* env, jclass jcaller, jobject sample) { - return JNI_SampleForAnnotationProcessor_Bar(env, base::android::JavaParamRef(env, - jcaller), base::android::JavaParamRef(env, sample)).Release(); + return JNI_SampleForAnnotationProcessor_Bar(env, base::android::JavaParamRef(env, + sample)).Release(); } static base::android::ScopedJavaLocalRef JNI_SampleForAnnotationProcessor_RevString(JNIEnv* - env, const base::android::JavaParamRef& jcaller, - const base::android::JavaParamRef& stringToReverse); + env, const base::android::JavaParamRef& stringToReverse); JNI_GENERATOR_EXPORT jstring Java_J_N_MM5Xkwyy( JNIEnv* env, jclass jcaller, jstring stringToReverse) { - return JNI_SampleForAnnotationProcessor_RevString(env, base::android::JavaParamRef(env, - jcaller), base::android::JavaParamRef(env, stringToReverse)).Release(); + return JNI_SampleForAnnotationProcessor_RevString(env, base::android::JavaParamRef(env, + stringToReverse)).Release(); } static base::android::ScopedJavaLocalRef JNI_SampleForAnnotationProcessor_SendToNative(JNIEnv* env, const - base::android::JavaParamRef& jcaller, - const base::android::JavaParamRef& strs); + base::android::JavaParamRef& strs); JNI_GENERATOR_EXPORT jobjectArray Java_J_N_MAC2QhR9( JNIEnv* env, jclass jcaller, jobjectArray strs) { - return JNI_SampleForAnnotationProcessor_SendToNative(env, base::android::JavaParamRef(env, - jcaller), base::android::JavaParamRef(env, strs)).Release(); + return JNI_SampleForAnnotationProcessor_SendToNative(env, + base::android::JavaParamRef(env, strs)).Release(); } static base::android::ScopedJavaLocalRef JNI_SampleForAnnotationProcessor_SendSamplesToNative(JNIEnv* env, const - base::android::JavaParamRef& jcaller, - const base::android::JavaParamRef& strs); + base::android::JavaParamRef& strs); JNI_GENERATOR_EXPORT jobjectArray Java_J_N_MGhRh4Nd( JNIEnv* env, jclass jcaller, jobjectArray strs) { return JNI_SampleForAnnotationProcessor_SendSamplesToNative(env, - base::android::JavaParamRef(env, jcaller), base::android::JavaParamRef(env, strs)).Release(); } -static jboolean JNI_SampleForAnnotationProcessor_HasPhalange(JNIEnv* env, const - base::android::JavaParamRef& jcaller); +static jboolean JNI_SampleForAnnotationProcessor_HasPhalange(JNIEnv* env); JNI_GENERATOR_EXPORT jboolean Java_J_N_MW0aEs4h( JNIEnv* env, jclass jcaller) { - return JNI_SampleForAnnotationProcessor_HasPhalange(env, base::android::JavaParamRef(env, - jcaller)); + return JNI_SampleForAnnotationProcessor_HasPhalange(env); } static base::android::ScopedJavaLocalRef - JNI_SampleForAnnotationProcessor_TestAllPrimitives(JNIEnv* env, const - base::android::JavaParamRef& jcaller, - jint zint, + JNI_SampleForAnnotationProcessor_TestAllPrimitives(JNIEnv* env, jint zint, const base::android::JavaParamRef& ints, jlong zlong, const base::android::JavaParamRef& longs, @@ -133,8 +122,7 @@ JNI_GENERATOR_EXPORT jintArray Java_J_N_MlVFI4RX( jfloatArray floats, jboolean zbool, jbooleanArray bools) { - return JNI_SampleForAnnotationProcessor_TestAllPrimitives(env, - base::android::JavaParamRef(env, jcaller), zint, + return JNI_SampleForAnnotationProcessor_TestAllPrimitives(env, zint, base::android::JavaParamRef(env, ints), zlong, base::android::JavaParamRef(env, longs), zshort, base::android::JavaParamRef(env, shorts), zchar, @@ -146,8 +134,7 @@ JNI_GENERATOR_EXPORT jintArray Java_J_N_MlVFI4RX( } static void JNI_SampleForAnnotationProcessor_TestSpecialTypes(JNIEnv* env, const - base::android::JavaParamRef& jcaller, - const base::android::JavaParamRef& clazz, + base::android::JavaParamRef& clazz, const base::android::JavaParamRef& classes, const base::android::JavaParamRef& throwable, const base::android::JavaParamRef& throwables, @@ -172,8 +159,8 @@ JNI_GENERATOR_EXPORT void Java_J_N_MqOnlud7( jobject obj, jobjectArray objects) { return JNI_SampleForAnnotationProcessor_TestSpecialTypes(env, - base::android::JavaParamRef(env, jcaller), base::android::JavaParamRef(env, - clazz), base::android::JavaParamRef(env, classes), + base::android::JavaParamRef(env, clazz), + base::android::JavaParamRef(env, classes), base::android::JavaParamRef(env, throwable), base::android::JavaParamRef(env, throwables), base::android::JavaParamRef(env, string), @@ -185,113 +172,93 @@ JNI_GENERATOR_EXPORT void Java_J_N_MqOnlud7( } static base::android::ScopedJavaLocalRef - JNI_SampleForAnnotationProcessor_ReturnThrowable(JNIEnv* env, const - base::android::JavaParamRef& jcaller); + JNI_SampleForAnnotationProcessor_ReturnThrowable(JNIEnv* env); JNI_GENERATOR_EXPORT jthrowable Java_J_N_MuZc76Vt( JNIEnv* env, jclass jcaller) { - return JNI_SampleForAnnotationProcessor_ReturnThrowable(env, - base::android::JavaParamRef(env, jcaller)).Release(); + return JNI_SampleForAnnotationProcessor_ReturnThrowable(env).Release(); } static base::android::ScopedJavaLocalRef - JNI_SampleForAnnotationProcessor_ReturnThrowables(JNIEnv* env, const - base::android::JavaParamRef& jcaller); + JNI_SampleForAnnotationProcessor_ReturnThrowables(JNIEnv* env); JNI_GENERATOR_EXPORT jobjectArray Java_J_N_MAD53J7V( JNIEnv* env, jclass jcaller) { - return JNI_SampleForAnnotationProcessor_ReturnThrowables(env, - base::android::JavaParamRef(env, jcaller)).Release(); + return JNI_SampleForAnnotationProcessor_ReturnThrowables(env).Release(); } static base::android::ScopedJavaLocalRef - JNI_SampleForAnnotationProcessor_ReturnClass(JNIEnv* env, const - base::android::JavaParamRef& jcaller); + JNI_SampleForAnnotationProcessor_ReturnClass(JNIEnv* env); JNI_GENERATOR_EXPORT jclass Java_J_N_M_00024ZgOi4g( JNIEnv* env, jclass jcaller) { - return JNI_SampleForAnnotationProcessor_ReturnClass(env, base::android::JavaParamRef(env, - jcaller)).Release(); + return JNI_SampleForAnnotationProcessor_ReturnClass(env).Release(); } static base::android::ScopedJavaLocalRef - JNI_SampleForAnnotationProcessor_ReturnClasses(JNIEnv* env, const - base::android::JavaParamRef& jcaller); + JNI_SampleForAnnotationProcessor_ReturnClasses(JNIEnv* env); JNI_GENERATOR_EXPORT jobjectArray Java_J_N_M_00024hL1577( JNIEnv* env, jclass jcaller) { - return JNI_SampleForAnnotationProcessor_ReturnClasses(env, - base::android::JavaParamRef(env, jcaller)).Release(); + return JNI_SampleForAnnotationProcessor_ReturnClasses(env).Release(); } static base::android::ScopedJavaLocalRef - JNI_SampleForAnnotationProcessor_ReturnString(JNIEnv* env, const - base::android::JavaParamRef& jcaller); + JNI_SampleForAnnotationProcessor_ReturnString(JNIEnv* env); JNI_GENERATOR_EXPORT jstring Java_J_N_M0k1OjBK( JNIEnv* env, jclass jcaller) { - return JNI_SampleForAnnotationProcessor_ReturnString(env, base::android::JavaParamRef(env, - jcaller)).Release(); + return JNI_SampleForAnnotationProcessor_ReturnString(env).Release(); } static base::android::ScopedJavaLocalRef - JNI_SampleForAnnotationProcessor_ReturnStrings(JNIEnv* env, const - base::android::JavaParamRef& jcaller); + JNI_SampleForAnnotationProcessor_ReturnStrings(JNIEnv* env); JNI_GENERATOR_EXPORT jobjectArray Java_J_N_Mssfs54E( JNIEnv* env, jclass jcaller) { - return JNI_SampleForAnnotationProcessor_ReturnStrings(env, - base::android::JavaParamRef(env, jcaller)).Release(); + return JNI_SampleForAnnotationProcessor_ReturnStrings(env).Release(); } static base::android::ScopedJavaLocalRef - JNI_SampleForAnnotationProcessor_ReturnStruct(JNIEnv* env, const - base::android::JavaParamRef& jcaller); + JNI_SampleForAnnotationProcessor_ReturnStruct(JNIEnv* env); JNI_GENERATOR_EXPORT jobject Java_J_N_MSzcel_1H( JNIEnv* env, jclass jcaller) { - return JNI_SampleForAnnotationProcessor_ReturnStruct(env, base::android::JavaParamRef(env, - jcaller)).Release(); + return JNI_SampleForAnnotationProcessor_ReturnStruct(env).Release(); } static base::android::ScopedJavaLocalRef - JNI_SampleForAnnotationProcessor_ReturnStructs(JNIEnv* env, const - base::android::JavaParamRef& jcaller); + JNI_SampleForAnnotationProcessor_ReturnStructs(JNIEnv* env); JNI_GENERATOR_EXPORT jobjectArray Java_J_N_MIBrQLK4( JNIEnv* env, jclass jcaller) { - return JNI_SampleForAnnotationProcessor_ReturnStructs(env, - base::android::JavaParamRef(env, jcaller)).Release(); + return JNI_SampleForAnnotationProcessor_ReturnStructs(env).Release(); } static base::android::ScopedJavaLocalRef - JNI_SampleForAnnotationProcessor_ReturnObject(JNIEnv* env, const - base::android::JavaParamRef& jcaller); + JNI_SampleForAnnotationProcessor_ReturnObject(JNIEnv* env); JNI_GENERATOR_EXPORT jobject Java_J_N_M_00024hPywjv( JNIEnv* env, jclass jcaller) { - return JNI_SampleForAnnotationProcessor_ReturnObject(env, base::android::JavaParamRef(env, - jcaller)).Release(); + return JNI_SampleForAnnotationProcessor_ReturnObject(env).Release(); } static base::android::ScopedJavaLocalRef - JNI_SampleForAnnotationProcessor_ReturnObjects(JNIEnv* env, const - base::android::JavaParamRef& jcaller); + JNI_SampleForAnnotationProcessor_ReturnObjects(JNIEnv* env); JNI_GENERATOR_EXPORT jobjectArray Java_J_N_MPpCU1l5( JNIEnv* env, jclass jcaller) { - return JNI_SampleForAnnotationProcessor_ReturnObjects(env, - base::android::JavaParamRef(env, jcaller)).Release(); + return JNI_SampleForAnnotationProcessor_ReturnObjects(env).Release(); } diff --git a/base/android/jni_generator/golden/SampleForAnnotationProcessor_jni.golden b/base/android/jni_generator/golden/SampleForAnnotationProcessor_jni.golden index a8c0f4caa5ce24..313766fed14435 100644 --- a/base/android/jni_generator/golden/SampleForAnnotationProcessor_jni.golden +++ b/base/android/jni_generator/golden/SampleForAnnotationProcessor_jni.golden @@ -23,19 +23,16 @@ // Step 3: Method stubs. -static void JNI_SampleForAnnotationProcessor_Foo(JNIEnv* env, const - base::android::JavaParamRef& jcaller); +static void JNI_SampleForAnnotationProcessor_Foo(JNIEnv* env); JNI_GENERATOR_EXPORT void Java_org_chromium_base_natives_GEN_1JNI_org_1chromium_1example_1jni_11generator_1SampleForAnnotationProcessor_1foo( JNIEnv* env, jclass jcaller) { - return JNI_SampleForAnnotationProcessor_Foo(env, base::android::JavaParamRef(env, - jcaller)); + return JNI_SampleForAnnotationProcessor_Foo(env); } static base::android::ScopedJavaLocalRef JNI_SampleForAnnotationProcessor_Bar(JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& sample); JNI_GENERATOR_EXPORT jobject @@ -43,41 +40,38 @@ JNI_GENERATOR_EXPORT jobject JNIEnv* env, jclass jcaller, jobject sample) { - return JNI_SampleForAnnotationProcessor_Bar(env, base::android::JavaParamRef(env, - jcaller), base::android::JavaParamRef(env, sample)).Release(); + return JNI_SampleForAnnotationProcessor_Bar(env, base::android::JavaParamRef(env, + sample)).Release(); } static base::android::ScopedJavaLocalRef JNI_SampleForAnnotationProcessor_RevString(JNIEnv* - env, const base::android::JavaParamRef& jcaller, - const base::android::JavaParamRef& stringToReverse); + env, const base::android::JavaParamRef& stringToReverse); JNI_GENERATOR_EXPORT jstring Java_org_chromium_base_natives_GEN_1JNI_org_1chromium_1example_1jni_11generator_1SampleForAnnotationProcessor_1revString( JNIEnv* env, jclass jcaller, jstring stringToReverse) { - return JNI_SampleForAnnotationProcessor_RevString(env, base::android::JavaParamRef(env, - jcaller), base::android::JavaParamRef(env, stringToReverse)).Release(); + return JNI_SampleForAnnotationProcessor_RevString(env, base::android::JavaParamRef(env, + stringToReverse)).Release(); } static base::android::ScopedJavaLocalRef JNI_SampleForAnnotationProcessor_SendToNative(JNIEnv* env, const - base::android::JavaParamRef& jcaller, - const base::android::JavaParamRef& strs); + base::android::JavaParamRef& strs); JNI_GENERATOR_EXPORT jobjectArray Java_org_chromium_base_natives_GEN_1JNI_org_1chromium_1example_1jni_11generator_1SampleForAnnotationProcessor_1sendToNative( JNIEnv* env, jclass jcaller, jobjectArray strs) { - return JNI_SampleForAnnotationProcessor_SendToNative(env, base::android::JavaParamRef(env, - jcaller), base::android::JavaParamRef(env, strs)).Release(); + return JNI_SampleForAnnotationProcessor_SendToNative(env, + base::android::JavaParamRef(env, strs)).Release(); } static base::android::ScopedJavaLocalRef JNI_SampleForAnnotationProcessor_SendSamplesToNative(JNIEnv* env, const - base::android::JavaParamRef& jcaller, - const base::android::JavaParamRef& strs); + base::android::JavaParamRef& strs); JNI_GENERATOR_EXPORT jobjectArray Java_org_chromium_base_natives_GEN_1JNI_org_1chromium_1example_1jni_11generator_1SampleForAnnotationProcessor_1sendSamplesToNative( @@ -85,25 +79,20 @@ JNI_GENERATOR_EXPORT jobjectArray jclass jcaller, jobjectArray strs) { return JNI_SampleForAnnotationProcessor_SendSamplesToNative(env, - base::android::JavaParamRef(env, jcaller), base::android::JavaParamRef(env, strs)).Release(); } -static jboolean JNI_SampleForAnnotationProcessor_HasPhalange(JNIEnv* env, const - base::android::JavaParamRef& jcaller); +static jboolean JNI_SampleForAnnotationProcessor_HasPhalange(JNIEnv* env); JNI_GENERATOR_EXPORT jboolean Java_org_chromium_base_natives_GEN_1JNI_org_1chromium_1example_1jni_11generator_1SampleForAnnotationProcessor_1hasPhalange( JNIEnv* env, jclass jcaller) { - return JNI_SampleForAnnotationProcessor_HasPhalange(env, base::android::JavaParamRef(env, - jcaller)); + return JNI_SampleForAnnotationProcessor_HasPhalange(env); } static base::android::ScopedJavaLocalRef - JNI_SampleForAnnotationProcessor_TestAllPrimitives(JNIEnv* env, const - base::android::JavaParamRef& jcaller, - jint zint, + JNI_SampleForAnnotationProcessor_TestAllPrimitives(JNIEnv* env, jint zint, const base::android::JavaParamRef& ints, jlong zlong, const base::android::JavaParamRef& longs, @@ -140,8 +129,7 @@ JNI_GENERATOR_EXPORT jintArray jfloatArray floats, jboolean zbool, jbooleanArray bools) { - return JNI_SampleForAnnotationProcessor_TestAllPrimitives(env, - base::android::JavaParamRef(env, jcaller), zint, + return JNI_SampleForAnnotationProcessor_TestAllPrimitives(env, zint, base::android::JavaParamRef(env, ints), zlong, base::android::JavaParamRef(env, longs), zshort, base::android::JavaParamRef(env, shorts), zchar, @@ -153,8 +141,7 @@ JNI_GENERATOR_EXPORT jintArray } static void JNI_SampleForAnnotationProcessor_TestSpecialTypes(JNIEnv* env, const - base::android::JavaParamRef& jcaller, - const base::android::JavaParamRef& clazz, + base::android::JavaParamRef& clazz, const base::android::JavaParamRef& classes, const base::android::JavaParamRef& throwable, const base::android::JavaParamRef& throwables, @@ -180,8 +167,8 @@ JNI_GENERATOR_EXPORT void jobject obj, jobjectArray objects) { return JNI_SampleForAnnotationProcessor_TestSpecialTypes(env, - base::android::JavaParamRef(env, jcaller), base::android::JavaParamRef(env, - clazz), base::android::JavaParamRef(env, classes), + base::android::JavaParamRef(env, clazz), + base::android::JavaParamRef(env, classes), base::android::JavaParamRef(env, throwable), base::android::JavaParamRef(env, throwables), base::android::JavaParamRef(env, string), @@ -193,123 +180,103 @@ JNI_GENERATOR_EXPORT void } static base::android::ScopedJavaLocalRef - JNI_SampleForAnnotationProcessor_ReturnThrowable(JNIEnv* env, const - base::android::JavaParamRef& jcaller); + JNI_SampleForAnnotationProcessor_ReturnThrowable(JNIEnv* env); JNI_GENERATOR_EXPORT jthrowable Java_org_chromium_base_natives_GEN_1JNI_org_1chromium_1example_1jni_11generator_1SampleForAnnotationProcessor_1returnThrowable( JNIEnv* env, jclass jcaller) { - return JNI_SampleForAnnotationProcessor_ReturnThrowable(env, - base::android::JavaParamRef(env, jcaller)).Release(); + return JNI_SampleForAnnotationProcessor_ReturnThrowable(env).Release(); } static base::android::ScopedJavaLocalRef - JNI_SampleForAnnotationProcessor_ReturnThrowables(JNIEnv* env, const - base::android::JavaParamRef& jcaller); + JNI_SampleForAnnotationProcessor_ReturnThrowables(JNIEnv* env); JNI_GENERATOR_EXPORT jobjectArray Java_org_chromium_base_natives_GEN_1JNI_org_1chromium_1example_1jni_11generator_1SampleForAnnotationProcessor_1returnThrowables( JNIEnv* env, jclass jcaller) { - return JNI_SampleForAnnotationProcessor_ReturnThrowables(env, - base::android::JavaParamRef(env, jcaller)).Release(); + return JNI_SampleForAnnotationProcessor_ReturnThrowables(env).Release(); } static base::android::ScopedJavaLocalRef - JNI_SampleForAnnotationProcessor_ReturnClass(JNIEnv* env, const - base::android::JavaParamRef& jcaller); + JNI_SampleForAnnotationProcessor_ReturnClass(JNIEnv* env); JNI_GENERATOR_EXPORT jclass Java_org_chromium_base_natives_GEN_1JNI_org_1chromium_1example_1jni_11generator_1SampleForAnnotationProcessor_1returnClass( JNIEnv* env, jclass jcaller) { - return JNI_SampleForAnnotationProcessor_ReturnClass(env, base::android::JavaParamRef(env, - jcaller)).Release(); + return JNI_SampleForAnnotationProcessor_ReturnClass(env).Release(); } static base::android::ScopedJavaLocalRef - JNI_SampleForAnnotationProcessor_ReturnClasses(JNIEnv* env, const - base::android::JavaParamRef& jcaller); + JNI_SampleForAnnotationProcessor_ReturnClasses(JNIEnv* env); JNI_GENERATOR_EXPORT jobjectArray Java_org_chromium_base_natives_GEN_1JNI_org_1chromium_1example_1jni_11generator_1SampleForAnnotationProcessor_1returnClasses( JNIEnv* env, jclass jcaller) { - return JNI_SampleForAnnotationProcessor_ReturnClasses(env, - base::android::JavaParamRef(env, jcaller)).Release(); + return JNI_SampleForAnnotationProcessor_ReturnClasses(env).Release(); } static base::android::ScopedJavaLocalRef - JNI_SampleForAnnotationProcessor_ReturnString(JNIEnv* env, const - base::android::JavaParamRef& jcaller); + JNI_SampleForAnnotationProcessor_ReturnString(JNIEnv* env); JNI_GENERATOR_EXPORT jstring Java_org_chromium_base_natives_GEN_1JNI_org_1chromium_1example_1jni_11generator_1SampleForAnnotationProcessor_1returnString( JNIEnv* env, jclass jcaller) { - return JNI_SampleForAnnotationProcessor_ReturnString(env, base::android::JavaParamRef(env, - jcaller)).Release(); + return JNI_SampleForAnnotationProcessor_ReturnString(env).Release(); } static base::android::ScopedJavaLocalRef - JNI_SampleForAnnotationProcessor_ReturnStrings(JNIEnv* env, const - base::android::JavaParamRef& jcaller); + JNI_SampleForAnnotationProcessor_ReturnStrings(JNIEnv* env); JNI_GENERATOR_EXPORT jobjectArray Java_org_chromium_base_natives_GEN_1JNI_org_1chromium_1example_1jni_11generator_1SampleForAnnotationProcessor_1returnStrings( JNIEnv* env, jclass jcaller) { - return JNI_SampleForAnnotationProcessor_ReturnStrings(env, - base::android::JavaParamRef(env, jcaller)).Release(); + return JNI_SampleForAnnotationProcessor_ReturnStrings(env).Release(); } static base::android::ScopedJavaLocalRef - JNI_SampleForAnnotationProcessor_ReturnStruct(JNIEnv* env, const - base::android::JavaParamRef& jcaller); + JNI_SampleForAnnotationProcessor_ReturnStruct(JNIEnv* env); JNI_GENERATOR_EXPORT jobject Java_org_chromium_base_natives_GEN_1JNI_org_1chromium_1example_1jni_11generator_1SampleForAnnotationProcessor_1returnStruct( JNIEnv* env, jclass jcaller) { - return JNI_SampleForAnnotationProcessor_ReturnStruct(env, base::android::JavaParamRef(env, - jcaller)).Release(); + return JNI_SampleForAnnotationProcessor_ReturnStruct(env).Release(); } static base::android::ScopedJavaLocalRef - JNI_SampleForAnnotationProcessor_ReturnStructs(JNIEnv* env, const - base::android::JavaParamRef& jcaller); + JNI_SampleForAnnotationProcessor_ReturnStructs(JNIEnv* env); JNI_GENERATOR_EXPORT jobjectArray Java_org_chromium_base_natives_GEN_1JNI_org_1chromium_1example_1jni_11generator_1SampleForAnnotationProcessor_1returnStructs( JNIEnv* env, jclass jcaller) { - return JNI_SampleForAnnotationProcessor_ReturnStructs(env, - base::android::JavaParamRef(env, jcaller)).Release(); + return JNI_SampleForAnnotationProcessor_ReturnStructs(env).Release(); } static base::android::ScopedJavaLocalRef - JNI_SampleForAnnotationProcessor_ReturnObject(JNIEnv* env, const - base::android::JavaParamRef& jcaller); + JNI_SampleForAnnotationProcessor_ReturnObject(JNIEnv* env); JNI_GENERATOR_EXPORT jobject Java_org_chromium_base_natives_GEN_1JNI_org_1chromium_1example_1jni_11generator_1SampleForAnnotationProcessor_1returnObject( JNIEnv* env, jclass jcaller) { - return JNI_SampleForAnnotationProcessor_ReturnObject(env, base::android::JavaParamRef(env, - jcaller)).Release(); + return JNI_SampleForAnnotationProcessor_ReturnObject(env).Release(); } static base::android::ScopedJavaLocalRef - JNI_SampleForAnnotationProcessor_ReturnObjects(JNIEnv* env, const - base::android::JavaParamRef& jcaller); + JNI_SampleForAnnotationProcessor_ReturnObjects(JNIEnv* env); JNI_GENERATOR_EXPORT jobjectArray Java_org_chromium_base_natives_GEN_1JNI_org_1chromium_1example_1jni_11generator_1SampleForAnnotationProcessor_1returnObjects( JNIEnv* env, jclass jcaller) { - return JNI_SampleForAnnotationProcessor_ReturnObjects(env, - base::android::JavaParamRef(env, jcaller)).Release(); + return JNI_SampleForAnnotationProcessor_ReturnObjects(env).Release(); } diff --git a/base/android/jni_generator/golden/SampleForTests_jni.golden b/base/android/jni_generator/golden/SampleForTests_jni.golden index 049f6bcfe49957..78fe7dd95e23f3 100644 --- a/base/android/jni_generator/golden/SampleForTests_jni.golden +++ b/base/android/jni_generator/golden/SampleForTests_jni.golden @@ -125,15 +125,13 @@ JNI_GENERATOR_EXPORT jdouble jcaller)); } -static jfloat JNI_SampleForTests_GetFloatFunction(JNIEnv* env, const - base::android::JavaParamRef& jcaller); +static jfloat JNI_SampleForTests_GetFloatFunction(JNIEnv* env); JNI_GENERATOR_EXPORT jfloat Java_org_chromium_example_jni_1generator_SampleForTests_nativeGetFloatFunction( JNIEnv* env, jclass jcaller) { - return JNI_SampleForTests_GetFloatFunction(env, base::android::JavaParamRef(env, - jcaller)); + return JNI_SampleForTests_GetFloatFunction(env); } static void JNI_SampleForTests_SetNonPODDatatype(JNIEnv* env, const @@ -211,14 +209,13 @@ JNI_GENERATOR_EXPORT jstring return native->ReturnAString(env, base::android::JavaParamRef(env, jcaller)).Release(); } -static jint JNI_InnerClass_GetInnerIntFunction(JNIEnv* env, const - base::android::JavaParamRef& jcaller); +static jint JNI_InnerClass_GetInnerIntFunction(JNIEnv* env); JNI_GENERATOR_EXPORT jint Java_org_chromium_example_jni_1generator_SampleForTests_00024InnerClass_nativeGetInnerIntFunction( JNIEnv* env, jclass jcaller) { - return JNI_InnerClass_GetInnerIntFunction(env, base::android::JavaParamRef(env, jcaller)); + return JNI_InnerClass_GetInnerIntFunction(env); } diff --git a/base/android/jni_generator/golden/testMultipleJNIAdditionalImport.golden b/base/android/jni_generator/golden/testMultipleJNIAdditionalImport.golden index 2bbcfd937a1494..38cca869c30e8b 100644 --- a/base/android/jni_generator/golden/testMultipleJNIAdditionalImport.golden +++ b/base/android/jni_generator/golden/testMultipleJNIAdditionalImport.golden @@ -35,8 +35,7 @@ inline jclass org_chromium_foo_Foo_clazz(JNIEnv* env) { // Step 3: Method stubs. -static void JNI_Foo_DoSomething(JNIEnv* env, const base::android::JavaParamRef& jcaller, - const base::android::JavaParamRef& callback1, +static void JNI_Foo_DoSomething(JNIEnv* env, const base::android::JavaParamRef& callback1, const base::android::JavaParamRef& callback2); JNI_GENERATOR_EXPORT void Java_org_chromium_foo_Foo_nativeDoSomething( @@ -44,8 +43,7 @@ JNI_GENERATOR_EXPORT void Java_org_chromium_foo_Foo_nativeDoSomething( jclass jcaller, jobject callback1, jobject callback2) { - return JNI_Foo_DoSomething(env, base::android::JavaParamRef(env, jcaller), - base::android::JavaParamRef(env, callback1), + return JNI_Foo_DoSomething(env, base::android::JavaParamRef(env, callback1), base::android::JavaParamRef(env, callback2)); } diff --git a/base/android/jni_generator/golden/testNatives.golden b/base/android/jni_generator/golden/testNatives.golden index 23598ffd593bc5..98b2568159e644 100644 --- a/base/android/jni_generator/golden/testNatives.golden +++ b/base/android/jni_generator/golden/testNatives.golden @@ -70,20 +70,18 @@ JNI_GENERATOR_EXPORT jlong Java_org_chromium_TestJni_nativeAddBookmark( } static base::android::ScopedJavaLocalRef JNI_TestJni_GetDomainAndRegistry(JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& url); JNI_GENERATOR_EXPORT jstring Java_org_chromium_TestJni_nativeGetDomainAndRegistry( JNIEnv* env, jclass jcaller, jstring url) { - return JNI_TestJni_GetDomainAndRegistry(env, base::android::JavaParamRef(env, jcaller), - base::android::JavaParamRef(env, url)).Release(); + return JNI_TestJni_GetDomainAndRegistry(env, base::android::JavaParamRef(env, + url)).Release(); } static void JNI_TestJni_CreateHistoricalTabFromState(JNIEnv* env, const - base::android::JavaParamRef& jcaller, - const base::android::JavaParamRef& state, + base::android::JavaParamRef& state, jint tab_index); JNI_GENERATOR_EXPORT void Java_org_chromium_TestJni_nativeCreateHistoricalTabFromState( @@ -91,8 +89,8 @@ JNI_GENERATOR_EXPORT void Java_org_chromium_TestJni_nativeCreateHistoricalTabFro jclass jcaller, jbyteArray state, jint tab_index) { - return JNI_TestJni_CreateHistoricalTabFromState(env, base::android::JavaParamRef(env, - jcaller), base::android::JavaParamRef(env, state), tab_index); + return JNI_TestJni_CreateHistoricalTabFromState(env, base::android::JavaParamRef(env, + state), tab_index); } static base::android::ScopedJavaLocalRef JNI_TestJni_GetStateAsByteArray(JNIEnv* env, @@ -108,13 +106,12 @@ JNI_GENERATOR_EXPORT jbyteArray Java_org_chromium_TestJni_nativeGetStateAsByteAr } static base::android::ScopedJavaLocalRef JNI_TestJni_GetAutofillProfileGUIDs(JNIEnv* - env, const base::android::JavaParamRef& jcaller); + env); JNI_GENERATOR_EXPORT jobjectArray Java_org_chromium_TestJni_nativeGetAutofillProfileGUIDs( JNIEnv* env, jclass jcaller) { - return JNI_TestJni_GetAutofillProfileGUIDs(env, base::android::JavaParamRef(env, - jcaller)).Release(); + return JNI_TestJni_GetAutofillProfileGUIDs(env).Release(); } static void JNI_TestJni_SetRecognitionResults(JNIEnv* env, const @@ -164,14 +161,12 @@ JNI_GENERATOR_EXPORT jint Java_org_chromium_TestJni_nativeFindAll( base::android::JavaParamRef(env, find)); } -static base::android::ScopedJavaLocalRef JNI_TestJni_GetInnerClass(JNIEnv* env, const - base::android::JavaParamRef& jcaller); +static base::android::ScopedJavaLocalRef JNI_TestJni_GetInnerClass(JNIEnv* env); JNI_GENERATOR_EXPORT jobject Java_org_chromium_TestJni_nativeGetInnerClass( JNIEnv* env, jclass jcaller) { - return JNI_TestJni_GetInnerClass(env, base::android::JavaParamRef(env, - jcaller)).Release(); + return JNI_TestJni_GetInnerClass(env).Release(); } JNI_GENERATOR_EXPORT jobject Java_org_chromium_TestJni_nativeQueryBitmap( @@ -207,15 +202,14 @@ JNI_GENERATOR_EXPORT void Java_org_chromium_TestJni_nativeGotOrientation( } static base::android::ScopedJavaLocalRef JNI_TestJni_MessWithJavaException(JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& e); JNI_GENERATOR_EXPORT jthrowable Java_org_chromium_TestJni_nativeMessWithJavaException( JNIEnv* env, jclass jcaller, jthrowable e) { - return JNI_TestJni_MessWithJavaException(env, base::android::JavaParamRef(env, jcaller), - base::android::JavaParamRef(env, e)).Release(); + return JNI_TestJni_MessWithJavaException(env, base::android::JavaParamRef(env, + e)).Release(); } diff --git a/base/android/jni_generator/golden/testProxyNatives.golden b/base/android/jni_generator/golden/testProxyNatives.golden index e63ed6a1ccc74a..2ac9308a6e76eb 100644 --- a/base/android/jni_generator/golden/testProxyNatives.golden +++ b/base/android/jni_generator/golden/testProxyNatives.golden @@ -23,17 +23,16 @@ // Step 3: Method stubs. -static void JNI_SampleProxyJni_Foo(JNIEnv* env, const base::android::JavaParamRef& jcaller); +static void JNI_SampleProxyJni_Foo(JNIEnv* env); JNI_GENERATOR_EXPORT void Java_org_chromium_base_natives_GEN_1JNI_org_1chromium_1example_1SampleProxyJni_1foo( JNIEnv* env, jclass jcaller) { - return JNI_SampleProxyJni_Foo(env, base::android::JavaParamRef(env, jcaller)); + return JNI_SampleProxyJni_Foo(env); } -static jint JNI_SampleProxyJni_Bar(JNIEnv* env, const base::android::JavaParamRef& jcaller, - jint x, +static jint JNI_SampleProxyJni_Bar(JNIEnv* env, jint x, jint y); JNI_GENERATOR_EXPORT jint @@ -42,12 +41,11 @@ JNI_GENERATOR_EXPORT jint jclass jcaller, jint x, jint y) { - return JNI_SampleProxyJni_Bar(env, base::android::JavaParamRef(env, jcaller), x, y); + return JNI_SampleProxyJni_Bar(env, x, y); } static base::android::ScopedJavaLocalRef JNI_SampleProxyJni_Foobar(JNIEnv* env, const - base::android::JavaParamRef& jcaller, - const base::android::JavaParamRef& x, + base::android::JavaParamRef& x, const base::android::JavaParamRef& y); JNI_GENERATOR_EXPORT jstring @@ -56,9 +54,8 @@ JNI_GENERATOR_EXPORT jstring jclass jcaller, jstring x, jstring y) { - return JNI_SampleProxyJni_Foobar(env, base::android::JavaParamRef(env, jcaller), - base::android::JavaParamRef(env, x), base::android::JavaParamRef(env, - y)).Release(); + return JNI_SampleProxyJni_Foobar(env, base::android::JavaParamRef(env, x), + base::android::JavaParamRef(env, y)).Release(); } diff --git a/base/android/jni_generator/golden/testProxyNativesWithNatives.golden b/base/android/jni_generator/golden/testProxyNativesWithNatives.golden index af194511b6301a..8486282fe3c76b 100644 --- a/base/android/jni_generator/golden/testProxyNativesWithNatives.golden +++ b/base/android/jni_generator/golden/testProxyNativesWithNatives.golden @@ -45,27 +45,26 @@ JNI_GENERATOR_EXPORT void Java_org_chromium_foo_Foo_nativeInstanceMethod( return native->InstanceMethod(env, base::android::JavaParamRef(env, jcaller)); } -static void JNI_Foo_StaticMethod(JNIEnv* env, const base::android::JavaParamRef& jcaller); +static void JNI_Foo_StaticMethod(JNIEnv* env); JNI_GENERATOR_EXPORT void Java_org_chromium_foo_Foo_nativeStaticMethod( JNIEnv* env, jclass jcaller) { TRACE_EVENT0("jni", "JNI_Foo_StaticMethod"); - return JNI_Foo_StaticMethod(env, base::android::JavaParamRef(env, jcaller)); + return JNI_Foo_StaticMethod(env); } -static void JNI_Foo_Foo(JNIEnv* env, const base::android::JavaParamRef& jcaller); +static void JNI_Foo_Foo(JNIEnv* env); JNI_GENERATOR_EXPORT void Java_org_chromium_base_natives_GEN_1JNI_org_1chromium_1foo_1Foo_1foo( JNIEnv* env, jclass jcaller) { TRACE_EVENT0("jni", "JNI_Foo_Foo"); - return JNI_Foo_Foo(env, base::android::JavaParamRef(env, jcaller)); + return JNI_Foo_Foo(env); } static base::android::ScopedJavaLocalRef JNI_Foo_Bar(JNIEnv* env, const - base::android::JavaParamRef& jcaller, - const base::android::JavaParamRef& s, + base::android::JavaParamRef& s, jint y, jchar x, jshort z); @@ -78,13 +77,11 @@ JNI_GENERATOR_EXPORT jstring Java_org_chromium_base_natives_GEN_1JNI_org_1chromi jchar x, jshort z) { TRACE_EVENT0("jni", "JNI_Foo_Bar"); - return JNI_Foo_Bar(env, base::android::JavaParamRef(env, jcaller), - base::android::JavaParamRef(env, s), y, x, z).Release(); + return JNI_Foo_Bar(env, base::android::JavaParamRef(env, s), y, x, z).Release(); } static base::android::ScopedJavaLocalRef JNI_Foo_Foobar(JNIEnv* env, const - base::android::JavaParamRef& jcaller, - const base::android::JavaParamRef& a); + base::android::JavaParamRef& a); JNI_GENERATOR_EXPORT jobjectArray Java_org_chromium_base_natives_GEN_1JNI_org_1chromium_1foo_1Foo_1foobar( @@ -92,8 +89,7 @@ JNI_GENERATOR_EXPORT jobjectArray jclass jcaller, jobjectArray a) { TRACE_EVENT0("jni", "JNI_Foo_Foobar"); - return JNI_Foo_Foobar(env, base::android::JavaParamRef(env, jcaller), - base::android::JavaParamRef(env, a)).Release(); + return JNI_Foo_Foobar(env, base::android::JavaParamRef(env, a)).Release(); } diff --git a/base/android/jni_generator/golden/testSingleJNIAdditionalImport.golden b/base/android/jni_generator/golden/testSingleJNIAdditionalImport.golden index 17d9cf3996d782..13fb55f32747fc 100644 --- a/base/android/jni_generator/golden/testSingleJNIAdditionalImport.golden +++ b/base/android/jni_generator/golden/testSingleJNIAdditionalImport.golden @@ -35,15 +35,13 @@ inline jclass org_chromium_foo_Foo_clazz(JNIEnv* env) { // Step 3: Method stubs. -static void JNI_Foo_DoSomething(JNIEnv* env, const base::android::JavaParamRef& jcaller, - const base::android::JavaParamRef& callback); +static void JNI_Foo_DoSomething(JNIEnv* env, const base::android::JavaParamRef& callback); JNI_GENERATOR_EXPORT void Java_org_chromium_foo_Foo_nativeDoSomething( JNIEnv* env, jclass jcaller, jobject callback) { - return JNI_Foo_DoSomething(env, base::android::JavaParamRef(env, jcaller), - base::android::JavaParamRef(env, callback)); + return JNI_Foo_DoSomething(env, base::android::JavaParamRef(env, callback)); } diff --git a/base/android/jni_generator/golden/testTracing.golden b/base/android/jni_generator/golden/testTracing.golden index fa8bdb2907c1b5..5ebe72848458ac 100644 --- a/base/android/jni_generator/golden/testTracing.golden +++ b/base/android/jni_generator/golden/testTracing.golden @@ -48,13 +48,13 @@ JNI_GENERATOR_EXPORT void Java_org_chromium_foo_Foo_nativeInstanceMethod( return native->InstanceMethod(env, base::android::JavaParamRef(env, jcaller)); } -static void JNI_Foo_StaticMethod(JNIEnv* env, const base::android::JavaParamRef& jcaller); +static void JNI_Foo_StaticMethod(JNIEnv* env); JNI_GENERATOR_EXPORT void Java_org_chromium_foo_Foo_nativeStaticMethod( JNIEnv* env, jclass jcaller) { TRACE_EVENT0("jni", "org::chromium_foo::JNI_Foo_StaticMethod"); - return JNI_Foo_StaticMethod(env, base::android::JavaParamRef(env, jcaller)); + return JNI_Foo_StaticMethod(env); } diff --git a/base/android/jni_generator/jni_generator.py b/base/android/jni_generator/jni_generator.py index ae227257507908..e8da007692c49d 100755 --- a/base/android/jni_generator/jni_generator.py +++ b/base/android/jni_generator/jni_generator.py @@ -257,10 +257,16 @@ def _GetParamsInDeclaration(native): Returns: A string containing the params. """ - return ',\n '.join(_GetJNIFirstParam(native, True) + - [_JavaDataTypeToCForDeclaration(param.datatype) + ' ' + - param.name - for param in native.params]) + if not native.static: + return ',\n '.join( + _GetJNIFirstParam(native, True) + [ + _JavaDataTypeToCForDeclaration(param.datatype) + ' ' + param.name + for param in native.params + ]) + return ',\n '.join([ + _JavaDataTypeToCForDeclaration(param.datatype) + ' ' + param.name + for param in native.params + ]) def GetParamsInStub(native): @@ -273,7 +279,8 @@ def GetParamsInStub(native): A string containing the params. """ params = [JavaDataTypeToC(p.datatype) + ' ' + p.name for p in native.params] - return ',\n '.join(_GetJNIFirstParam(native, False) + params) + params = _GetJNIFirstParam(native, False) + params + return ',\n '.join(params) def _StripGenerics(value): @@ -1196,7 +1203,9 @@ def GetNativeStub(self, native): params = native.params[1:] else: params = native.params - params_in_call = ['env'] + self.GetJNIFirstParamForCall(native) + params_in_call = ['env'] + if not native.static or is_method: + params_in_call.extend(self.GetJNIFirstParamForCall(native)) for p in params: c_type = JavaDataTypeToC(p.datatype) if re.match(RE_SCOPED_JNI_TYPES, c_type): @@ -1254,11 +1263,13 @@ def GetNativeStub(self, native): } """) else: + if values['PARAMS']: + values['PARAMS'] = ', ' + values['PARAMS'] if self.options.enable_tracing: values['TRACE_EVENT'] = self.GetTraceEventForNameTemplate( namespace_qual + '${IMPL_METHOD_NAME}', values) template = Template("""\ -static ${RETURN_DECLARATION} ${IMPL_METHOD_NAME}(JNIEnv* env, ${PARAMS}); +static ${RETURN_DECLARATION} ${IMPL_METHOD_NAME}(JNIEnv* env${PARAMS}); JNI_GENERATOR_EXPORT ${RETURN} ${STUB_NAME}( JNIEnv* env, diff --git a/base/android/jni_generator/sample_for_tests.cc b/base/android/jni_generator/sample_for_tests.cc index 8a47de9246850e..24fe642442ce04 100644 --- a/base/android/jni_generator/sample_for_tests.cc +++ b/base/android/jni_generator/sample_for_tests.cc @@ -85,8 +85,7 @@ static jdouble JNI_SampleForTests_GetDoubleFunction( return 0; } -static jfloat JNI_SampleForTests_GetFloatFunction(JNIEnv*, - const JavaParamRef&) { +static jfloat JNI_SampleForTests_GetFloatFunction(JNIEnv*) { return 0; } @@ -113,8 +112,7 @@ static ScopedJavaLocalRef JNI_SampleForTests_GetNonPODDatatype( return ScopedJavaLocalRef(); } -static jint JNI_InnerClass_GetInnerIntFunction(JNIEnv*, - const JavaParamRef&) { +static jint JNI_InnerClass_GetInnerIntFunction(JNIEnv*) { return 0; } @@ -122,14 +120,11 @@ static jint JNI_InnerClass_GetInnerIntFunction(JNIEnv*, } // namespace base // Proxy natives. -static void JNI_SampleForAnnotationProcessor_Foo( - JNIEnv* env, - const base::android::JavaParamRef& jcaller) {} +static void JNI_SampleForAnnotationProcessor_Foo(JNIEnv* env) {} static base::android::ScopedJavaLocalRef JNI_SampleForAnnotationProcessor_Bar( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& sample) { return JNI_SampleForTests_GetNonPODDatatype(env, sample); } @@ -137,7 +132,6 @@ JNI_SampleForAnnotationProcessor_Bar( static base::android::ScopedJavaLocalRef JNI_SampleForAnnotationProcessor_RevString( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& stringToReverse) { return JNI_SampleForTests_GetNonPODDatatype(env, stringToReverse); } @@ -145,7 +139,6 @@ JNI_SampleForAnnotationProcessor_RevString( static base::android::ScopedJavaLocalRef JNI_SampleForAnnotationProcessor_SendToNative( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& strs) { return JNI_SampleForTests_GetNonPODDatatype(env, strs); } @@ -153,21 +146,17 @@ JNI_SampleForAnnotationProcessor_SendToNative( static base::android::ScopedJavaLocalRef JNI_SampleForAnnotationProcessor_SendSamplesToNative( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& strs) { return JNI_SampleForTests_GetNonPODDatatype(env, strs); } -static jboolean JNI_SampleForAnnotationProcessor_HasPhalange( - JNIEnv* env, - const base::android::JavaParamRef& jcaller) { +static jboolean JNI_SampleForAnnotationProcessor_HasPhalange(JNIEnv* env) { return jboolean(true); } static base::android::ScopedJavaLocalRef JNI_SampleForAnnotationProcessor_TestAllPrimitives( JNIEnv* env, - const base::android::JavaParamRef& jcaller, jint zint, const base::android::JavaParamRef& ints, jlong zlong, @@ -189,7 +178,6 @@ JNI_SampleForAnnotationProcessor_TestAllPrimitives( static void JNI_SampleForAnnotationProcessor_TestSpecialTypes( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& clazz, const base::android::JavaParamRef& classes, const base::android::JavaParamRef& throwable, @@ -202,72 +190,52 @@ static void JNI_SampleForAnnotationProcessor_TestSpecialTypes( const base::android::JavaParamRef& objects) {} static base::android::ScopedJavaLocalRef -JNI_SampleForAnnotationProcessor_ReturnThrowable( - JNIEnv* env, - const base::android::JavaParamRef& jcaller) { +JNI_SampleForAnnotationProcessor_ReturnThrowable(JNIEnv* env) { return ScopedJavaLocalRef(); } static base::android::ScopedJavaLocalRef -JNI_SampleForAnnotationProcessor_ReturnThrowables( - JNIEnv* env, - const base::android::JavaParamRef& jcaller) { +JNI_SampleForAnnotationProcessor_ReturnThrowables(JNIEnv* env) { return ScopedJavaLocalRef(); } static base::android::ScopedJavaLocalRef -JNI_SampleForAnnotationProcessor_ReturnClass( - JNIEnv* env, - const base::android::JavaParamRef& jcaller) { +JNI_SampleForAnnotationProcessor_ReturnClass(JNIEnv* env) { return ScopedJavaLocalRef(); } static base::android::ScopedJavaLocalRef -JNI_SampleForAnnotationProcessor_ReturnClasses( - JNIEnv* env, - const base::android::JavaParamRef& jcaller) { +JNI_SampleForAnnotationProcessor_ReturnClasses(JNIEnv* env) { return ScopedJavaLocalRef(); } static base::android::ScopedJavaLocalRef -JNI_SampleForAnnotationProcessor_ReturnString( - JNIEnv* env, - const base::android::JavaParamRef& jcaller) { +JNI_SampleForAnnotationProcessor_ReturnString(JNIEnv* env) { return ScopedJavaLocalRef(); } static base::android::ScopedJavaLocalRef -JNI_SampleForAnnotationProcessor_ReturnStrings( - JNIEnv* env, - const base::android::JavaParamRef& jcaller) { +JNI_SampleForAnnotationProcessor_ReturnStrings(JNIEnv* env) { return ScopedJavaLocalRef(); } static base::android::ScopedJavaLocalRef -JNI_SampleForAnnotationProcessor_ReturnStruct( - JNIEnv* env, - const base::android::JavaParamRef& jcaller) { +JNI_SampleForAnnotationProcessor_ReturnStruct(JNIEnv* env) { return ScopedJavaLocalRef(); } static base::android::ScopedJavaLocalRef -JNI_SampleForAnnotationProcessor_ReturnStructs( - JNIEnv* env, - const base::android::JavaParamRef& jcaller) { +JNI_SampleForAnnotationProcessor_ReturnStructs(JNIEnv* env) { return ScopedJavaLocalRef(); } static base::android::ScopedJavaLocalRef -JNI_SampleForAnnotationProcessor_ReturnObject( - JNIEnv* env, - const base::android::JavaParamRef& jcaller) { +JNI_SampleForAnnotationProcessor_ReturnObject(JNIEnv* env) { return ScopedJavaLocalRef(); } static base::android::ScopedJavaLocalRef -JNI_SampleForAnnotationProcessor_ReturnObjects( - JNIEnv* env, - const base::android::JavaParamRef& jcaller) { +JNI_SampleForAnnotationProcessor_ReturnObjects(JNIEnv* env) { return ScopedJavaLocalRef(); } diff --git a/base/android/library_loader/library_loader_hooks.cc b/base/android/library_loader/library_loader_hooks.cc index a47aadcc295d48..dd71a0f8bcf0a3 100644 --- a/base/android/library_loader/library_loader_hooks.cc +++ b/base/android/library_loader/library_loader_hooks.cc @@ -214,9 +214,7 @@ void LibraryLoaderExitHook() { } } -static void JNI_LibraryLoader_ForkAndPrefetchNativeLibrary( - JNIEnv* env, - const JavaParamRef& clazz) { +static void JNI_LibraryLoader_ForkAndPrefetchNativeLibrary(JNIEnv* env) { #if BUILDFLAG(SUPPORTS_CODE_ORDERING) return NativeLibraryPrefetcher::ForkAndPrefetchNativeLibrary( ShouldDoOrderfileMemoryOptimization()); @@ -224,8 +222,7 @@ static void JNI_LibraryLoader_ForkAndPrefetchNativeLibrary( } static jint JNI_LibraryLoader_PercentageOfResidentNativeLibraryCode( - JNIEnv* env, - const JavaParamRef& clazz) { + JNIEnv* env) { #if BUILDFLAG(SUPPORTS_CODE_ORDERING) return NativeLibraryPrefetcher::PercentageOfResidentNativeLibraryCode(); #else @@ -233,9 +230,7 @@ static jint JNI_LibraryLoader_PercentageOfResidentNativeLibraryCode( #endif } -static void JNI_LibraryLoader_PeriodicallyCollectResidency( - JNIEnv* env, - const JavaParamRef& clazz) { +static void JNI_LibraryLoader_PeriodicallyCollectResidency(JNIEnv* env) { #if BUILDFLAG(SUPPORTS_CODE_ORDERING) NativeLibraryPrefetcher::PeriodicallyCollectResidency(); #else diff --git a/base/android/memory_pressure_listener_android.cc b/base/android/memory_pressure_listener_android.cc index cab66e1c65f2e3..830ed2727aabad 100644 --- a/base/android/memory_pressure_listener_android.cc +++ b/base/android/memory_pressure_listener_android.cc @@ -12,7 +12,6 @@ using base::android::JavaParamRef; // Defined and called by JNI. static void JNI_MemoryPressureListener_OnMemoryPressure( JNIEnv* env, - const JavaParamRef& clazz, jint memory_pressure_level) { base::MemoryPressureListener::NotifyMemoryPressure( static_cast( diff --git a/base/android/path_service_android.cc b/base/android/path_service_android.cc index 51be530ea3881e..16968d198af7b1 100644 --- a/base/android/path_service_android.cc +++ b/base/android/path_service_android.cc @@ -12,7 +12,6 @@ namespace base { namespace android { void JNI_PathService_Override(JNIEnv* env, - const JavaParamRef& clazz, jint what, const JavaParamRef& path) { FilePath file_path(ConvertJavaStringToUTF8(env, path)); diff --git a/base/android/record_histogram.cc b/base/android/record_histogram.cc index f41ec99d18cde1..3e4e1201a58d70 100644 --- a/base/android/record_histogram.cc +++ b/base/android/record_histogram.cc @@ -210,7 +210,6 @@ LazyInstance::Leaky g_histograms; jlong JNI_RecordHistogram_RecordBooleanHistogram( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_histogram_name, jlong j_histogram_key, jboolean j_sample) { @@ -224,7 +223,6 @@ jlong JNI_RecordHistogram_RecordBooleanHistogram( jlong JNI_RecordHistogram_RecordEnumeratedHistogram( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_histogram_name, jlong j_histogram_key, jint j_sample, @@ -240,7 +238,6 @@ jlong JNI_RecordHistogram_RecordEnumeratedHistogram( jlong JNI_RecordHistogram_RecordCustomCountHistogram( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_histogram_name, jlong j_histogram_key, jint j_sample, @@ -258,7 +255,6 @@ jlong JNI_RecordHistogram_RecordCustomCountHistogram( jlong JNI_RecordHistogram_RecordLinearCountHistogram( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_histogram_name, jlong j_histogram_key, jint j_sample, @@ -276,7 +272,6 @@ jlong JNI_RecordHistogram_RecordLinearCountHistogram( jlong JNI_RecordHistogram_RecordSparseHistogram( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_histogram_name, jlong j_histogram_key, jint j_sample) { @@ -290,7 +285,6 @@ jlong JNI_RecordHistogram_RecordSparseHistogram( jlong JNI_RecordHistogram_RecordCustomTimesHistogramMilliseconds( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_histogram_name, jlong j_histogram_key, jint j_duration, @@ -311,7 +305,6 @@ jlong JNI_RecordHistogram_RecordCustomTimesHistogramMilliseconds( // targets - see http://crbug.com/415945. jint JNI_RecordHistogram_GetHistogramValueCountForTesting( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& histogram_name, jint sample) { HistogramBase* histogram = StatisticsRecorder::FindHistogram( @@ -327,7 +320,6 @@ jint JNI_RecordHistogram_GetHistogramValueCountForTesting( jint JNI_RecordHistogram_GetHistogramTotalCountForTesting( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& histogram_name) { HistogramBase* histogram = StatisticsRecorder::FindHistogram( android::ConvertJavaStringToUTF8(env, histogram_name)); diff --git a/base/android/record_user_action.cc b/base/android/record_user_action.cc index 683add6b9b6bd9..107db1c10c2945 100644 --- a/base/android/record_user_action.cc +++ b/base/android/record_user_action.cc @@ -21,7 +21,6 @@ namespace android { static void JNI_RecordUserAction_RecordUserAction( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_action) { RecordComputedAction(ConvertJavaStringToUTF8(env, j_action)); } @@ -35,7 +34,6 @@ static void OnActionRecorded(const JavaRef& callback, static jlong JNI_RecordUserAction_AddActionCallbackForTesting( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& callback) { // Create a wrapper for the ActionCallback, so it can life on the heap until // RemoveActionCallbackForTesting() is called. @@ -47,7 +45,6 @@ static jlong JNI_RecordUserAction_AddActionCallbackForTesting( static void JNI_RecordUserAction_RemoveActionCallbackForTesting( JNIEnv* env, - const JavaParamRef& clazz, jlong callback_id) { DCHECK(callback_id); auto* wrapper = reinterpret_cast(callback_id); diff --git a/base/android/statistics_recorder_android.cc b/base/android/statistics_recorder_android.cc index ae9192e5a70130..bab112abb1d5ed 100644 --- a/base/android/statistics_recorder_android.cc +++ b/base/android/statistics_recorder_android.cc @@ -18,7 +18,6 @@ namespace android { static ScopedJavaLocalRef JNI_StatisticsRecorderAndroid_ToJson( JNIEnv* env, - const JavaParamRef& clazz, jint verbosityLevel) { return ConvertUTF8ToJavaString( env, base::StatisticsRecorder::ToJSON( diff --git a/base/android/sys_utils.cc b/base/android/sys_utils.cc index 66f0213c4068aa..6204c4abaee85d 100644 --- a/base/android/sys_utils.cc +++ b/base/android/sys_utils.cc @@ -27,9 +27,7 @@ bool SysUtils::IsCurrentlyLowMemory() { // Logs the number of minor / major page faults to tracing (and also the time to // collect) the metrics. Does nothing if tracing is not enabled. -static void JNI_SysUtils_LogPageFaultCountToTracing( - JNIEnv* env, - const base::android::JavaParamRef& jcaller) { +static void JNI_SysUtils_LogPageFaultCountToTracing(JNIEnv* env) { // This is racy, but we are OK losing data, and collecting it is potentially // expensive (reading and parsing a file). bool enabled; diff --git a/base/android/task_scheduler/post_task_android.cc b/base/android/task_scheduler/post_task_android.cc index 6de2057cd8505a..e33d52fc6a8dd0 100644 --- a/base/android/task_scheduler/post_task_android.cc +++ b/base/android/task_scheduler/post_task_android.cc @@ -63,7 +63,6 @@ TaskTraits PostTaskAndroid::CreateTaskTraits( void JNI_PostTask_PostTask( JNIEnv* env, - const base::android::JavaParamRef& jcaller, jboolean priority_set_explicitly, jint priority, jboolean may_block, diff --git a/base/android/task_scheduler/sequenced_task_runner_android.cc b/base/android/task_scheduler/sequenced_task_runner_android.cc index 227819b56b5c09..f414a715b9818b 100644 --- a/base/android/task_scheduler/sequenced_task_runner_android.cc +++ b/base/android/task_scheduler/sequenced_task_runner_android.cc @@ -11,7 +11,6 @@ namespace base { jlong JNI_SequencedTaskRunnerImpl_Init( JNIEnv* env, - const base::android::JavaParamRef& jcaller, jboolean priority_set_explicitly, jint priority, jboolean may_block, diff --git a/base/android/task_scheduler/single_thread_task_runner_android.cc b/base/android/task_scheduler/single_thread_task_runner_android.cc index f919a496be8483..6f5e25045c7447 100644 --- a/base/android/task_scheduler/single_thread_task_runner_android.cc +++ b/base/android/task_scheduler/single_thread_task_runner_android.cc @@ -11,7 +11,6 @@ namespace base { jlong JNI_SingleThreadTaskRunnerImpl_Init( JNIEnv* env, - const base::android::JavaParamRef& jcaller, jboolean priority_set_explicitly, jint priority, jboolean may_block, diff --git a/base/android/task_scheduler/task_runner_android.cc b/base/android/task_scheduler/task_runner_android.cc index dfdad5f938ecfb..f32dc3172a0f6d 100644 --- a/base/android/task_scheduler/task_runner_android.cc +++ b/base/android/task_scheduler/task_runner_android.cc @@ -13,7 +13,6 @@ namespace base { jlong JNI_TaskRunnerImpl_Init( JNIEnv* env, - const base::android::JavaParamRef& jcaller, jboolean priority_set_explicitly, jint priority, jboolean may_block, diff --git a/base/android/time_utils.cc b/base/android/time_utils.cc index 632dfb7a4e0de7..6823e2faae7e22 100644 --- a/base/android/time_utils.cc +++ b/base/android/time_utils.cc @@ -10,9 +10,7 @@ namespace base { namespace android { -static jlong JNI_TimeUtils_GetTimeTicksNowUs( - JNIEnv* env, - const JavaParamRef& clazz) { +static jlong JNI_TimeUtils_GetTimeTicksNowUs(JNIEnv* env) { return (TimeTicks::Now() - TimeTicks()).InMicroseconds(); } diff --git a/base/android/trace_event_binding.cc b/base/android/trace_event_binding.cc index 2123f94e50ea00..495233f7c3bea3 100644 --- a/base/android/trace_event_binding.cc +++ b/base/android/trace_event_binding.cc @@ -61,27 +61,22 @@ class TraceEnabledObserver } // namespace -static void JNI_TraceEvent_RegisterEnabledObserver( - JNIEnv* env, - const JavaParamRef& clazz) { +static void JNI_TraceEvent_RegisterEnabledObserver(JNIEnv* env) { bool enabled = trace_event::TraceLog::GetInstance()->IsEnabled(); base::android::Java_TraceEvent_setEnabled(env, enabled); trace_event::TraceLog::GetInstance()->AddOwnedEnabledStateObserver( std::make_unique()); } -static void JNI_TraceEvent_StartATrace(JNIEnv* env, - const JavaParamRef& clazz) { +static void JNI_TraceEvent_StartATrace(JNIEnv* env) { base::trace_event::TraceLog::GetInstance()->StartATrace(); } -static void JNI_TraceEvent_StopATrace(JNIEnv* env, - const JavaParamRef& clazz) { +static void JNI_TraceEvent_StopATrace(JNIEnv* env) { base::trace_event::TraceLog::GetInstance()->StopATrace(); } static void JNI_TraceEvent_Instant(JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jname, const JavaParamRef& jarg) { TraceEventDataConverter converter(env, jname, jarg); @@ -96,7 +91,6 @@ static void JNI_TraceEvent_Instant(JNIEnv* env, } static void JNI_TraceEvent_Begin(JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jname, const JavaParamRef& jarg) { TraceEventDataConverter converter(env, jname, jarg); @@ -109,7 +103,6 @@ static void JNI_TraceEvent_Begin(JNIEnv* env, } static void JNI_TraceEvent_End(JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jname, const JavaParamRef& jarg) { TraceEventDataConverter converter(env, jname, jarg); @@ -122,20 +115,17 @@ static void JNI_TraceEvent_End(JNIEnv* env, } static void JNI_TraceEvent_BeginToplevel(JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jtarget) { std::string target = ConvertJavaStringToUTF8(env, jtarget); TRACE_EVENT_BEGIN1(kToplevelCategory, kLooperDispatchMessage, "target", target); } -static void JNI_TraceEvent_EndToplevel(JNIEnv* env, - const JavaParamRef& clazz) { +static void JNI_TraceEvent_EndToplevel(JNIEnv* env) { TRACE_EVENT_END0(kToplevelCategory, kLooperDispatchMessage); } static void JNI_TraceEvent_StartAsync(JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jname, jlong jid) { TraceEventDataConverter converter(env, jname, nullptr); @@ -143,7 +133,6 @@ static void JNI_TraceEvent_StartAsync(JNIEnv* env, } static void JNI_TraceEvent_FinishAsync(JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jname, jlong jid) { TraceEventDataConverter converter(env, jname, nullptr); diff --git a/base/power_monitor/power_monitor_device_source_android.cc b/base/power_monitor/power_monitor_device_source_android.cc index 7688513501d048..a9898aac3bf4aa 100644 --- a/base/power_monitor/power_monitor_device_source_android.cc +++ b/base/power_monitor/power_monitor_device_source_android.cc @@ -19,9 +19,7 @@ namespace android { // Native implementation of PowerMonitor.java. Note: This will be invoked by // PowerMonitor.java shortly after startup to set the correct initial value for // "is on battery power." -void JNI_PowerMonitor_OnBatteryChargingChanged( - JNIEnv* env, - const JavaParamRef& clazz) { +void JNI_PowerMonitor_OnBatteryChargingChanged(JNIEnv* env) { ProcessPowerEventHelper(PowerMonitorSource::POWER_STATE_EVENT); } diff --git a/base/test/task_scheduler_test_helpers_android.cc b/base/test/task_scheduler_test_helpers_android.cc index 47d64eb803d579..99471fda25d5af 100644 --- a/base/test/task_scheduler_test_helpers_android.cc +++ b/base/test/task_scheduler_test_helpers_android.cc @@ -26,15 +26,13 @@ void TaskSchedulerTestHelpers::SetTaskSchedulerExecutionFenceEnabledForTesting( } // namespace base void JNI_TaskSchedulerTestHelpers_EnableTaskSchedulerExecutionForTesting( - JNIEnv* env, - const base::android::JavaParamRef& jcaller) { + JNIEnv* env) { base::TaskSchedulerTestHelpers:: SetTaskSchedulerExecutionFenceEnabledForTesting(false); } void JNI_TaskSchedulerTestHelpers_DisableTaskSchedulerExecutionForTesting( - JNIEnv* env, - const base::android::JavaParamRef& jcaller) { + JNIEnv* env) { base::TaskSchedulerTestHelpers:: SetTaskSchedulerExecutionFenceEnabledForTesting(true); } diff --git a/chrome/browser/after_startup_task_utils_android.cc b/chrome/browser/after_startup_task_utils_android.cc index ecf99eadf4c4a5..17881fcc327b59 100644 --- a/chrome/browser/after_startup_task_utils_android.cc +++ b/chrome/browser/after_startup_task_utils_android.cc @@ -18,8 +18,6 @@ class AfterStartupTaskUtilsJNI { } // android -static void JNI_AfterStartupTaskUtils_SetStartupComplete( - JNIEnv* env, - const JavaParamRef& obj) { +static void JNI_AfterStartupTaskUtils_SetStartupComplete(JNIEnv* env) { android::AfterStartupTaskUtilsJNI::SetBrowserStartupIsComplete(); } diff --git a/chrome/browser/android/bookmarks/partner_bookmarks_reader.cc b/chrome/browser/android/bookmarks/partner_bookmarks_reader.cc index ad0d2873b7e682..ff6873468d20a3 100644 --- a/chrome/browser/android/bookmarks/partner_bookmarks_reader.cc +++ b/chrome/browser/android/bookmarks/partner_bookmarks_reader.cc @@ -363,8 +363,7 @@ void PartnerBookmarksReader::OnFaviconFetched( // ---------------------------------------------------------------- static void JNI_PartnerBookmarksReader_DisablePartnerBookmarksEditing( - JNIEnv* env, - const JavaParamRef& clazz) { + JNIEnv* env) { PartnerBookmarksShim::DisablePartnerBookmarksEditing(); } @@ -381,7 +380,6 @@ static jlong JNI_PartnerBookmarksReader_Init(JNIEnv* env, static base::android::ScopedJavaLocalRef JNI_PartnerBookmarksReader_GetNativeUrlString( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_url) { GURL url(ConvertJavaStringToUTF8(j_url)); return ConvertUTF8ToJavaString(env, url.spec()); diff --git a/chrome/browser/android/browserservices/ukm_recorder.cc b/chrome/browser/android/browserservices/ukm_recorder.cc index c1b3331dee51d5..3e007a1e9528b1 100644 --- a/chrome/browser/android/browserservices/ukm_recorder.cc +++ b/chrome/browser/android/browserservices/ukm_recorder.cc @@ -14,7 +14,6 @@ namespace browserservices { // Called by Java org.chromium.chrome.browser.browserservices.UkmRecorder. static void JNI_Bridge_RecordOpen( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& java_web_contents) { content::WebContents* web_contents = content::WebContents::FromJavaWebContents(java_web_contents); diff --git a/chrome/browser/android/browsing_data/browsing_data_bridge.cc b/chrome/browser/android/browsing_data/browsing_data_bridge.cc index e84f0438ad33e6..a2cb31a092f3cd 100644 --- a/chrome/browser/android/browsing_data/browsing_data_bridge.cc +++ b/chrome/browser/android/browsing_data/browsing_data_bridge.cc @@ -180,7 +180,6 @@ static void JNI_BrowsingDataBridge_RequestInfoAboutOtherFormsOfBrowsingHistory( static void JNI_BrowsingDataBridge_FetchImportantSites( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jprofile, const JavaParamRef& java_callback) { TRACE_EVENT0("browsing_data", "BrowsingDataBridge_FetchImportantSites"); @@ -212,15 +211,12 @@ static void JNI_BrowsingDataBridge_FetchImportantSites( } // This value should not change during a sessions, as it's used for UMA metrics. -static jint JNI_BrowsingDataBridge_GetMaxImportantSites( - JNIEnv* env, - const JavaParamRef& clazz) { +static jint JNI_BrowsingDataBridge_GetMaxImportantSites(JNIEnv* env) { return ImportantSitesUtil::kMaxImportantSites; } static void JNI_BrowsingDataBridge_MarkOriginAsImportantForTesting( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jprofile, const JavaParamRef& jorigin) { GURL origin(base::android::ConvertJavaStringToUTF8(jorigin)); diff --git a/chrome/browser/android/cached_image_fetcher/cached_image_fetcher_bridge.cc b/chrome/browser/android/cached_image_fetcher/cached_image_fetcher_bridge.cc index 657d0e2bcbd811..1f9daba5bd75f0 100644 --- a/chrome/browser/android/cached_image_fetcher/cached_image_fetcher_bridge.cc +++ b/chrome/browser/android/cached_image_fetcher/cached_image_fetcher_bridge.cc @@ -59,7 +59,6 @@ constexpr net::NetworkTrafficAnnotationTag kTrafficAnnotation = // static jlong JNI_CachedImageFetcherBridge_Init( JNIEnv* j_env, - const JavaParamRef& j_caller, const JavaParamRef& j_profile) { Profile* profile = ProfileAndroid::FromProfileAndroid(j_profile); base::FilePath file_path = diff --git a/chrome/browser/android/chrome_feature_list.cc b/chrome/browser/android/chrome_feature_list.cc index 1911f6827c37cf..73d862ed82a68b 100644 --- a/chrome/browser/android/chrome_feature_list.cc +++ b/chrome/browser/android/chrome_feature_list.cc @@ -430,15 +430,12 @@ const base::Feature kVideoPersistence{"VideoPersistence", const base::Feature kVrBrowsingFeedback{"VrBrowsingFeedback", base::FEATURE_ENABLED_BY_DEFAULT}; -static jboolean JNI_ChromeFeatureList_IsInitialized( - JNIEnv* env, - const JavaParamRef& clazz) { +static jboolean JNI_ChromeFeatureList_IsInitialized(JNIEnv* env) { return !!base::FeatureList::GetInstance(); } static jboolean JNI_ChromeFeatureList_IsEnabled( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jfeature_name) { const base::Feature* feature = FindFeatureExposedToJava(ConvertJavaStringToUTF8(env, jfeature_name)); @@ -448,7 +445,6 @@ static jboolean JNI_ChromeFeatureList_IsEnabled( static ScopedJavaLocalRef JNI_ChromeFeatureList_GetFieldTrialParamByFeature( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jfeature_name, const JavaParamRef& jparam_name) { const base::Feature* feature = @@ -461,7 +457,6 @@ JNI_ChromeFeatureList_GetFieldTrialParamByFeature( static jint JNI_ChromeFeatureList_GetFieldTrialParamByFeatureAsInt( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jfeature_name, const JavaParamRef& jparam_name, const jint jdefault_value) { @@ -474,7 +469,6 @@ static jint JNI_ChromeFeatureList_GetFieldTrialParamByFeatureAsInt( static jdouble JNI_ChromeFeatureList_GetFieldTrialParamByFeatureAsDouble( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jfeature_name, const JavaParamRef& jparam_name, const jdouble jdefault_value) { @@ -487,7 +481,6 @@ static jdouble JNI_ChromeFeatureList_GetFieldTrialParamByFeatureAsDouble( static jboolean JNI_ChromeFeatureList_GetFieldTrialParamByFeatureAsBoolean( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jfeature_name, const JavaParamRef& jparam_name, const jboolean jdefault_value) { diff --git a/chrome/browser/android/compositor/resources/resource_factory.cc b/chrome/browser/android/compositor/resources/resource_factory.cc index a56ec33b0c46d0..c51220a74da74f 100644 --- a/chrome/browser/android/compositor/resources/resource_factory.cc +++ b/chrome/browser/android/compositor/resources/resource_factory.cc @@ -13,7 +13,6 @@ namespace android { jlong JNI_ResourceFactory_CreateToolbarContainerResource( JNIEnv* env, - const JavaParamRef& clazz, jint toolbar_left, jint toolbar_top, jint toolbar_right, diff --git a/chrome/browser/android/content/content_utils.cc b/chrome/browser/android/content/content_utils.cc index 06a62d4b57dc81..68df02d3edd031 100644 --- a/chrome/browser/android/content/content_utils.cc +++ b/chrome/browser/android/content/content_utils.cc @@ -11,15 +11,12 @@ #include "jni/ContentUtils_jni.h" static base::android::ScopedJavaLocalRef -JNI_ContentUtils_GetBrowserUserAgent( - JNIEnv* env, - const base::android::JavaParamRef& clazz) { +JNI_ContentUtils_GetBrowserUserAgent(JNIEnv* env) { return base::android::ConvertUTF8ToJavaString(env, GetUserAgent()); } static void JNI_ContentUtils_SetUserAgentOverride( JNIEnv* env, - const base::android::JavaParamRef& clazz, const base::android::JavaParamRef& jweb_contents) { const char kLinuxInfoStr[] = "X11; Linux x86_64"; ChromeContentClient content_client; diff --git a/chrome/browser/android/contextual_suggestions/contextual_suggestions_bridge.cc b/chrome/browser/android/contextual_suggestions/contextual_suggestions_bridge.cc index b908a2609ae26d..2607384e1e9d78 100644 --- a/chrome/browser/android/contextual_suggestions/contextual_suggestions_bridge.cc +++ b/chrome/browser/android/contextual_suggestions/contextual_suggestions_bridge.cc @@ -66,8 +66,7 @@ static jlong JNI_ContextualSuggestionsBridge_Init( } static jboolean JNI_ContextualSuggestionsBridge_IsDisabledByEnterprisePolicy( - JNIEnv* env, - const JavaParamRef& clazz) { + JNIEnv* env) { Profile* profile = ProfileManager::GetLastUsedProfile()->GetOriginalProfile(); if (!profile) return false; diff --git a/chrome/browser/android/cookies/cookies_fetcher_util.cc b/chrome/browser/android/cookies/cookies_fetcher_util.cc index c278a09e40c71f..c61cdc6ed5fa22 100644 --- a/chrome/browser/android/cookies/cookies_fetcher_util.cc +++ b/chrome/browser/android/cookies/cookies_fetcher_util.cc @@ -62,8 +62,7 @@ void OnCookiesFetchFinished(const net::CookieList& cookies) { // Fetches cookies for the off-the-record session (i.e. incognito mode). It is a // no-op for the standard session. Typically associated with the #onPause of // Android's activty lifecycle. -void JNI_CookiesFetcher_PersistCookies(JNIEnv* env, - const JavaParamRef& jcaller) { +void JNI_CookiesFetcher_PersistCookies(JNIEnv* env) { if (!ProfileManager::GetPrimaryUserProfile()->HasOffTheRecordProfile()) { // There is no work to be done. We might consider calling // the Java callback if needed. @@ -79,7 +78,6 @@ void JNI_CookiesFetcher_PersistCookies(JNIEnv* env, // with the #onResume of Android's activty lifecycle. static void JNI_CookiesFetcher_RestoreCookies( JNIEnv* env, - const JavaParamRef& jcaller, const JavaParamRef& name, const JavaParamRef& value, const JavaParamRef& domain, diff --git a/chrome/browser/android/customtabs/detached_resource_request_android.cc b/chrome/browser/android/customtabs/detached_resource_request_android.cc index aef902ca516ddc..46875d72272db8 100644 --- a/chrome/browser/android/customtabs/detached_resource_request_android.cc +++ b/chrome/browser/android/customtabs/detached_resource_request_android.cc @@ -31,7 +31,6 @@ void NotifyClientOfDetachedRequestCompletion( static void JNI_CustomTabsConnection_CreateAndStartDetachedResourceRequest( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& profile, const base::android::JavaParamRef& session, const base::android::JavaParamRef& url, diff --git a/chrome/browser/android/download/download_controller.cc b/chrome/browser/android/download/download_controller.cc index 51348ce461588f..c65e261a849ff6 100644 --- a/chrome/browser/android/download/download_controller.cc +++ b/chrome/browser/android/download/download_controller.cc @@ -203,7 +203,6 @@ void OnStoragePermissionDecided( static void JNI_DownloadController_OnAcquirePermissionResult( JNIEnv* env, - const JavaParamRef& clazz, jlong callback_id, jboolean granted, const JavaParamRef& jpermission_to_update) { diff --git a/chrome/browser/android/download/download_manager_service.cc b/chrome/browser/android/download/download_manager_service.cc index 7bf32ddfb4b562..a5df7eaa5709c1 100644 --- a/chrome/browser/android/download/download_manager_service.cc +++ b/chrome/browser/android/download/download_manager_service.cc @@ -620,16 +620,13 @@ content::DownloadManager* DownloadManagerService::GetDownloadManager( // static jboolean JNI_DownloadManagerService_IsSupportedMimeType( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jmime_type) { std::string mime_type = ConvertJavaStringToUTF8(env, jmime_type); return blink::IsSupportedMimeType(mime_type); } // static -jint JNI_DownloadManagerService_GetAutoResumptionLimit( - JNIEnv* env, - const JavaParamRef& clazz) { +jint JNI_DownloadManagerService_GetAutoResumptionLimit(JNIEnv* env) { std::string value = base::GetFieldTrialParamValueByFeature( chrome::android::kDownloadAutoResumptionThrottling, kAutoResumptionLimitParamName); diff --git a/chrome/browser/android/download/download_utils.cc b/chrome/browser/android/download/download_utils.cc index 1228b8b182efd2..c413f752ca0f06 100644 --- a/chrome/browser/android/download/download_utils.cc +++ b/chrome/browser/android/download/download_utils.cc @@ -17,7 +17,6 @@ using base::android::ScopedJavaLocalRef; static ScopedJavaLocalRef JNI_DownloadUtils_GetFailStateMessage( JNIEnv* env, - const JavaParamRef& clazz, jint fail_state) { base::string16 message = OfflineItemUtils::GetFailStateMessage( static_cast(fail_state)); @@ -27,7 +26,6 @@ static ScopedJavaLocalRef JNI_DownloadUtils_GetFailStateMessage( static jint JNI_DownloadUtils_GetResumeMode( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& jurl, jint failState) { std::string url = ConvertJavaStringToUTF8(env, jurl); diff --git a/chrome/browser/android/download/items/offline_content_aggregator_factory_android.cc b/chrome/browser/android/download/items/offline_content_aggregator_factory_android.cc index 727e046c9f457f..736422fafc2590 100644 --- a/chrome/browser/android/download/items/offline_content_aggregator_factory_android.cc +++ b/chrome/browser/android/download/items/offline_content_aggregator_factory_android.cc @@ -17,7 +17,6 @@ using base::android::JavaParamRef; static base::android::ScopedJavaLocalRef JNI_OfflineContentAggregatorFactory_GetOfflineContentAggregatorForProfile( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jprofile) { Profile* profile = ProfileAndroid::FromProfileAndroid(jprofile); DCHECK(profile); diff --git a/chrome/browser/android/explore_sites/explore_sites_bridge.cc b/chrome/browser/android/explore_sites/explore_sites_bridge.cc index 2e70b8b2f1546e..2418eb8bb9b3ad 100644 --- a/chrome/browser/android/explore_sites/explore_sites_bridge.cc +++ b/chrome/browser/android/explore_sites/explore_sites_bridge.cc @@ -86,7 +86,6 @@ void UpdateCatalogDone(ScopedJavaGlobalRef(j_callback_obj), // static void JNI_ExploreSitesBridge_GetEspCatalog( JNIEnv* env, - const JavaParamRef& j_caller, const JavaParamRef& j_profile, const JavaParamRef& j_result_obj, const JavaParamRef& j_callback_obj) { @@ -107,8 +106,7 @@ void JNI_ExploreSitesBridge_GetEspCatalog( } // static -jint JNI_ExploreSitesBridge_GetVariation(JNIEnv* env, - const JavaParamRef& j_caller) { +jint JNI_ExploreSitesBridge_GetVariation(JNIEnv* env) { return static_cast( chrome::android::explore_sites::GetExploreSitesVariation()); } @@ -116,7 +114,6 @@ jint JNI_ExploreSitesBridge_GetVariation(JNIEnv* env, // static void JNI_ExploreSitesBridge_GetIcon( JNIEnv* env, - const JavaParamRef& j_caller, const JavaParamRef& j_profile, const jint j_site_id, const JavaParamRef& j_callback_obj) { @@ -139,7 +136,6 @@ void JNI_ExploreSitesBridge_GetIcon( void JNI_ExploreSitesBridge_UpdateCatalogFromNetwork( JNIEnv* env, - const JavaParamRef& j_caller, const JavaParamRef& j_profile, jboolean is_immediate_fetch, const JavaParamRef& j_callback_obj) { @@ -170,7 +166,6 @@ void JNI_ExploreSitesBridge_UpdateCatalogFromNetwork( void JNI_ExploreSitesBridge_BlacklistSite( JNIEnv* env, - const JavaParamRef& j_caller, const JavaParamRef& j_profile, const JavaParamRef& j_url) { Profile* profile = ProfileAndroid::FromProfileAndroid(j_profile); @@ -200,7 +195,6 @@ float ExploreSitesBridge::GetScaleFactorFromDevice() { // static void JNI_ExploreSitesBridge_GetCategoryImage( JNIEnv* env, - const JavaParamRef& j_caller, const JavaParamRef& j_profile, const jint j_category_id, const jint j_pixel_size, diff --git a/chrome/browser/android/explore_sites/explore_sites_bridge_experimental.cc b/chrome/browser/android/explore_sites/explore_sites_bridge_experimental.cc index fd62e89b37ee9d..8606351d07e4ea 100644 --- a/chrome/browser/android/explore_sites/explore_sites_bridge_experimental.cc +++ b/chrome/browser/android/explore_sites/explore_sites_bridge_experimental.cc @@ -96,7 +96,6 @@ void OnGetIconDone(std::unique_ptr image_fetcher, // static void JNI_ExploreSitesBridgeExperimental_GetNtpCategories( JNIEnv* env, - const JavaParamRef& j_caller, const JavaParamRef& j_profile, const JavaParamRef& j_result_obj, const JavaParamRef& j_callback_obj) { @@ -111,8 +110,7 @@ void JNI_ExploreSitesBridgeExperimental_GetNtpCategories( // static ScopedJavaLocalRef JNI_ExploreSitesBridgeExperimental_GetCatalogUrl( - JNIEnv* env, - const JavaParamRef& jcaller) { + JNIEnv* env) { return base::android::ConvertUTF8ToJavaString( env, GetCatalogPrototypeURL().spec()); } @@ -120,7 +118,6 @@ ScopedJavaLocalRef JNI_ExploreSitesBridgeExperimental_GetCatalogUrl( // static static void JNI_ExploreSitesBridgeExperimental_GetIcon( JNIEnv* env, - const JavaParamRef& j_caller, const JavaParamRef& j_profile, const JavaParamRef& j_url, const JavaParamRef& j_callback_obj) { diff --git a/chrome/browser/android/favicon_helper.cc b/chrome/browser/android/favicon_helper.cc index 53713d8c4dd554..51c9d4fed07fb6 100644 --- a/chrome/browser/android/favicon_helper.cc +++ b/chrome/browser/android/favicon_helper.cc @@ -78,8 +78,7 @@ void OnEnsureIconIsAvailableFinished( } // namespace -static jlong JNI_FaviconHelper_Init(JNIEnv* env, - const JavaParamRef& clazz) { +static jlong JNI_FaviconHelper_Init(JNIEnv* env) { return reinterpret_cast(new FaviconHelper()); } diff --git a/chrome/browser/android/feature_engagement/tracker_factory_android.cc b/chrome/browser/android/feature_engagement/tracker_factory_android.cc index 1286be62125eef..a3fe513217c1ff 100644 --- a/chrome/browser/android/feature_engagement/tracker_factory_android.cc +++ b/chrome/browser/android/feature_engagement/tracker_factory_android.cc @@ -12,7 +12,6 @@ static base::android::ScopedJavaLocalRef JNI_TrackerFactory_GetTrackerForProfile( JNIEnv* env, - const base::android::JavaParamRef& clazz, const base::android::JavaParamRef& jprofile) { Profile* profile = ProfileAndroid::FromProfileAndroid(jprofile); DCHECK(profile); diff --git a/chrome/browser/android/feature_utilities.cc b/chrome/browser/android/feature_utilities.cc index e56569dbc4c012..d07a3530881430 100644 --- a/chrome/browser/android/feature_utilities.cc +++ b/chrome/browser/android/feature_utilities.cc @@ -35,7 +35,6 @@ bool GetIsInMultiWindowModeValue() { static void JNI_FeatureUtilities_SetCustomTabVisible( JNIEnv* env, - const JavaParamRef& clazz, jboolean visible) { custom_tab_visible = visible; ukm::UkmSource::SetCustomTabVisible(visible); @@ -43,7 +42,6 @@ static void JNI_FeatureUtilities_SetCustomTabVisible( static void JNI_FeatureUtilities_SetIsInMultiWindowMode( JNIEnv* env, - const JavaParamRef& clazz, jboolean j_is_in_multi_window_mode) { is_in_multi_window_mode = j_is_in_multi_window_mode; } diff --git a/chrome/browser/android/feedback/connectivity_checker.cc b/chrome/browser/android/feedback/connectivity_checker.cc index a0505cf09ffac9..14351346240b80 100644 --- a/chrome/browser/android/feedback/connectivity_checker.cc +++ b/chrome/browser/android/feedback/connectivity_checker.cc @@ -160,7 +160,6 @@ void ConnectivityChecker::OnTimeout() { void JNI_ConnectivityChecker_CheckConnectivity( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_profile, const JavaParamRef& j_url, jlong j_timeout_ms, @@ -187,7 +186,6 @@ void JNI_ConnectivityChecker_CheckConnectivity( jboolean JNI_ConnectivityChecker_IsUrlValid( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_url) { GURL url(base::android::ConvertJavaStringToUTF8(env, j_url)); return url.is_valid(); diff --git a/chrome/browser/android/feedback/process_id_feedback_source.cc b/chrome/browser/android/feedback/process_id_feedback_source.cc index 6e703bba792e24..e66abf8151cb4d 100644 --- a/chrome/browser/android/feedback/process_id_feedback_source.cc +++ b/chrome/browser/android/feedback/process_id_feedback_source.cc @@ -24,14 +24,11 @@ using content::BrowserThread; namespace chrome { namespace android { -int64_t JNI_ProcessIdFeedbackSource_GetCurrentPid( - JNIEnv* env, - const JavaParamRef& clazz) { +int64_t JNI_ProcessIdFeedbackSource_GetCurrentPid(JNIEnv* env) { return base::GetCurrentProcId(); } void JNI_ProcessIdFeedbackSource_Start(JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& obj) { scoped_refptr source = new ProcessIdFeedbackSource(env, obj); diff --git a/chrome/browser/android/feedback/screenshot_task.cc b/chrome/browser/android/feedback/screenshot_task.cc index f60b8ca9e95aaa..cf87a05032bd81 100644 --- a/chrome/browser/android/feedback/screenshot_task.cc +++ b/chrome/browser/android/feedback/screenshot_task.cc @@ -39,7 +39,6 @@ void JNI_ScreenshotTask_SnapshotCallback( void JNI_ScreenshotTask_GrabWindowSnapshotAsync( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jcallback, const JavaParamRef& jwindow_android, jint window_width, diff --git a/chrome/browser/android/feedback/system_info_feedback_source.cc b/chrome/browser/android/feedback/system_info_feedback_source.cc index 071e897dbf71ba..fec734552ce3b3 100644 --- a/chrome/browser/android/feedback/system_info_feedback_source.cc +++ b/chrome/browser/android/feedback/system_info_feedback_source.cc @@ -18,37 +18,30 @@ namespace chrome { namespace android { ScopedJavaLocalRef JNI_SystemInfoFeedbackSource_GetCpuArchitecture( - JNIEnv* env, - const JavaParamRef& clazz) { + JNIEnv* env) { return ConvertUTF8ToJavaString(env, base::SysInfo::OperatingSystemArchitecture()); } ScopedJavaLocalRef JNI_SystemInfoFeedbackSource_GetGpuVendor( - JNIEnv* env, - const JavaParamRef& clazz) { + JNIEnv* env) { gpu::GPUInfo info = content::GpuDataManager::GetInstance()->GetGPUInfo(); return ConvertUTF8ToJavaString(env, info.active_gpu().vendor_string); } ScopedJavaLocalRef JNI_SystemInfoFeedbackSource_GetGpuModel( - JNIEnv* env, - const JavaParamRef& clazz) { + JNIEnv* env) { gpu::GPUInfo info = content::GpuDataManager::GetInstance()->GetGPUInfo(); return ConvertUTF8ToJavaString(env, info.active_gpu().device_string); } -int JNI_SystemInfoFeedbackSource_GetAvailableMemoryMB( - JNIEnv* env, - const JavaParamRef& clazz) { +int JNI_SystemInfoFeedbackSource_GetAvailableMemoryMB(JNIEnv* env) { return base::saturated_cast( base::SysInfo::AmountOfAvailablePhysicalMemory() / 1024 / 1024); } -int JNI_SystemInfoFeedbackSource_GetTotalMemoryMB( - JNIEnv* env, - const JavaParamRef& clazz) { +int JNI_SystemInfoFeedbackSource_GetTotalMemoryMB(JNIEnv* env) { return base::SysInfo::AmountOfPhysicalMemoryMB(); } diff --git a/chrome/browser/android/foreign_session_helper.cc b/chrome/browser/android/foreign_session_helper.cc index 586a090b3c79c9..b5f69021b42476 100644 --- a/chrome/browser/android/foreign_session_helper.cc +++ b/chrome/browser/android/foreign_session_helper.cc @@ -139,7 +139,6 @@ void JNI_ForeignSessionHelper_CopySessionToJava( static jlong JNI_ForeignSessionHelper_Init( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& profile) { ForeignSessionHelper* foreign_session_helper = new ForeignSessionHelper( ProfileAndroid::FromProfileAndroid(profile)); diff --git a/chrome/browser/android/headers_classifier.cc b/chrome/browser/android/headers_classifier.cc index 1d74b8d1e2118e..eead9c6861fd1b 100644 --- a/chrome/browser/android/headers_classifier.cc +++ b/chrome/browser/android/headers_classifier.cc @@ -13,7 +13,6 @@ namespace android { jboolean JNI_HeaderClassifier_IsCorsSafelistedHeader( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_header_name, const JavaParamRef& j_header_value) { std::string header_name(ConvertJavaStringToUTF8(env, j_header_name)); diff --git a/chrome/browser/android/instantapps/instant_apps_infobar_delegate.cc b/chrome/browser/android/instantapps/instant_apps_infobar_delegate.cc index 0f3ac64820d059..c7070520d688bc 100644 --- a/chrome/browser/android/instantapps/instant_apps_infobar_delegate.cc +++ b/chrome/browser/android/instantapps/instant_apps_infobar_delegate.cc @@ -129,7 +129,6 @@ bool InstantAppsInfoBarDelegate::ShouldExpire( void JNI_InstantAppsInfoBarDelegate_Launch( JNIEnv* env, - const base::android::JavaParamRef& clazz, const base::android::JavaParamRef& jweb_contents, const base::android::JavaParamRef& jdata, const base::android::JavaParamRef& jurl, diff --git a/chrome/browser/android/instantapps/instant_apps_settings.cc b/chrome/browser/android/instantapps/instant_apps_settings.cc index 9a709d03061bdd..044126fecff89c 100644 --- a/chrome/browser/android/instantapps/instant_apps_settings.cc +++ b/chrome/browser/android/instantapps/instant_apps_settings.cc @@ -64,7 +64,6 @@ void InstantAppsSettings::RecordInfoBarDismissEvent( static void JNI_InstantAppsSettings_SetInstantAppDefault( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jweb_contents, const JavaParamRef& jurl) { content::WebContents* web_contents = @@ -83,7 +82,6 @@ static void JNI_InstantAppsSettings_SetInstantAppDefault( static jboolean JNI_InstantAppsSettings_GetInstantAppDefault( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jweb_contents, const JavaParamRef& jurl) { content::WebContents* web_contents = @@ -103,7 +101,6 @@ static jboolean JNI_InstantAppsSettings_GetInstantAppDefault( static jboolean JNI_InstantAppsSettings_ShouldShowBanner( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jweb_contents, const JavaParamRef& jurl) { content::WebContents* web_contents = diff --git a/chrome/browser/android/large_icon_bridge.cc b/chrome/browser/android/large_icon_bridge.cc index 3cd6b2a5f99535..0b9410b7aa8b20 100644 --- a/chrome/browser/android/large_icon_bridge.cc +++ b/chrome/browser/android/large_icon_bridge.cc @@ -58,8 +58,7 @@ void OnLargeIconAvailable(const JavaRef& j_callback, } // namespace -static jlong JNI_LargeIconBridge_Init(JNIEnv* env, - const JavaParamRef& clazz) { +static jlong JNI_LargeIconBridge_Init(JNIEnv* env) { return reinterpret_cast(new LargeIconBridge()); } diff --git a/chrome/browser/android/locale/locale_template_url_loader.cc b/chrome/browser/android/locale/locale_template_url_loader.cc index 45d703003b110d..cc0accf78f2e1e 100644 --- a/chrome/browser/android/locale/locale_template_url_loader.cc +++ b/chrome/browser/android/locale/locale_template_url_loader.cc @@ -26,7 +26,6 @@ class TemplateURL; static jlong JNI_LocaleTemplateUrlLoader_Init( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jlocale) { Profile* profile = ProfileManager::GetActiveUserProfile()->GetOriginalProfile(); diff --git a/chrome/browser/android/location_settings_impl.cc b/chrome/browser/android/location_settings_impl.cc index 4ef0443fb09a5f..41cb546714328d 100644 --- a/chrome/browser/android/location_settings_impl.cc +++ b/chrome/browser/android/location_settings_impl.cc @@ -57,7 +57,6 @@ void LocationSettingsImpl::PromptToEnableSystemLocationSetting( static void JNI_LocationSettings_OnLocationSettingsDialogOutcome( JNIEnv* env, - const base::android::JavaParamRef& jcaller, jlong callback_ptr, int result) { auto* callback = diff --git a/chrome/browser/android/metrics/launch_metrics.cc b/chrome/browser/android/metrics/launch_metrics.cc index 106d74f8240eaa..4bb3c0956c8ca7 100644 --- a/chrome/browser/android/metrics/launch_metrics.cc +++ b/chrome/browser/android/metrics/launch_metrics.cc @@ -26,7 +26,6 @@ enum class HomeScreenLaunchType { STANDALONE = 0, SHORTCUT = 1, COUNT = 2 }; static void JNI_LaunchMetrics_RecordLaunch( JNIEnv* env, - const JavaParamRef& caller, jboolean is_shortcut, const JavaParamRef& jurl, int source, @@ -120,7 +119,6 @@ static void JNI_LaunchMetrics_RecordLaunch( static void JNI_LaunchMetrics_RecordHomePageLaunchMetrics( JNIEnv* env, - const JavaParamRef& caller, jboolean show_home_button, jboolean homepage_is_ntp, const JavaParamRef& jhomepage_url) { diff --git a/chrome/browser/android/metrics/ukm_utils_for_test.cc b/chrome/browser/android/metrics/ukm_utils_for_test.cc index 5c80488617b249..ed18f3cba5087b 100644 --- a/chrome/browser/android/metrics/ukm_utils_for_test.cc +++ b/chrome/browser/android/metrics/ukm_utils_for_test.cc @@ -48,26 +48,22 @@ uint64_t UkmUtilsForTest::GetClientId() { } // namespace ukm -static jboolean JNI_UkmUtilsForTest_IsEnabled(JNIEnv*, - const JavaParamRef&) { +static jboolean JNI_UkmUtilsForTest_IsEnabled(JNIEnv*) { return ukm::UkmUtilsForTest::IsEnabled(); } static jboolean JNI_UkmUtilsForTest_HasSourceWithId(JNIEnv*, - const JavaParamRef&, jlong source_id) { ukm::SourceId source = static_cast(source_id); return ukm::UkmUtilsForTest::HasSourceWithId(source); } static void JNI_UkmUtilsForTest_RecordSourceWithId(JNIEnv*, - const JavaParamRef&, jlong source_id) { ukm::SourceId source = static_cast(source_id); ukm::UkmUtilsForTest::RecordSourceWithId(source); } -static jlong JNI_UkmUtilsForTest_GetClientId(JNIEnv*, - const JavaParamRef&) { +static jlong JNI_UkmUtilsForTest_GetClientId(JNIEnv*) { return ukm::UkmUtilsForTest::GetClientId(); } diff --git a/chrome/browser/android/metrics/uma_session_stats.cc b/chrome/browser/android/metrics/uma_session_stats.cc index 81ef896b19275a..42ca110ba3e9fb 100644 --- a/chrome/browser/android/metrics/uma_session_stats.cc +++ b/chrome/browser/android/metrics/uma_session_stats.cc @@ -114,7 +114,6 @@ void UmaSessionStats::RegisterSyntheticMultiGroupFieldTrial( // the Java side. static void JNI_UmaSessionStats_ChangeMetricsReportingConsent( JNIEnv*, - const JavaParamRef&, jboolean consent) { UpdateMetricsPrefsOnPermissionChange(consent); @@ -130,8 +129,7 @@ static void JNI_UmaSessionStats_ChangeMetricsReportingConsent( // Initialize the local consent bool variable to false. Used only for testing. static void JNI_UmaSessionStats_InitMetricsAndCrashReportingForTesting( - JNIEnv*, - const JavaParamRef&) { + JNIEnv*) { DCHECK(g_browser_process); g_metrics_consent_for_testing = false; @@ -142,8 +140,7 @@ static void JNI_UmaSessionStats_InitMetricsAndCrashReportingForTesting( // Clears the boolean consent pointer for ChromeMetricsServiceAccessor to // original setting. Used only for testing. static void JNI_UmaSessionStats_UnsetMetricsAndCrashReportingForTesting( - JNIEnv*, - const JavaParamRef&) { + JNIEnv*) { DCHECK(g_browser_process); g_metrics_consent_for_testing = false; @@ -155,7 +152,6 @@ static void JNI_UmaSessionStats_UnsetMetricsAndCrashReportingForTesting( // repeatedly. Used only for testing. static void JNI_UmaSessionStats_UpdateMetricsAndCrashReportingForTesting( JNIEnv*, - const JavaParamRef&, jboolean consent) { DCHECK(g_browser_process); @@ -178,7 +174,6 @@ static void JNI_UmaSessionStats_UpdateMetricsAndCrashReportingForTesting( // ChangeMetricsReportingConsent() should be called first. static void JNI_UmaSessionStats_UpdateMetricsServiceState( JNIEnv*, - const JavaParamRef&, jboolean may_upload) { // This will also apply the consent state, taken from Chrome Local State // prefs. @@ -188,7 +183,6 @@ static void JNI_UmaSessionStats_UpdateMetricsServiceState( static void JNI_UmaSessionStats_RegisterExternalExperiment( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jtrial_name, const JavaParamRef& jexperiment_ids) { const std::string trial_name_utf8(ConvertJavaStringToUTF8(env, jtrial_name)); @@ -224,7 +218,6 @@ static void JNI_UmaSessionStats_RegisterExternalExperiment( static void JNI_UmaSessionStats_RegisterSyntheticFieldTrial( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jtrial_name, const JavaParamRef& jgroup_name) { std::string trial_name(ConvertJavaStringToUTF8(env, jtrial_name)); @@ -234,7 +227,6 @@ static void JNI_UmaSessionStats_RegisterSyntheticFieldTrial( static void JNI_UmaSessionStats_RecordMultiWindowSession( JNIEnv*, - const JavaParamRef&, jint area_percent, jint instance_count) { UMA_HISTOGRAM_PERCENTAGE("MobileStartup.MobileMultiWindowSession", @@ -250,7 +242,6 @@ static void JNI_UmaSessionStats_RecordMultiWindowSession( static void JNI_UmaSessionStats_RecordTabCountPerLoad( JNIEnv*, - const JavaParamRef&, jint num_tabs) { // Record how many tabs total are open. UMA_HISTOGRAM_CUSTOM_COUNTS("Tabs.TabCountPerLoad", num_tabs, 1, 200, 50); @@ -258,7 +249,6 @@ static void JNI_UmaSessionStats_RecordTabCountPerLoad( static void JNI_UmaSessionStats_RecordPageLoaded( JNIEnv*, - const JavaParamRef&, jboolean is_desktop_user_agent) { // Should be called whenever a page has been loaded. base::RecordAction(UserMetricsAction("MobilePageLoaded")); @@ -267,14 +257,11 @@ static void JNI_UmaSessionStats_RecordPageLoaded( } } -static void JNI_UmaSessionStats_RecordPageLoadedWithKeyboard( - JNIEnv*, - const JavaParamRef&) { +static void JNI_UmaSessionStats_RecordPageLoadedWithKeyboard(JNIEnv*) { base::RecordAction(UserMetricsAction("MobilePageLoadedWithKeyboard")); } -static jlong JNI_UmaSessionStats_Init(JNIEnv* env, - const JavaParamRef& obj) { +static jlong JNI_UmaSessionStats_Init(JNIEnv* env) { // We should have only one UmaSessionStats instance. DCHECK(!g_uma_session_stats); g_uma_session_stats = new UmaSessionStats(); diff --git a/chrome/browser/android/metrics/uma_utils.cc b/chrome/browser/android/metrics/uma_utils.cc index cca27c36d756a6..7228d1deacaccc 100644 --- a/chrome/browser/android/metrics/uma_utils.cc +++ b/chrome/browser/android/metrics/uma_utils.cc @@ -24,15 +24,12 @@ base::TimeTicks GetMainEntryPointTimeTicks() { Java_UmaUtils_getMainEntryPointTicks(env)); } -static jboolean JNI_UmaUtils_IsClientInMetricsReportingSample( - JNIEnv* env, - const JavaParamRef& obj) { +static jboolean JNI_UmaUtils_IsClientInMetricsReportingSample(JNIEnv* env) { return ChromeMetricsServicesManagerClient::IsClientInSample(); } static void JNI_UmaUtils_RecordMetricsReportingDefaultOptIn( JNIEnv* env, - const JavaParamRef& obj, jboolean opt_in) { DCHECK(g_browser_process); PrefService* local_state = g_browser_process->local_state(); diff --git a/chrome/browser/android/ntp/android_content_suggestions_notifier.cc b/chrome/browser/android/ntp/android_content_suggestions_notifier.cc index 39649c690b8c04..5c86b031f97cfb 100644 --- a/chrome/browser/android/ntp/android_content_suggestions_notifier.cc +++ b/chrome/browser/android/ntp/android_content_suggestions_notifier.cc @@ -97,7 +97,6 @@ void AndroidContentSuggestionsNotifier::UnregisterChannel() { static void JNI_ContentSuggestionsNotifier_RecordNotificationOptOut( JNIEnv* env, - const JavaParamRef& class_object, jint reason) { RecordContentSuggestionsNotificationOptOut( static_cast(reason)); @@ -105,7 +104,6 @@ static void JNI_ContentSuggestionsNotifier_RecordNotificationOptOut( static void JNI_ContentSuggestionsNotifier_RecordNotificationAction( JNIEnv* env, - const JavaParamRef& class_object, jint action) { RecordContentSuggestionsNotificationAction( static_cast(action)); @@ -113,7 +111,6 @@ static void JNI_ContentSuggestionsNotifier_RecordNotificationAction( static void JNI_ContentSuggestionsNotifier_ReceiveFlushedMetrics( JNIEnv* env, - const JavaParamRef& class_object, jint tap_count, jint dismissal_count, jint hide_deadline_count, diff --git a/chrome/browser/android/ntp/ntp_snippets_bridge.cc b/chrome/browser/android/ntp/ntp_snippets_bridge.cc index d83689ed65d0ab..3cac57950157f6 100644 --- a/chrome/browser/android/ntp/ntp_snippets_bridge.cc +++ b/chrome/browser/android/ntp/ntp_snippets_bridge.cc @@ -111,8 +111,7 @@ static jlong JNI_SnippetsBridge_Init(JNIEnv* env, static void JNI_SnippetsBridge_RemoteSuggestionsSchedulerOnPersistentSchedulerWakeUp( - JNIEnv* env, - const JavaParamRef& caller) { + JNIEnv* env) { ntp_snippets::RemoteSuggestionsScheduler* scheduler = GetRemoteSuggestionsScheduler(); if (!scheduler) { @@ -123,8 +122,7 @@ JNI_SnippetsBridge_RemoteSuggestionsSchedulerOnPersistentSchedulerWakeUp( } static void JNI_SnippetsBridge_RemoteSuggestionsSchedulerOnBrowserUpgraded( - JNIEnv* env, - const JavaParamRef& caller) { + JNIEnv* env) { ntp_snippets::RemoteSuggestionsScheduler* scheduler = GetRemoteSuggestionsScheduler(); // Can be null if the feature has been disabled but the scheduler has not been @@ -138,7 +136,6 @@ static void JNI_SnippetsBridge_RemoteSuggestionsSchedulerOnBrowserUpgraded( static void JNI_SnippetsBridge_SetContentSuggestionsNotificationsEnabled( JNIEnv* env, - const JavaParamRef& caller, jboolean enabled) { ContentSuggestionsNotifierService* notifier_service = ContentSuggestionsNotifierServiceFactory::GetForProfile( @@ -150,8 +147,7 @@ static void JNI_SnippetsBridge_SetContentSuggestionsNotificationsEnabled( } static jboolean JNI_SnippetsBridge_AreContentSuggestionsNotificationsEnabled( - JNIEnv* env, - const JavaParamRef& caller) { + JNIEnv* env) { ContentSuggestionsNotifierService* notifier_service = ContentSuggestionsNotifierServiceFactory::GetForProfile( ProfileManager::GetLastUsedProfile()); diff --git a/chrome/browser/android/ntp/recent_tabs_page_prefs.cc b/chrome/browser/android/ntp/recent_tabs_page_prefs.cc index abecf56b99c9e2..da0224dddc9c59 100644 --- a/chrome/browser/android/ntp/recent_tabs_page_prefs.cc +++ b/chrome/browser/android/ntp/recent_tabs_page_prefs.cc @@ -19,7 +19,6 @@ using base::android::JavaParamRef; static jlong JNI_RecentTabsPagePrefs_Init( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& profile) { RecentTabsPagePrefs* recent_tabs_page_prefs = new RecentTabsPagePrefs(ProfileAndroid::FromProfileAndroid(profile)); diff --git a/chrome/browser/android/ntp/suggestions_event_reporter_bridge.cc b/chrome/browser/android/ntp/suggestions_event_reporter_bridge.cc index e9bc8e9453ff67..2305142499502b 100644 --- a/chrome/browser/android/ntp/suggestions_event_reporter_bridge.cc +++ b/chrome/browser/android/ntp/suggestions_event_reporter_bridge.cc @@ -47,7 +47,6 @@ void NotifyEvent(UserClassifier::Metric metric) { static void JNI_SuggestionsEventReporterBridge_OnSuggestionTargetVisited( JNIEnv* env, - const JavaParamRef& caller, jint j_category_id, jlong visit_time_ms) { ntp_snippets::metrics::OnSuggestionTargetVisited( @@ -57,7 +56,6 @@ static void JNI_SuggestionsEventReporterBridge_OnSuggestionTargetVisited( static void JNI_SuggestionsEventReporterBridge_OnPageShown( JNIEnv* env, - const JavaParamRef& caller, const JavaParamRef& jcategories, const JavaParamRef& jsuggestions_per_category, const JavaParamRef& jis_category_visible) { @@ -85,7 +83,6 @@ static void JNI_SuggestionsEventReporterBridge_OnPageShown( static void JNI_SuggestionsEventReporterBridge_OnSuggestionShown( JNIEnv* env, - const JavaParamRef& caller, jint global_position, jint j_category_id, jint position_in_category, @@ -103,7 +100,6 @@ static void JNI_SuggestionsEventReporterBridge_OnSuggestionShown( static void JNI_SuggestionsEventReporterBridge_OnSuggestionOpened( JNIEnv* env, - const JavaParamRef& caller, jint global_position, jint j_category_id, jint category_index, @@ -131,7 +127,6 @@ static void JNI_SuggestionsEventReporterBridge_OnSuggestionOpened( static void JNI_SuggestionsEventReporterBridge_OnSuggestionMenuOpened( JNIEnv* env, - const JavaParamRef& caller, jint global_position, jint j_category_id, jint position_in_category, @@ -145,7 +140,6 @@ static void JNI_SuggestionsEventReporterBridge_OnSuggestionMenuOpened( static void JNI_SuggestionsEventReporterBridge_OnMoreButtonShown( JNIEnv* env, - const JavaParamRef& caller, jint j_category_id, jint position) { ntp_snippets::metrics::OnMoreButtonShown(Category::FromIDValue(j_category_id), @@ -154,7 +148,6 @@ static void JNI_SuggestionsEventReporterBridge_OnMoreButtonShown( static void JNI_SuggestionsEventReporterBridge_OnMoreButtonClicked( JNIEnv* env, - const JavaParamRef& caller, jint j_category_id, jint position) { ntp_snippets::metrics::OnMoreButtonClicked( @@ -162,9 +155,7 @@ static void JNI_SuggestionsEventReporterBridge_OnMoreButtonClicked( NotifyEvent(UserClassifier::Metric::SUGGESTIONS_USED); } -static void JNI_SuggestionsEventReporterBridge_OnSurfaceOpened( - JNIEnv* env, - const JavaParamRef& caller) { +static void JNI_SuggestionsEventReporterBridge_OnSurfaceOpened(JNIEnv* env) { ntp_snippets::RemoteSuggestionsScheduler* scheduler = GetRemoteSuggestionsScheduler(); // Can be null if the feature has been disabled but the scheduler has not been @@ -176,9 +167,7 @@ static void JNI_SuggestionsEventReporterBridge_OnSurfaceOpened( scheduler->OnSuggestionsSurfaceOpened(); } -static void JNI_SuggestionsEventReporterBridge_OnColdStart( - JNIEnv* env, - const JavaParamRef& caller) { +static void JNI_SuggestionsEventReporterBridge_OnColdStart(JNIEnv* env) { ntp_snippets::RemoteSuggestionsScheduler* scheduler = GetRemoteSuggestionsScheduler(); // TODO(fhorschig): Remove guard when https://crbug.com/678556 is resolved. @@ -189,8 +178,7 @@ static void JNI_SuggestionsEventReporterBridge_OnColdStart( } static void JNI_SuggestionsEventReporterBridge_OnActivityWarmResumed( - JNIEnv* env, - const JavaParamRef& caller) { + JNIEnv* env) { ntp_snippets::RemoteSuggestionsScheduler* scheduler = GetRemoteSuggestionsScheduler(); // TODO(fhorschig): Remove guard when https://crbug.com/678556 is resolved. diff --git a/chrome/browser/android/omnibox/answers_image_bridge.cc b/chrome/browser/android/omnibox/answers_image_bridge.cc index 5df3b31f94ade2..9ce2b25233c4b6 100644 --- a/chrome/browser/android/omnibox/answers_image_bridge.cc +++ b/chrome/browser/android/omnibox/answers_image_bridge.cc @@ -51,7 +51,6 @@ class AnswersImageObserverAndroid : public BitmapFetcherService::Observer { static void JNI_AnswersImageFetcher_CancelAnswersImageRequest( JNIEnv* env, - const JavaParamRef&, const JavaParamRef& java_profile, jint java_request_id) { Profile* profile = ProfileAndroid::FromProfileAndroid(java_profile); @@ -63,7 +62,6 @@ static void JNI_AnswersImageFetcher_CancelAnswersImageRequest( static int JNI_AnswersImageFetcher_RequestAnswersImage( JNIEnv* env, - const JavaParamRef&, const JavaParamRef& java_profile, const JavaParamRef& java_url, const JavaParamRef& java_callback) { diff --git a/chrome/browser/android/omnibox/autocomplete_controller_android.cc b/chrome/browser/android/omnibox/autocomplete_controller_android.cc index 4d9f5108629a7f..1a6905dfdf781e 100644 --- a/chrome/browser/android/omnibox/autocomplete_controller_android.cc +++ b/chrome/browser/android/omnibox/autocomplete_controller_android.cc @@ -625,7 +625,6 @@ static jlong JNI_AutocompleteController_Init( static ScopedJavaLocalRef JNI_AutocompleteController_QualifyPartialURLQuery( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jquery) { Profile* profile = ProfileManager::GetActiveUserProfile(); if (!profile) @@ -652,9 +651,7 @@ JNI_AutocompleteController_QualifyPartialURLQuery( return ConvertUTF8ToJavaString(env, match.destination_url.spec()); } -static void JNI_AutocompleteController_PrefetchZeroSuggestResults( - JNIEnv* env, - const JavaParamRef& clazz) { +static void JNI_AutocompleteController_PrefetchZeroSuggestResults(JNIEnv* env) { Profile* profile = ProfileManager::GetActiveUserProfile(); if (!profile) return; diff --git a/chrome/browser/android/omnibox/query_in_omnibox_android.cc b/chrome/browser/android/omnibox/query_in_omnibox_android.cc index 686e6527b406db..db2da506865381 100644 --- a/chrome/browser/android/omnibox/query_in_omnibox_android.cc +++ b/chrome/browser/android/omnibox/query_in_omnibox_android.cc @@ -12,7 +12,6 @@ using base::android::JavaParamRef; static base::android::ScopedJavaLocalRef JNI_QueryInOmnibox_GetDisplaySearchTerms(JNIEnv* env, - const JavaParamRef&, const JavaParamRef& j_profile, jint j_security_level, jboolean j_ignore_security_level, diff --git a/chrome/browser/android/password_ui_view_android.cc b/chrome/browser/android/password_ui_view_android.cc index 45871526f4a84b..bbdef1bc94a96b 100644 --- a/chrome/browser/android/password_ui_view_android.cc +++ b/chrome/browser/android/password_ui_view_android.cc @@ -190,8 +190,7 @@ void PasswordUIViewAndroid::HandleSerializePasswords( } ScopedJavaLocalRef JNI_PasswordUIView_GetAccountDashboardURL( - JNIEnv* env, - const JavaParamRef&) { + JNIEnv* env) { return ConvertUTF16ToJavaString( env, l10n_util::GetStringUTF16(IDS_PASSWORDS_WEB_LINK)); } diff --git a/chrome/browser/android/payments/service_worker_payment_app_bridge.cc b/chrome/browser/android/payments/service_worker_payment_app_bridge.cc index b46ba4e2c91966..bc660c9b487d39 100644 --- a/chrome/browser/android/payments/service_worker_payment_app_bridge.cc +++ b/chrome/browser/android/payments/service_worker_payment_app_bridge.cc @@ -293,7 +293,6 @@ PaymentRequestEventDataPtr ConvertPaymentRequestEventDataFromJavaToNative( static void JNI_ServiceWorkerPaymentAppBridge_GetAllPaymentApps( JNIEnv* env, - const JavaParamRef& jcaller, const JavaParamRef& jweb_contents, const JavaParamRef& jmethod_data, jboolean jmay_crawl_for_installable_payment_apps, @@ -321,7 +320,6 @@ static void JNI_ServiceWorkerPaymentAppBridge_GetAllPaymentApps( static void JNI_ServiceWorkerPaymentAppBridge_HasServiceWorkerPaymentApps( JNIEnv* env, - const JavaParamRef& jcaller, const JavaParamRef& jcallback) { // Checks whether there is a installed service worker payment app through // GetAllPaymentApps. @@ -333,7 +331,6 @@ static void JNI_ServiceWorkerPaymentAppBridge_HasServiceWorkerPaymentApps( static void JNI_ServiceWorkerPaymentAppBridge_GetServiceWorkerPaymentAppsInfo( JNIEnv* env, - const JavaParamRef& jcaller, const JavaParamRef& jcallback) { content::PaymentAppProvider::GetInstance()->GetAllPaymentApps( ProfileManager::GetActiveUserProfile(), @@ -343,7 +340,6 @@ static void JNI_ServiceWorkerPaymentAppBridge_GetServiceWorkerPaymentAppsInfo( static void JNI_ServiceWorkerPaymentAppBridge_CanMakePayment( JNIEnv* env, - const JavaParamRef& jcaller, const JavaParamRef& jweb_contents, jlong registration_id, const JavaParamRef& jtop_origin, @@ -406,7 +402,6 @@ static void JNI_ServiceWorkerPaymentAppBridge_CanMakePayment( static void JNI_ServiceWorkerPaymentAppBridge_InvokePaymentApp( JNIEnv* env, - const JavaParamRef& jcaller, const JavaParamRef& jweb_contents, jlong registration_id, const JavaParamRef& jtop_origin, @@ -431,7 +426,6 @@ static void JNI_ServiceWorkerPaymentAppBridge_InvokePaymentApp( static void JNI_ServiceWorkerPaymentAppBridge_InstallAndInvokePaymentApp( JNIEnv* env, - const JavaParamRef& jcaller, const JavaParamRef& jweb_contents, const JavaParamRef& jtop_origin, const JavaParamRef& jpayment_request_origin, @@ -470,7 +464,6 @@ static void JNI_ServiceWorkerPaymentAppBridge_InstallAndInvokePaymentApp( static void JNI_ServiceWorkerPaymentAppBridge_AbortPaymentApp( JNIEnv* env, - const JavaParamRef& jcaller, const JavaParamRef& jweb_contents, jlong registration_id, const JavaParamRef& jcallback) { @@ -486,7 +479,6 @@ static void JNI_ServiceWorkerPaymentAppBridge_AbortPaymentApp( static void JNI_ServiceWorkerPaymentAppBridge_OnClosingPaymentAppWindow( JNIEnv* env, - const JavaParamRef& jcaller, const JavaParamRef& jweb_contents) { content::WebContents* web_contents = content::WebContents::FromJavaWebContents(jweb_contents); diff --git a/chrome/browser/android/photo_picker_sandbox_bridge.cc b/chrome/browser/android/photo_picker_sandbox_bridge.cc index c94e9fcd26b0a3..d5888b57b65434 100644 --- a/chrome/browser/android/photo_picker_sandbox_bridge.cc +++ b/chrome/browser/android/photo_picker_sandbox_bridge.cc @@ -14,9 +14,7 @@ #include "sandbox/linux/seccomp-bpf-helpers/baseline_policy_android.h" #endif -void JNI_DecoderService_InitializePhotoPickerSandbox( - JNIEnv* env, - const base::android::JavaParamRef& jcaller) { +void JNI_DecoderService_InitializePhotoPickerSandbox(JNIEnv* env) { auto* info = base::android::BuildInfo::GetInstance(); sandbox::SeccompStarterAndroid starter(info->sdk_int(), info->device()); diff --git a/chrome/browser/android/policy/policy_auditor.cc b/chrome/browser/android/policy/policy_auditor.cc index 25c457039e56f4..dae4338856e506 100644 --- a/chrome/browser/android/policy/policy_auditor.cc +++ b/chrome/browser/android/policy/policy_auditor.cc @@ -13,7 +13,6 @@ using base::android::JavaParamRef; int JNI_PolicyAuditor_GetCertificateFailure( JNIEnv* env, - const JavaParamRef& obj, const JavaParamRef& java_web_contents) { // This function is similar to // LocationBarModelImpl::GetSecurityLevelForWebContents, but has a custom diff --git a/chrome/browser/android/preferences/autofill/autofill_profile_bridge.cc b/chrome/browser/android/preferences/autofill/autofill_profile_bridge.cc index d8738048ec87c6..415747e516b34e 100644 --- a/chrome/browser/android/preferences/autofill/autofill_profile_bridge.cc +++ b/chrome/browser/android/preferences/autofill/autofill_profile_bridge.cc @@ -36,9 +36,7 @@ using ::i18n::addressinput::Localization; using ::i18n::addressinput::RECIPIENT; static ScopedJavaLocalRef -JNI_AutofillProfileBridge_GetDefaultCountryCode( - JNIEnv* env, - const JavaParamRef& clazz) { +JNI_AutofillProfileBridge_GetDefaultCountryCode(JNIEnv* env) { std::string default_country_code = autofill::AutofillCountry::CountryCodeForLocale( g_browser_process->GetApplicationLocale()); @@ -47,7 +45,6 @@ JNI_AutofillProfileBridge_GetDefaultCountryCode( static void JNI_AutofillProfileBridge_GetSupportedCountries( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_country_code_list, const JavaParamRef& j_country_name_list) { std::vector country_codes = GetRegionCodes(); @@ -72,7 +69,6 @@ static void JNI_AutofillProfileBridge_GetSupportedCountries( static void JNI_AutofillProfileBridge_GetRequiredFields( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_country_code, const JavaParamRef& j_required_fields_list) { std::string country_code = ConvertJavaStringToUTF8(env, j_country_code); @@ -94,7 +90,6 @@ static void JNI_AutofillProfileBridge_GetRequiredFields( static ScopedJavaLocalRef JNI_AutofillProfileBridge_GetAddressUiComponents( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_country_code, const JavaParamRef& j_language_code, const JavaParamRef& j_id_list, diff --git a/chrome/browser/android/preferences/website_preference_bridge.cc b/chrome/browser/android/preferences/website_preference_bridge.cc index f25aae7868a833..b7578ad5f9c54d 100644 --- a/chrome/browser/android/preferences/website_preference_bridge.cc +++ b/chrome/browser/android/preferences/website_preference_bridge.cc @@ -277,7 +277,6 @@ bool OriginMatcher(const url::Origin& origin, const GURL& other) { static void JNI_WebsitePreferenceBridge_GetClipboardOrigins( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& list) { JNI_WebsitePreferenceBridge_GetOrigins( env, CONTENT_SETTINGS_TYPE_CLIPBOARD_READ, @@ -286,7 +285,6 @@ static void JNI_WebsitePreferenceBridge_GetClipboardOrigins( static jint JNI_WebsitePreferenceBridge_GetClipboardSettingForOrigin( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& origin, jboolean is_incognito) { return JNI_WebsitePreferenceBridge_GetSettingForOrigin( @@ -295,7 +293,6 @@ static jint JNI_WebsitePreferenceBridge_GetClipboardSettingForOrigin( static void JNI_WebsitePreferenceBridge_SetClipboardSettingForOrigin( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& origin, jint value, jboolean is_incognito) { @@ -306,7 +303,6 @@ static void JNI_WebsitePreferenceBridge_SetClipboardSettingForOrigin( static void JNI_WebsitePreferenceBridge_GetGeolocationOrigins( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& list, jboolean managedOnly) { JNI_WebsitePreferenceBridge_GetOrigins( @@ -317,7 +313,6 @@ static void JNI_WebsitePreferenceBridge_GetGeolocationOrigins( static jint JNI_WebsitePreferenceBridge_GetGeolocationSettingForOrigin( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& origin, const JavaParamRef& embedder, jboolean is_incognito) { @@ -327,7 +322,6 @@ static jint JNI_WebsitePreferenceBridge_GetGeolocationSettingForOrigin( static void JNI_WebsitePreferenceBridge_SetGeolocationSettingForOrigin( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& origin, const JavaParamRef& embedder, jint value, @@ -339,7 +333,6 @@ static void JNI_WebsitePreferenceBridge_SetGeolocationSettingForOrigin( static void JNI_WebsitePreferenceBridge_GetMidiOrigins( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& list) { JNI_WebsitePreferenceBridge_GetOrigins( env, CONTENT_SETTINGS_TYPE_MIDI_SYSEX, @@ -348,7 +341,6 @@ static void JNI_WebsitePreferenceBridge_GetMidiOrigins( static jint JNI_WebsitePreferenceBridge_GetMidiSettingForOrigin( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& origin, const JavaParamRef& embedder, jboolean is_incognito) { @@ -358,7 +350,6 @@ static jint JNI_WebsitePreferenceBridge_GetMidiSettingForOrigin( static void JNI_WebsitePreferenceBridge_SetMidiSettingForOrigin( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& origin, const JavaParamRef& embedder, jint value, @@ -370,7 +361,6 @@ static void JNI_WebsitePreferenceBridge_SetMidiSettingForOrigin( static void JNI_WebsitePreferenceBridge_GetProtectedMediaIdentifierOrigins( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& list) { JNI_WebsitePreferenceBridge_GetOrigins( env, CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER, @@ -381,7 +371,6 @@ static void JNI_WebsitePreferenceBridge_GetProtectedMediaIdentifierOrigins( static jint JNI_WebsitePreferenceBridge_GetProtectedMediaIdentifierSettingForOrigin( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& origin, const JavaParamRef& embedder, jboolean is_incognito) { @@ -393,7 +382,6 @@ JNI_WebsitePreferenceBridge_GetProtectedMediaIdentifierSettingForOrigin( static void JNI_WebsitePreferenceBridge_SetProtectedMediaIdentifierSettingForOrigin( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& origin, const JavaParamRef& embedder, jint value, @@ -405,7 +393,6 @@ JNI_WebsitePreferenceBridge_SetProtectedMediaIdentifierSettingForOrigin( static void JNI_WebsitePreferenceBridge_GetNotificationOrigins( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& list) { JNI_WebsitePreferenceBridge_GetOrigins( env, CONTENT_SETTINGS_TYPE_NOTIFICATIONS, @@ -414,7 +401,6 @@ static void JNI_WebsitePreferenceBridge_GetNotificationOrigins( static jint JNI_WebsitePreferenceBridge_GetNotificationSettingForOrigin( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& origin, jboolean is_incognito) { return JNI_WebsitePreferenceBridge_GetSettingForOrigin( @@ -423,7 +409,6 @@ static jint JNI_WebsitePreferenceBridge_GetNotificationSettingForOrigin( static void JNI_WebsitePreferenceBridge_SetNotificationSettingForOrigin( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& origin, jint value, jboolean is_incognito) { @@ -461,7 +446,6 @@ static void JNI_WebsitePreferenceBridge_SetNotificationSettingForOrigin( // We detect this change and explicitly report it back for UMA reporting. static void JNI_WebsitePreferenceBridge_ReportNotificationRevokedForOrigin( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& origin, jint new_setting_value, jboolean is_incognito) { @@ -481,7 +465,6 @@ static void JNI_WebsitePreferenceBridge_ReportNotificationRevokedForOrigin( static void JNI_WebsitePreferenceBridge_GetCameraOrigins( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& list, jboolean managedOnly) { JNI_WebsitePreferenceBridge_GetOrigins( @@ -492,7 +475,6 @@ static void JNI_WebsitePreferenceBridge_GetCameraOrigins( static void JNI_WebsitePreferenceBridge_GetMicrophoneOrigins( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& list, jboolean managedOnly) { JNI_WebsitePreferenceBridge_GetOrigins( @@ -503,7 +485,6 @@ static void JNI_WebsitePreferenceBridge_GetMicrophoneOrigins( static jint JNI_WebsitePreferenceBridge_GetMicrophoneSettingForOrigin( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& origin, const JavaParamRef& embedder, jboolean is_incognito) { @@ -514,7 +495,6 @@ static jint JNI_WebsitePreferenceBridge_GetMicrophoneSettingForOrigin( static jint JNI_WebsitePreferenceBridge_GetCameraSettingForOrigin( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& origin, const JavaParamRef& embedder, jboolean is_incognito) { @@ -525,7 +505,6 @@ static jint JNI_WebsitePreferenceBridge_GetCameraSettingForOrigin( static void JNI_WebsitePreferenceBridge_SetMicrophoneSettingForOrigin( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& origin, jint value, jboolean is_incognito) { @@ -537,7 +516,6 @@ static void JNI_WebsitePreferenceBridge_SetMicrophoneSettingForOrigin( static void JNI_WebsitePreferenceBridge_SetCameraSettingForOrigin( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& origin, jint value, jboolean is_incognito) { @@ -549,7 +527,6 @@ static void JNI_WebsitePreferenceBridge_SetCameraSettingForOrigin( static jboolean JNI_WebsitePreferenceBridge_IsContentSettingsPatternValid( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& pattern) { return ContentSettingsPattern::FromString( ConvertJavaStringToUTF8(env, pattern)).IsValid(); @@ -557,7 +534,6 @@ static jboolean JNI_WebsitePreferenceBridge_IsContentSettingsPatternValid( static jboolean JNI_WebsitePreferenceBridge_UrlMatchesContentSettingsPattern( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jurl, const JavaParamRef& jpattern) { ContentSettingsPattern pattern = ContentSettingsPattern::FromString( @@ -567,7 +543,6 @@ static jboolean JNI_WebsitePreferenceBridge_UrlMatchesContentSettingsPattern( static void JNI_WebsitePreferenceBridge_GetChosenObjects( JNIEnv* env, - const JavaParamRef& clazz, jint content_settings_type, const JavaParamRef& list) { ChooserContextBase* context = GetChooserContext( @@ -604,7 +579,6 @@ static void JNI_WebsitePreferenceBridge_GetChosenObjects( static void JNI_WebsitePreferenceBridge_RevokeObjectPermission( JNIEnv* env, - const JavaParamRef& clazz, jint content_settings_type, const JavaParamRef& jorigin, const JavaParamRef& jembedder, @@ -740,7 +714,6 @@ void OnLocalStorageModelInfoLoaded( static void JNI_WebsitePreferenceBridge_FetchLocalStorageInfo( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& java_callback, jboolean fetch_important) { Profile* profile = ProfileManager::GetActiveUserProfile(); @@ -753,7 +726,6 @@ static void JNI_WebsitePreferenceBridge_FetchLocalStorageInfo( static void JNI_WebsitePreferenceBridge_FetchStorageInfo( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& java_callback) { Profile* profile = ProfileManager::GetActiveUserProfile(); @@ -764,7 +736,6 @@ static void JNI_WebsitePreferenceBridge_FetchStorageInfo( static void JNI_WebsitePreferenceBridge_ClearLocalStorageData( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jorigin, const JavaParamRef& java_callback) { Profile* profile = ProfileManager::GetActiveUserProfile(); @@ -778,7 +749,6 @@ static void JNI_WebsitePreferenceBridge_ClearLocalStorageData( static void JNI_WebsitePreferenceBridge_ClearStorageData( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jhost, jint type, const JavaParamRef& java_callback) { @@ -794,7 +764,6 @@ static void JNI_WebsitePreferenceBridge_ClearStorageData( static void JNI_WebsitePreferenceBridge_ClearCookieData( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jorigin) { Profile* profile = ProfileManager::GetActiveUserProfile(); GURL url(ConvertJavaStringToUTF8(env, jorigin)); @@ -808,7 +777,6 @@ static void JNI_WebsitePreferenceBridge_ClearCookieData( static void JNI_WebsitePreferenceBridge_ClearBannerData( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jorigin) { GetHostContentSettingsMap(false)->SetWebsiteSettingDefaultScope( GURL(ConvertJavaStringToUTF8(env, jorigin)), GURL(), @@ -817,7 +785,6 @@ static void JNI_WebsitePreferenceBridge_ClearBannerData( static void JNI_WebsitePreferenceBridge_ClearMediaLicenses( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jorigin) { Profile* profile = ProfileManager::GetActiveUserProfile(); url::Origin origin = @@ -829,7 +796,6 @@ static void JNI_WebsitePreferenceBridge_ClearMediaLicenses( static jboolean JNI_WebsitePreferenceBridge_IsPermissionControlledByDSE( JNIEnv* env, - const JavaParamRef& clazz, int content_settings_type, const JavaParamRef& jorigin, jboolean is_incognito) { @@ -844,7 +810,6 @@ static jboolean JNI_WebsitePreferenceBridge_IsPermissionControlledByDSE( static jboolean JNI_WebsitePreferenceBridge_GetAdBlockingActivated( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jorigin) { GURL url(ConvertJavaStringToUTF8(env, jorigin)); return !!GetHostContentSettingsMap(false)->GetWebsiteSetting( @@ -853,7 +818,6 @@ static jboolean JNI_WebsitePreferenceBridge_GetAdBlockingActivated( static void JNI_WebsitePreferenceBridge_GetSensorsOrigins( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& list) { JNI_WebsitePreferenceBridge_GetOrigins( env, CONTENT_SETTINGS_TYPE_SENSORS, @@ -862,7 +826,6 @@ static void JNI_WebsitePreferenceBridge_GetSensorsOrigins( static jint JNI_WebsitePreferenceBridge_GetSensorsSettingForOrigin( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& origin, const JavaParamRef& embedder, jboolean is_incognito) { @@ -872,7 +835,6 @@ static jint JNI_WebsitePreferenceBridge_GetSensorsSettingForOrigin( static void JNI_WebsitePreferenceBridge_SetSensorsSettingForOrigin( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& origin, const JavaParamRef& embedder, jint value, @@ -885,8 +847,7 @@ static void JNI_WebsitePreferenceBridge_SetSensorsSettingForOrigin( // On Android O+ notification channels are not stored in the Chrome profile and // so are persisted across tests. This function resets them. static void JNI_WebsitePreferenceBridge_ResetNotificationsSettingsForTest( - JNIEnv* env, - const JavaParamRef& clazz) { + JNIEnv* env) { GetHostContentSettingsMap(/*is_incognito=*/false) ->ClearSettingsForOneType(CONTENT_SETTINGS_TYPE_NOTIFICATIONS); } diff --git a/chrome/browser/android/profiles/profile_downloader_android.cc b/chrome/browser/android/profiles/profile_downloader_android.cc index 617447f5027bec..25e5288ebe308e 100644 --- a/chrome/browser/android/profiles/profile_downloader_android.cc +++ b/chrome/browser/android/profiles/profile_downloader_android.cc @@ -126,7 +126,6 @@ class AccountInfoRetriever : public ProfileDownloaderDelegate { ScopedJavaLocalRef JNI_ProfileDownloader_GetCachedFullNameForPrimaryAccount( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jprofile) { Profile* profile = ProfileAndroid::FromProfileAndroid(jprofile); @@ -144,7 +143,6 @@ JNI_ProfileDownloader_GetCachedFullNameForPrimaryAccount( ScopedJavaLocalRef JNI_ProfileDownloader_GetCachedGivenNameForPrimaryAccount( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jprofile) { Profile* profile = ProfileAndroid::FromProfileAndroid(jprofile); @@ -162,7 +160,6 @@ JNI_ProfileDownloader_GetCachedGivenNameForPrimaryAccount( ScopedJavaLocalRef JNI_ProfileDownloader_GetCachedAvatarForPrimaryAccount( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jprofile) { Profile* profile = ProfileAndroid::FromProfileAndroid(jprofile); @@ -185,7 +182,6 @@ JNI_ProfileDownloader_GetCachedAvatarForPrimaryAccount( // static void JNI_ProfileDownloader_StartFetchingAccountInfoFor( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jprofile, const JavaParamRef& jemail, jint image_side_pixels, diff --git a/chrome/browser/android/profiles/profile_manager_utils.cc b/chrome/browser/android/profiles/profile_manager_utils.cc index 41d280d2ced450..4026be16547739 100644 --- a/chrome/browser/android/profiles/profile_manager_utils.cc +++ b/chrome/browser/android/profiles/profile_manager_utils.cc @@ -52,8 +52,7 @@ void RemoveSessionCookiesForProfile(Profile* profile) { } // namespace static void JNI_ProfileManagerUtils_FlushPersistentDataForAllProfiles( - JNIEnv* env, - const JavaParamRef& obj) { + JNIEnv* env) { std::vector loaded_profiles = g_browser_process->profile_manager()->GetLoadedProfiles(); std::for_each(loaded_profiles.begin(), loaded_profiles.end(), @@ -64,8 +63,7 @@ static void JNI_ProfileManagerUtils_FlushPersistentDataForAllProfiles( } static void JNI_ProfileManagerUtils_RemoveSessionCookiesForAllProfiles( - JNIEnv* env, - const JavaParamRef& obj) { + JNIEnv* env) { std::vector loaded_profiles = g_browser_process->profile_manager()->GetLoadedProfiles(); std::for_each(loaded_profiles.begin(), loaded_profiles.end(), diff --git a/chrome/browser/android/rappor/rappor_service_bridge.cc b/chrome/browser/android/rappor/rappor_service_bridge.cc index 97958f4ba9ffd7..8c62adf2e1606e 100644 --- a/chrome/browser/android/rappor/rappor_service_bridge.cc +++ b/chrome/browser/android/rappor/rappor_service_bridge.cc @@ -15,7 +15,6 @@ namespace rappor { void JNI_RapporServiceBridge_SampleDomainAndRegistryFromURL( JNIEnv* env, - const JavaParamRef& caller, const JavaParamRef& j_metric, const JavaParamRef& j_url) { // TODO(knn): UMA metrics hash the string to prevent frequent re-encoding, @@ -28,7 +27,6 @@ void JNI_RapporServiceBridge_SampleDomainAndRegistryFromURL( void JNI_RapporServiceBridge_SampleString( JNIEnv* env, - const JavaParamRef& caller, const JavaParamRef& j_metric, const JavaParamRef& j_value) { std::string metric(base::android::ConvertJavaStringToUTF8(env, j_metric)); diff --git a/chrome/browser/android/rlz/revenue_stats.cc b/chrome/browser/android/rlz/revenue_stats.cc index 727264b1ff457b..7a6dacfeec251c 100644 --- a/chrome/browser/android/rlz/revenue_stats.cc +++ b/chrome/browser/android/rlz/revenue_stats.cc @@ -15,7 +15,6 @@ namespace android { static void JNI_RevenueStats_SetSearchClient( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jclient) { SearchTermsDataAndroid::search_client_.Get() = base::android::ConvertJavaStringToUTF8(env, jclient); @@ -23,7 +22,6 @@ static void JNI_RevenueStats_SetSearchClient( static void JNI_RevenueStats_SetRlzParameterValue( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jrlz) { SearchTermsDataAndroid::rlz_parameter_value_.Get() = base::android::ConvertJavaStringToUTF16(env, jrlz); diff --git a/chrome/browser/android/rlz/rlz_ping_handler.cc b/chrome/browser/android/rlz/rlz_ping_handler.cc index 0b503ab5e311fd..eb4efd3ed046ae 100644 --- a/chrome/browser/android/rlz/rlz_ping_handler.cc +++ b/chrome/browser/android/rlz/rlz_ping_handler.cc @@ -153,7 +153,6 @@ void RlzPingHandler::OnSimpleLoaderComplete( void JNI_RlzPingHandler_StartPing( JNIEnv* env, - const JavaParamRef& clazz, const base::android::JavaParamRef& j_profile, const base::android::JavaParamRef& j_brand, const base::android::JavaParamRef& j_language, diff --git a/chrome/browser/android/search_permissions/search_geolocation_disclosure_tab_helper.cc b/chrome/browser/android/search_permissions/search_geolocation_disclosure_tab_helper.cc index 58e4a6d113d106..28945435e51565 100644 --- a/chrome/browser/android/search_permissions/search_geolocation_disclosure_tab_helper.cc +++ b/chrome/browser/android/search_permissions/search_geolocation_disclosure_tab_helper.cc @@ -250,15 +250,13 @@ Profile* SearchGeolocationDisclosureTabHelper::GetProfile() { // static void JNI_SearchGeolocationDisclosureTabHelper_SetIgnoreUrlChecksForTesting( - JNIEnv* env, - const base::android::JavaParamRef& clazz) { + JNIEnv* env) { gIgnoreUrlChecksForTesting = true; } // static void JNI_SearchGeolocationDisclosureTabHelper_SetDayOffsetForTesting( JNIEnv* env, - const base::android::JavaParamRef& clazz, jint days) { gDayOffsetForTesting = days; } diff --git a/chrome/browser/android/service_tab_launcher.cc b/chrome/browser/android/service_tab_launcher.cc index a73e05ae156406..12b9e5edf99576 100644 --- a/chrome/browser/android/service_tab_launcher.cc +++ b/chrome/browser/android/service_tab_launcher.cc @@ -21,7 +21,6 @@ using base::android::ScopedJavaLocalRef; // Called by Java when the WebContents instance for a request Id is available. void JNI_ServiceTabLauncher_OnWebContentsForRequestAvailable( JNIEnv* env, - const JavaParamRef& clazz, jint request_id, const JavaParamRef& android_web_contents) { ServiceTabLauncher::GetInstance()->OnTabLaunched( diff --git a/chrome/browser/android/sessions/session_tab_helper_android.cc b/chrome/browser/android/sessions/session_tab_helper_android.cc index 03b79736c7b955..3950bffe990754 100644 --- a/chrome/browser/android/sessions/session_tab_helper_android.cc +++ b/chrome/browser/android/sessions/session_tab_helper_android.cc @@ -12,7 +12,6 @@ using base::android::JavaParamRef; // static jint JNI_SessionTabHelper_IdForTab( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& java_web_contents) { content::WebContents* web_contents = content::WebContents::FromJavaWebContents(java_web_contents); diff --git a/chrome/browser/android/shortcut_helper.cc b/chrome/browser/android/shortcut_helper.cc index f0fd40d4df5791..1dc6785428e5fc 100644 --- a/chrome/browser/android/shortcut_helper.cc +++ b/chrome/browser/android/shortcut_helper.cc @@ -343,7 +343,6 @@ void ShortcutHelper::RetrieveWebApks(const WebApkInfoCallback& callback) { // webapp-capable site; otherwise, |splash_image_callback| will have never been // allocated and doesn't need to be run or deleted. void JNI_ShortcutHelper_OnWebappDataStored(JNIEnv* env, - const JavaParamRef& clazz, jlong jsplash_image_callback) { DCHECK(jsplash_image_callback); base::Closure* splash_image_callback = @@ -354,7 +353,6 @@ void JNI_ShortcutHelper_OnWebappDataStored(JNIEnv* env, void JNI_ShortcutHelper_OnWebApksRetrieved( JNIEnv* env, - const JavaParamRef& clazz, const jlong jcallback_pointer, const JavaParamRef& jnames, const JavaParamRef& jshort_names, diff --git a/chrome/browser/android/signin/account_management_screen_helper.cc b/chrome/browser/android/signin/account_management_screen_helper.cc index cf929a807462b4..205b847757c922 100644 --- a/chrome/browser/android/signin/account_management_screen_helper.cc +++ b/chrome/browser/android/signin/account_management_screen_helper.cc @@ -27,7 +27,6 @@ void AccountManagementScreenHelper::OpenAccountManagementScreen( static void JNI_AccountManagementScreenHelper_LogEvent( JNIEnv* env, - const JavaParamRef& clazz, jint metric, jint gaiaServiceType) { ProfileMetrics::LogProfileAndroidAccountManagementMenu( diff --git a/chrome/browser/android/signin/account_tracker_service_android.cc b/chrome/browser/android/signin/account_tracker_service_android.cc index f2568cabaac501..a658ce15470497 100644 --- a/chrome/browser/android/signin/account_tracker_service_android.cc +++ b/chrome/browser/android/signin/account_tracker_service_android.cc @@ -17,7 +17,6 @@ namespace android { void JNI_AccountTrackerService_SeedAccountsInfo( JNIEnv* env, - const JavaParamRef& jcaller, const JavaParamRef& gaiaIds, const JavaParamRef& accountNames) { std::vector gaia_ids; @@ -40,7 +39,6 @@ void JNI_AccountTrackerService_SeedAccountsInfo( jboolean JNI_AccountTrackerService_AreAccountsSeeded( JNIEnv* env, - const JavaParamRef& jcaller, const JavaParamRef& accountNames) { std::vector account_names; base::android::AppendJavaStringArrayToStringVector(env, accountNames, diff --git a/chrome/browser/android/signin/signin_investigator_android.cc b/chrome/browser/android/signin/signin_investigator_android.cc index 0241ff2c6b4769..01ea9fa629655a 100644 --- a/chrome/browser/android/signin/signin_investigator_android.cc +++ b/chrome/browser/android/signin/signin_investigator_android.cc @@ -18,7 +18,6 @@ using base::android::JavaParamRef; // static jint JNI_SigninInvestigator_Investigate( JNIEnv* env, - const JavaParamRef& jcaller, const JavaParamRef& current_email) { Profile* profile = ProfileManager::GetActiveUserProfile(); DCHECK(profile); diff --git a/chrome/browser/android/signin/signin_manager_android.cc b/chrome/browser/android/signin/signin_manager_android.cc index 35df6ebfbd92b5..b821b76b5c69ce 100644 --- a/chrome/browser/android/signin/signin_manager_android.cc +++ b/chrome/browser/android/signin/signin_manager_android.cc @@ -362,7 +362,6 @@ static jlong JNI_SigninManager_Init(JNIEnv* env, static jboolean JNI_SigninManager_ShouldLoadPolicyForUser( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_username) { std::string username = base::android::ConvertJavaStringToUTF8(env, j_username); @@ -371,7 +370,6 @@ static jboolean JNI_SigninManager_ShouldLoadPolicyForUser( static void JNI_SigninManager_IsUserManaged( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_username, const JavaParamRef& j_callback) { base::android::ScopedJavaGlobalRef callback(env, j_callback); @@ -391,7 +389,6 @@ static void JNI_SigninManager_IsUserManaged( base::android::ScopedJavaLocalRef JNI_SigninManager_ExtractDomainName( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_email) { std::string email = base::android::ConvertJavaStringToUTF8(env, j_email); std::string domain = gaia::ExtractDomainName(email); diff --git a/chrome/browser/android/signin/unified_consent_service_bridge.cc b/chrome/browser/android/signin/unified_consent_service_bridge.cc index 3118bc6dd8a34c..6f0cc2ed11058f 100644 --- a/chrome/browser/android/signin/unified_consent_service_bridge.cc +++ b/chrome/browser/android/signin/unified_consent_service_bridge.cc @@ -15,7 +15,6 @@ using base::android::JavaParamRef; static jboolean JNI_UnifiedConsentServiceBridge_IsUnifiedConsentGiven( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& profileAndroid) { // TODO(crbug.com/907856): Remove. return false; @@ -23,7 +22,6 @@ static jboolean JNI_UnifiedConsentServiceBridge_IsUnifiedConsentGiven( static void JNI_UnifiedConsentServiceBridge_SetUnifiedConsentGiven( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& profileAndroid, jboolean unifiedConsentGiven) { // TODO(crbug.com/907856): Remove. @@ -32,7 +30,6 @@ static void JNI_UnifiedConsentServiceBridge_SetUnifiedConsentGiven( static jboolean JNI_UnifiedConsentServiceBridge_IsUrlKeyedAnonymizedDataCollectionEnabled( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& profileAndroid) { Profile* profile = ProfileAndroid::FromProfileAndroid(profileAndroid); return profile->GetPrefs()->GetBoolean( @@ -42,7 +39,6 @@ JNI_UnifiedConsentServiceBridge_IsUrlKeyedAnonymizedDataCollectionEnabled( static void JNI_UnifiedConsentServiceBridge_SetUrlKeyedAnonymizedDataCollectionEnabled( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& profileAndroid, const jboolean enabled) { Profile* profile = ProfileAndroid::FromProfileAndroid(profileAndroid); @@ -54,7 +50,6 @@ JNI_UnifiedConsentServiceBridge_SetUrlKeyedAnonymizedDataCollectionEnabled( static jboolean JNI_UnifiedConsentServiceBridge_IsUrlKeyedAnonymizedDataCollectionManaged( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& profileAndroid) { Profile* profile = ProfileAndroid::FromProfileAndroid(profileAndroid); return profile->GetPrefs()->IsManagedPreference( diff --git a/chrome/browser/android/tab_state.cc b/chrome/browser/android/tab_state.cc index 48012589673309..43d7ee65cf3bf6 100644 --- a/chrome/browser/android/tab_state.cc +++ b/chrome/browser/android/tab_state.cc @@ -477,7 +477,6 @@ WebContentsState::GetVirtualUrlFromByteBuffer(JNIEnv* env, ScopedJavaLocalRef WebContentsState::RestoreContentsFromByteBuffer( JNIEnv* env, - jclass clazz, jobject state, jint saved_state_version, jboolean initially_hidden) { @@ -525,7 +524,6 @@ ScopedJavaLocalRef static void JNI_TabState_FreeWebContentsStateBuffer( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& obj) { void* data = env->GetDirectBufferAddress(obj); free(data); @@ -533,12 +531,10 @@ static void JNI_TabState_FreeWebContentsStateBuffer( static ScopedJavaLocalRef JNI_TabState_RestoreContentsFromByteBuffer( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& state, jint saved_state_version, jboolean initially_hidden) { return WebContentsState::RestoreContentsFromByteBuffer(env, - clazz, state, saved_state_version, initially_hidden); @@ -546,7 +542,6 @@ static ScopedJavaLocalRef JNI_TabState_RestoreContentsFromByteBuffer( static ScopedJavaLocalRef JNI_TabState_GetContentsStateAsByteBuffer( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jtab) { TabAndroid* tab_android = TabAndroid::GetNativeTab(env, jtab); return WebContentsState::GetContentsStateAsByteBuffer(env, tab_android); @@ -555,7 +550,6 @@ static ScopedJavaLocalRef JNI_TabState_GetContentsStateAsByteBuffer( static base::android::ScopedJavaLocalRef JNI_TabState_DeleteNavigationEntries( JNIEnv* env, - const JavaParamRef& clazz, const base::android::JavaParamRef& state, jint saved_state_version, jlong predicate_ptr) { @@ -571,7 +565,6 @@ JNI_TabState_DeleteNavigationEntries( static ScopedJavaLocalRef JNI_TabState_CreateSingleNavigationStateAsByteBuffer( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& url, const JavaParamRef& referrer_url, jint referrer_policy, @@ -582,7 +575,6 @@ JNI_TabState_CreateSingleNavigationStateAsByteBuffer( static ScopedJavaLocalRef JNI_TabState_GetDisplayTitleFromByteBuffer( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& state, jint saved_state_version) { void* data = env->GetDirectBufferAddress(state); @@ -596,7 +588,6 @@ static ScopedJavaLocalRef JNI_TabState_GetDisplayTitleFromByteBuffer( static ScopedJavaLocalRef JNI_TabState_GetVirtualUrlFromByteBuffer( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& state, jint saved_state_version) { void* data = env->GetDirectBufferAddress(state); @@ -610,12 +601,11 @@ static ScopedJavaLocalRef JNI_TabState_GetVirtualUrlFromByteBuffer( // Creates a historical tab entry from the serialized tab contents contained // within |state|. static void JNI_TabState_CreateHistoricalTab(JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& state, jint saved_state_version) { std::unique_ptr web_contents(WebContents::FromJavaWebContents( WebContentsState::RestoreContentsFromByteBuffer( - env, clazz, state, saved_state_version, true))); + env, state, saved_state_version, true))); if (web_contents.get()) TabAndroid::CreateHistoricalTabFromContents(web_contents.get()); } diff --git a/chrome/browser/android/tab_state.h b/chrome/browser/android/tab_state.h index 7a631d772b3c5d..c6f1b7c7a03d98 100644 --- a/chrome/browser/android/tab_state.h +++ b/chrome/browser/android/tab_state.h @@ -46,7 +46,6 @@ class WebContentsState { // Restores a WebContents from the passed in state. static base::android::ScopedJavaLocalRef RestoreContentsFromByteBuffer(JNIEnv* env, - jclass clazz, jobject state, jint saved_state_version, jboolean initially_hidden); diff --git a/chrome/browser/android/tab_web_contents_delegate_android.cc b/chrome/browser/android/tab_web_contents_delegate_android.cc index 4fdac0719f8d4d..0359a78421b3fd 100644 --- a/chrome/browser/android/tab_web_contents_delegate_android.cc +++ b/chrome/browser/android/tab_web_contents_delegate_android.cc @@ -482,7 +482,6 @@ TabWebContentsDelegateAndroid::SwapWebContents( void JNI_TabWebContentsDelegateAndroid_OnRendererUnresponsive( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& java_web_contents) { if (!base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kEnableHungRendererInfoBar)) { @@ -500,7 +499,6 @@ void JNI_TabWebContentsDelegateAndroid_OnRendererUnresponsive( void JNI_TabWebContentsDelegateAndroid_OnRendererResponsive( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& java_web_contents) { content::WebContents* web_contents = content::WebContents::FromJavaWebContents(java_web_contents); @@ -519,7 +517,6 @@ void JNI_TabWebContentsDelegateAndroid_OnRendererResponsive( jboolean JNI_TabWebContentsDelegateAndroid_IsCapturingAudio( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& java_web_contents) { content::WebContents* web_contents = content::WebContents::FromJavaWebContents(java_web_contents); @@ -531,7 +528,6 @@ jboolean JNI_TabWebContentsDelegateAndroid_IsCapturingAudio( jboolean JNI_TabWebContentsDelegateAndroid_IsCapturingVideo( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& java_web_contents) { content::WebContents* web_contents = content::WebContents::FromJavaWebContents(java_web_contents); @@ -543,7 +539,6 @@ jboolean JNI_TabWebContentsDelegateAndroid_IsCapturingVideo( jboolean JNI_TabWebContentsDelegateAndroid_IsCapturingScreen( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& java_web_contents) { content::WebContents* web_contents = content::WebContents::FromJavaWebContents(java_web_contents); @@ -555,7 +550,6 @@ jboolean JNI_TabWebContentsDelegateAndroid_IsCapturingScreen( void JNI_TabWebContentsDelegateAndroid_NotifyStopped( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& java_web_contents) { content::WebContents* web_contents = content::WebContents::FromJavaWebContents(java_web_contents); @@ -567,7 +561,6 @@ void JNI_TabWebContentsDelegateAndroid_NotifyStopped( void JNI_TabWebContentsDelegateAndroid_ShowFramebustBlockInfoBar( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& java_web_contents, const JavaParamRef& java_url) { GURL url(base::android::ConvertJavaStringToUTF16(env, java_url)); diff --git a/chrome/browser/android/url_utilities.cc b/chrome/browser/android/url_utilities.cc index 67f645701dd5c4..778941041c073f 100644 --- a/chrome/browser/android/url_utilities.cc +++ b/chrome/browser/android/url_utilities.cc @@ -57,7 +57,6 @@ net::registry_controlled_domains::PrivateRegistryFilter GetRegistryFilter( static jboolean JNI_UrlUtilities_SameDomainOrHost( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& url_1_str, const JavaParamRef& url_2_str, jboolean include_private) { @@ -74,7 +73,6 @@ static jboolean JNI_UrlUtilities_SameDomainOrHost( static ScopedJavaLocalRef JNI_UrlUtilities_GetDomainAndRegistry( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& url, jboolean include_private) { DCHECK(url); @@ -92,7 +90,6 @@ static ScopedJavaLocalRef JNI_UrlUtilities_GetDomainAndRegistry( static jboolean JNI_UrlUtilities_IsGoogleSearchUrl( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& url) { GURL gurl = JNI_UrlUtilities_ConvertJavaStringToGURL(env, url); if (gurl.is_empty()) @@ -102,7 +99,6 @@ static jboolean JNI_UrlUtilities_IsGoogleSearchUrl( static jboolean JNI_UrlUtilities_IsGoogleHomePageUrl( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& url) { GURL gurl = JNI_UrlUtilities_ConvertJavaStringToGURL(env, url); if (gurl.is_empty()) @@ -112,7 +108,6 @@ static jboolean JNI_UrlUtilities_IsGoogleHomePageUrl( static jboolean JNI_UrlUtilities_IsUrlWithinScope( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& url, const JavaParamRef& scope_url) { GURL gurl = JNI_UrlUtilities_ConvertJavaStringToGURL(env, url); @@ -124,7 +119,6 @@ static jboolean JNI_UrlUtilities_IsUrlWithinScope( static jboolean JNI_UrlUtilities_UrlsMatchIgnoringFragments( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& url, const JavaParamRef& url2) { GURL gurl = JNI_UrlUtilities_ConvertJavaStringToGURL(env, url); @@ -142,7 +136,6 @@ static jboolean JNI_UrlUtilities_UrlsMatchIgnoringFragments( static jboolean JNI_UrlUtilities_UrlsFragmentsDiffer( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& url, const JavaParamRef& url2) { GURL gurl = JNI_UrlUtilities_ConvertJavaStringToGURL(env, url); @@ -156,21 +149,18 @@ static jboolean JNI_UrlUtilities_UrlsFragmentsDiffer( static jboolean JNI_UrlUtilities_IsAcceptedScheme( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& url) { return CheckSchemeBelongsToList(env, url, g_supported_schemes); } static jboolean JNI_UrlUtilities_IsValidForIntentFallbackNavigation( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& url) { return CheckSchemeBelongsToList(env, url, g_fallback_valid_schemes); } static jboolean JNI_UrlUtilities_IsDownloadable( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& url) { return CheckSchemeBelongsToList(env, url, g_downloadable_schemes); } diff --git a/chrome/browser/android/vr/arcore_device/arcore_java_utils.cc b/chrome/browser/android/vr/arcore_device/arcore_java_utils.cc index 606a1ca8f22446..a02533efd6eb5c 100644 --- a/chrome/browser/android/vr/arcore_device/arcore_java_utils.cc +++ b/chrome/browser/android/vr/arcore_device/arcore_java_utils.cc @@ -132,8 +132,7 @@ ScopedJavaLocalRef ArCoreJavaUtils::GetApplicationContext() { } static void JNI_ArCoreJavaUtils_InstallArCoreDeviceProviderFactory( - JNIEnv* env, - const base::android::JavaParamRef& clazz) { + JNIEnv* env) { device::ArCoreDeviceProviderFactory::Install( std::make_unique()); } diff --git a/chrome/browser/android/vr/vr_module_provider.cc b/chrome/browser/android/vr/vr_module_provider.cc index 738d156791ec64..c6f35e106853bc 100644 --- a/chrome/browser/android/vr/vr_module_provider.cc +++ b/chrome/browser/android/vr/vr_module_provider.cc @@ -54,15 +54,11 @@ void VrModuleProvider::OnInstalledModule( j_vr_module_provider_ = nullptr; } -static void JNI_VrModuleProvider_Init( - JNIEnv* env, - const base::android::JavaParamRef& clazz) { +static void JNI_VrModuleProvider_Init(JNIEnv* env) { device::VrModuleDelegate::Set(std::make_unique()); } -static void JNI_VrModuleProvider_RegisterJni( - JNIEnv* env, - const base::android::JavaParamRef& clazz) { +static void JNI_VrModuleProvider_RegisterJni(JNIEnv* env) { CHECK(RegisterJni(env)); } diff --git a/chrome/browser/android/vr/vr_shell_delegate.cc b/chrome/browser/android/vr/vr_shell_delegate.cc index 92037831810d7d..ead33c87dab695 100644 --- a/chrome/browser/android/vr/vr_shell_delegate.cc +++ b/chrome/browser/android/vr/vr_shell_delegate.cc @@ -331,16 +331,12 @@ jlong JNI_VrShellDelegate_Init(JNIEnv* env, const JavaParamRef& obj) { return reinterpret_cast(new VrShellDelegate(env, obj)); } -static void JNI_VrShellDelegate_OnLibraryAvailable( - JNIEnv* env, - const JavaParamRef& clazz) { +static void JNI_VrShellDelegate_OnLibraryAvailable(JNIEnv* env) { device::GvrDelegateProviderFactory::Install( std::make_unique()); } -static void JNI_VrShellDelegate_RegisterVrAssetsComponent( - JNIEnv* env, - const JavaParamRef& clazz) { +static void JNI_VrShellDelegate_RegisterVrAssetsComponent(JNIEnv* env) { component_updater::RegisterVrAssetsComponent( g_browser_process->component_updater()); } diff --git a/chrome/browser/android/warmup_manager.cc b/chrome/browser/android/warmup_manager.cc index 0fc7ce7807f814..ba43a27eeb09b3 100644 --- a/chrome/browser/android/warmup_manager.cc +++ b/chrome/browser/android/warmup_manager.cc @@ -16,7 +16,6 @@ using base::android::JavaParamRef; static void JNI_WarmupManager_StartPreconnectPredictorInitialization( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jprofile) { Profile* profile = ProfileAndroid::FromProfileAndroid(jprofile); auto* loading_predictor = @@ -28,7 +27,6 @@ static void JNI_WarmupManager_StartPreconnectPredictorInitialization( static void JNI_WarmupManager_PreconnectUrlAndSubresources( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jprofile, const JavaParamRef& url_str) { if (url_str) { @@ -46,7 +44,6 @@ static void JNI_WarmupManager_PreconnectUrlAndSubresources( static void JNI_WarmupManager_WarmupSpareRenderer( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jprofile) { Profile* profile = ProfileAndroid::FromProfileAndroid(jprofile); if (profile) { diff --git a/chrome/browser/android/web_contents_factory.cc b/chrome/browser/android/web_contents_factory.cc index 030f510db4b94d..e68ab2cc4ab1aa 100644 --- a/chrome/browser/android/web_contents_factory.cc +++ b/chrome/browser/android/web_contents_factory.cc @@ -15,7 +15,6 @@ using base::android::ScopedJavaLocalRef; static ScopedJavaLocalRef JNI_WebContentsFactory_CreateWebContents( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_profile, jboolean incognito, jboolean initially_hidden, diff --git a/chrome/browser/android/webapk/webapk_post_share_target_navigator.cc b/chrome/browser/android/webapk/webapk_post_share_target_navigator.cc index 2f68c6a305dfa5..eb51ca1c2dfe13 100644 --- a/chrome/browser/android/webapk/webapk_post_share_target_navigator.cc +++ b/chrome/browser/android/webapk/webapk_post_share_target_navigator.cc @@ -95,7 +95,6 @@ void NavigateShareTargetPost(const std::string& body, void JNI_WebApkPostShareTargetNavigator_LoadViewForShareTargetPost( JNIEnv* env, - const JavaParamRef& clazz, const jboolean java_is_multipart_encoding, const JavaParamRef& java_names, const JavaParamRef& java_values, diff --git a/chrome/browser/android/webapk/webapk_update_manager.cc b/chrome/browser/android/webapk/webapk_update_manager.cc index ade0dd5bb07370..ffbea5bf191c65 100644 --- a/chrome/browser/android/webapk/webapk_update_manager.cc +++ b/chrome/browser/android/webapk/webapk_update_manager.cc @@ -46,7 +46,6 @@ void OnUpdated(const JavaRef& java_callback, // static JNI method. static void JNI_WebApkUpdateManager_StoreWebApkUpdateRequestToFile( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& java_update_request_path, const JavaParamRef& java_start_url, const JavaParamRef& java_scope, @@ -129,7 +128,6 @@ static void JNI_WebApkUpdateManager_StoreWebApkUpdateRequestToFile( // static JNI method. static void JNI_WebApkUpdateManager_UpdateWebApkFromFile( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& java_update_request_path, const JavaParamRef& java_callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); diff --git a/chrome/browser/autofill/android/personal_data_manager_android.cc b/chrome/browser/autofill/android/personal_data_manager_android.cc index 3ee81789bba124..99ae9899b685fb 100644 --- a/chrome/browser/autofill/android/personal_data_manager_android.cc +++ b/chrome/browser/autofill/android/personal_data_manager_android.cc @@ -871,7 +871,6 @@ PersonalDataManagerAndroid::GetShippingAddressLabelForPaymentRequest( // Returns whether the specified feature is enabled. static jboolean JNI_PersonalDataManager_GetPref( JNIEnv* env, - const JavaParamRef& clazz, const jint j_pref_index) { return GetPrefs()->GetBoolean( PersonalDataManagerAndroid::GetPrefNameExposedToJava(j_pref_index)); @@ -879,7 +878,6 @@ static jboolean JNI_PersonalDataManager_GetPref( // Enables or disables the specified feature for profiles. static void JNI_PersonalDataManager_SetPref(JNIEnv* env, - const JavaParamRef& clazz, const jint j_pref_index, const jboolean j_enable) { return GetPrefs()->SetBoolean( @@ -888,37 +886,30 @@ static void JNI_PersonalDataManager_SetPref(JNIEnv* env, } // Returns whether the Autofill feature is managed. -static jboolean JNI_PersonalDataManager_IsAutofillManaged( - JNIEnv* env, - const JavaParamRef& clazz) { +static jboolean JNI_PersonalDataManager_IsAutofillManaged(JNIEnv* env) { return prefs::IsAutofillManaged(GetPrefs()); } // Returns whether the Autofill feature for profiles is managed. -static jboolean JNI_PersonalDataManager_IsAutofillProfileManaged( - JNIEnv* env, - const JavaParamRef& clazz) { +static jboolean JNI_PersonalDataManager_IsAutofillProfileManaged(JNIEnv* env) { return prefs::IsProfileAutofillManaged(GetPrefs()); } // Returns whether the Autofill feature for credit cards is managed. static jboolean JNI_PersonalDataManager_IsAutofillCreditCardManaged( - JNIEnv* env, - const JavaParamRef& clazz) { + JNIEnv* env) { return prefs::IsCreditCardAutofillManaged(GetPrefs()); } // Returns whether the Payments integration feature is enabled. static jboolean JNI_PersonalDataManager_IsPaymentsIntegrationEnabled( - JNIEnv* env, - const JavaParamRef& clazz) { + JNIEnv* env) { return prefs::IsPaymentsIntegrationEnabled(GetPrefs()); } // Enables or disables the Payments integration feature. static void JNI_PersonalDataManager_SetPaymentsIntegrationEnabled( JNIEnv* env, - const JavaParamRef& clazz, jboolean enable) { prefs::SetPaymentsIntegrationEnabled(GetPrefs(), enable); } @@ -927,7 +918,6 @@ static void JNI_PersonalDataManager_SetPaymentsIntegrationEnabled( // the application locale, or an empty string. static ScopedJavaLocalRef JNI_PersonalDataManager_ToCountryCode( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jcountry_name) { return ConvertUTF8ToJavaString( env, CountryNames::GetInstance()->GetCountryCode( diff --git a/chrome/browser/autofill/android/phone_number_util_android.cc b/chrome/browser/autofill/android/phone_number_util_android.cc index e2b0dee921a7f7..09c828cfce78bd 100644 --- a/chrome/browser/autofill/android/phone_number_util_android.cc +++ b/chrome/browser/autofill/android/phone_number_util_android.cc @@ -57,7 +57,6 @@ std::string FormatPhoneNumber( // by using i18n::phonenumbers::PhoneNumberUtil::Format. ScopedJavaLocalRef JNI_PhoneNumberUtil_FormatForDisplay( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const JavaParamRef& jphone_number, const JavaParamRef& jcountry_code) { return ConvertUTF8ToJavaString( @@ -79,7 +78,6 @@ ScopedJavaLocalRef JNI_PhoneNumberUtil_FormatForDisplay( // (https://w3c.github.io/browser-payment-api/#paymentrequest-updated-algorithm) ScopedJavaLocalRef JNI_PhoneNumberUtil_FormatForResponse( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const JavaParamRef& jphone_number) { return ConvertUTF8ToJavaString( env, FormatPhoneNumber( @@ -92,7 +90,6 @@ ScopedJavaLocalRef JNI_PhoneNumberUtil_FormatForResponse( // i18n::phonenumbers::PhoneNumberUtil::IsPossibleNumberForString. jboolean JNI_PhoneNumberUtil_IsPossibleNumber( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const JavaParamRef& jphone_number, const JavaParamRef& jcountry_code) { const std::string phone_number = ConvertJavaStringToUTF8(env, jphone_number); diff --git a/chrome/browser/banners/app_banner_manager_android.cc b/chrome/browser/banners/app_banner_manager_android.cc index 4054266a3c54b3..ab7de166a8b18d 100644 --- a/chrome/browser/banners/app_banner_manager_android.cc +++ b/chrome/browser/banners/app_banner_manager_android.cc @@ -412,9 +412,7 @@ AppBannerManager* AppBannerManager::FromWebContents( } // static -jint JNI_AppBannerManager_GetHomescreenLanguageOption( - JNIEnv* env, - const JavaParamRef& clazz) { +jint JNI_AppBannerManager_GetHomescreenLanguageOption(JNIEnv* env) { return AppBannerSettingsHelper::GetHomescreenLanguageOption(); } @@ -422,7 +420,6 @@ jint JNI_AppBannerManager_GetHomescreenLanguageOption( base::android::ScopedJavaLocalRef JNI_AppBannerManager_GetJavaBannerManagerForWebContents( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& java_web_contents) { AppBannerManagerAndroid* manager = AppBannerManagerAndroid::FromWebContents( content::WebContents::FromJavaWebContents(java_web_contents)); @@ -433,7 +430,6 @@ JNI_AppBannerManager_GetJavaBannerManagerForWebContents( // static void JNI_AppBannerManager_SetDaysAfterDismissAndIgnoreToTrigger( JNIEnv* env, - const JavaParamRef& clazz, jint dismiss_days, jint ignore_days) { AppBannerSettingsHelper::SetDaysAfterDismissAndIgnoreToTrigger(dismiss_days, @@ -443,7 +439,6 @@ void JNI_AppBannerManager_SetDaysAfterDismissAndIgnoreToTrigger( // static void JNI_AppBannerManager_SetTimeDeltaForTesting( JNIEnv* env, - const JavaParamRef& clazz, jint days) { AppBannerManager::SetTimeDeltaForTesting(days); } @@ -451,7 +446,6 @@ void JNI_AppBannerManager_SetTimeDeltaForTesting( // static void JNI_AppBannerManager_SetTotalEngagementToTrigger( JNIEnv* env, - const JavaParamRef& clazz, jdouble engagement) { AppBannerSettingsHelper::SetTotalEngagementToTrigger(engagement); } diff --git a/chrome/browser/dom_distiller/dom_distiller_service_factory_android.cc b/chrome/browser/dom_distiller/dom_distiller_service_factory_android.cc index 253f529eeb5e1d..5e095bf77e71a5 100644 --- a/chrome/browser/dom_distiller/dom_distiller_service_factory_android.cc +++ b/chrome/browser/dom_distiller/dom_distiller_service_factory_android.cc @@ -31,7 +31,6 @@ ScopedJavaLocalRef DomDistillerServiceFactoryAndroid::GetForProfile( ScopedJavaLocalRef JNI_DomDistillerServiceFactory_GetForProfile( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_profile) { return DomDistillerServiceFactoryAndroid::GetForProfile(env, j_profile); } diff --git a/chrome/browser/dom_distiller/tab_utils_android.cc b/chrome/browser/dom_distiller/tab_utils_android.cc index 1c8418648b85a3..3d2729ff240d4c 100644 --- a/chrome/browser/dom_distiller/tab_utils_android.cc +++ b/chrome/browser/dom_distiller/tab_utils_android.cc @@ -23,7 +23,6 @@ namespace android { void JNI_DomDistillerTabUtils_DistillCurrentPageAndView( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_web_contents) { content::WebContents* web_contents = content::WebContents::FromJavaWebContents(j_web_contents); @@ -32,7 +31,6 @@ void JNI_DomDistillerTabUtils_DistillCurrentPageAndView( void JNI_DomDistillerTabUtils_DistillCurrentPage( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_source_web_contents) { content::WebContents* source_web_contents = content::WebContents::FromJavaWebContents(j_source_web_contents); @@ -41,7 +39,6 @@ void JNI_DomDistillerTabUtils_DistillCurrentPage( void JNI_DomDistillerTabUtils_DistillAndView( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_source_web_contents, const JavaParamRef& j_destination_web_contents) { content::WebContents* source_web_contents = @@ -54,7 +51,6 @@ void JNI_DomDistillerTabUtils_DistillAndView( ScopedJavaLocalRef JNI_DomDistillerTabUtils_GetFormattedUrlFromOriginalDistillerUrl( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_url) { GURL url(base::android::ConvertJavaStringToUTF8(env, j_url)); @@ -70,15 +66,12 @@ JNI_DomDistillerTabUtils_GetFormattedUrlFromOriginalDistillerUrl( nullptr)); } -jint JNI_DomDistillerTabUtils_GetDistillerHeuristics( - JNIEnv* env, - const JavaParamRef& clazz) { +jint JNI_DomDistillerTabUtils_GetDistillerHeuristics(JNIEnv* env) { return static_cast(dom_distiller::GetDistillerHeuristicsType()); } void JNI_DomDistillerTabUtils_SetInterceptNavigationDelegate( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& delegate, const JavaParamRef& j_web_contents) { content::WebContents* web_contents = diff --git a/chrome/browser/engagement/site_engagement_service_android.cc b/chrome/browser/engagement/site_engagement_service_android.cc index 4d0af749177160..34458ca7f07496 100644 --- a/chrome/browser/engagement/site_engagement_service_android.cc +++ b/chrome/browser/engagement/site_engagement_service_android.cc @@ -63,16 +63,13 @@ void SiteEngagementServiceAndroid::ResetBaseScoreForURL( } } -void JNI_SiteEngagementService_SetParamValuesForTesting( - JNIEnv* env, - const JavaParamRef& clazz) { +void JNI_SiteEngagementService_SetParamValuesForTesting(JNIEnv* env) { SiteEngagementScore::SetParamValuesForTesting(); } base::android::ScopedJavaLocalRef JNI_SiteEngagementService_SiteEngagementServiceForProfile( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jprofile) { Profile* profile = ProfileAndroid::FromProfileAndroid(jprofile); SiteEngagementService* service = SiteEngagementService::Get(profile); diff --git a/chrome/browser/invalidation/invalidation_service_factory_android.cc b/chrome/browser/invalidation/invalidation_service_factory_android.cc index 1f62a24310438f..999faa4ba23522 100644 --- a/chrome/browser/invalidation/invalidation_service_factory_android.cc +++ b/chrome/browser/invalidation/invalidation_service_factory_android.cc @@ -37,14 +37,12 @@ ScopedJavaLocalRef InvalidationServiceFactoryAndroid::GetForTest() { ScopedJavaLocalRef JNI_InvalidationServiceFactory_GetForProfile( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_profile) { return InvalidationServiceFactoryAndroid::GetForProfile(j_profile); } ScopedJavaLocalRef JNI_InvalidationServiceFactory_GetForTest( - JNIEnv* env, - const JavaParamRef& clazz) { + JNIEnv* env) { return InvalidationServiceFactoryAndroid::GetForTest(); } diff --git a/chrome/browser/media/android/remote/record_cast_action.cc b/chrome/browser/media/android/remote/record_cast_action.cc index f3312ed46034aa..89bbfc9e8c21e6 100644 --- a/chrome/browser/media/android/remote/record_cast_action.cc +++ b/chrome/browser/media/android/remote/record_cast_action.cc @@ -40,22 +40,18 @@ enum RemotePlaybackDeviceType { namespace remote_media { static void JNI_RecordCastAction_RecordRemotePlaybackDeviceSelected( JNIEnv*, - const JavaParamRef&, jint device_type) { UMA_HISTOGRAM_ENUMERATION("Cast.Sender.DeviceType", static_cast(device_type), REMOTE_PLAYBACK_DEVICE_TYPE_COUNT); } -static void JNI_RecordCastAction_RecordCastPlayRequested( - JNIEnv*, - const JavaParamRef&) { +static void JNI_RecordCastAction_RecordCastPlayRequested(JNIEnv*) { base::RecordAction(base::UserMetricsAction("Cast_Sender_CastPlayRequested")); } static void JNI_RecordCastAction_RecordCastDefaultPlayerResult( JNIEnv*, - const JavaParamRef&, jboolean cast_success) { if (cast_success) { UMA_HISTOGRAM_ENUMERATION("Cast.Sender.CastPlayerResult", @@ -70,7 +66,6 @@ static void JNI_RecordCastAction_RecordCastDefaultPlayerResult( static void JNI_RecordCastAction_RecordCastYouTubePlayerResult( JNIEnv*, - const JavaParamRef&, jboolean cast_success) { if (cast_success) { UMA_HISTOGRAM_ENUMERATION("Cast.Sender.CastPlayerResult", YT_PLAYER_SUCCESS, @@ -83,7 +78,6 @@ static void JNI_RecordCastAction_RecordCastYouTubePlayerResult( static void JNI_RecordCastAction_RecordCastMediaType( JNIEnv*, - const JavaParamRef&, jint media_type) { UMA_HISTOGRAM_ENUMERATION( "Cast.Sender.CastMediaType", @@ -93,7 +87,6 @@ static void JNI_RecordCastAction_RecordCastMediaType( static void JNI_RecordCastAction_RecordCastEndedTimeRemaining( JNIEnv*, - const JavaParamRef&, jint video_total_time, jint time_left_in_video) { int percent_remaining = 100; diff --git a/chrome/browser/net/spdyproxy/data_reduction_promo_infobar_delegate_android.cc b/chrome/browser/net/spdyproxy/data_reduction_promo_infobar_delegate_android.cc index e98c250d4b508b..76607908051087 100644 --- a/chrome/browser/net/spdyproxy/data_reduction_promo_infobar_delegate_android.cc +++ b/chrome/browser/net/spdyproxy/data_reduction_promo_infobar_delegate_android.cc @@ -67,7 +67,6 @@ bool DataReductionPromoInfoBarDelegateAndroid::Accept() { // JNI for DataReductionPromoInfoBarDelegate. void JNI_DataReductionPromoInfoBarDelegate_Launch( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jweb_contents) { DataReductionPromoInfoBarDelegateAndroid::Launch(env, jweb_contents); } diff --git a/chrome/browser/notifications/notification_platform_bridge_android.cc b/chrome/browser/notifications/notification_platform_bridge_android.cc index 000b7235efbf0c..95fddc4e106849 100644 --- a/chrome/browser/notifications/notification_platform_bridge_android.cc +++ b/chrome/browser/notifications/notification_platform_bridge_android.cc @@ -108,8 +108,7 @@ ScopedJavaLocalRef ConvertToJavaActionInfos( // NotificationBridge has not been initialized yet. Enforce initialization of // the class. static void JNI_NotificationPlatformBridge_InitializeNotificationPlatformBridge( - JNIEnv* env, - const JavaParamRef& clazz) { + JNIEnv* env) { g_browser_process->notification_platform_bridge(); } diff --git a/chrome/browser/offline_pages/android/background_scheduler_bridge.cc b/chrome/browser/offline_pages/android/background_scheduler_bridge.cc index 1c156c1fa4f058..556f7c43d56e3a 100644 --- a/chrome/browser/offline_pages/android/background_scheduler_bridge.cc +++ b/chrome/browser/offline_pages/android/background_scheduler_bridge.cc @@ -25,7 +25,6 @@ namespace android { // JNI call to start request processing in scheduled mode. static jboolean JNI_BackgroundSchedulerBridge_StartScheduledProcessing( JNIEnv* env, - const JavaParamRef& jcaller, const jboolean j_power_connected, const jint j_battery_percentage, const jint j_net_connection_type, @@ -51,9 +50,7 @@ static jboolean JNI_BackgroundSchedulerBridge_StartScheduledProcessing( } // JNI call to stop request processing in scheduled mode. -static void JNI_BackgroundSchedulerBridge_StopScheduledProcessing( - JNIEnv* env, - const JavaParamRef& jcaller) { +static void JNI_BackgroundSchedulerBridge_StopScheduledProcessing(JNIEnv* env) { Profile* profile = ProfileManager::GetLastUsedProfile(); RequestCoordinator* coordinator = RequestCoordinatorFactory::GetInstance()->GetForBrowserContext(profile); diff --git a/chrome/browser/offline_pages/android/downloads/offline_page_download_bridge.cc b/chrome/browser/offline_pages/android/downloads/offline_page_download_bridge.cc index ed7274097ded33..a4e426deed3421 100644 --- a/chrome/browser/offline_pages/android/downloads/offline_page_download_bridge.cc +++ b/chrome/browser/offline_pages/android/downloads/offline_page_download_bridge.cc @@ -344,7 +344,6 @@ void OfflinePageDownloadBridge::Destroy(JNIEnv* env, void JNI_OfflinePageDownloadBridge_StartDownload( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_tab, const JavaParamRef& j_origin) { TabAndroid* tab = TabAndroid::GetNativeTab(env, j_tab); diff --git a/chrome/browser/offline_pages/android/offline_page_bridge.cc b/chrome/browser/offline_pages/android/offline_page_bridge.cc index 756b2dc15c491c..34720685723d66 100644 --- a/chrome/browser/offline_pages/android/offline_page_bridge.cc +++ b/chrome/browser/offline_pages/android/offline_page_bridge.cc @@ -332,21 +332,16 @@ void PublishPageDone( } // namespace -static jboolean JNI_OfflinePageBridge_IsOfflineBookmarksEnabled( - JNIEnv* env, - const JavaParamRef& clazz) { +static jboolean JNI_OfflinePageBridge_IsOfflineBookmarksEnabled(JNIEnv* env) { return offline_pages::IsOfflineBookmarksEnabled(); } -static jboolean JNI_OfflinePageBridge_IsPageSharingEnabled( - JNIEnv* env, - const JavaParamRef& clazz) { +static jboolean JNI_OfflinePageBridge_IsPageSharingEnabled(JNIEnv* env) { return offline_pages::IsOfflinePagesSharingEnabled(); } static jboolean JNI_OfflinePageBridge_CanSavePage( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_url) { GURL url(ConvertJavaStringToUTF8(env, j_url)); return OfflinePageModel::CanSaveURL(url); @@ -355,7 +350,6 @@ static jboolean JNI_OfflinePageBridge_CanSavePage( static ScopedJavaLocalRef JNI_OfflinePageBridge_GetOfflinePageBridgeForProfile( JNIEnv* env, - const JavaParamRef& jcaller, const JavaParamRef& j_profile) { Profile* profile = ProfileAndroid::FromProfileAndroid(j_profile); diff --git a/chrome/browser/offline_pages/android/prefetch_configuration_impl_android.cc b/chrome/browser/offline_pages/android/prefetch_configuration_impl_android.cc index a3ce2f5dd95814..7c26882cfeea97 100644 --- a/chrome/browser/offline_pages/android/prefetch_configuration_impl_android.cc +++ b/chrome/browser/offline_pages/android/prefetch_configuration_impl_android.cc @@ -21,7 +21,6 @@ namespace android { JNI_EXPORT jboolean JNI_PrefetchConfiguration_IsPrefetchingEnabled( JNIEnv* env, - const JavaParamRef& jcaller, const JavaParamRef& jprofile) { Profile* profile = ProfileAndroid::FromProfileAndroid(jprofile); return profile && @@ -30,7 +29,6 @@ JNI_EXPORT jboolean JNI_PrefetchConfiguration_IsPrefetchingEnabled( JNI_EXPORT void JNI_PrefetchConfiguration_SetPrefetchingEnabledInSettings( JNIEnv* env, - const JavaParamRef& jcaller, const JavaParamRef& jprofile, jboolean enabled) { Profile* profile = ProfileAndroid::FromProfileAndroid(jprofile); diff --git a/chrome/browser/offline_pages/android/prefetch_test_bridge.cc b/chrome/browser/offline_pages/android/prefetch_test_bridge.cc index ac988bff82d720..f9febdb3f85769 100644 --- a/chrome/browser/offline_pages/android/prefetch_test_bridge.cc +++ b/chrome/browser/offline_pages/android/prefetch_test_bridge.cc @@ -19,20 +19,17 @@ namespace prefetch { JNI_EXPORT void JNI_PrefetchTestBridge_EnableLimitlessPrefetching( JNIEnv* env, - const JavaParamRef& jcaller, jboolean enable) { SetLimitlessPrefetchingEnabledForTesting(enable != 0); } -JNI_EXPORT jboolean JNI_PrefetchTestBridge_IsLimitlessPrefetchingEnabled( - JNIEnv* env, - const JavaParamRef& jcaller) { +JNI_EXPORT jboolean +JNI_PrefetchTestBridge_IsLimitlessPrefetchingEnabled(JNIEnv* env) { return static_cast(IsLimitlessPrefetchingEnabled()); } JNI_EXPORT void JNI_PrefetchTestBridge_SkipNTPSuggestionsAPIKeyCheck( - JNIEnv* env, - const JavaParamRef& jcaller) { + JNIEnv* env) { ntp_snippets::RemoteSuggestionsFetcherImpl:: set_skip_api_key_check_for_testing(); } diff --git a/chrome/browser/payments/android/can_make_payment_query_android.cc b/chrome/browser/payments/android/can_make_payment_query_android.cc index e8838fd92cc110..9d33ac6457abfc 100644 --- a/chrome/browser/payments/android/can_make_payment_query_android.cc +++ b/chrome/browser/payments/android/can_make_payment_query_android.cc @@ -21,7 +21,6 @@ namespace payments { // static jboolean JNI_CanMakePaymentQuery_CanQuery( JNIEnv* env, - const base::android::JavaParamRef& clazz, const base::android::JavaParamRef& jweb_contents, const base::android::JavaParamRef& jtop_level_origin, const base::android::JavaParamRef& jframe_origin, diff --git a/chrome/browser/payments/android/ssl_validity_checker_android.cc b/chrome/browser/payments/android/ssl_validity_checker_android.cc index d7929fe2b92091..8b074dbdf023c4 100644 --- a/chrome/browser/payments/android/ssl_validity_checker_android.cc +++ b/chrome/browser/payments/android/ssl_validity_checker_android.cc @@ -12,7 +12,6 @@ namespace payments { // static jboolean JNI_SslValidityChecker_IsSslCertificateValid( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& jweb_contents) { return SslValidityChecker::IsSslCertificateValid( content::WebContents::FromJavaWebContents(jweb_contents)); diff --git a/chrome/browser/prerender/external_prerender_handler_android.cc b/chrome/browser/prerender/external_prerender_handler_android.cc index a18a942740fece..cd81dbe60efc8d 100644 --- a/chrome/browser/prerender/external_prerender_handler_android.cc +++ b/chrome/browser/prerender/external_prerender_handler_android.cc @@ -120,7 +120,6 @@ void ExternalPrerenderHandlerAndroid::CancelCurrentPrerender( static jboolean JNI_ExternalPrerenderHandler_HasPrerenderedUrl( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jprofile, const JavaParamRef& jurl, const JavaParamRef& jweb_contents) { @@ -137,7 +136,6 @@ static jboolean JNI_ExternalPrerenderHandler_HasPrerenderedUrl( static jboolean JNI_ExternalPrerenderHandler_HasRecentlyPrefetchedUrlForTesting( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jprofile, const JavaParamRef& jurl) { if (!jurl) @@ -157,7 +155,6 @@ static jboolean JNI_ExternalPrerenderHandler_HasRecentlyPrefetchedUrlForTesting( static void JNI_ExternalPrerenderHandler_ClearPrefetchInformationForTesting( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jprofile) { Profile* profile = ProfileAndroid::FromProfileAndroid(jprofile); PrerenderManager* prerender_manager = @@ -171,9 +168,7 @@ ExternalPrerenderHandlerAndroid::ExternalPrerenderHandlerAndroid() {} ExternalPrerenderHandlerAndroid::~ExternalPrerenderHandlerAndroid() {} -static jlong JNI_ExternalPrerenderHandler_Init( - JNIEnv* env, - const JavaParamRef& clazz) { +static jlong JNI_ExternalPrerenderHandler_Init(JNIEnv* env) { ExternalPrerenderHandlerAndroid* external_handler = new ExternalPrerenderHandlerAndroid(); return reinterpret_cast(external_handler); diff --git a/chrome/browser/profiles/profile_android.cc b/chrome/browser/profiles/profile_android.cc index 2c110b00b52469..fadeb838f7c24d 100644 --- a/chrome/browser/profiles/profile_android.cc +++ b/chrome/browser/profiles/profile_android.cc @@ -47,8 +47,7 @@ Profile* ProfileAndroid::FromProfileAndroid(const JavaRef& obj) { } // static -ScopedJavaLocalRef ProfileAndroid::GetLastUsedProfile(JNIEnv* env, - jclass clazz) { +ScopedJavaLocalRef ProfileAndroid::GetLastUsedProfile(JNIEnv* env) { Profile* profile = ProfileManager::GetLastUsedProfile(); if (profile == NULL) { NOTREACHED() << "Profile not found."; @@ -107,10 +106,8 @@ jboolean ProfileAndroid::IsChild( } // static -ScopedJavaLocalRef JNI_Profile_GetLastUsedProfile( - JNIEnv* env, - const JavaParamRef& clazz) { - return ProfileAndroid::GetLastUsedProfile(env, clazz); +ScopedJavaLocalRef JNI_Profile_GetLastUsedProfile(JNIEnv* env) { + return ProfileAndroid::GetLastUsedProfile(env); } ProfileAndroid::ProfileAndroid(Profile* profile) diff --git a/chrome/browser/profiles/profile_android.h b/chrome/browser/profiles/profile_android.h index 3d44426e63d44f..36481443181cbf 100644 --- a/chrome/browser/profiles/profile_android.h +++ b/chrome/browser/profiles/profile_android.h @@ -22,8 +22,7 @@ class ProfileAndroid : public base::SupportsUserData::Data { const base::android::JavaRef& obj); static base::android::ScopedJavaLocalRef GetLastUsedProfile( - JNIEnv* env, - jclass clazz); + JNIEnv* env); // Destroys this Profile when possible. void DestroyWhenAppropriate(JNIEnv* env, diff --git a/chrome/browser/search_engines/template_url_android.cc b/chrome/browser/search_engines/template_url_android.cc index 9acf79d9c3ac51..dfed29813b1d43 100644 --- a/chrome/browser/search_engines/template_url_android.cc +++ b/chrome/browser/search_engines/template_url_android.cc @@ -19,7 +19,6 @@ TemplateURL* ToTemplateURL(jlong j_template_url) { ScopedJavaLocalRef JNI_TemplateUrl_GetShortName( JNIEnv* env, - const JavaParamRef& jcaller, jlong template_url_ptr) { TemplateURL* template_url = ToTemplateURL(template_url_ptr); return base::android::ConvertUTF16ToJavaString(env, @@ -28,7 +27,6 @@ ScopedJavaLocalRef JNI_TemplateUrl_GetShortName( ScopedJavaLocalRef JNI_TemplateUrl_GetKeyword( JNIEnv* env, - const JavaParamRef& jcaller, jlong template_url_ptr) { TemplateURL* template_url = ToTemplateURL(template_url_ptr); return base::android::ConvertUTF16ToJavaString(env, template_url->keyword()); @@ -36,7 +34,6 @@ ScopedJavaLocalRef JNI_TemplateUrl_GetKeyword( jboolean JNI_TemplateUrl_IsPrepopulatedOrCreatedByPolicy( JNIEnv* env, - const JavaParamRef& jcaller, jlong template_url_ptr) { TemplateURL* template_url = ToTemplateURL(template_url_ptr); return template_url->prepopulate_id() > 0 || @@ -44,14 +41,12 @@ jboolean JNI_TemplateUrl_IsPrepopulatedOrCreatedByPolicy( } jlong JNI_TemplateUrl_GetLastVisitedTime(JNIEnv* env, - const JavaParamRef& jcaller, jlong template_url_ptr) { TemplateURL* template_url = ToTemplateURL(template_url_ptr); return template_url->last_visited().ToJavaTime(); } jint JNI_TemplateUrl_GetPrepopulatedId(JNIEnv* env, - const JavaParamRef& jcaller, jlong template_url_ptr) { TemplateURL* template_url = ToTemplateURL(template_url_ptr); return template_url->prepopulate_id(); diff --git a/chrome/browser/signin/oauth2_token_service_delegate_android.cc b/chrome/browser/signin/oauth2_token_service_delegate_android.cc index e887b00a6e300d..dc9b18d99ff8f4 100644 --- a/chrome/browser/signin/oauth2_token_service_delegate_android.cc +++ b/chrome/browser/signin/oauth2_token_service_delegate_android.cc @@ -187,7 +187,6 @@ ScopedJavaLocalRef OAuth2TokenServiceDelegateAndroid::GetForProfile( static ScopedJavaLocalRef JNI_OAuth2TokenService_GetForProfile( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_profile_android) { return OAuth2TokenServiceDelegateAndroid::GetForProfile(env, j_profile_android); @@ -526,7 +525,6 @@ std::string OAuth2TokenServiceDelegateAndroid::MapAccountNameToAccountId( // |authToken| param is only valid when |result| is true. void JNI_OAuth2TokenService_OAuth2TokenFetched( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& authToken, jboolean isTransientError, jlong nativeCallback) { diff --git a/chrome/browser/ssl/captive_portal_helper_android.cc b/chrome/browser/ssl/captive_portal_helper_android.cc index 8e69864d68a3b4..b976e7028ae9d9 100644 --- a/chrome/browser/ssl/captive_portal_helper_android.cc +++ b/chrome/browser/ssl/captive_portal_helper_android.cc @@ -25,7 +25,6 @@ namespace android { void JNI_CaptivePortalHelper_SetCaptivePortalCertificateForTesting( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& jhash) { auto default_proto = SSLErrorAssistant::GetErrorAssistantProtoFromResourceBundle(); @@ -48,7 +47,6 @@ void JNI_CaptivePortalHelper_SetCaptivePortalCertificateForTesting( void JNI_CaptivePortalHelper_SetOSReportsCaptivePortalForTesting( JNIEnv* env, - const base::android::JavaParamRef& jcaller, jboolean os_reports_captive_portal) { base::PostTaskWithTraits( FROM_HERE, {content::BrowserThread::UI}, diff --git a/chrome/browser/ssl/security_state_model_android.cc b/chrome/browser/ssl/security_state_model_android.cc index c94d37bbe69608..7092a1edec99e8 100644 --- a/chrome/browser/ssl/security_state_model_android.cc +++ b/chrome/browser/ssl/security_state_model_android.cc @@ -13,7 +13,6 @@ using base::android::JavaParamRef; // static jint JNI_SecurityStateModel_GetSecurityLevelForWebContents( JNIEnv* env, - const JavaParamRef& jcaller, const JavaParamRef& jweb_contents) { content::WebContents* web_contents = content::WebContents::FromJavaWebContents(jweb_contents); diff --git a/chrome/browser/supervised_user/child_accounts/child_account_service_android.cc b/chrome/browser/supervised_user/child_accounts/child_account_service_android.cc index b837fdda1b8949..7d22091892e051 100644 --- a/chrome/browser/supervised_user/child_accounts/child_account_service_android.cc +++ b/chrome/browser/supervised_user/child_accounts/child_account_service_android.cc @@ -26,7 +26,6 @@ using base::android::ScopedJavaGlobalRef; void JNI_ChildAccountService_ListenForChildStatusReceived( JNIEnv* env, - const JavaParamRef& jcaller, const JavaParamRef& callback) { ProfileManager* profile_manager = g_browser_process->profile_manager(); ChildAccountService* service = ChildAccountServiceFactory::GetForProfile( @@ -54,7 +53,6 @@ void ReauthenticateChildAccount(content::WebContents* web_contents, void JNI_ChildAccountService_OnReauthenticationResult( JNIEnv* env, - const JavaParamRef& jcaller, jlong jcallbackPtr, jboolean result) { // Cast the pointer value back to a Callback and take ownership of it. diff --git a/chrome/browser/translate/android/translate_bridge.cc b/chrome/browser/translate/android/translate_bridge.cc index 6fe4ec6a23f7ae..fe5ce32807587c 100644 --- a/chrome/browser/translate/android/translate_bridge.cc +++ b/chrome/browser/translate/android/translate_bridge.cc @@ -23,7 +23,6 @@ static ChromeTranslateClient* GetTranslateClient( static void JNI_TranslateBridge_ManualTranslateWhenReady( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& j_web_contents) { content::WebContents* web_contents = content::WebContents::FromJavaWebContents(j_web_contents); @@ -35,7 +34,6 @@ static void JNI_TranslateBridge_ManualTranslateWhenReady( static jboolean JNI_TranslateBridge_CanManuallyTranslate( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& j_web_contents) { ChromeTranslateClient* client = GetTranslateClient(j_web_contents); translate::TranslateManager* manager = client->GetTranslateManager(); @@ -45,7 +43,6 @@ static jboolean JNI_TranslateBridge_CanManuallyTranslate( static jboolean JNI_TranslateBridge_ShouldShowManualTranslateIPH( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& j_web_contents) { ChromeTranslateClient* client = GetTranslateClient(j_web_contents); translate::TranslateManager* manager = client->GetTranslateManager(); diff --git a/chrome/browser/ui/android/infobars/download_progress_infobar.cc b/chrome/browser/ui/android/infobars/download_progress_infobar.cc index 646e50fc3be44c..9ae8f2ea82a137 100644 --- a/chrome/browser/ui/android/infobars/download_progress_infobar.cc +++ b/chrome/browser/ui/android/infobars/download_progress_infobar.cc @@ -82,7 +82,6 @@ base::android::ScopedJavaLocalRef DownloadProgressInfoBar::GetTab( } void JNI_DownloadProgressInfoBar_Create(JNIEnv* env, - const JavaParamRef& j_caller, const JavaParamRef& j_client, const JavaParamRef& j_tab, const JavaParamRef& j_data) { diff --git a/chrome/browser/ui/android/infobars/reader_mode_infobar.cc b/chrome/browser/ui/android/infobars/reader_mode_infobar.cc index 3de3748f8bcbec..45f435bf843777 100644 --- a/chrome/browser/ui/android/infobars/reader_mode_infobar.cc +++ b/chrome/browser/ui/android/infobars/reader_mode_infobar.cc @@ -60,7 +60,6 @@ base::android::ScopedJavaLocalRef ReaderModeInfoBar::GetTab( void ReaderModeInfoBar::ProcessButton(int action) {} void JNI_ReaderModeInfoBar_Create(JNIEnv* env, - const JavaParamRef& j_caller, const JavaParamRef& j_tab) { InfoBarService* service = InfoBarService::FromWebContents( TabAndroid::GetNativeTab(env, j_tab)->web_contents()); diff --git a/chrome/browser/ui/android/infobars/simple_confirm_infobar_builder.cc b/chrome/browser/ui/android/infobars/simple_confirm_infobar_builder.cc index d77ba83bfb8c24..0347c68df26be5 100644 --- a/chrome/browser/ui/android/infobars/simple_confirm_infobar_builder.cc +++ b/chrome/browser/ui/android/infobars/simple_confirm_infobar_builder.cc @@ -127,7 +127,6 @@ bool SimpleConfirmInfoBarDelegate::Cancel() { void JNI_SimpleConfirmInfoBarBuilder_Create( JNIEnv* env, - const JavaParamRef& j_caller, const JavaParamRef& j_tab, jint j_identifier, const JavaParamRef& j_icon, diff --git a/chrome/browser/ui/android/infobars/survey_infobar.cc b/chrome/browser/ui/android/infobars/survey_infobar.cc index 9ff6a2352307e2..a4e5e65ff64c96 100644 --- a/chrome/browser/ui/android/infobars/survey_infobar.cc +++ b/chrome/browser/ui/android/infobars/survey_infobar.cc @@ -99,7 +99,6 @@ ScopedJavaLocalRef SurveyInfoBar::CreateRenderInfoBar(JNIEnv* env) { void JNI_SurveyInfoBar_Create( JNIEnv* env, - const JavaParamRef& j_caller, const JavaParamRef& j_web_contents, const JavaParamRef& j_site_id, jboolean j_show_as_bottom_sheet, diff --git a/chrome/browser/ui/android/javascript_app_modal_dialog_android.cc b/chrome/browser/ui/android/javascript_app_modal_dialog_android.cc index c4a1994cbe5888..e42db85180582c 100644 --- a/chrome/browser/ui/android/javascript_app_modal_dialog_android.cc +++ b/chrome/browser/ui/android/javascript_app_modal_dialog_android.cc @@ -150,8 +150,7 @@ const ScopedJavaGlobalRef& // static ScopedJavaLocalRef JNI_JavascriptAppModalDialog_GetCurrentModalDialog( - JNIEnv* env, - const JavaParamRef& clazz) { + JNIEnv* env) { app_modal::JavaScriptAppModalDialog* dialog = app_modal::AppModalDialogQueue::GetInstance()->active_dialog(); if (!dialog || !dialog->native_dialog()) diff --git a/chrome/browser/ui/android/omnibox/omnibox_url_emphasizer.cc b/chrome/browser/ui/android/omnibox/omnibox_url_emphasizer.cc index dc72b2ef0564f3..9516cc82878de2 100644 --- a/chrome/browser/ui/android/omnibox/omnibox_url_emphasizer.cc +++ b/chrome/browser/ui/android/omnibox/omnibox_url_emphasizer.cc @@ -18,7 +18,6 @@ using base::android::ScopedJavaLocalRef; ScopedJavaLocalRef JNI_OmniboxUrlEmphasizer_ParseForEmphasizeComponents( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jprofile, const JavaParamRef& jtext) { Profile* profile = ProfileAndroid::FromProfileAndroid(jprofile); diff --git a/chrome/browser/ui/android/omnibox/omnibox_view_util.cc b/chrome/browser/ui/android/omnibox/omnibox_view_util.cc index 490376727e568e..f8939c449d964d 100644 --- a/chrome/browser/ui/android/omnibox/omnibox_view_util.cc +++ b/chrome/browser/ui/android/omnibox/omnibox_view_util.cc @@ -14,7 +14,6 @@ using base::android::ScopedJavaLocalRef; // static ScopedJavaLocalRef JNI_OmniboxViewUtil_SanitizeTextForPaste( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jtext) { base::string16 pasted_text( base::android::ConvertJavaStringToUTF16(env, jtext)); diff --git a/chrome/browser/ui/android/page_info/certificate_chain_helper.cc b/chrome/browser/ui/android/page_info/certificate_chain_helper.cc index a7dfa26bc87b72..dcb356ce635623 100644 --- a/chrome/browser/ui/android/page_info/certificate_chain_helper.cc +++ b/chrome/browser/ui/android/page_info/certificate_chain_helper.cc @@ -20,7 +20,6 @@ using content::WebContents; static ScopedJavaLocalRef JNI_CertificateChainHelper_GetCertificateChain( JNIEnv* env, - const JavaParamRef&, const JavaParamRef& java_web_contents) { content::WebContents* web_contents = content::WebContents::FromJavaWebContents(java_web_contents); diff --git a/chrome/browser/ui/android/page_info/certificate_viewer_android.cc b/chrome/browser/ui/android/page_info/certificate_viewer_android.cc index 41f768499f3d98..b30ede3af7c411 100644 --- a/chrome/browser/ui/android/page_info/certificate_viewer_android.cc +++ b/chrome/browser/ui/android/page_info/certificate_viewer_android.cc @@ -22,101 +22,85 @@ void ShowCertificateViewer(content::WebContents* web_contents, } static ScopedJavaLocalRef JNI_CertificateViewer_GetCertIssuedToText( - JNIEnv* env, - const JavaParamRef&) { + JNIEnv* env) { return ConvertUTF8ToJavaString( env, l10n_util::GetStringUTF8(IDS_CERT_INFO_SUBJECT_GROUP)); } static ScopedJavaLocalRef -JNI_CertificateViewer_GetCertInfoCommonNameText(JNIEnv* env, - const JavaParamRef&) { +JNI_CertificateViewer_GetCertInfoCommonNameText(JNIEnv* env) { return ConvertUTF8ToJavaString( env, l10n_util::GetStringUTF8(IDS_CERT_INFO_COMMON_NAME_LABEL)); } static ScopedJavaLocalRef -JNI_CertificateViewer_GetCertInfoOrganizationText(JNIEnv* env, - const JavaParamRef&) { +JNI_CertificateViewer_GetCertInfoOrganizationText(JNIEnv* env) { return ConvertUTF8ToJavaString( env, l10n_util::GetStringUTF8(IDS_CERT_INFO_ORGANIZATION_LABEL)); } static ScopedJavaLocalRef -JNI_CertificateViewer_GetCertInfoSerialNumberText(JNIEnv* env, - const JavaParamRef&) { +JNI_CertificateViewer_GetCertInfoSerialNumberText(JNIEnv* env) { return ConvertUTF8ToJavaString( env, l10n_util::GetStringUTF8(IDS_CERT_INFO_SERIAL_NUMBER_LABEL)); } static ScopedJavaLocalRef -JNI_CertificateViewer_GetCertInfoOrganizationUnitText( - JNIEnv* env, - const JavaParamRef&) { +JNI_CertificateViewer_GetCertInfoOrganizationUnitText(JNIEnv* env) { return ConvertUTF8ToJavaString( env, l10n_util::GetStringUTF8(IDS_CERT_INFO_ORGANIZATIONAL_UNIT_LABEL)); } static ScopedJavaLocalRef JNI_CertificateViewer_GetCertIssuedByText( - JNIEnv* env, - const JavaParamRef&) { + JNIEnv* env) { return ConvertUTF8ToJavaString( env, l10n_util::GetStringUTF8(IDS_CERT_INFO_ISSUER_GROUP)); } static ScopedJavaLocalRef JNI_CertificateViewer_GetCertValidityText( - JNIEnv* env, - const JavaParamRef&) { + JNIEnv* env) { return ConvertUTF8ToJavaString( env, l10n_util::GetStringUTF8(IDS_CERT_INFO_VALIDITY_GROUP)); } static ScopedJavaLocalRef JNI_CertificateViewer_GetCertIssuedOnText( - JNIEnv* env, - const JavaParamRef&) { + JNIEnv* env) { return ConvertUTF8ToJavaString( env, l10n_util::GetStringUTF8(IDS_CERT_INFO_ISSUED_ON_LABEL)); } static ScopedJavaLocalRef JNI_CertificateViewer_GetCertExpiresOnText( - JNIEnv* env, - const JavaParamRef&) { + JNIEnv* env) { return ConvertUTF8ToJavaString( env, l10n_util::GetStringUTF8(IDS_CERT_INFO_EXPIRES_ON_LABEL)); } static ScopedJavaLocalRef -JNI_CertificateViewer_GetCertFingerprintsText(JNIEnv* env, - const JavaParamRef&) { +JNI_CertificateViewer_GetCertFingerprintsText(JNIEnv* env) { return ConvertUTF8ToJavaString( env, l10n_util::GetStringUTF8(IDS_CERT_INFO_FINGERPRINTS_GROUP)); } static ScopedJavaLocalRef -JNI_CertificateViewer_GetCertSHA256FingerprintText( - JNIEnv* env, - const JavaParamRef&) { +JNI_CertificateViewer_GetCertSHA256FingerprintText(JNIEnv* env) { return ConvertUTF8ToJavaString( env, l10n_util::GetStringUTF8(IDS_CERT_INFO_SHA256_FINGERPRINT_LABEL)); } static ScopedJavaLocalRef -JNI_CertificateViewer_GetCertSHA1FingerprintText(JNIEnv* env, - const JavaParamRef&) { +JNI_CertificateViewer_GetCertSHA1FingerprintText(JNIEnv* env) { return ConvertUTF8ToJavaString( env, l10n_util::GetStringUTF8(IDS_CERT_INFO_SHA1_FINGERPRINT_LABEL)); } static ScopedJavaLocalRef JNI_CertificateViewer_GetCertExtensionText( - JNIEnv* env, - const JavaParamRef&) { + JNIEnv* env) { return ConvertUTF8ToJavaString( env, l10n_util::GetStringUTF8(IDS_CERT_DETAILS_EXTENSIONS)); } static ScopedJavaLocalRef JNI_CertificateViewer_GetCertSANText( - JNIEnv* env, - const JavaParamRef&) { + JNIEnv* env) { return ConvertUTF8ToJavaString( env, l10n_util::GetStringUTF8(IDS_CERT_X509_SUBJECT_ALT_NAME)); } diff --git a/chrome/browser/ui/android/page_info/connection_info_popup_android.cc b/chrome/browser/ui/android/page_info/connection_info_popup_android.cc index 0e36cde7aecda1..1c9ae32b5d8f6c 100644 --- a/chrome/browser/ui/android/page_info/connection_info_popup_android.cc +++ b/chrome/browser/ui/android/page_info/connection_info_popup_android.cc @@ -34,7 +34,6 @@ using content::WebContents; // static static jlong JNI_ConnectionInfoPopup_Init( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& obj, const JavaParamRef& java_web_contents) { content::WebContents* web_contents = diff --git a/chrome/browser/ui/android/page_info/page_info_controller_android.cc b/chrome/browser/ui/android/page_info/page_info_controller_android.cc index 02a6b6b0c1b3e7..0094918519e034 100644 --- a/chrome/browser/ui/android/page_info/page_info_controller_android.cc +++ b/chrome/browser/ui/android/page_info/page_info_controller_android.cc @@ -31,7 +31,6 @@ using base::android::JavaParamRef; // static static jlong JNI_PageInfoController_Init( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& obj, const JavaParamRef& java_web_contents) { content::WebContents* web_contents = diff --git a/chrome/browser/ui/android/ssl_client_certificate_request.cc b/chrome/browser/ui/android/ssl_client_certificate_request.cc index 5c2b6aa6784c56..875764e5c16e1f 100644 --- a/chrome/browser/ui/android/ssl_client_certificate_request.cc +++ b/chrome/browser/ui/android/ssl_client_certificate_request.cc @@ -228,7 +228,6 @@ namespace android { // the user didn't select a certificate. static void JNI_SSLClientCertificateRequest_OnSystemRequestCompletion( JNIEnv* env, - const JavaParamRef& clazz, jlong request_id, const JavaParamRef& encoded_chain_ref, const JavaParamRef& private_key_ref) { @@ -280,8 +279,7 @@ static void NotifyClientCertificatesChanged() { static void JNI_SSLClientCertificateRequest_NotifyClientCertificatesChangedOnIOThread( - JNIEnv* env, - const JavaParamRef&) { + JNIEnv* env) { if (content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)) { NotifyClientCertificatesChanged(); } else { diff --git a/chrome/browser/ui/android/tab_model/single_tab_model.cc b/chrome/browser/ui/android/tab_model/single_tab_model.cc index 4b951347041829..39e6abf486c09f 100644 --- a/chrome/browser/ui/android/tab_model/single_tab_model.cc +++ b/chrome/browser/ui/android/tab_model/single_tab_model.cc @@ -12,7 +12,6 @@ using base::android::JavaParamRef; static void JNI_SingleTabModel_PermanentlyBlockAllNewWindows( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_tab_android) { TabAndroid* tab = TabAndroid::GetNativeTab(env, j_tab_android); if (!tab) diff --git a/chrome/browser/ui/android/tab_model/tab_model_jni_bridge.cc b/chrome/browser/ui/android/tab_model/tab_model_jni_bridge.cc index a09654194c2e44..e964dec0019614 100644 --- a/chrome/browser/ui/android/tab_model/tab_model_jni_bridge.cc +++ b/chrome/browser/ui/android/tab_model/tab_model_jni_bridge.cc @@ -181,7 +181,6 @@ inline static base::TimeDelta GetTimeDelta(jlong ms) { void JNI_TabModelJniBridge_LogFromCloseMetric( JNIEnv* env, - const JavaParamRef& jcaller, jlong ms, jboolean perceived) { if (perceived) { @@ -195,7 +194,6 @@ void JNI_TabModelJniBridge_LogFromCloseMetric( void JNI_TabModelJniBridge_LogFromExitMetric( JNIEnv* env, - const JavaParamRef& jcaller, jlong ms, jboolean perceived) { if (perceived) { @@ -208,7 +206,6 @@ void JNI_TabModelJniBridge_LogFromExitMetric( } void JNI_TabModelJniBridge_LogFromNewMetric(JNIEnv* env, - const JavaParamRef& jcaller, jlong ms, jboolean perceived) { if (perceived) { @@ -222,7 +219,6 @@ void JNI_TabModelJniBridge_LogFromNewMetric(JNIEnv* env, void JNI_TabModelJniBridge_LogFromUserMetric( JNIEnv* env, - const JavaParamRef& jcaller, jlong ms, jboolean perceived) { if (perceived) { diff --git a/chromecast/browser/android/cast_metrics_helper_android.cc b/chromecast/browser/android/cast_metrics_helper_android.cc index aa3a2e8c390a07..519df071df37a4 100644 --- a/chromecast/browser/android/cast_metrics_helper_android.cc +++ b/chromecast/browser/android/cast_metrics_helper_android.cc @@ -10,13 +10,11 @@ using base::android::JavaParamRef; namespace chromecast { namespace shell { -void JNI_CastMetricsHelper_LogMediaPlay(JNIEnv* env, - const JavaParamRef& clazz) { +void JNI_CastMetricsHelper_LogMediaPlay(JNIEnv* env) { metrics::CastMetricsHelper::GetInstance()->LogMediaPlay(); } -void JNI_CastMetricsHelper_LogMediaPause(JNIEnv* env, - const JavaParamRef& clazz) { +void JNI_CastMetricsHelper_LogMediaPause(JNIEnv* env) { metrics::CastMetricsHelper::GetInstance()->LogMediaPause(); } diff --git a/components/about_ui/credit_utils.cc b/components/about_ui/credit_utils.cc index 06c6c372f79042..254fdbd36eccbc 100644 --- a/components/about_ui/credit_utils.cc +++ b/components/about_ui/credit_utils.cc @@ -53,9 +53,7 @@ std::string GetCredits(bool include_scripts) { #if defined(OS_ANDROID) static base::android::ScopedJavaLocalRef -JNI_CreditUtils_GetJavaWrapperCredits( - JNIEnv* env, - const base::android::JavaParamRef& clazz) { +JNI_CreditUtils_GetJavaWrapperCredits(JNIEnv* env) { std::string html_content = GetCredits(false); const char* html_content_arr = html_content.c_str(); return base::android::ToJavaByteArray( diff --git a/components/cronet/android/cronet_library_loader.cc b/components/cronet/android/cronet_library_loader.cc index 0c29e2c121b072..fc18c17b280abd 100644 --- a/components/cronet/android/cronet_library_loader.cc +++ b/components/cronet/android/cronet_library_loader.cc @@ -107,9 +107,7 @@ void CronetOnUnLoad(JavaVM* jvm, void* reserved) { } #endif -void JNI_CronetLibraryLoader_CronetInitOnInitThread( - JNIEnv* env, - const JavaParamRef& jcaller) { +void JNI_CronetLibraryLoader_CronetInitOnInitThread(JNIEnv* env) { // Initialize message loop for init thread. DCHECK(!base::MessageLoopCurrent::IsSet()); DCHECK(!g_init_message_loop); @@ -132,8 +130,7 @@ void JNI_CronetLibraryLoader_CronetInitOnInitThread( } ScopedJavaLocalRef JNI_CronetLibraryLoader_GetCronetVersion( - JNIEnv* env, - const JavaParamRef& jcaller) { + JNIEnv* env) { #if defined(ARCH_CPU_ARM64) // Attempt to avoid crashes on some ARM64 Marshmallow devices by // prompting zlib ARM feature detection early on. https://crbug.com/853725 diff --git a/components/cronet/android/cronet_url_request_context_adapter.cc b/components/cronet/android/cronet_url_request_context_adapter.cc index 39629bae912013..acf4810060df77 100644 --- a/components/cronet/android/cronet_url_request_context_adapter.cc +++ b/components/cronet/android/cronet_url_request_context_adapter.cc @@ -237,7 +237,6 @@ int CronetURLRequestContextAdapter::default_load_flags() const { // Create a URLRequestContextConfig from the given parameters. static jlong JNI_CronetUrlRequestContext_CreateRequestContextConfig( JNIEnv* env, - const JavaParamRef& jcaller, const JavaParamRef& juser_agent, const JavaParamRef& jstorage_path, jboolean jquic_enabled, @@ -275,7 +274,6 @@ static jlong JNI_CronetUrlRequestContext_CreateRequestContextConfig( // Add a QUIC hint to a URLRequestContextConfig. static void JNI_CronetUrlRequestContext_AddQuicHint( JNIEnv* env, - const JavaParamRef& jcaller, jlong jurl_request_context_config, const JavaParamRef& jhost, jint jport, @@ -296,7 +294,6 @@ static void JNI_CronetUrlRequestContext_AddQuicHint( // Jan. 1, 1970, midnight GMT. static void JNI_CronetUrlRequestContext_AddPkp( JNIEnv* env, - const JavaParamRef& jcaller, jlong jurl_request_context_config, const JavaParamRef& jhost, const JavaParamRef& jhashes, @@ -335,7 +332,6 @@ static void JNI_CronetUrlRequestContext_AddPkp( // returns 0 otherwise. static jlong JNI_CronetUrlRequestContext_CreateRequestContextAdapter( JNIEnv* env, - const JavaParamRef& jcaller, jlong jconfig) { std::unique_ptr context_config( reinterpret_cast(jconfig)); @@ -347,7 +343,6 @@ static jlong JNI_CronetUrlRequestContext_CreateRequestContextAdapter( static jint JNI_CronetUrlRequestContext_SetMinLogLevel( JNIEnv* env, - const JavaParamRef& jcaller, jint jlog_level) { jint old_log_level = static_cast(logging::GetMinLogLevel()); // MinLogLevel is global, shared by all URLRequestContexts. @@ -356,9 +351,7 @@ static jint JNI_CronetUrlRequestContext_SetMinLogLevel( } static ScopedJavaLocalRef -JNI_CronetUrlRequestContext_GetHistogramDeltas( - JNIEnv* env, - const JavaParamRef& jcaller) { +JNI_CronetUrlRequestContext_GetHistogramDeltas(JNIEnv* env) { std::vector data; if (!HistogramManager::GetInstance()->GetDeltas(&data)) return ScopedJavaLocalRef(); diff --git a/components/cronet/android/test/cronet_test_util.cc b/components/cronet/android/test/cronet_test_util.cc index c3122c5f8f2975..68ac853a6aa032 100644 --- a/components/cronet/android/test/cronet_test_util.cc +++ b/components/cronet/android/test/cronet_test_util.cc @@ -27,7 +27,6 @@ base::MessageLoop* g_message_loop = nullptr; } // namespace jint JNI_CronetTestUtil_GetLoadFlags(JNIEnv* env, - const JavaParamRef& jcaller, const jlong jurl_request_adapter) { return TestUtil::GetURLRequest(jurl_request_adapter)->load_flags(); } @@ -90,7 +89,6 @@ static void PrepareNetworkThreadOnNetworkThread(jlong jcontext_adapter) { // for these threads. Called from Java CronetTestUtil class. void JNI_CronetTestUtil_PrepareNetworkThread( JNIEnv* env, - const JavaParamRef& jcaller, jlong jcontext_adapter) { TestUtil::GetTaskRunner(jcontext_adapter) ->PostTask(FROM_HERE, base::Bind(&PrepareNetworkThreadOnNetworkThread, @@ -107,14 +105,12 @@ static void CleanupNetworkThreadOnNetworkThread() { // Called from Java CronetTestUtil class. void JNI_CronetTestUtil_CleanupNetworkThread( JNIEnv* env, - const JavaParamRef& jcaller, jlong jcontext_adapter) { TestUtil::RunAfterContextInit( jcontext_adapter, base::Bind(&CleanupNetworkThreadOnNetworkThread)); } jlong JNI_CronetTestUtil_GetTaggedBytes(JNIEnv* env, - const JavaParamRef& jcaller, jint jexpected_tag) { return net::GetTaggedBytes(jexpected_tag); } diff --git a/components/cronet/android/test/cronet_url_request_context_config_test.cc b/components/cronet/android/test/cronet_url_request_context_config_test.cc index 0c046a8bc15bc7..9ebb24979bb487 100644 --- a/components/cronet/android/test/cronet_url_request_context_config_test.cc +++ b/components/cronet/android/test/cronet_url_request_context_config_test.cc @@ -23,7 +23,6 @@ namespace cronet { // made it from the CronetEngine.Builder to the URLRequestContextConfig. static void JNI_CronetUrlRequestContextTest_VerifyUrlRequestContextConfig( JNIEnv* env, - const JavaParamRef& jcaller, jlong jurl_request_context_config, const JavaParamRef& jstorage_path) { URLRequestContextConfig* config = diff --git a/components/cronet/android/test/cronet_url_request_test.cc b/components/cronet/android/test/cronet_url_request_test.cc index 7669f7c11e336b..0ac958c0e3f13a 100644 --- a/components/cronet/android/test/cronet_url_request_test.cc +++ b/components/cronet/android/test/cronet_url_request_test.cc @@ -8,7 +8,6 @@ using base::android::JavaParamRef; static jint JNI_CronetUrlRequestTest_GetConnectionMigrationDisableLoadFlag( - JNIEnv* env, - const JavaParamRef& jcaller) { + JNIEnv* env) { return net::LOAD_DISABLE_CONNECTION_MIGRATION_TO_CELLULAR; } diff --git a/components/cronet/android/test/experimental_options_test.cc b/components/cronet/android/test/experimental_options_test.cc index 122d04d7f69ea1..96a87d84983d25 100644 --- a/components/cronet/android/test/experimental_options_test.cc +++ b/components/cronet/android/test/experimental_options_test.cc @@ -50,7 +50,6 @@ void WriteToHostCacheOnNetworkThread(jlong jcontext_adapter, static void JNI_ExperimentalOptionsTest_WriteToHostCache( JNIEnv* env, - const JavaParamRef& jcaller, jlong jcontext_adapter, const JavaParamRef& jaddress) { TestUtil::RunAfterContextInit( diff --git a/components/cronet/android/test/mock_cert_verifier.cc b/components/cronet/android/test/mock_cert_verifier.cc index a1629f5c52d72f..5200d85ae508cc 100644 --- a/components/cronet/android/test/mock_cert_verifier.cc +++ b/components/cronet/android/test/mock_cert_verifier.cc @@ -49,7 +49,6 @@ static bool CalculatePublicKeySha256(const net::X509Certificate& cert, static jlong JNI_MockCertVerifier_CreateMockCertVerifier( JNIEnv* env, - const JavaParamRef& jcaller, const JavaParamRef& jcerts, const jboolean jknown_root, const JavaParamRef& jtest_data_dir) { diff --git a/components/cronet/android/test/mock_url_request_job_factory.cc b/components/cronet/android/test/mock_url_request_job_factory.cc index a475d90e0cd92b..7fee527a969c29 100644 --- a/components/cronet/android/test/mock_url_request_job_factory.cc +++ b/components/cronet/android/test/mock_url_request_job_factory.cc @@ -77,7 +77,6 @@ class UrlInterceptorJobFactoryHandle { // that calls into libcronet_tests.so's URLRequestFilter. jlong JNI_MockUrlRequestJobFactory_AddUrlInterceptors( JNIEnv* env, - const JavaParamRef& jcaller, jlong jcontext_adapter) { net::URLRequestMockDataJob::AddUrlHandler(); net::URLRequestFailedJob::AddUrlHandler(); @@ -90,7 +89,6 @@ jlong JNI_MockUrlRequestJobFactory_AddUrlInterceptors( // Put back the old URLRequestJobFactory into the URLRequestContext. void JNI_MockUrlRequestJobFactory_RemoveUrlInterceptorJobFactory( JNIEnv* env, - const JavaParamRef& jcaller, jlong jinterceptor_handle) { reinterpret_cast(jinterceptor_handle) ->ShutDown(); @@ -98,7 +96,6 @@ void JNI_MockUrlRequestJobFactory_RemoveUrlInterceptorJobFactory( ScopedJavaLocalRef JNI_MockUrlRequestJobFactory_GetMockUrlWithFailure( JNIEnv* jenv, - const JavaParamRef& jcaller, jint jphase, jint jnet_error) { GURL url(net::URLRequestFailedJob::GetMockHttpUrlWithFailurePhase( @@ -109,7 +106,6 @@ ScopedJavaLocalRef JNI_MockUrlRequestJobFactory_GetMockUrlWithFailure( ScopedJavaLocalRef JNI_MockUrlRequestJobFactory_GetMockUrlForData( JNIEnv* jenv, - const JavaParamRef& jcaller, const JavaParamRef& jdata, jint jdata_repeat_count) { std::string data(base::android::ConvertJavaStringToUTF8(jenv, jdata)); @@ -119,25 +115,20 @@ ScopedJavaLocalRef JNI_MockUrlRequestJobFactory_GetMockUrlForData( } ScopedJavaLocalRef -JNI_MockUrlRequestJobFactory_GetMockUrlForSSLCertificateError( - JNIEnv* jenv, - const JavaParamRef& jcaller) { +JNI_MockUrlRequestJobFactory_GetMockUrlForSSLCertificateError(JNIEnv* jenv) { GURL url(net::SSLCertificateErrorJob::GetMockUrl()); return base::android::ConvertUTF8ToJavaString(jenv, url.spec()); } ScopedJavaLocalRef JNI_MockUrlRequestJobFactory_GetMockUrlForClientCertificateRequest( - JNIEnv* jenv, - const JavaParamRef& jcaller) { + JNIEnv* jenv) { GURL url(net::URLRequestMockDataJob::GetMockUrlForClientCertificateRequest()); return base::android::ConvertUTF8ToJavaString(jenv, url.spec()); } ScopedJavaLocalRef -JNI_MockUrlRequestJobFactory_GetMockUrlForHangingRead( - JNIEnv* jenv, - const JavaParamRef& jcaller) { +JNI_MockUrlRequestJobFactory_GetMockUrlForHangingRead(JNIEnv* jenv) { GURL url(net::URLRequestHangingReadJob::GetMockHttpUrl()); return base::android::ConvertUTF8ToJavaString(jenv, url.spec()); } diff --git a/components/cronet/android/test/native_test_server.cc b/components/cronet/android/test/native_test_server.cc index 96b516575a39b4..0095065cd62bbd 100644 --- a/components/cronet/android/test/native_test_server.cc +++ b/components/cronet/android/test/native_test_server.cc @@ -20,7 +20,6 @@ namespace cronet { jboolean JNI_NativeTestServer_StartNativeTestServer( JNIEnv* env, - const JavaParamRef& jcaller, const JavaParamRef& jtest_files_root, const JavaParamRef& jtest_data_dir) { base::FilePath test_data_dir( @@ -32,22 +31,17 @@ jboolean JNI_NativeTestServer_StartNativeTestServer( return cronet::TestServer::StartServeFilesFromDirectory(test_files_root); } -void JNI_NativeTestServer_ShutdownNativeTestServer( - JNIEnv* env, - const JavaParamRef& jcaller) { +void JNI_NativeTestServer_ShutdownNativeTestServer(JNIEnv* env) { cronet::TestServer::Shutdown(); } -ScopedJavaLocalRef JNI_NativeTestServer_GetEchoBodyURL( - JNIEnv* env, - const JavaParamRef& jcaller) { +ScopedJavaLocalRef JNI_NativeTestServer_GetEchoBodyURL(JNIEnv* env) { return base::android::ConvertUTF8ToJavaString( env, cronet::TestServer::GetEchoRequestBodyURL()); } ScopedJavaLocalRef JNI_NativeTestServer_GetEchoHeaderURL( JNIEnv* env, - const JavaParamRef& jcaller, const JavaParamRef& jheader) { return base::android::ConvertUTF8ToJavaString( env, cronet::TestServer::GetEchoHeaderURL( @@ -55,50 +49,41 @@ ScopedJavaLocalRef JNI_NativeTestServer_GetEchoHeaderURL( } ScopedJavaLocalRef JNI_NativeTestServer_GetEchoAllHeadersURL( - JNIEnv* env, - const JavaParamRef& jcaller) { + JNIEnv* env) { return base::android::ConvertUTF8ToJavaString( env, cronet::TestServer::GetEchoAllHeadersURL()); } -ScopedJavaLocalRef JNI_NativeTestServer_GetEchoMethodURL( - JNIEnv* env, - const JavaParamRef& jcaller) { +ScopedJavaLocalRef JNI_NativeTestServer_GetEchoMethodURL(JNIEnv* env) { return base::android::ConvertUTF8ToJavaString( env, cronet::TestServer::GetEchoMethodURL()); } ScopedJavaLocalRef JNI_NativeTestServer_GetRedirectToEchoBody( - JNIEnv* env, - const JavaParamRef& jcaller) { + JNIEnv* env) { return base::android::ConvertUTF8ToJavaString( env, cronet::TestServer::GetRedirectToEchoBodyURL()); } ScopedJavaLocalRef JNI_NativeTestServer_GetFileURL( JNIEnv* env, - const JavaParamRef& jcaller, const JavaParamRef& jfile_path) { return base::android::ConvertUTF8ToJavaString( env, cronet::TestServer::GetFileURL( base::android::ConvertJavaStringToUTF8(env, jfile_path))); } -jint JNI_NativeTestServer_GetPort(JNIEnv* env, - const JavaParamRef& jcaller) { +jint JNI_NativeTestServer_GetPort(JNIEnv* env) { return cronet::TestServer::GetPort(); } ScopedJavaLocalRef JNI_NativeTestServer_GetExabyteResponseURL( - JNIEnv* env, - const JavaParamRef& jcaller) { + JNIEnv* env) { return base::android::ConvertUTF8ToJavaString( env, cronet::TestServer::GetExabyteResponseURL()); } -ScopedJavaLocalRef JNI_NativeTestServer_GetHostPort( - JNIEnv* env, - const JavaParamRef& jcaller) { +ScopedJavaLocalRef JNI_NativeTestServer_GetHostPort(JNIEnv* env) { return base::android::ConvertUTF8ToJavaString( env, cronet::TestServer::GetHostPort()); } diff --git a/components/cronet/android/test/quic_test_server.cc b/components/cronet/android/test/quic_test_server.cc index 0a820aeb6fea85..39019ff3abcb96 100644 --- a/components/cronet/android/test/quic_test_server.cc +++ b/components/cronet/android/test/quic_test_server.cc @@ -79,7 +79,6 @@ void ShutdownOnServerThread() { // the device. void JNI_QuicTestServer_StartQuicTestServer( JNIEnv* env, - const JavaParamRef& /*jcaller*/, const JavaParamRef& jtest_files_root, const JavaParamRef& jtest_data_dir) { DCHECK(!g_quic_server_thread); @@ -99,17 +98,14 @@ void JNI_QuicTestServer_StartQuicTestServer( base::Bind(&StartOnServerThread, test_files_root, test_data_dir)); } -void JNI_QuicTestServer_ShutdownQuicTestServer( - JNIEnv* env, - const JavaParamRef& /*jcaller*/) { +void JNI_QuicTestServer_ShutdownQuicTestServer(JNIEnv* env) { DCHECK(!g_quic_server_thread->task_runner()->BelongsToCurrentThread()); g_quic_server_thread->task_runner()->PostTask( FROM_HERE, base::Bind(&ShutdownOnServerThread)); delete g_quic_server_thread; } -int JNI_QuicTestServer_GetServerPort(JNIEnv* env, - const JavaParamRef& /*jcaller*/) { +int JNI_QuicTestServer_GetServerPort(JNIEnv* env) { return kServerPort; } diff --git a/components/dom_distiller/content/browser/distillable_page_utils_android.cc b/components/dom_distiller/content/browser/distillable_page_utils_android.cc index b998842bd45458..0182c364bea9f6 100644 --- a/components/dom_distiller/content/browser/distillable_page_utils_android.cc +++ b/components/dom_distiller/content/browser/distillable_page_utils_android.cc @@ -31,7 +31,6 @@ void OnIsPageDistillableUpdate(const JavaRef& callback, static void JNI_DistillablePageUtils_SetDelegate( JNIEnv* env, - const JavaParamRef& jcaller, const JavaParamRef& webContents, const JavaParamRef& callback) { content::WebContents* web_contents( diff --git a/components/dom_distiller/core/url_utils_android.cc b/components/dom_distiller/core/url_utils_android.cc index 990b2cad4bcdf8..cadcd110187085 100644 --- a/components/dom_distiller/core/url_utils_android.cc +++ b/components/dom_distiller/core/url_utils_android.cc @@ -22,7 +22,6 @@ namespace android { ScopedJavaLocalRef JNI_DomDistillerUrlUtils_GetDistillerViewUrlFromUrl( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_scheme, const JavaParamRef& j_url) { std::string scheme(base::android::ConvertJavaStringToUTF8(env, j_scheme)); @@ -41,7 +40,6 @@ ScopedJavaLocalRef JNI_DomDistillerUrlUtils_GetDistillerViewUrlFromUrl( ScopedJavaLocalRef JNI_DomDistillerUrlUtils_GetOriginalUrlFromDistillerUrl( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_url) { GURL url(base::android::ConvertJavaStringToUTF8(env, j_url)); if (!url.is_valid()) @@ -57,7 +55,6 @@ JNI_DomDistillerUrlUtils_GetOriginalUrlFromDistillerUrl( jboolean JNI_DomDistillerUrlUtils_IsDistilledPage( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_url) { GURL url(base::android::ConvertJavaStringToUTF8(env, j_url)); return dom_distiller::url_utils::IsDistilledPage(url); @@ -65,7 +62,6 @@ jboolean JNI_DomDistillerUrlUtils_IsDistilledPage( ScopedJavaLocalRef JNI_DomDistillerUrlUtils_GetValueForKeyInUrl( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_url, const JavaParamRef& j_key) { GURL url(base::android::ConvertJavaStringToUTF8(env, j_url)); diff --git a/components/language/android/android_language_metrics_bridge.cc b/components/language/android/android_language_metrics_bridge.cc index 745c6437a1b0ee..d1aa846133e628 100644 --- a/components/language/android/android_language_metrics_bridge.cc +++ b/components/language/android/android_language_metrics_bridge.cc @@ -17,7 +17,6 @@ const char kTranslateExplicitLanguageAskLanguageRemoved[] = static void JNI_AndroidLanguageMetricsBridge_ReportExplicitLanguageAskStateChanged( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& language, const jboolean added) { base::UmaHistogramSparse( diff --git a/components/language/android/geo_language_provider_bridge.cc b/components/language/android/geo_language_provider_bridge.cc index 56587c609e21b1..d25c7914665ba4 100644 --- a/components/language/android/geo_language_provider_bridge.cc +++ b/components/language/android/geo_language_provider_bridge.cc @@ -8,7 +8,6 @@ static void JNI_GeoLanguageProviderBridge_GetCurrentGeoLanguages( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& set) { const std::vector current_geo_languages = language::GeoLanguageProvider::GetInstance()->CurrentGeoLanguages(); diff --git a/components/minidump_uploader/rewrite_minidumps_as_mimes.cc b/components/minidump_uploader/rewrite_minidumps_as_mimes.cc index 282f73984624e3..2e8aae87727895 100644 --- a/components/minidump_uploader/rewrite_minidumps_as_mimes.cc +++ b/components/minidump_uploader/rewrite_minidumps_as_mimes.cc @@ -162,7 +162,6 @@ void RewriteMinidumpsAsMIMEs(const base::FilePath& src_dir, static void JNI_CrashReportMimeWriter_RewriteMinidumpsAsMIMEs( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& j_src_dir, const base::android::JavaParamRef& j_dest_dir) { std::string src_dir, dest_dir; diff --git a/components/payments/content/android/origin_security_checker_android.cc b/components/payments/content/android/origin_security_checker_android.cc index c9eef600bf8b78..16a4dcafd72ca5 100644 --- a/components/payments/content/android/origin_security_checker_android.cc +++ b/components/payments/content/android/origin_security_checker_android.cc @@ -19,7 +19,6 @@ using ::base::android::ConvertJavaStringToUTF8; // static jboolean JNI_OriginSecurityChecker_IsOriginSecure( JNIEnv* env, - const JavaParamRef& jcaller, const JavaParamRef& jurl) { return OriginSecurityChecker::IsOriginSecure( GURL(ConvertJavaStringToUTF8(env, jurl))); @@ -28,7 +27,6 @@ jboolean JNI_OriginSecurityChecker_IsOriginSecure( // static jboolean JNI_OriginSecurityChecker_IsSchemeCryptographic( JNIEnv* env, - const JavaParamRef& jcaller, const JavaParamRef& jurl) { return OriginSecurityChecker::IsSchemeCryptographic( GURL(ConvertJavaStringToUTF8(env, jurl))); @@ -37,7 +35,6 @@ jboolean JNI_OriginSecurityChecker_IsSchemeCryptographic( // static jboolean JNI_OriginSecurityChecker_IsOriginLocalhostOrFile( JNIEnv* env, - const JavaParamRef& jcaller, const JavaParamRef& jurl) { return OriginSecurityChecker::IsOriginLocalhostOrFile( GURL(ConvertJavaStringToUTF8(env, jurl))); diff --git a/components/payments/content/android/payment_manifest_downloader_android.cc b/components/payments/content/android/payment_manifest_downloader_android.cc index 4574ddaa543311..6c101cfbea3ef3 100644 --- a/components/payments/content/android/payment_manifest_downloader_android.cc +++ b/components/payments/content/android/payment_manifest_downloader_android.cc @@ -100,7 +100,6 @@ void PaymentManifestDownloaderAndroid::Destroy( // Caller owns the result. Returns 0 on error. static jlong JNI_PaymentManifestDownloader_Init( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& jweb_contents) { content::WebContents* web_contents = content::WebContents::FromJavaWebContents(jweb_contents); diff --git a/components/payments/content/android/payment_manifest_parser_android.cc b/components/payments/content/android/payment_manifest_parser_android.cc index 8fd24382e69aff..790e879d4ca358 100644 --- a/components/payments/content/android/payment_manifest_parser_android.cc +++ b/components/payments/content/android/payment_manifest_parser_android.cc @@ -160,7 +160,6 @@ void PaymentManifestParserAndroid::DestroyPaymentManifestParserAndroid( // Caller owns the result. jlong JNI_PaymentManifestParser_CreatePaymentManifestParserAndroid( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& jweb_contents) { content::WebContents* web_contents = content::WebContents::FromJavaWebContents(jweb_contents); diff --git a/components/payments/content/android/payment_validator_android.cc b/components/payments/content/android/payment_validator_android.cc index d9d5c7d08a4d57..9e3c966fc59127 100644 --- a/components/payments/content/android/payment_validator_android.cc +++ b/components/payments/content/android/payment_validator_android.cc @@ -21,7 +21,6 @@ namespace payments { jboolean JNI_PaymentValidator_ValidatePaymentDetailsAndroid( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& buffer) { jbyte* buf_in = static_cast(env->GetDirectBufferAddress(buffer)); jlong buf_size = env->GetDirectBufferCapacity(buffer); @@ -37,7 +36,6 @@ jboolean JNI_PaymentValidator_ValidatePaymentDetailsAndroid( jboolean JNI_PaymentValidator_ValidatePaymentValidationErrorsAndroid( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& buffer) { jbyte* buf_in = static_cast(env->GetDirectBufferAddress(buffer)); jlong buf_size = env->GetDirectBufferCapacity(buffer); diff --git a/components/safe_browsing/android/safe_browsing_api_handler_bridge.cc b/components/safe_browsing/android/safe_browsing_api_handler_bridge.cc index e05d1d0f9c1dcb..e4a797defb8d3a 100644 --- a/components/safe_browsing/android/safe_browsing_api_handler_bridge.cc +++ b/components/safe_browsing/android/safe_browsing_api_handler_bridge.cc @@ -84,9 +84,7 @@ ScopedJavaLocalRef SBThreatTypeSetToJavaArray( // Java->Native call, to check whether the feature to use local blacklists is // enabled. -jboolean JNI_SafeBrowsingApiBridge_AreLocalBlacklistsEnabled( - JNIEnv* env, - const JavaParamRef&) { +jboolean JNI_SafeBrowsingApiBridge_AreLocalBlacklistsEnabled(JNIEnv* env) { return base::FeatureList::IsEnabled(kUseLocalBlacklistsV2); } @@ -100,7 +98,6 @@ jboolean JNI_SafeBrowsingApiBridge_AreLocalBlacklistsEnabled( // nothing thread unsafe happening here. void JNI_SafeBrowsingApiBridge_OnUrlCheckDone( JNIEnv* env, - const JavaParamRef& context, jlong callback_id, jint result_status, const JavaParamRef& metadata, diff --git a/components/signin/core/browser/child_account_info_fetcher_android.cc b/components/signin/core/browser/child_account_info_fetcher_android.cc index 529906b09e8b39..29935b1310f2bb 100644 --- a/components/signin/core/browser/child_account_info_fetcher_android.cc +++ b/components/signin/core/browser/child_account_info_fetcher_android.cc @@ -54,7 +54,6 @@ ChildAccountInfoFetcherAndroid::~ChildAccountInfoFetcherAndroid() { void JNI_ChildAccountInfoFetcher_SetIsChildAccount( JNIEnv* env, - const JavaParamRef& caller, jlong native_service, const JavaParamRef& j_account_id, jboolean is_child_account) { diff --git a/components/sync/android/model_type_helper.cc b/components/sync/android/model_type_helper.cc index 9bb492125251a2..8b5ee6631a12ab 100644 --- a/components/sync/android/model_type_helper.cc +++ b/components/sync/android/model_type_helper.cc @@ -17,7 +17,6 @@ namespace syncer { static ScopedJavaLocalRef JNI_ModelTypeHelper_ModelTypeToNotificationType( JNIEnv* env, - const JavaParamRef& clazz, jint model_type_int) { std::string model_type_string; ModelType model_type = static_cast(model_type_int); diff --git a/components/url_formatter/url_formatter_android.cc b/components/url_formatter/url_formatter_android.cc index 0558d5a84af08b..acc0e019d57f33 100644 --- a/components/url_formatter/url_formatter_android.cc +++ b/components/url_formatter/url_formatter_android.cc @@ -29,7 +29,6 @@ namespace android { static ScopedJavaLocalRef JNI_UrlFormatter_FixupUrl( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& url) { DCHECK(url); GURL fixed_url = url_formatter::FixupURL( @@ -43,7 +42,6 @@ static ScopedJavaLocalRef JNI_UrlFormatter_FixupUrl( static ScopedJavaLocalRef JNI_UrlFormatter_FormatUrlForDisplayOmitScheme( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& url) { return base::android::ConvertUTF16ToJavaString( env, url_formatter::FormatUrl( @@ -56,7 +54,6 @@ JNI_UrlFormatter_FormatUrlForDisplayOmitScheme( static ScopedJavaLocalRef JNI_UrlFormatter_FormatUrlForDisplayOmitHTTPScheme( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& url) { return base::android::ConvertUTF16ToJavaString( env, url_formatter::FormatUrl( @@ -67,7 +64,6 @@ JNI_UrlFormatter_FormatUrlForDisplayOmitHTTPScheme( static ScopedJavaLocalRef JNI_UrlFormatter_FormatUrlForCopy( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& url) { return base::android::ConvertUTF16ToJavaString( env, url_formatter::FormatUrl( @@ -78,7 +74,6 @@ static ScopedJavaLocalRef JNI_UrlFormatter_FormatUrlForCopy( static ScopedJavaLocalRef JNI_UrlFormatter_FormatUrlForSecurityDisplay( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& url) { return base::android::ConvertUTF16ToJavaString( env, url_formatter::FormatUrlForSecurityDisplay( @@ -88,7 +83,6 @@ static ScopedJavaLocalRef JNI_UrlFormatter_FormatUrlForSecurityDisplay( static ScopedJavaLocalRef JNI_UrlFormatter_FormatUrlForSecurityDisplayOmitScheme( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& url) { return base::android::ConvertUTF16ToJavaString( env, url_formatter::FormatUrlForSecurityDisplay( diff --git a/components/variations/android/variations_associated_data_android.cc b/components/variations/android/variations_associated_data_android.cc index faba341999ea7b..043ed0a739e129 100644 --- a/components/variations/android/variations_associated_data_android.cc +++ b/components/variations/android/variations_associated_data_android.cc @@ -19,7 +19,6 @@ namespace android { ScopedJavaLocalRef JNI_VariationsAssociatedData_GetVariationParamValue( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jtrial_name, const JavaParamRef& jparam_name) { std::string trial_name(ConvertJavaStringToUTF8(env, jtrial_name)); @@ -30,8 +29,7 @@ ScopedJavaLocalRef JNI_VariationsAssociatedData_GetVariationParamValue( } ScopedJavaLocalRef JNI_VariationsAssociatedData_GetFeedbackVariations( - JNIEnv* env, - const JavaParamRef& clazz) { + JNIEnv* env) { const std::string values = VariationsHttpHeaderProvider::GetInstance()->GetVariationsString(); return ConvertUTF8ToJavaString(env, values); diff --git a/content/app/android/content_main.cc b/content/app/android/content_main.cc index f24042458a862f..bb61be3e6d780b 100644 --- a/content/app/android/content_main.cc +++ b/content/app/android/content_main.cc @@ -32,7 +32,6 @@ LazyInstance>::DestructorAtExit // process. The first method should always be called upon browser start, and // the second method can be deferred. See http://crbug.com/854209. static jint JNI_ContentMain_Start(JNIEnv* env, - const JavaParamRef& clazz, jboolean start_service_manager_only) { TRACE_EVENT0("startup", "content::Start"); diff --git a/content/browser/android/app_web_message_port.cc b/content/browser/android/app_web_message_port.cc index 0f4751f4f47ddb..37112192ca7033 100644 --- a/content/browser/android/app_web_message_port.cc +++ b/content/browser/android/app_web_message_port.cc @@ -37,7 +37,6 @@ std::vector AppWebMessagePort::UnwrapJavaArray( base::android::ScopedJavaLocalRef JNI_AppWebMessagePort_DecodeStringMessage( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& encoded_data) { std::vector encoded_message; base::android::JavaByteArrayToByteVector(env, encoded_data, &encoded_message); @@ -54,7 +53,6 @@ JNI_AppWebMessagePort_DecodeStringMessage( base::android::ScopedJavaLocalRef JNI_AppWebMessagePort_EncodeStringMessage( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& jmessage) { std::vector encoded_message = blink::EncodeStringMessage( base::android::ConvertJavaStringToUTF16(jmessage)); diff --git a/content/browser/android/browser_startup_controller.cc b/content/browser/android/browser_startup_controller.cc index 7ca03b04ad9d62..e0eddff7457284 100644 --- a/content/browser/android/browser_startup_controller.cc +++ b/content/browser/android/browser_startup_controller.cc @@ -34,14 +34,11 @@ bool ShouldStartGpuProcessOnBrowserStartup() { static void JNI_BrowserStartupControllerImpl_SetCommandLineFlags( JNIEnv* env, - const JavaParamRef& clazz, jboolean single_process) { SetContentCommandLineFlags(static_cast(single_process)); } -static jboolean JNI_BrowserStartupControllerImpl_IsOfficialBuild( - JNIEnv* env, - const JavaParamRef& clazz) { +static jboolean JNI_BrowserStartupControllerImpl_IsOfficialBuild(JNIEnv* env) { #if defined(OFFICIAL_BUILD) return true; #else @@ -49,9 +46,7 @@ static jboolean JNI_BrowserStartupControllerImpl_IsOfficialBuild( #endif } -static void JNI_BrowserStartupControllerImpl_FlushStartupTasks( - JNIEnv* env, - const JavaParamRef& clazz) { +static void JNI_BrowserStartupControllerImpl_FlushStartupTasks(JNIEnv* env) { BrowserMainLoop::GetInstance()->SynchronouslyFlushStartupTasks(); } diff --git a/content/browser/android/content_feature_list.cc b/content/browser/android/content_feature_list.cc index a3b57a91db0dde..507ec547689025 100644 --- a/content/browser/android/content_feature_list.cc +++ b/content/browser/android/content_feature_list.cc @@ -46,7 +46,6 @@ const base::Feature kRequestUnbufferedDispatch{ static jboolean JNI_ContentFeatureList_IsEnabled( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jfeature_name) { const base::Feature* feature = FindFeatureExposedToJava(ConvertJavaStringToUTF8(env, jfeature_name)); diff --git a/content/browser/android/content_view_statics.cc b/content/browser/android/content_view_statics.cc index 6275395ace81aa..2c9247a554db7b 100644 --- a/content/browser/android/content_view_statics.cc +++ b/content/browser/android/content_view_statics.cc @@ -92,7 +92,6 @@ base::LazyInstance::DestructorAtExit static void JNI_ContentViewStaticsImpl_SetWebKitSharedTimersSuspended( JNIEnv* env, - const JavaParamRef& obj, jboolean suspend) { if (suspend) { g_suspended_processes_watcher.Pointer()->SuspendWebKitSharedTimers(); diff --git a/content/browser/android/dialog_overlay_impl.cc b/content/browser/android/dialog_overlay_impl.cc index a6a952bd31f5df..67ec2bb24fad9c 100644 --- a/content/browser/android/dialog_overlay_impl.cc +++ b/content/browser/android/dialog_overlay_impl.cc @@ -253,7 +253,6 @@ void DialogOverlayImpl::RegisterWindowObserverIfNeeded( static jint JNI_DialogOverlayImpl_RegisterSurface( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const JavaParamRef& surface) { DCHECK_CURRENTLY_ON(BrowserThread::UI); return gpu::GpuSurfaceTracker::Get()->AddSurfaceForNativeWidget( @@ -263,7 +262,6 @@ static jint JNI_DialogOverlayImpl_RegisterSurface( static void JNI_DialogOverlayImpl_UnregisterSurface( JNIEnv* env, - const base::android::JavaParamRef& jcaller, jint surface_id) { DCHECK_CURRENTLY_ON(BrowserThread::UI); gpu::GpuSurfaceTracker::Get()->RemoveSurface(surface_id); @@ -272,7 +270,6 @@ static void JNI_DialogOverlayImpl_UnregisterSurface( static ScopedJavaLocalRef JNI_DialogOverlayImpl_LookupSurfaceForTesting( JNIEnv* env, - const base::android::JavaParamRef& jcaller, jint surfaceId) { gl::ScopedJavaSurface surface = gpu::GpuSurfaceTracker::Get()->AcquireJavaSurface(surfaceId); diff --git a/content/browser/android/gpu_process_callback.cc b/content/browser/android/gpu_process_callback.cc index fc33aa10fd8db1..439e600bd73934 100644 --- a/content/browser/android/gpu_process_callback.cc +++ b/content/browser/android/gpu_process_callback.cc @@ -14,7 +14,6 @@ namespace content { void JNI_GpuProcessCallback_CompleteScopedSurfaceRequest( JNIEnv* env, - const base::android::JavaParamRef& clazz, const base::android::JavaParamRef& token, const base::android::JavaParamRef& surface) { base::UnguessableToken requestToken = @@ -36,7 +35,6 @@ void JNI_GpuProcessCallback_CompleteScopedSurfaceRequest( base::android::ScopedJavaLocalRef JNI_GpuProcessCallback_GetViewSurface( JNIEnv* env, - const base::android::JavaParamRef& jcaller, jint surface_id) { gl::ScopedJavaSurface surface_view = gpu::GpuSurfaceTracker::GetInstance()->AcquireJavaSurface(surface_id); diff --git a/content/browser/android/ime_adapter_android.cc b/content/browser/android/ime_adapter_android.cc index cdc5d3255cb3e9..b3d15832b5ead1 100644 --- a/content/browser/android/ime_adapter_android.cc +++ b/content/browser/android/ime_adapter_android.cc @@ -75,7 +75,6 @@ jlong JNI_ImeAdapterImpl_Init(JNIEnv* env, // Callback from Java to convert BackgroundColorSpan data to a // ui::ImeTextSpan instance, and append it to |ime_text_spans_ptr|. void JNI_ImeAdapterImpl_AppendBackgroundColorSpan(JNIEnv*, - const JavaParamRef&, jlong ime_text_spans_ptr, jint start, jint end, @@ -96,7 +95,6 @@ void JNI_ImeAdapterImpl_AppendBackgroundColorSpan(JNIEnv*, // ui::ImeTextSpan instance, and append it to |ime_text_spans_ptr|. void JNI_ImeAdapterImpl_AppendSuggestionSpan( JNIEnv* env, - const JavaParamRef&, jlong ime_text_spans_ptr, jint start, jint end, @@ -126,7 +124,6 @@ void JNI_ImeAdapterImpl_AppendSuggestionSpan( // Callback from Java to convert UnderlineSpan data to a // ui::ImeTextSpan instance, and append it to |ime_text_spans_ptr|. void JNI_ImeAdapterImpl_AppendUnderlineSpan(JNIEnv*, - const JavaParamRef&, jlong ime_text_spans_ptr, jint start, jint end) { diff --git a/content/browser/android/load_url_params.cc b/content/browser/android/load_url_params.cc index 2a1cf646b14d13..255ce7733e177f 100644 --- a/content/browser/android/load_url_params.cc +++ b/content/browser/android/load_url_params.cc @@ -15,7 +15,6 @@ using base::android::JavaParamRef; namespace content { jboolean JNI_LoadUrlParams_IsDataScheme(JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jurl) { GURL url(base::android::ConvertJavaStringToUTF8(env, jurl)); return url.SchemeIs(url::kDataScheme); diff --git a/content/browser/child_process_launcher_helper_android.cc b/content/browser/child_process_launcher_helper_android.cc index 3d378851d00c6f..caacdf82314b48 100644 --- a/content/browser/child_process_launcher_helper_android.cc +++ b/content/browser/child_process_launcher_helper_android.cc @@ -181,7 +181,6 @@ ChildProcessTerminationInfo ChildProcessLauncherHelper::GetTerminationInfo( static void JNI_ChildProcessLauncherHelperImpl_SetTerminationInfo( JNIEnv* env, - const JavaParamRef&, jlong termination_info_ptr, jint binding_state, jboolean killed_by_us, diff --git a/content/browser/media/session/media_session_android.cc b/content/browser/media/session/media_session_android.cc index ee5f7ef093850e..fd2f481cbf1e24 100644 --- a/content/browser/media/session/media_session_android.cc +++ b/content/browser/media/session/media_session_android.cc @@ -42,7 +42,6 @@ MediaSessionAndroid::~MediaSessionAndroid() = default; // static ScopedJavaLocalRef JNI_MediaSessionImpl_GetMediaSessionFromWebContents( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_contents_android) { WebContents* contents = WebContents::FromJavaWebContents(j_contents_android); if (!contents) diff --git a/content/browser/memory/memory_monitor_android.cc b/content/browser/memory/memory_monitor_android.cc index 4125dff458af52..3e8a5052ec0d2f 100644 --- a/content/browser/memory/memory_monitor_android.cc +++ b/content/browser/memory/memory_monitor_android.cc @@ -44,7 +44,6 @@ void MemoryMonitorAndroidDelegateImpl::GetMemoryInfo(MemoryInfo* out) { // Called by JNI to populate ActivityManager.MemoryInfo. static void JNI_MemoryMonitorAndroid_GetMemoryInfoCallback( JNIEnv* env, - const base::android::JavaParamRef& clazz, jlong avail_mem, jboolean low_memory, jlong threshold, @@ -66,7 +65,6 @@ const int kTrimMemoryRunningCritical = 15; // Called by JNI. static void JNI_MemoryMonitorAndroid_OnTrimMemory( JNIEnv* env, - const base::android::JavaParamRef& jcaller, jint level) { DCHECK(level >= 0 && level <= kTrimMemoryLevelMax); diff --git a/content/browser/web_contents/web_contents_android.cc b/content/browser/web_contents/web_contents_android.cc index 7a4d8d9d248941..60996ac30ea452 100644 --- a/content/browser/web_contents/web_contents_android.cc +++ b/content/browser/web_contents/web_contents_android.cc @@ -200,7 +200,6 @@ WebContents* WebContents::FromJavaWebContents( // static static void JNI_WebContentsImpl_DestroyWebContents( JNIEnv* env, - const JavaParamRef& clazz, jlong jweb_contents_android_ptr) { WebContentsAndroid* web_contents_android = reinterpret_cast(jweb_contents_android_ptr); @@ -217,7 +216,6 @@ static void JNI_WebContentsImpl_DestroyWebContents( // static ScopedJavaLocalRef JNI_WebContentsImpl_FromNativePtr( JNIEnv* env, - const JavaParamRef& clazz, jlong web_contents_ptr) { WebContentsAndroid* web_contents_android = reinterpret_cast(web_contents_ptr); diff --git a/content/common/android/use_zoom_for_dsf_policy_android.cc b/content/common/android/use_zoom_for_dsf_policy_android.cc index 7d7727618786cd..6f9de9ea4b9d20 100644 --- a/content/common/android/use_zoom_for_dsf_policy_android.cc +++ b/content/common/android/use_zoom_for_dsf_policy_android.cc @@ -12,9 +12,7 @@ using base::android::JavaParamRef; namespace content { -jboolean JNI_UseZoomForDSFPolicy_IsUseZoomForDSFEnabled( - JNIEnv* env, - const JavaParamRef& clazz) { +jboolean JNI_UseZoomForDSFPolicy_IsUseZoomForDSFEnabled(JNIEnv* env) { return IsUseZoomForDSFEnabled(); } diff --git a/content/common/service_manager/service_manager_connection_impl.cc b/content/common/service_manager/service_manager_connection_impl.cc index b49540023c5b01..73da791ca735a8 100644 --- a/content/common/service_manager/service_manager_connection_impl.cc +++ b/content/common/service_manager/service_manager_connection_impl.cc @@ -375,8 +375,7 @@ class ServiceManagerConnectionImpl::IOThreadContext #if defined(OS_ANDROID) // static jint JNI_ServiceManagerConnectionImpl_GetConnectorMessagePipeHandle( - JNIEnv* env, - const base::android::JavaParamRef& jcaller) { + JNIEnv* env) { DCHECK(ServiceManagerConnection::GetForProcess()); service_manager::mojom::ConnectorPtrInfo connector_info; diff --git a/content/public/common/resource_request_body_android.cc b/content/public/common/resource_request_body_android.cc index 8b64025ab31c4a..9e2c72a68756a8 100644 --- a/content/public/common/resource_request_body_android.cc +++ b/content/public/common/resource_request_body_android.cc @@ -35,7 +35,6 @@ JNI_ResourceRequestBody_ConvertResourceRequestBodyToJavaArray( base::android::ScopedJavaLocalRef JNI_ResourceRequestBody_CreateResourceRequestBodyFromBytes( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_post_data) { base::android::ScopedJavaLocalRef result; if (!j_post_data) diff --git a/content/public/test/android/dom_utils.cc b/content/public/test/android/dom_utils.cc index 71f8059ad72491..c74be3acab73c6 100644 --- a/content/public/test/android/dom_utils.cc +++ b/content/public/test/android/dom_utils.cc @@ -17,7 +17,6 @@ namespace content { // of shrinking Blink's view size, otherwise 0. jint JNI_DOMUtils_GetTopControlsShrinkBlinkHeight( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jweb_contents) { WebContents* web_contents = WebContents::FromJavaWebContents(jweb_contents); diff --git a/content/public/test/android/web_contents_utils.cc b/content/public/test/android/web_contents_utils.cc index b32e06acd97cd4..8f69932b4a76b3 100644 --- a/content/public/test/android/web_contents_utils.cc +++ b/content/public/test/android/web_contents_utils.cc @@ -23,7 +23,6 @@ namespace content { // impact Browser UI. void JNI_WebContentsUtils_ReportAllFrameSubmissions( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jweb_contents, jboolean enabled) { WebContents* web_contents = WebContents::FromJavaWebContents(jweb_contents); @@ -35,7 +34,6 @@ void JNI_WebContentsUtils_ReportAllFrameSubmissions( ScopedJavaLocalRef JNI_WebContentsUtils_GetFocusedFrame( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jweb_contents) { WebContents* web_contents = WebContents::FromJavaWebContents(jweb_contents); return static_cast(web_contents->GetFocusedFrame()) @@ -44,7 +42,6 @@ ScopedJavaLocalRef JNI_WebContentsUtils_GetFocusedFrame( void JNI_WebContentsUtils_EvaluateJavaScriptWithUserGesture( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jweb_contents, const JavaParamRef& script) { WebContents* web_contents = WebContents::FromJavaWebContents(jweb_contents); diff --git a/content/shell/android/linker_test_apk/chromium_linker_test_linker_tests.cc b/content/shell/android/linker_test_apk/chromium_linker_test_linker_tests.cc index 91b5a03d889822..360e51614a9ff2 100644 --- a/content/shell/android/linker_test_apk/chromium_linker_test_linker_tests.cc +++ b/content/shell/android/linker_test_apk/chromium_linker_test_linker_tests.cc @@ -172,14 +172,12 @@ jboolean RunChecks(bool in_browser_process, bool need_relros) { } // namespace jboolean JNI_LinkerTests_CheckForSharedRelros(JNIEnv* env, - const JavaParamRef& clazz, jboolean in_browser_process) { return RunChecks(in_browser_process, true); } jboolean JNI_LinkerTests_CheckForNoSharedRelros( JNIEnv* env, - const JavaParamRef& clazz, jboolean in_browser_process) { return RunChecks(in_browser_process, false); } diff --git a/content/shell/android/shell_manager.cc b/content/shell/android/shell_manager.cc index df89343f4ce268..d58e9a70b91387 100644 --- a/content/shell/android/shell_manager.cc +++ b/content/shell/android/shell_manager.cc @@ -48,13 +48,11 @@ void RemoveShellView(const JavaRef& shell_view) { } static void JNI_ShellManager_Init(JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& obj) { g_global_state.Get().j_shell_manager.Reset(obj); } void JNI_ShellManager_LaunchShell(JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& jurl) { ShellBrowserContext* browserContext = ShellContentBrowserClient::Get()->browser_context(); diff --git a/content/shell/browser/shell_android.cc b/content/shell/browser/shell_android.cc index 78c6cae6132795..0c1834ce225081 100644 --- a/content/shell/browser/shell_android.cc +++ b/content/shell/browser/shell_android.cc @@ -108,7 +108,6 @@ void Shell::Close() { // static void JNI_Shell_CloseShell(JNIEnv* env, - const JavaParamRef& clazz, jlong shellPtr) { Shell* shell = reinterpret_cast(shellPtr); shell->Close(); diff --git a/mojo/public/java/system/javatests/mojo_test_rule.cc b/mojo/public/java/system/javatests/mojo_test_rule.cc index 67576bbfac10f0..be37af1bb6ede2 100644 --- a/mojo/public/java/system/javatests/mojo_test_rule.cc +++ b/mojo/public/java/system/javatests/mojo_test_rule.cc @@ -32,8 +32,7 @@ struct TestEnvironment { namespace mojo { namespace android { -static void JNI_MojoTestRule_InitCore(JNIEnv* env, - const JavaParamRef& clazz) { +static void JNI_MojoTestRule_InitCore(JNIEnv* env) { mojo::core::Init(); } diff --git a/mojo/public/java/system/javatests/validation_test_util.cc b/mojo/public/java/system/javatests/validation_test_util.cc index 277a2d5b634871..7aa1098ead2f52 100644 --- a/mojo/public/java/system/javatests/validation_test_util.cc +++ b/mojo/public/java/system/javatests/validation_test_util.cc @@ -20,7 +20,6 @@ namespace android { ScopedJavaLocalRef JNI_ValidationTestUtil_ParseData( JNIEnv* env, - const JavaParamRef& jcaller, const JavaParamRef& data_as_string) { std::string input = base::android::ConvertJavaStringToUTF8(env, data_as_string); diff --git a/net/android/android_http_util.cc b/net/android/android_http_util.cc index 5b42fd0a2bc564..3bcc5cffd61f82 100644 --- a/net/android/android_http_util.cc +++ b/net/android/android_http_util.cc @@ -15,7 +15,6 @@ namespace net { jboolean JNI_HttpUtil_IsAllowedHeader( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& j_header_name, const JavaParamRef& j_header_value) { std::string header_name(ConvertJavaStringToUTF8(env, j_header_name)); diff --git a/net/android/gurl_utils.cc b/net/android/gurl_utils.cc index 9dbb4e91eb04a6..68d65b3c5d3806 100644 --- a/net/android/gurl_utils.cc +++ b/net/android/gurl_utils.cc @@ -13,7 +13,6 @@ namespace net { ScopedJavaLocalRef JNI_GURLUtils_GetOrigin( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& url) { GURL host(base::android::ConvertJavaStringToUTF16(env, url)); @@ -22,7 +21,6 @@ ScopedJavaLocalRef JNI_GURLUtils_GetOrigin( ScopedJavaLocalRef JNI_GURLUtils_GetScheme( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& url) { GURL host(base::android::ConvertJavaStringToUTF16(env, url)); diff --git a/net/cert/x509_util_android.cc b/net/cert/x509_util_android.cc index 2ef23d21ed16ad..3ad4bdf65f9d7a 100644 --- a/net/cert/x509_util_android.cc +++ b/net/cert/x509_util_android.cc @@ -9,8 +9,7 @@ using base::android::JavaParamRef; namespace net { -void JNI_X509Util_NotifyKeyChainChanged(JNIEnv* env, - const JavaParamRef& clazz) { +void JNI_X509Util_NotifyKeyChainChanged(JNIEnv* env) { CertDatabase::GetInstance()->NotifyObserversCertDBChanged(); } diff --git a/remoting/client/jni/jni_oauth_token_getter.cc b/remoting/client/jni/jni_oauth_token_getter.cc index abeaad3f850951..3198018b25c63a 100644 --- a/remoting/client/jni/jni_oauth_token_getter.cc +++ b/remoting/client/jni/jni_oauth_token_getter.cc @@ -16,7 +16,6 @@ namespace remoting { static void JNI_JniOAuthTokenGetter_ResolveOAuthTokenCallback( JNIEnv* env, - const JavaParamRef& clazz, jlong callback_ptr, jint jni_status, const JavaParamRef& user_email, diff --git a/remoting/client/jni/jni_runtime_delegate.cc b/remoting/client/jni/jni_runtime_delegate.cc index 20ce7f389de6aa..21d8dd39034b96 100644 --- a/remoting/client/jni/jni_runtime_delegate.cc +++ b/remoting/client/jni/jni_runtime_delegate.cc @@ -32,8 +32,7 @@ namespace remoting { // Implementation of stubs defined in JniInterface_jni.h. These are the entry // points for JNI calls from Java into C++. -static void JNI_JniInterface_LoadNative(JNIEnv* env, - const JavaParamRef& clazz) { +static void JNI_JniInterface_LoadNative(JNIEnv* env) { base::CommandLine::Init(0, nullptr); // Create the singleton now so that the Chromoting threads will be set up. diff --git a/services/data_decoder/public/cpp/json_sanitizer_android.cc b/services/data_decoder/public/cpp/json_sanitizer_android.cc index 23b3e6a6419413..f9648759fed8e5 100644 --- a/services/data_decoder/public/cpp/json_sanitizer_android.cc +++ b/services/data_decoder/public/cpp/json_sanitizer_android.cc @@ -88,7 +88,6 @@ void JsonSanitizerAndroid::OnError(const std::string& error) { } // namespace void JNI_JsonSanitizer_OnSuccess(JNIEnv* env, - const JavaParamRef& clazz, jlong jsanitizer, const JavaParamRef& json) { JsonSanitizerAndroid* sanitizer = @@ -97,7 +96,6 @@ void JNI_JsonSanitizer_OnSuccess(JNIEnv* env, } void JNI_JsonSanitizer_OnError(JNIEnv* env, - const JavaParamRef& clazz, jlong jsanitizer, const JavaParamRef& error) { JsonSanitizerAndroid* sanitizer = diff --git a/services/device/geolocation/location_api_adapter_android.cc b/services/device/geolocation/location_api_adapter_android.cc index ae326eb8e33c44..6f96bf5657b399 100644 --- a/services/device/geolocation/location_api_adapter_android.cc +++ b/services/device/geolocation/location_api_adapter_android.cc @@ -19,7 +19,6 @@ using device::LocationApiAdapterAndroid; static void JNI_LocationProviderAdapter_NewLocationAvailable( JNIEnv* env, - const JavaParamRef&, jdouble latitude, jdouble longitude, jdouble time_stamp, @@ -38,7 +37,6 @@ static void JNI_LocationProviderAdapter_NewLocationAvailable( static void JNI_LocationProviderAdapter_NewErrorAvailable( JNIEnv* env, - const JavaParamRef&, const JavaParamRef& message) { LocationApiAdapterAndroid::OnNewErrorAvailable(env, message); } diff --git a/testing/android/native_test/main_runner.cc b/testing/android/native_test/main_runner.cc index 41bdfd8dedcc6f..1200a58a30caca 100644 --- a/testing/android/native_test/main_runner.cc +++ b/testing/android/native_test/main_runner.cc @@ -16,7 +16,6 @@ namespace android { static jint JNI_MainRunner_RunMain( JNIEnv* env, - const base::android::JavaParamRef& jcaller, const base::android::JavaParamRef& command_line) { // Guards against process being reused. // In most cases, running main again will cause problems (static variables, diff --git a/ui/android/resources/resource_factory.cc b/ui/android/resources/resource_factory.cc index 7a40a18e877b88..aa3221936d0d20 100644 --- a/ui/android/resources/resource_factory.cc +++ b/ui/android/resources/resource_factory.cc @@ -10,15 +10,12 @@ using base::android::JavaParamRef; namespace ui { -jlong JNI_ResourceFactory_CreateBitmapResource( - JNIEnv* env, - const JavaParamRef& clazz) { +jlong JNI_ResourceFactory_CreateBitmapResource(JNIEnv* env) { return reinterpret_cast(new Resource()); } jlong JNI_ResourceFactory_CreateNinePatchBitmapResource( JNIEnv* env, - const JavaParamRef& clazz, jint padding_left, jint padding_top, jint padding_right, diff --git a/ui/base/l10n/l10n_util_android.cc b/ui/base/l10n/l10n_util_android.cc index cd3e0e06f35032..9b43a7b26a6bfb 100644 --- a/ui/base/l10n/l10n_util_android.cc +++ b/ui/base/l10n/l10n_util_android.cc @@ -24,7 +24,6 @@ namespace l10n_util { jint JNI_LocalizationUtils_GetFirstStrongCharacterDirection( JNIEnv* env, - const JavaParamRef& clazz, const JavaParamRef& string) { return base::i18n::GetFirstStrongCharacterDirection( base::android::ConvertJavaStringToUTF16(env, string)); @@ -99,7 +98,6 @@ base::string16 GetDisplayNameForLocale(const std::string& locale, ScopedJavaLocalRef JNI_LocalizationUtils_GetDurationString( JNIEnv* env, - const JavaParamRef& clazz, jlong timeInMillis) { ScopedJavaLocalRef jtime_remaining = base::android::ConvertUTF16ToJavaString(