Browse Source

chore: comment out unused arg names

autofix clang-tidy misc-unused-parameters warnings
Charles Kerr 3 months ago
parent
commit
d11f0c381c
100 changed files with 429 additions and 421 deletions
  1. 1 1
      shell/app/electron_content_client.cc
  2. 1 1
      shell/app/electron_main_win.cc
  3. 1 1
      shell/app/uv_task_runner.cc
  4. 12 12
      shell/browser/api/electron_api_app.cc
  5. 2 2
      shell/browser/api/electron_api_auto_updater.cc
  6. 3 3
      shell/browser/api/electron_api_base_window.cc
  7. 2 2
      shell/browser/api/electron_api_browser_window.cc
  8. 2 2
      shell/browser/api/electron_api_content_tracing.cc
  9. 1 1
      shell/browser/api/electron_api_cookies.cc
  10. 2 2
      shell/browser/api/electron_api_crash_reporter.cc
  11. 2 2
      shell/browser/api/electron_api_debugger.cc
  12. 3 2
      shell/browser/api/electron_api_desktop_capturer.cc
  13. 2 2
      shell/browser/api/electron_api_dialog.cc
  14. 2 2
      shell/browser/api/electron_api_event_emitter.cc
  15. 3 3
      shell/browser/api/electron_api_global_shortcut.cc
  16. 5 5
      shell/browser/api/electron_api_menu.cc
  17. 1 1
      shell/browser/api/electron_api_menu_views.cc
  18. 4 4
      shell/browser/api/electron_api_native_theme.cc
  19. 2 2
      shell/browser/api/electron_api_notification.cc
  20. 3 3
      shell/browser/api/electron_api_power_monitor.cc
  21. 3 3
      shell/browser/api/electron_api_power_save_blocker.cc
  22. 2 2
      shell/browser/api/electron_api_printing.cc
  23. 1 1
      shell/browser/api/electron_api_protocol.cc
  24. 2 2
      shell/browser/api/electron_api_push_notifications.cc
  25. 2 2
      shell/browser/api/electron_api_safe_storage.cc
  26. 3 3
      shell/browser/api/electron_api_screen.cc
  27. 1 1
      shell/browser/api/electron_api_service_worker_context.cc
  28. 8 7
      shell/browser/api/electron_api_session.cc
  29. 2 2
      shell/browser/api/electron_api_system_preferences.cc
  30. 6 6
      shell/browser/api/electron_api_tray.cc
  31. 2 2
      shell/browser/api/electron_api_utility_process.cc
  32. 3 3
      shell/browser/api/electron_api_view.cc
  33. 48 48
      shell/browser/api/electron_api_web_contents.cc
  34. 1 1
      shell/browser/api/electron_api_web_contents_view.cc
  35. 3 3
      shell/browser/api/electron_api_web_frame_main.cc
  36. 1 1
      shell/browser/api/electron_api_web_request.cc
  37. 1 1
      shell/browser/api/electron_api_web_view_manager.cc
  38. 1 1
      shell/browser/api/frame_subscriber.cc
  39. 2 2
      shell/browser/api/message_port.cc
  40. 1 1
      shell/browser/api/save_page_handler.cc
  41. 2 2
      shell/browser/api/views/electron_api_image_view.cc
  42. 3 2
      shell/browser/auto_updater.cc
  43. 1 1
      shell/browser/badging/badge_manager_factory.cc
  44. 27 27
      shell/browser/bluetooth/electron_bluetooth_delegate.cc
  45. 1 1
      shell/browser/browser.cc
  46. 5 5
      shell/browser/browser_linux.cc
  47. 2 4
      shell/browser/certificate_manager_model.cc
  48. 42 40
      shell/browser/electron_browser_client.cc
  49. 2 5
      shell/browser/electron_browser_context.cc
  50. 2 2
      shell/browser/electron_browser_main_parts.cc
  51. 1 1
      shell/browser/electron_download_manager_delegate.cc
  52. 1 1
      shell/browser/electron_permission_manager.cc
  53. 1 1
      shell/browser/electron_speech_recognition_manager_delegate.cc
  54. 1 1
      shell/browser/electron_web_ui_controller_factory.cc
  55. 17 17
      shell/browser/extensions/api/management/electron_management_api_delegate.cc
  56. 2 2
      shell/browser/extensions/api/runtime/electron_runtime_api_delegate.cc
  57. 3 3
      shell/browser/extensions/api/scripting/scripting_api.cc
  58. 2 2
      shell/browser/extensions/api/tabs/tabs_api.cc
  59. 7 7
      shell/browser/extensions/electron_extension_host_delegate.cc
  60. 8 5
      shell/browser/extensions/electron_extension_loader.cc
  61. 11 10
      shell/browser/extensions/electron_extension_system.cc
  62. 1 1
      shell/browser/extensions/electron_extensions_api_client.cc
  63. 16 16
      shell/browser/extensions/electron_extensions_browser_client.cc
  64. 1 1
      shell/browser/extensions/electron_kiosk_delegate.cc
  65. 13 13
      shell/browser/extensions/electron_messaging_delegate.cc
  66. 4 4
      shell/browser/extensions/electron_process_manager_delegate.cc
  67. 2 2
      shell/browser/file_select_helper.cc
  68. 10 10
      shell/browser/file_system_access/file_system_access_permission_context.cc
  69. 2 2
      shell/browser/hid/electron_hid_delegate.cc
  70. 3 3
      shell/browser/lib/bluetooth_chooser.cc
  71. 2 2
      shell/browser/media/media_capture_devices_dispatcher.cc
  72. 2 1
      shell/browser/microtasks_runner.cc
  73. 2 2
      shell/browser/native_window.cc
  74. 12 12
      shell/browser/native_window_views.cc
  75. 2 2
      shell/browser/net/cert_verifier_client.cc
  76. 2 2
      shell/browser/net/electron_url_loader_factory.cc
  77. 1 1
      shell/browser/net/network_context_service.cc
  78. 3 3
      shell/browser/net/proxying_websocket.cc
  79. 1 1
      shell/browser/net/resolve_host_function.cc
  80. 1 1
      shell/browser/net/resolve_proxy_helper.cc
  81. 12 12
      shell/browser/net/url_loader_network_observer.cc
  82. 2 2
      shell/browser/net/url_pipe_loader.cc
  83. 5 4
      shell/browser/notifications/linux/libnotify_notification.cc
  84. 2 2
      shell/browser/notifications/platform_notification_service.cc
  85. 4 4
      shell/browser/osr/osr_render_widget_host_view.cc
  86. 1 1
      shell/browser/osr/osr_video_consumer.cc
  87. 4 4
      shell/browser/printing/print_view_manager_electron.cc
  88. 1 1
      shell/browser/printing/printing_utils.cc
  89. 1 1
      shell/browser/relauncher.cc
  90. 1 1
      shell/browser/relauncher_linux.cc
  91. 2 2
      shell/browser/serial/serial_chooser_context.cc
  92. 5 5
      shell/browser/special_storage_policy.cc
  93. 2 2
      shell/browser/ui/autofill_popup.cc
  94. 3 2
      shell/browser/ui/certificate_trust_win.cc
  95. 4 4
      shell/browser/ui/devtools_manager_delegate.cc
  96. 1 1
      shell/browser/ui/devtools_ui_bundle_data_source.cc
  97. 2 2
      shell/browser/ui/electron_desktop_window_tree_host_linux.cc
  98. 1 1
      shell/browser/ui/file_dialog_linux.cc
  99. 7 6
      shell/browser/ui/inspectable_web_contents.cc
  100. 1 1
      shell/browser/ui/inspectable_web_contents_view.cc

+ 1 - 1
shell/app/electron_content_client.cc

@@ -187,7 +187,7 @@ void ElectronContentClient::AddPlugins(
 
 void ElectronContentClient::AddContentDecryptionModules(
     std::vector<content::CdmInfo>* cdms,
-    std::vector<media::CdmHostFilePath>* cdm_host_file_paths) {
+    std::vector<media::CdmHostFilePath>* /*cdm_host_file_paths*/) {
   if (cdms) {
 #if BUILDFLAG(ENABLE_WIDEVINE)
     base::FilePath cdm_path;

+ 1 - 1
shell/app/electron_main_win.cc

@@ -86,7 +86,7 @@ void WINAPI FiberBinder(void* params) {
 }
 #endif  // defined(ARCH_CPU_32_BITS)
 
-int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) {
+int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* /*cmd*/, int) {
 #if defined(ARCH_CPU_32_BITS)
   enum class FiberStatus { kConvertFailed, kCreateFiberFailed, kSuccess };
   FiberStatus fiber_status = FiberStatus::kSuccess;

+ 1 - 1
shell/app/uv_task_runner.cc

@@ -15,7 +15,7 @@ UvTaskRunner::UvTaskRunner(uv_loop_t* loop) : loop_{loop} {}
 
 UvTaskRunner::~UvTaskRunner() = default;
 
-bool UvTaskRunner::PostDelayedTask(const base::Location& from_here,
+bool UvTaskRunner::PostDelayedTask(const base::Location& /*from_here*/,
                                    base::OnceClosure task,
                                    base::TimeDelta delay) {
   auto on_timeout = [](uv_timer_t* timer) {

+ 12 - 12
shell/browser/api/electron_api_app.cc

@@ -690,20 +690,20 @@ void App::OnDidResignActive() {
 
 bool App::CanCreateWindow(
     content::RenderFrameHost* opener,
-    const GURL& opener_url,
-    const GURL& opener_top_level_frame_url,
-    const url::Origin& source_origin,
-    content::mojom::WindowContainerType container_type,
+    const GURL& /*opener_url*/,
+    const GURL& /*opener_top_level_frame_url*/,
+    const url::Origin& /*source_origin*/,
+    content::mojom::WindowContainerType /*container_type*/,
     const GURL& target_url,
     const content::Referrer& referrer,
     const std::string& frame_name,
     WindowOpenDisposition disposition,
-    const blink::mojom::WindowFeatures& features,
+    const blink::mojom::WindowFeatures& /*features*/,
     const std::string& raw_features,
     const scoped_refptr<network::ResourceRequestBody>& body,
-    bool user_gesture,
-    bool opener_suppressed,
-    bool* no_javascript_access) {
+    bool /*user_gesture*/,
+    bool /*opener_suppressed*/,
+    bool* /*no_javascript_access*/) {
   v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
   v8::HandleScope handle_scope(isolate);
   content::WebContents* web_contents =
@@ -726,7 +726,7 @@ void App::AllowCertificateError(
     const net::SSLInfo& ssl_info,
     const GURL& request_url,
     bool is_main_frame_request,
-    bool strict_enforcement,
+    bool /*strict_enforcement*/,
     base::OnceCallback<void(content::CertificateRequestResultType)> callback) {
   auto adapted_callback = base::AdaptCallbackForRepeating(std::move(callback));
   v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
@@ -742,8 +742,8 @@ void App::AllowCertificateError(
 }
 
 base::OnceClosure App::SelectClientCertificate(
-    content::BrowserContext* browser_context,
-    int process_id,
+    content::BrowserContext* /*browser_context*/,
+    int /*process_id*/,
     content::WebContents* web_contents,
     net::SSLCertRequestInfo* cert_request_info,
     net::ClientCertIdentityList identities,
@@ -1827,7 +1827,7 @@ namespace {
 void Initialize(v8::Local<v8::Object> exports,
                 v8::Local<v8::Value> unused,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   v8::Isolate* isolate = context->GetIsolate();
   gin_helper::Dictionary dict(isolate, exports);
   dict.Set("app", electron::api::App::Create(isolate));

+ 2 - 2
shell/browser/api/electron_api_auto_updater.cc

@@ -152,9 +152,9 @@ namespace {
 using electron::api::AutoUpdater;
 
 void Initialize(v8::Local<v8::Object> exports,
-                v8::Local<v8::Value> unused,
+                v8::Local<v8::Value> /*unused*/,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   v8::Isolate* isolate = context->GetIsolate();
   gin_helper::Dictionary dict(isolate, exports);
   dict.Set("autoUpdater", AutoUpdater::Create(isolate));

+ 3 - 3
shell/browser/api/electron_api_base_window.cc

@@ -1001,7 +1001,7 @@ bool BaseWindow::IsModal() const {
   return window_->is_modal();
 }
 
-bool BaseWindow::SetThumbarButtons(gin_helper::Arguments* args) {
+bool BaseWindow::SetThumbarButtons(gin_helper::Arguments* /*args*/) {
 #if BUILDFLAG(IS_WIN)
   std::vector<TaskbarHost::ThumbarButton> buttons;
   if (!args->GetNext(&buttons)) {
@@ -1353,9 +1353,9 @@ namespace {
 using electron::api::BaseWindow;
 
 void Initialize(v8::Local<v8::Object> exports,
-                v8::Local<v8::Value> unused,
+                v8::Local<v8::Value> /*unused*/,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   v8::Isolate* isolate = context->GetIsolate();
   BaseWindow::SetConstructor(isolate, base::BindRepeating(&BaseWindow::New));
 

+ 2 - 2
shell/browser/api/electron_api_browser_window.cc

@@ -325,9 +325,9 @@ namespace {
 using electron::api::BrowserWindow;
 
 void Initialize(v8::Local<v8::Object> exports,
-                v8::Local<v8::Value> unused,
+                v8::Local<v8::Value> /*unused*/,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   v8::Isolate* isolate = context->GetIsolate();
   gin_helper::Dictionary dict(isolate, exports);
   dict.Set("BrowserWindow",

+ 2 - 2
shell/browser/api/electron_api_content_tracing.cc

@@ -170,9 +170,9 @@ v8::Local<v8::Promise> GetTraceBufferUsage(v8::Isolate* isolate) {
 }
 
 void Initialize(v8::Local<v8::Object> exports,
-                v8::Local<v8::Value> unused,
+                v8::Local<v8::Value> /*unused*/,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   gin_helper::Dictionary dict(context->GetIsolate(), exports);
   dict.SetMethod("getCategories", &GetCategories);
   dict.SetMethod("startRecording", &StartTracing);

+ 1 - 1
shell/browser/api/electron_api_cookies.cc

@@ -350,7 +350,7 @@ v8::Local<v8::Promise> Cookies::Remove(v8::Isolate* isolate,
   manager->DeleteCookies(
       std::move(cookie_deletion_filter),
       base::BindOnce(
-          [](gin_helper::Promise<void> promise, uint32_t num_deleted) {
+          [](gin_helper::Promise<void> promise, uint32_t /*num_deleted*/) {
             gin_helper::Promise<void>::ResolvePromise(std::move(promise));
           },
           std::move(promise)));

+ 2 - 2
shell/browser/api/electron_api_crash_reporter.cc

@@ -258,9 +258,9 @@ v8::Local<v8::Value> GetParameters(v8::Isolate* isolate) {
 }
 
 void Initialize(v8::Local<v8::Object> exports,
-                v8::Local<v8::Value> unused,
+                v8::Local<v8::Value> /*unused*/,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   gin_helper::Dictionary dict(context->GetIsolate(), exports);
   dict.SetMethod("start", &electron::api::crash_reporter::Start);
 #if IS_MAS_BUILD()

+ 2 - 2
shell/browser/api/electron_api_debugger.cc

@@ -25,7 +25,7 @@ namespace electron::api {
 
 gin::WrapperInfo Debugger::kWrapperInfo = {gin::kEmbedderNativeGin};
 
-Debugger::Debugger(v8::Isolate* isolate, content::WebContents* web_contents)
+Debugger::Debugger(v8::Isolate* /*isolate*/, content::WebContents* web_contents)
     : content::WebContentsObserver(web_contents), web_contents_(web_contents) {}
 
 Debugger::~Debugger() = default;
@@ -79,7 +79,7 @@ void Debugger::DispatchProtocolMessage(DevToolsAgentHost* agent_host,
   }
 }
 
-void Debugger::RenderFrameHostChanged(content::RenderFrameHost* old_rfh,
+void Debugger::RenderFrameHostChanged(content::RenderFrameHost* /*old_rfh*/,
                                       content::RenderFrameHost* new_rfh) {
   if (agent_host_) {
     agent_host_->DisconnectWebContents();

+ 3 - 2
shell/browser/api/electron_api_desktop_capturer.cc

@@ -238,7 +238,8 @@ void DesktopCapturer::DesktopListListener::OnDelegatedSourceListSelection() {
   }
 }
 
-void DesktopCapturer::DesktopListListener::OnSourceThumbnailChanged(int index) {
+void DesktopCapturer::DesktopListListener::OnSourceThumbnailChanged(
+    int /*index*/) {
   if (have_selection_) {
     // This is called every time a thumbnail is refreshed. Reset variable to
     // ensure that the callback is not run again.
@@ -527,7 +528,7 @@ namespace {
 void Initialize(v8::Local<v8::Object> exports,
                 v8::Local<v8::Value> unused,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   gin_helper::Dictionary dict(context->GetIsolate(), exports);
   dict.SetMethod("createDesktopCapturer",
                  &electron::api::DesktopCapturer::Create);

+ 2 - 2
shell/browser/api/electron_api_dialog.cc

@@ -87,9 +87,9 @@ v8::Local<v8::Promise> ShowSaveDialog(
 }
 
 void Initialize(v8::Local<v8::Object> exports,
-                v8::Local<v8::Value> unused,
+                v8::Local<v8::Value> /*unused*/,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   v8::Isolate* isolate = context->GetIsolate();
   gin_helper::Dictionary dict(isolate, exports);
   dict.SetMethod("showMessageBoxSync", &ShowMessageBoxSync);

+ 2 - 2
shell/browser/api/electron_api_event_emitter.cc

@@ -24,9 +24,9 @@ void SetEventEmitterPrototype(v8::Isolate* isolate,
 }
 
 void Initialize(v8::Local<v8::Object> exports,
-                v8::Local<v8::Value> unused,
+                v8::Local<v8::Value> /*unused*/,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   v8::Isolate* isolate = context->GetIsolate();
 
   gin::Dictionary dict(isolate, exports);

+ 3 - 3
shell/browser/api/electron_api_global_shortcut.cc

@@ -45,7 +45,7 @@ namespace electron::api {
 
 gin::WrapperInfo GlobalShortcut::kWrapperInfo = {gin::kEmbedderNativeGin};
 
-GlobalShortcut::GlobalShortcut(v8::Isolate* isolate) {}
+GlobalShortcut::GlobalShortcut(v8::Isolate* /*isolate*/) {}
 
 GlobalShortcut::~GlobalShortcut() {
   UnregisterAll();
@@ -177,9 +177,9 @@ const char* GlobalShortcut::GetTypeName() {
 namespace {
 
 void Initialize(v8::Local<v8::Object> exports,
-                v8::Local<v8::Value> unused,
+                v8::Local<v8::Value> /*unused*/,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   v8::Isolate* isolate = context->GetIsolate();
   gin::Dictionary dict(isolate, exports);
   dict.Set("globalShortcut", electron::api::GlobalShortcut::Create(isolate));

+ 5 - 5
shell/browser/api/electron_api_menu.cc

@@ -50,7 +50,7 @@ namespace electron::api {
 
 gin::WrapperInfo Menu::kWrapperInfo = {gin::kEmbedderNativeGin};
 
-Menu::Menu(gin::Arguments* args)
+Menu::Menu(gin::Arguments* /*args*/)
     : model_(std::make_unique<ElectronMenuModel>(this)) {
   model_->AddObserver(this);
 
@@ -141,7 +141,7 @@ void Menu::ExecuteCommand(int command_id, int flags) {
                          CreateEventFromFlags(flags), command_id);
 }
 
-void Menu::OnMenuWillShow(ui::SimpleMenuModel* source) {
+void Menu::OnMenuWillShow(ui::SimpleMenuModel* /*source*/) {
   v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
   v8::HandleScope scope(isolate);
   gin_helper::CallMethod(isolate, const_cast<Menu*>(this), "_menuWillShow");
@@ -155,7 +155,7 @@ base::OnceClosure Menu::BindSelfToClosure(base::OnceClosure callback) {
   if (GetWrapper(isolate).ToLocal(&self)) {
     v8::Global<v8::Value> ref(isolate, self);
     return base::BindOnce(
-        [](base::OnceClosure callback, v8::Global<v8::Value> ref) {
+        [](base::OnceClosure callback, v8::Global<v8::Value> /*ref*/) {
           std::move(callback).Run();
         },
         std::move(callback), std::move(ref));
@@ -315,9 +315,9 @@ namespace {
 using electron::api::Menu;
 
 void Initialize(v8::Local<v8::Object> exports,
-                v8::Local<v8::Value> unused,
+                v8::Local<v8::Value> /*unused*/,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   v8::Isolate* isolate = context->GetIsolate();
 
   gin_helper::Dictionary dict(isolate, exports);

+ 1 - 1
shell/browser/api/electron_api_menu_views.cc

@@ -22,7 +22,7 @@ MenuViews::~MenuViews() = default;
 void MenuViews::PopupAt(BaseWindow* window,
                         int x,
                         int y,
-                        int positioning_item,
+                        int /*positioning_item*/,
                         ui::mojom::MenuSourceType source_type,
                         base::OnceClosure callback) {
   auto* native_window = static_cast<NativeWindowViews*>(window->window());

+ 4 - 4
shell/browser/api/electron_api_native_theme.cc

@@ -19,7 +19,7 @@ namespace electron::api {
 
 gin::WrapperInfo NativeTheme::kWrapperInfo = {gin::kEmbedderNativeGin};
 
-NativeTheme::NativeTheme(v8::Isolate* isolate,
+NativeTheme::NativeTheme(v8::Isolate* /*isolate*/,
                          ui::NativeTheme* ui_theme,
                          ui::NativeTheme* web_theme)
     : ui_theme_(ui_theme), web_theme_(web_theme) {
@@ -34,7 +34,7 @@ void NativeTheme::OnNativeThemeUpdatedOnUI() {
   Emit("updated");
 }
 
-void NativeTheme::OnNativeThemeUpdated(ui::NativeTheme* theme) {
+void NativeTheme::OnNativeThemeUpdated(ui::NativeTheme* /*theme*/) {
   content::GetUIThreadTaskRunner({})->PostTask(
       FROM_HERE, base::BindOnce(&NativeTheme::OnNativeThemeUpdatedOnUI,
                                 base::Unretained(this)));
@@ -127,9 +127,9 @@ namespace {
 using electron::api::NativeTheme;
 
 void Initialize(v8::Local<v8::Object> exports,
-                v8::Local<v8::Value> unused,
+                v8::Local<v8::Value> /*unused*/,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   v8::Isolate* isolate = context->GetIsolate();
   gin::Dictionary dict(isolate, exports);
   dict.Set("nativeTheme", NativeTheme::Create(isolate));

+ 2 - 2
shell/browser/api/electron_api_notification.cc

@@ -243,9 +243,9 @@ namespace {
 using electron::api::Notification;
 
 void Initialize(v8::Local<v8::Object> exports,
-                v8::Local<v8::Value> unused,
+                v8::Local<v8::Value> /*unused*/,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   v8::Isolate* isolate = context->GetIsolate();
   gin_helper::Dictionary dict(isolate, exports);
   dict.Set("Notification", Notification::GetConstructor(context));

+ 3 - 3
shell/browser/api/electron_api_power_monitor.cc

@@ -62,7 +62,7 @@ namespace electron::api {
 
 gin::WrapperInfo PowerMonitor::kWrapperInfo = {gin::kEmbedderNativeGin};
 
-PowerMonitor::PowerMonitor(v8::Isolate* isolate) {
+PowerMonitor::PowerMonitor(v8::Isolate* /*isolate*/) {
 #if BUILDFLAG(IS_MAC)
   Browser::Get()->SetShutdownHandler(base::BindRepeating(
       &PowerMonitor::ShouldShutdown, base::Unretained(this)));
@@ -193,9 +193,9 @@ base::PowerThermalObserver::DeviceThermalState GetCurrentThermalState() {
 }
 
 void Initialize(v8::Local<v8::Object> exports,
-                v8::Local<v8::Value> unused,
+                v8::Local<v8::Value> /*unused*/,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   v8::Isolate* isolate = context->GetIsolate();
   gin_helper::Dictionary dict(isolate, exports);
   dict.SetMethod("createPowerMonitor",

+ 3 - 3
shell/browser/api/electron_api_power_save_blocker.cc

@@ -43,7 +43,7 @@ namespace electron::api {
 
 gin::WrapperInfo PowerSaveBlocker::kWrapperInfo = {gin::kEmbedderNativeGin};
 
-PowerSaveBlocker::PowerSaveBlocker(v8::Isolate* isolate)
+PowerSaveBlocker::PowerSaveBlocker(v8::Isolate* /*isolate*/)
     : current_lock_type_(device::mojom::WakeLockType::kPreventAppSuspension) {}
 
 PowerSaveBlocker::~PowerSaveBlocker() = default;
@@ -135,9 +135,9 @@ const char* PowerSaveBlocker::GetTypeName() {
 namespace {
 
 void Initialize(v8::Local<v8::Object> exports,
-                v8::Local<v8::Value> unused,
+                v8::Local<v8::Value> /*unused*/,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   v8::Isolate* isolate = context->GetIsolate();
   gin::Dictionary dict(isolate, exports);
   dict.Set("powerSaveBlocker",

+ 2 - 2
shell/browser/api/electron_api_printing.cc

@@ -77,9 +77,9 @@ using electron::api::GetPrinterListAsync;
 #endif
 
 void Initialize(v8::Local<v8::Object> exports,
-                v8::Local<v8::Value> unused,
+                v8::Local<v8::Value> /*unused*/,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   v8::Isolate* isolate = context->GetIsolate();
   gin_helper::Dictionary dict(isolate, exports);
 #if BUILDFLAG(ENABLE_PRINTING)

+ 1 - 1
shell/browser/api/electron_api_protocol.cc

@@ -364,7 +364,7 @@ void RegisterSchemesAsPrivileged(gin_helper::ErrorThrower thrower,
 void Initialize(v8::Local<v8::Object> exports,
                 v8::Local<v8::Value> unused,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   v8::Isolate* isolate = context->GetIsolate();
   gin_helper::Dictionary dict(isolate, exports);
   dict.Set("Protocol", electron::api::Protocol::GetConstructor(context));

+ 2 - 2
shell/browser/api/electron_api_push_notifications.cc

@@ -57,9 +57,9 @@ const char* PushNotifications::GetTypeName() {
 namespace {
 
 void Initialize(v8::Local<v8::Object> exports,
-                v8::Local<v8::Value> unused,
+                v8::Local<v8::Value> /*unused*/,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   v8::Isolate* isolate = context->GetIsolate();
   gin::Dictionary dict(isolate, exports);
   dict.Set("pushNotifications",

+ 2 - 2
shell/browser/api/electron_api_safe_storage.cc

@@ -128,9 +128,9 @@ std::string DecryptString(v8::Isolate* isolate, v8::Local<v8::Value> buffer) {
 }  // namespace
 
 void Initialize(v8::Local<v8::Object> exports,
-                v8::Local<v8::Value> unused,
+                v8::Local<v8::Value> /*unused*/,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   v8::Isolate* isolate = context->GetIsolate();
   gin_helper::Dictionary dict(isolate, exports);
   dict.SetMethod("decryptString", &DecryptString);

+ 3 - 3
shell/browser/api/electron_api_screen.cc

@@ -64,7 +64,7 @@ void DelayEmitWithMetrics(Screen* screen,
 
 }  // namespace
 
-Screen::Screen(v8::Isolate* isolate, display::Screen* screen)
+Screen::Screen(v8::Isolate* /*isolate*/, display::Screen* screen)
     : screen_(screen) {
   screen_->AddObserver(this);
 }
@@ -173,9 +173,9 @@ namespace {
 using electron::api::Screen;
 
 void Initialize(v8::Local<v8::Object> exports,
-                v8::Local<v8::Value> unused,
+                v8::Local<v8::Value> /*unused*/,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   v8::Isolate* isolate = context->GetIsolate();
   gin_helper::Dictionary dict(isolate, exports);
   dict.SetMethod("createScreen", base::BindRepeating(&Screen::Create));

+ 1 - 1
shell/browser/api/electron_api_service_worker_context.cc

@@ -83,7 +83,7 @@ ServiceWorkerContext::~ServiceWorkerContext() {
 
 void ServiceWorkerContext::OnReportConsoleMessage(
     int64_t version_id,
-    const GURL& scope,
+    const GURL& /*scope*/,
     const content::ConsoleMessage& message) {
   v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
   v8::HandleScope handle_scope(isolate);

+ 8 - 7
shell/browser/api/electron_api_session.cc

@@ -590,7 +590,7 @@ Session::~Session() {
 #endif
 }
 
-void Session::OnDownloadCreated(content::DownloadManager* manager,
+void Session::OnDownloadCreated(content::DownloadManager* /*manager*/,
                                 download::DownloadItem* item) {
   if (item->IsSavePackageDownload())
     return;
@@ -1329,18 +1329,19 @@ v8::Local<v8::Value> Session::GetAllExtensions() {
   return gin::ConvertToV8(isolate_, extensions_vector);
 }
 
-void Session::OnExtensionLoaded(content::BrowserContext* browser_context,
+void Session::OnExtensionLoaded(content::BrowserContext* /*browser_context*/,
                                 const extensions::Extension* extension) {
   Emit("extension-loaded", extension);
 }
 
-void Session::OnExtensionUnloaded(content::BrowserContext* browser_context,
-                                  const extensions::Extension* extension,
-                                  extensions::UnloadedExtensionReason reason) {
+void Session::OnExtensionUnloaded(
+    content::BrowserContext* /*browser_context*/,
+    const extensions::Extension* extension,
+    extensions::UnloadedExtensionReason /*reason*/) {
   Emit("extension-unloaded", extension);
 }
 
-void Session::OnExtensionReady(content::BrowserContext* browser_context,
+void Session::OnExtensionReady(content::BrowserContext* /*browser_context*/,
                                const extensions::Extension* extension) {
   Emit("extension-ready", extension);
 }
@@ -1890,7 +1891,7 @@ v8::Local<v8::Value> FromPath(const base::FilePath& path,
 void Initialize(v8::Local<v8::Object> exports,
                 v8::Local<v8::Value> unused,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   v8::Isolate* isolate = context->GetIsolate();
   gin_helper::Dictionary dict(isolate, exports);
   dict.Set("Session", Session::GetConstructor(context));

+ 2 - 2
shell/browser/api/electron_api_system_preferences.cc

@@ -113,9 +113,9 @@ namespace {
 using electron::api::SystemPreferences;
 
 void Initialize(v8::Local<v8::Object> exports,
-                v8::Local<v8::Value> unused,
+                v8::Local<v8::Value> /*unused*/,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   v8::Isolate* isolate = context->GetIsolate();
   gin_helper::Dictionary dict(isolate, exports);
   dict.Set("systemPreferences", SystemPreferences::Create(isolate));

+ 6 - 6
shell/browser/api/electron_api_tray.cc

@@ -232,9 +232,9 @@ void Tray::SetToolTip(const std::string& tool_tip) {
   tray_icon_->SetToolTip(tool_tip);
 }
 
-void Tray::SetTitle(const std::string& title,
-                    const std::optional<gin_helper::Dictionary>& options,
-                    gin::Arguments* args) {
+void Tray::SetTitle(const std::string& /*title*/,
+                    const std::optional<gin_helper::Dictionary>& /*options*/,
+                    gin::Arguments* /*args*/) {
   if (!CheckAlive())
     return;
 #if BUILDFLAG(IS_MAC)
@@ -272,7 +272,7 @@ std::string Tray::GetTitle() {
 #endif
 }
 
-void Tray::SetIgnoreDoubleClickEvents(bool ignore) {
+void Tray::SetIgnoreDoubleClickEvents(bool /*ignore*/) {
   if (!CheckAlive())
     return;
 #if BUILDFLAG(IS_MAC)
@@ -438,9 +438,9 @@ namespace {
 using electron::api::Tray;
 
 void Initialize(v8::Local<v8::Object> exports,
-                v8::Local<v8::Value> unused,
+                v8::Local<v8::Value> /*unused*/,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   v8::Isolate* isolate = context->GetIsolate();
 
   gin::Dictionary dict(isolate, exports);

+ 2 - 2
shell/browser/api/electron_api_utility_process.cc

@@ -67,7 +67,7 @@ UtilityProcessWrapper::UtilityProcessWrapper(
     std::map<IOHandle, IOType> stdio,
     base::EnvironmentMap env_map,
     base::FilePath current_working_directory,
-    bool use_plugin_helper,
+    bool /*use_plugin_helper*/,
     bool create_network_observer) {
 #if BUILDFLAG(IS_WIN)
   base::win::ScopedHandle stdout_write(nullptr);
@@ -498,7 +498,7 @@ namespace {
 void Initialize(v8::Local<v8::Object> exports,
                 v8::Local<v8::Value> unused,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   v8::Isolate* isolate = context->GetIsolate();
   gin_helper::Dictionary dict(isolate, exports);
   dict.SetMethod("_fork", &electron::api::UtilityProcessWrapper::Create);

+ 3 - 3
shell/browser/api/electron_api_view.cc

@@ -387,7 +387,7 @@ void View::SetVisible(bool visible) {
   view_->SetVisible(visible);
 }
 
-void View::OnViewBoundsChanged(views::View* observed_view) {
+void View::OnViewBoundsChanged(views::View* /*observed_view*/) {
   ApplyBorderRadius();
   Emit("bounds-changed");
 }
@@ -455,9 +455,9 @@ namespace {
 using electron::api::View;
 
 void Initialize(v8::Local<v8::Object> exports,
-                v8::Local<v8::Value> unused,
+                v8::Local<v8::Value> /*unused*/,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   v8::Isolate* isolate = context->GetIsolate();
 
   gin_helper::Dictionary dict(isolate, exports);

+ 48 - 48
shell/browser/api/electron_api_web_contents.cc

@@ -870,7 +870,7 @@ void WebContents::InitZoomController(content::WebContents* web_contents,
 }
 
 void WebContents::InitWithSessionAndOptions(
-    v8::Isolate* isolate,
+    v8::Isolate* /*isolate*/,
     std::unique_ptr<content::WebContents> owned_web_contents,
     gin::Handle<api::Session> session,
     const gin_helper::Dictionary& options) {
@@ -1078,7 +1078,7 @@ void WebContents::OnDidAddMessageToConsole(
     const std::u16string& message,
     int32_t line_no,
     const std::u16string& source_id,
-    const std::optional<std::u16string>& untrusted_stack_trace) {
+    const std::optional<std::u16string>& /*untrusted_stack_trace*/) {
   v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
   v8::HandleScope handle_scope(isolate);
 
@@ -1111,9 +1111,9 @@ void WebContents::OnCreateWindow(
 }
 
 void WebContents::WebContentsCreatedWithFullParams(
-    content::WebContents* source_contents,
-    int opener_render_process_id,
-    int opener_render_frame_id,
+    content::WebContents* /*source_contents*/,
+    int /*opener_render_process_id*/,
+    int /*opener_render_frame_id*/,
     const content::mojom::CreateNewWindowParams& params,
     content::WebContents* new_contents) {
   ChildWebContentsTracker::CreateForWebContents(new_contents);
@@ -1140,9 +1140,9 @@ void WebContents::WebContentsCreatedWithFullParams(
 }
 
 bool WebContents::IsWebContentsCreationOverridden(
-    content::SiteInstance* source_site_instance,
-    content::mojom::WindowContainerType window_container_type,
-    const GURL& opener_url,
+    content::SiteInstance* /*source_site_instance*/,
+    content::mojom::WindowContainerType /*window_container_type*/,
+    const GURL& /*opener_url*/,
     const content::mojom::CreateNewWindowParams& params) {
   bool default_prevented = Emit(
       "-will-add-new-contents", params.target_url, params.frame_name,
@@ -1163,25 +1163,25 @@ void WebContents::SetNextChildWebPreferences(
 }
 
 content::WebContents* WebContents::CreateCustomWebContents(
-    content::RenderFrameHost* opener,
-    content::SiteInstance* source_site_instance,
-    bool is_new_browsing_instance,
-    const GURL& opener_url,
-    const std::string& frame_name,
-    const GURL& target_url,
-    const content::StoragePartitionConfig& partition_config,
-    content::SessionStorageNamespace* session_storage_namespace) {
+    content::RenderFrameHost* /*opener*/,
+    content::SiteInstance* /*source_site_instance*/,
+    bool /*is_new_browsing_instance*/,
+    const GURL& /*opener_url*/,
+    const std::string& /*frame_name*/,
+    const GURL& /*target_url*/,
+    const content::StoragePartitionConfig& /*partition_config*/,
+    content::SessionStorageNamespace* /*session_storage_namespace*/) {
   return nullptr;
 }
 
 content::WebContents* WebContents::AddNewContents(
-    content::WebContents* source,
+    content::WebContents* /*source*/,
     std::unique_ptr<content::WebContents> new_contents,
-    const GURL& target_url,
+    const GURL& /*target_url*/,
     WindowOpenDisposition disposition,
     const blink::mojom::WindowFeatures& window_features,
     bool user_gesture,
-    bool* was_blocked) {
+    bool* /*was_blocked*/) {
   auto* tracker = ChildWebContentsTracker::FromWebContents(new_contents.get());
   DCHECK(tracker);
 
@@ -1253,7 +1253,7 @@ content::WebContents* WebContents::OpenURLFromTab(
   return source;
 }
 
-void WebContents::BeforeUnloadFired(content::WebContents* tab,
+void WebContents::BeforeUnloadFired(content::WebContents* /*tab*/,
                                     bool proceed,
                                     bool* proceed_to_fire_unload) {
   // Note that Chromium does not emit this for navigations.
@@ -1270,7 +1270,7 @@ void WebContents::SetContentsBounds(content::WebContents* source,
       observer.OnSetContentBounds(rect);
 }
 
-void WebContents::CloseContents(content::WebContents* source) {
+void WebContents::CloseContents(content::WebContents* /*source*/) {
   Emit("close");
 
   auto* autofill_driver_factory =
@@ -1287,7 +1287,7 @@ void WebContents::ActivateContents(content::WebContents* source) {
     observer.OnActivateContents();
 }
 
-void WebContents::UpdateTargetURL(content::WebContents* source,
+void WebContents::UpdateTargetURL(content::WebContents* /*source*/,
                                   const GURL& url) {
   Emit("update-target-url", url);
 }
@@ -1326,7 +1326,7 @@ bool WebContents::PlatformHandleKeyboardEvent(
 #endif
 
 content::KeyboardEventProcessingResult WebContents::PreHandleKeyboardEvent(
-    content::WebContents* source,
+    content::WebContents* /*source*/,
     const input::NativeWebKeyboardEvent& event) {
   if (exclusive_access_manager_.HandleUserKeyEvent(event))
     return content::KeyboardEventProcessingResult::HANDLED;
@@ -1443,7 +1443,7 @@ void WebContents::ExitFullscreenModeForTab(content::WebContents* source) {
 void WebContents::RendererUnresponsive(
     content::WebContents* source,
     content::RenderWidgetHost* render_widget_host,
-    base::RepeatingClosure hang_monitor_restarter) {
+    base::RepeatingClosure /*hang_monitor_restarter*/) {
   v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
   v8::HandleScope handle_scope(isolate);
   gin::Handle<gin_helper::internal::Event> event =
@@ -1466,8 +1466,8 @@ void WebContents::RendererUnresponsive(
 }
 
 void WebContents::RendererResponsive(
-    content::WebContents* source,
-    content::RenderWidgetHost* render_widget_host) {
+    content::WebContents* /*source*/,
+    content::RenderWidgetHost* /*render_widget_host*/) {
   Emit("responsive");
 }
 
@@ -1511,7 +1511,7 @@ void WebContents::OnGetPlatformSuggestionsComplete(
 }
 #endif
 
-void WebContents::FindReply(content::WebContents* web_contents,
+void WebContents::FindReply(content::WebContents* /*web_contents*/,
                             int request_id,
                             int number_of_matches,
                             const gfx::Rect& selection_rect,
@@ -1806,7 +1806,7 @@ void WebContents::PrimaryMainFrameRenderProcessGone(
 }
 
 void WebContents::PluginCrashed(const base::FilePath& plugin_path,
-                                base::ProcessId plugin_pid) {
+                                base::ProcessId /*plugin_pid*/) {
 #if BUILDFLAG(ENABLE_PLUGINS)
   content::WebPluginInfo info;
   auto* plugin_service = content::PluginService::GetInstance();
@@ -1815,15 +1815,15 @@ void WebContents::PluginCrashed(const base::FilePath& plugin_path,
 #endif  // BUILDFLAG(ENABLE_PLUGINS)
 }
 
-void WebContents::MediaStartedPlaying(const MediaPlayerInfo& video_type,
-                                      const content::MediaPlayerId& id) {
+void WebContents::MediaStartedPlaying(const MediaPlayerInfo& /*video_type*/,
+                                      const content::MediaPlayerId& /*id*/) {
   Emit("media-started-playing");
 }
 
 void WebContents::MediaStoppedPlaying(
-    const MediaPlayerInfo& video_type,
-    const content::MediaPlayerId& id,
-    content::WebContentsObserver::MediaStoppedReason reason) {
+    const MediaPlayerInfo& /*video_type*/,
+    const content::MediaPlayerId& /*id*/,
+    content::WebContentsObserver::MediaStoppedReason /*reason*/) {
   Emit("media-paused");
 }
 
@@ -1841,12 +1841,12 @@ void WebContents::DidAcquireFullscreen(content::RenderFrameHost* rfh) {
 }
 
 void WebContents::OnWebContentsFocused(
-    content::RenderWidgetHost* render_widget_host) {
+    content::RenderWidgetHost* /*render_widget_host*/) {
   Emit("focus");
 }
 
 void WebContents::OnWebContentsLostFocus(
-    content::RenderWidgetHost* render_widget_host) {
+    content::RenderWidgetHost* /*render_widget_host*/) {
   Emit("blur");
 }
 
@@ -1861,7 +1861,7 @@ void WebContents::DOMContentLoaded(
 }
 
 void WebContents::DidFinishLoad(content::RenderFrameHost* render_frame_host,
-                                const GURL& validated_url) {
+                                const GURL& /*validated_url*/) {
   bool is_main_frame = !render_frame_host->GetParent();
   int32_t frame_process_id =
       render_frame_host->GetProcess()->GetID().GetUnsafeValue();
@@ -2110,7 +2110,7 @@ void WebContents::MessageHost(const std::string& channel,
 
 void WebContents::DraggableRegionsChanged(
     const std::vector<blink::mojom::DraggableRegionPtr>& regions,
-    content::WebContents* contents) {
+    content::WebContents* /*contents*/) {
   if (owner_window() && owner_window()->has_frame()) {
     return;
   }
@@ -2244,7 +2244,7 @@ void WebContents::TitleWasSet(content::NavigationEntry* entry) {
 }
 
 void WebContents::DidUpdateFaviconURL(
-    content::RenderFrameHost* render_frame_host,
+    content::RenderFrameHost* /*render_frame_host*/,
     const std::vector<blink::mojom::FaviconURLPtr>& urls) {
   std::set<GURL> unique_urls;
   for (const auto& iter : urls) {
@@ -3891,7 +3891,7 @@ void WebContents::PDFReadyToPrint() {
   Emit("-pdf-ready-to-print");
 }
 
-void WebContents::OnInputEvent(const content::RenderWidgetHost& rfh,
+void WebContents::OnInputEvent(const content::RenderWidgetHost& /*rfh*/,
                                const blink::WebInputEvent& event) {
   Emit("input-event", event);
 }
@@ -3902,7 +3902,7 @@ void WebContents::RunJavaScriptDialog(content::WebContents* web_contents,
                                       const std::u16string& message_text,
                                       const std::u16string& default_prompt_text,
                                       DialogClosedCallback callback,
-                                      bool* did_suppress_message) {
+                                      bool* /*did_suppress_message*/) {
   CHECK_EQ(web_contents, this->web_contents());
 
   auto* isolate = JavascriptEnvironment::GetIsolate();
@@ -3917,16 +3917,16 @@ void WebContents::RunJavaScriptDialog(content::WebContents* web_contents,
   EmitWithoutEvent("-run-dialog", info, std::move(callback));
 }
 
-void WebContents::RunBeforeUnloadDialog(content::WebContents* web_contents,
-                                        content::RenderFrameHost* rfh,
-                                        bool is_reload,
+void WebContents::RunBeforeUnloadDialog(content::WebContents* /*web_contents*/,
+                                        content::RenderFrameHost* /*rfh*/,
+                                        bool /*is_reload*/,
                                         DialogClosedCallback callback) {
   // TODO: asyncify?
   bool default_prevented = Emit("will-prevent-unload");
   std::move(callback).Run(default_prevented, std::u16string());
 }
 
-void WebContents::CancelDialogs(content::WebContents* web_contents,
+void WebContents::CancelDialogs(content::WebContents* /*web_contents*/,
                                 bool reset_state) {
   auto* isolate = JavascriptEnvironment::GetIsolate();
   v8::HandleScope scope(isolate);
@@ -4001,7 +4001,7 @@ v8::Local<v8::Promise> WebContents::TakeHeapSnapshot(
   (*raw_ptr)->TakeHeapSnapshot(
       mojo::WrapPlatformFile(base::ScopedPlatformFile(file.TakePlatformFile())),
       base::BindOnce(
-          [](mojo::Remote<mojom::ElectronRenderer>* ep,
+          [](mojo::Remote<mojom::ElectronRenderer>* /*ep*/,
              gin_helper::Promise<void> promise, bool success) {
             if (success) {
               promise.Resolve();
@@ -4013,7 +4013,7 @@ v8::Local<v8::Promise> WebContents::TakeHeapSnapshot(
   return handle;
 }
 
-void WebContents::UpdatePreferredSize(content::WebContents* web_contents,
+void WebContents::UpdatePreferredSize(content::WebContents* /*web_contents*/,
                                       const gfx::Size& pref_size) {
   Emit("preferred-size-changed", pref_size);
 }
@@ -4044,7 +4044,7 @@ void WebContents::EnumerateDirectory(
 }
 
 bool WebContents::IsFullscreenForTabOrPending(
-    const content::WebContents* source) {
+    const content::WebContents* /*source*/) {
   if (!owner_window())
     return is_html_fullscreen();
 
@@ -4726,7 +4726,7 @@ std::vector<gin::Handle<WebContents>> GetAllWebContentsAsV8(
 void Initialize(v8::Local<v8::Object> exports,
                 v8::Local<v8::Value> unused,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   v8::Isolate* isolate = context->GetIsolate();
   gin_helper::Dictionary dict(isolate, exports);
   dict.Set("WebContents", WebContents::GetConstructor(context));

+ 1 - 1
shell/browser/api/electron_api_web_contents_view.cc

@@ -228,7 +228,7 @@ using electron::api::WebContentsView;
 void Initialize(v8::Local<v8::Object> exports,
                 v8::Local<v8::Value> unused,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   v8::Isolate* isolate = context->GetIsolate();
   gin_helper::Dictionary dict(isolate, exports);
   dict.Set("WebContentsView", WebContentsView::GetConstructor(isolate));

+ 3 - 3
shell/browser/api/electron_api_web_frame_main.cc

@@ -491,7 +491,7 @@ void WebFrameMain::DOMContentLoaded() {
 }
 
 // static
-gin::Handle<WebFrameMain> WebFrameMain::New(v8::Isolate* isolate) {
+gin::Handle<WebFrameMain> WebFrameMain::New(v8::Isolate* /*isolate*/) {
   return {};
 }
 
@@ -595,9 +595,9 @@ v8::Local<v8::Value> FromFtnIdIfExists(gin_helper::ErrorThrower thrower,
 }
 
 void Initialize(v8::Local<v8::Object> exports,
-                v8::Local<v8::Value> unused,
+                v8::Local<v8::Value> /*unused*/,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   v8::Isolate* isolate = context->GetIsolate();
   gin_helper::Dictionary dict(isolate, exports);
   dict.Set("WebFrameMain", WebFrameMain::GetConstructor(context));

+ 1 - 1
shell/browser/api/electron_api_web_request.cc

@@ -480,7 +480,7 @@ int WebRequest::OnHeadersReceived(
     net::CompletionOnceCallback callback,
     const net::HttpResponseHeaders* original_response_headers,
     scoped_refptr<net::HttpResponseHeaders>* override_response_headers,
-    GURL* allowed_unsafe_redirect_url) {
+    GURL* /*allowed_unsafe_redirect_url*/) {
   return HandleOnHeadersReceivedResponseEvent(
       info, request, std::move(callback), original_response_headers,
       override_response_headers);

+ 1 - 1
shell/browser/api/electron_api_web_view_manager.cc

@@ -39,7 +39,7 @@ void RemoveGuest(content::WebContents* embedder, int guest_instance_id) {
 void Initialize(v8::Local<v8::Object> exports,
                 v8::Local<v8::Value> unused,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   gin_helper::Dictionary dict(context->GetIsolate(), exports);
   dict.SetMethod("addGuest", &AddGuest);
   dict.SetMethod("removeGuest", &RemoveGuest);

+ 1 - 1
shell/browser/api/frame_subscriber.cc

@@ -135,7 +135,7 @@ void FrameSubscriber::OnFrameCaptured(
       pixels,
       media::VideoFrame::RowBytes(media::VideoFrame::Plane::kARGB,
                                   info->pixel_format, info->coded_size.width()),
-      [](void* addr, void* context) {
+      [](void* /*addr*/, void* context) {
         delete static_cast<FramePinner*>(context);
       },
       new FramePinner{std::move(mapping), std::move(callbacks_remote)});

+ 2 - 2
shell/browser/api/message_port.cc

@@ -325,9 +325,9 @@ v8::Local<v8::Value> CreatePair(v8::Isolate* isolate) {
 }
 
 void Initialize(v8::Local<v8::Object> exports,
-                v8::Local<v8::Value> unused,
+                v8::Local<v8::Value> /*unused*/,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   v8::Isolate* isolate = context->GetIsolate();
   gin_helper::Dictionary dict(isolate, exports);
   dict.SetMethod("createPair", &CreatePair);

+ 1 - 1
shell/browser/api/save_page_handler.cc

@@ -18,7 +18,7 @@ SavePageHandler::SavePageHandler(content::WebContents* web_contents,
 
 SavePageHandler::~SavePageHandler() = default;
 
-void SavePageHandler::OnDownloadCreated(content::DownloadManager* manager,
+void SavePageHandler::OnDownloadCreated(content::DownloadManager* /*manager*/,
                                         download::DownloadItem* item) {
   // OnDownloadCreated is invoked during WebContents::SavePage, so the |item|
   // here is the one stated by WebContents::SavePage.

+ 2 - 2
shell/browser/api/views/electron_api_image_view.cc

@@ -46,9 +46,9 @@ namespace {
 using electron::api::ImageView;
 
 void Initialize(v8::Local<v8::Object> exports,
-                v8::Local<v8::Value> unused,
+                v8::Local<v8::Value> /*unused*/,
                 v8::Local<v8::Context> context,
-                void* priv) {
+                void* /*priv*/) {
   v8::Isolate* isolate = context->GetIsolate();
   gin_helper::Dictionary dict(isolate, exports);
   dict.Set("ImageView", gin_helper::CreateConstructor<ImageView>(

+ 3 - 2
shell/browser/auto_updater.cc

@@ -30,8 +30,9 @@ void AutoUpdater::CheckForUpdates() {}
 
 void AutoUpdater::QuitAndInstall() {}
 
-bool AutoUpdater::IsVersionAllowedForUpdate(const std::string& current_version,
-                                            const std::string& target_version) {
+bool AutoUpdater::IsVersionAllowedForUpdate(
+    const std::string& /*current_version*/,
+    const std::string& /*target_version*/) {
   return false;
 }
 #endif

+ 1 - 1
shell/browser/badging/badge_manager_factory.cc

@@ -32,7 +32,7 @@ BadgeManagerFactory::~BadgeManagerFactory() = default;
 
 std::unique_ptr<KeyedService>
 BadgeManagerFactory::BuildServiceInstanceForBrowserContext(
-    content::BrowserContext* context) const {
+    content::BrowserContext* /*context*/) const {
   return std::make_unique<BadgeManager>();
 }
 

+ 27 - 27
shell/browser/bluetooth/electron_bluetooth_delegate.cc

@@ -67,94 +67,94 @@ ElectronBluetoothDelegate::RunBluetoothChooser(
 // The following methods are not currently called in Electron.
 std::unique_ptr<content::BluetoothScanningPrompt>
 ElectronBluetoothDelegate::ShowBluetoothScanningPrompt(
-    content::RenderFrameHost* frame,
-    const content::BluetoothScanningPrompt::EventHandler& event_handler) {
+    content::RenderFrameHost* /*frame*/,
+    const content::BluetoothScanningPrompt::EventHandler& /*event_handler*/) {
   NOTIMPLEMENTED();
   return nullptr;
 }
 
 WebBluetoothDeviceId ElectronBluetoothDelegate::GetWebBluetoothDeviceId(
-    RenderFrameHost* frame,
-    const std::string& device_address) {
+    RenderFrameHost* /*frame*/,
+    const std::string& /*device_address*/) {
   NOTIMPLEMENTED();
   return WebBluetoothDeviceId::Create();
 }
 
 std::string ElectronBluetoothDelegate::GetDeviceAddress(
-    RenderFrameHost* frame,
-    const WebBluetoothDeviceId& device_id) {
+    RenderFrameHost* /*frame*/,
+    const WebBluetoothDeviceId& /*device_id*/) {
   NOTIMPLEMENTED();
   return "";
 }
 
 WebBluetoothDeviceId ElectronBluetoothDelegate::AddScannedDevice(
-    RenderFrameHost* frame,
-    const std::string& device_address) {
+    RenderFrameHost* /*frame*/,
+    const std::string& /*device_address*/) {
   NOTIMPLEMENTED();
   return WebBluetoothDeviceId::Create();
 }
 
 WebBluetoothDeviceId ElectronBluetoothDelegate::GrantServiceAccessPermission(
-    RenderFrameHost* frame,
-    const device::BluetoothDevice* device,
-    const blink::mojom::WebBluetoothRequestDeviceOptions* options) {
+    RenderFrameHost* /*frame*/,
+    const device::BluetoothDevice* /*device*/,
+    const blink::mojom::WebBluetoothRequestDeviceOptions* /*options*/) {
   NOTIMPLEMENTED();
   return WebBluetoothDeviceId::Create();
 }
 
 bool ElectronBluetoothDelegate::HasDevicePermission(
-    RenderFrameHost* frame,
-    const WebBluetoothDeviceId& device_id) {
+    RenderFrameHost* /*frame*/,
+    const WebBluetoothDeviceId& /*device_id*/) {
   NOTIMPLEMENTED();
   return true;
 }
 
 void ElectronBluetoothDelegate::RevokeDevicePermissionWebInitiated(
-    RenderFrameHost* frame,
-    const WebBluetoothDeviceId& device_id) {
+    RenderFrameHost* /*frame*/,
+    const WebBluetoothDeviceId& /*device_id*/) {
   NOTIMPLEMENTED();
 }
 
-bool ElectronBluetoothDelegate::MayUseBluetooth(RenderFrameHost* frame) {
+bool ElectronBluetoothDelegate::MayUseBluetooth(RenderFrameHost* /*frame*/) {
   return true;
 }
 
 bool ElectronBluetoothDelegate::IsAllowedToAccessService(
-    RenderFrameHost* frame,
-    const WebBluetoothDeviceId& device_id,
-    const BluetoothUUID& service) {
+    RenderFrameHost* /*frame*/,
+    const WebBluetoothDeviceId& /*device_id*/,
+    const BluetoothUUID& /*service*/) {
   NOTIMPLEMENTED();
   return true;
 }
 
 bool ElectronBluetoothDelegate::IsAllowedToAccessAtLeastOneService(
-    RenderFrameHost* frame,
-    const WebBluetoothDeviceId& device_id) {
+    RenderFrameHost* /*frame*/,
+    const WebBluetoothDeviceId& /*device_id*/) {
   NOTIMPLEMENTED();
   return true;
 }
 
 bool ElectronBluetoothDelegate::IsAllowedToAccessManufacturerData(
-    RenderFrameHost* frame,
-    const WebBluetoothDeviceId& device_id,
-    uint16_t manufacturer_code) {
+    RenderFrameHost* /*frame*/,
+    const WebBluetoothDeviceId& /*device_id*/,
+    uint16_t /*manufacturer_code*/) {
   NOTIMPLEMENTED();
   return true;
 }
 
 void ElectronBluetoothDelegate::AddFramePermissionObserver(
-    FramePermissionObserver* observer) {
+    FramePermissionObserver* /*observer*/) {
   NOTIMPLEMENTED();
 }
 
 void ElectronBluetoothDelegate::RemoveFramePermissionObserver(
-    FramePermissionObserver* observer) {
+    FramePermissionObserver* /*observer*/) {
   NOTIMPLEMENTED();
 }
 
 std::vector<blink::mojom::WebBluetoothDevicePtr>
 ElectronBluetoothDelegate::GetPermittedDevices(
-    content::RenderFrameHost* frame) {
+    content::RenderFrameHost* /*frame*/) {
   std::vector<blink::mojom::WebBluetoothDevicePtr> permitted_devices;
   NOTIMPLEMENTED();
   return permitted_devices;

+ 1 - 1
shell/browser/browser.cc

@@ -263,7 +263,7 @@ bool Browser::HandleBeforeQuit() {
   return !prevent_default;
 }
 
-void Browser::OnWindowCloseCancelled(NativeWindow* window) {
+void Browser::OnWindowCloseCancelled(NativeWindow* /*window*/) {
   if (is_quitting_)
     // Once a beforeunload handler has prevented the closing, we think the quit
     // is cancelled too.

+ 5 - 5
shell/browser/browser_linux.cc

@@ -97,12 +97,12 @@ void Browser::AddRecentDocument(const base::FilePath& path) {}
 void Browser::ClearRecentDocuments() {}
 
 bool Browser::SetAsDefaultProtocolClient(const std::string& protocol,
-                                         gin::Arguments* args) {
+                                         gin::Arguments* /*args*/) {
   return SetDefaultWebClient(protocol);
 }
 
 bool Browser::IsDefaultProtocolClient(const std::string& protocol,
-                                      gin::Arguments* args) {
+                                      gin::Arguments* /*args*/) {
   auto env = base::Environment::Create();
 
   if (protocol.empty())
@@ -120,8 +120,8 @@ bool Browser::IsDefaultProtocolClient(const std::string& protocol,
 }
 
 // Todo implement
-bool Browser::RemoveAsDefaultProtocolClient(const std::string& protocol,
-                                            gin::Arguments* args) {
+bool Browser::RemoveAsDefaultProtocolClient(const std::string& /*protocol*/,
+                                            gin::Arguments* /*args*/) {
   return false;
 }
 
@@ -146,7 +146,7 @@ bool Browser::SetBadgeCount(std::optional<int> count) {
 void Browser::SetLoginItemSettings(LoginItemSettings settings) {}
 
 v8::Local<v8::Value> Browser::GetLoginItemSettings(
-    const LoginItemSettings& options) {
+    const LoginItemSettings& /*options*/) {
   LoginItemSettings settings;
   return gin::ConvertToV8(JavascriptEnvironment::GetIsolate(), settings);
 }

+ 2 - 4
shell/browser/certificate_manager_model.cc

@@ -23,8 +23,7 @@ namespace {
 
 net::NSSCertDatabase* g_nss_cert_database = nullptr;
 
-net::NSSCertDatabase* GetNSSCertDatabase(
-    base::OnceCallback<void(net::NSSCertDatabase*)> callback) {
+net::NSSCertDatabase* GetNSSCertDatabase() {
   // This initialization is not thread safe. This CHECK ensures that this code
   // is only run on a single thread.
   CHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
@@ -152,8 +151,7 @@ void CertificateManagerModel::GetCertDBOnIOThread(CreationCallback callback) {
   auto split_callback = base::SplitOnceCallback(base::BindOnce(
       &CertificateManagerModel::DidGetCertDBOnIOThread, std::move(callback)));
 
-  net::NSSCertDatabase* cert_db =
-      GetNSSCertDatabase(std::move(split_callback.first));
+  net::NSSCertDatabase* cert_db = GetNSSCertDatabase();
 
   // If the NSS database was already available, |cert_db| is non-null and
   // |did_get_cert_db_callback| has not been called. Call it explicitly.

+ 42 - 40
shell/browser/electron_browser_client.cc

@@ -308,7 +308,7 @@ const extensions::Extension* GetEnabledExtensionFromEffectiveURL(
 #endif  // BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
 
 #if BUILDFLAG(IS_LINUX)
-int GetCrashSignalFD(const base::CommandLine& command_line) {
+int GetCrashSignalFD() {
   int fd;
   return crash_reporter::GetHandlerSocket(&fd, nullptr) ? fd : -1;
 }
@@ -370,9 +370,9 @@ content::WebContents* ElectronBrowserClient::GetWebContentsFromProcessID(
 }
 
 content::SiteInstance* ElectronBrowserClient::GetSiteInstanceFromAffinity(
-    content::BrowserContext* browser_context,
-    const GURL& url,
-    content::RenderFrameHost* rfh) const {
+    content::BrowserContext* /*browser_context*/,
+    const GURL& /*url*/,
+    content::RenderFrameHost* /*rfh*/) const {
   return nullptr;
 }
 
@@ -765,8 +765,8 @@ bool ElectronBrowserClient::ShouldUseProcessPerSite(
 
 void ElectronBrowserClient::GetMediaDeviceIDSalt(
     content::RenderFrameHost* rfh,
-    const net::SiteForCookies& site_for_cookies,
-    const blink::StorageKey& storage_key,
+    const net::SiteForCookies& /*site_for_cookies*/,
+    const blink::StorageKey& /*storage_key*/,
     base::OnceCallback<void(bool, const std::string&)> callback) {
   constexpr bool persistent_media_device_id_allowed = true;
   std::string persistent_media_device_id_salt =
@@ -783,7 +783,7 @@ base::FilePath ElectronBrowserClient::GetLoggingFileName(
 
 std::unique_ptr<net::ClientCertStore>
 ElectronBrowserClient::CreateClientCertStore(
-    content::BrowserContext* browser_context) {
+    content::BrowserContext* /*browser_context*/) {
 #if BUILDFLAG(USE_NSS_CERTS)
   return std::make_unique<net::ClientCertStoreNSS>(
       base::BindRepeating([](const net::HostPortPair& server) {
@@ -811,8 +811,8 @@ ElectronBrowserClient::OverrideSystemLocationProvider() {
 
 void ElectronBrowserClient::ConfigureNetworkContextParams(
     content::BrowserContext* browser_context,
-    bool in_memory,
-    const base::FilePath& relative_partition_path,
+    bool /*in_memory*/,
+    const base::FilePath& /*relative_partition_path*/,
     network::mojom::NetworkContextParams* network_context_params,
     cert_verifier::mojom::CertVerifierCreationParams*
         cert_verifier_creation_params) {
@@ -870,7 +870,7 @@ void ElectronBrowserClient::RenderProcessReady(
 
 void ElectronBrowserClient::RenderProcessExited(
     content::RenderProcessHost* host,
-    const content::ChildProcessTerminationInfo& info) {
+    const content::ChildProcessTerminationInfo& /*info*/) {
   if (delegate_) {
     static_cast<api::App*>(delegate_)->RenderProcessExited(host);
   }
@@ -920,16 +920,16 @@ bool ElectronBrowserClient::HandleExternalProtocol(
     const GURL& url,
     content::WebContents::Getter web_contents_getter,
     content::FrameTreeNodeId frame_tree_node_id,
-    content::NavigationUIData* navigation_data,
-    bool is_primary_main_frame,
-    bool is_in_fenced_frame_tree,
-    network::mojom::WebSandboxFlags sandbox_flags,
-    ui::PageTransition page_transition,
+    content::NavigationUIData* /*navigation_data*/,
+    bool /*is_primary_main_frame*/,
+    bool /*is_in_fenced_frame_tree*/,
+    network::mojom::WebSandboxFlags /*sandbox_flags*/,
+    ui::PageTransition /*page_transition*/,
     bool has_user_gesture,
-    const std::optional<url::Origin>& initiating_origin,
+    const std::optional<url::Origin>& /*initiating_origin*/,
     content::RenderFrameHost* initiator_document,
-    const net::IsolationInfo& isolation_info,
-    mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory) {
+    const net::IsolationInfo& /*isolation_info*/,
+    mojo::PendingRemote<network::mojom::URLLoaderFactory>* /*out_factory*/) {
   content::GetUIThreadTaskRunner({})->PostTask(
       FROM_HERE,
       base::BindOnce(&HandleExternalProtocolInUI, url,
@@ -1097,11 +1097,11 @@ class FileURLLoaderFactory : public network::SelfDeletingURLLoaderFactory {
   // network::mojom::URLLoaderFactory:
   void CreateLoaderAndStart(
       mojo::PendingReceiver<network::mojom::URLLoader> loader,
-      int32_t request_id,
-      uint32_t options,
+      int32_t /*request_id*/,
+      uint32_t /*options*/,
       const network::ResourceRequest& request,
       mojo::PendingRemote<network::mojom::URLLoaderClient> client,
-      const net::MutableNetworkTrafficAnnotationTag& traffic_annotation)
+      const net::MutableNetworkTrafficAnnotationTag& /*traffic_annotation*/)
       override {
     if (!content::ChildProcessSecurityPolicy::GetInstance()->CanRequestURL(
             child_id_, request.url)) {
@@ -1125,7 +1125,7 @@ class FileURLLoaderFactory : public network::SelfDeletingURLLoaderFactory {
 void ElectronBrowserClient::RegisterNonNetworkSubresourceURLLoaderFactories(
     int render_process_id,
     int render_frame_id,
-    const std::optional<url::Origin>& request_initiator_origin,
+    const std::optional<url::Origin>& /*request_initiator_origin*/,
     NonNetworkURLLoaderFactoryMap* factories) {
   auto* render_process_host =
       content::RenderProcessHost::FromID(render_process_id);
@@ -1297,16 +1297,16 @@ void ElectronBrowserClient::WillCreateURLLoaderFactory(
     content::RenderFrameHost* frame_host,
     int render_process_id,
     URLLoaderFactoryType type,
-    const url::Origin& request_initiator,
-    const net::IsolationInfo& isolation_info,
+    const url::Origin& /*request_initiator*/,
+    const net::IsolationInfo& /*isolation_info*/,
     std::optional<int64_t> navigation_id,
     ukm::SourceIdObj ukm_source_id,
     network::URLLoaderFactoryBuilder& factory_builder,
     mojo::PendingRemote<network::mojom::TrustedURLLoaderHeaderClient>*
         header_client,
     bool* bypass_redirect_checks,
-    bool* disable_secure_dns,
-    network::mojom::URLLoaderFactoryOverridePtr* factory_override,
+    bool* /*disable_secure_dns*/,
+    network::mojom::URLLoaderFactoryOverridePtr* /*factory_override*/,
     scoped_refptr<base::SequencedTaskRunner> navigation_response_task_runner) {
   v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
   v8::HandleScope scope(isolate);
@@ -1363,11 +1363,12 @@ void ElectronBrowserClient::WillCreateURLLoaderFactory(
 
 std::vector<std::unique_ptr<content::URLLoaderRequestInterceptor>>
 ElectronBrowserClient::WillCreateURLLoaderRequestInterceptors(
-    content::NavigationUIData* navigation_ui_data,
+    content::NavigationUIData* /*navigation_ui_data*/,
     content::FrameTreeNodeId frame_tree_node_id,
-    int64_t navigation_id,
-    bool force_no_https_upgrade,
-    scoped_refptr<base::SequencedTaskRunner> navigation_response_task_runner) {
+    int64_t /*navigation_id*/,
+    bool /*force_no_https_upgrade*/,
+    scoped_refptr<
+        base::SequencedTaskRunner> /*navigation_response_task_runner*/) {
   std::vector<std::unique_ptr<content::URLLoaderRequestInterceptor>>
       interceptors;
 #if BUILDFLAG(ENABLE_PDF_VIEWER)
@@ -1638,9 +1639,9 @@ void ElectronBrowserClient::RegisterBrowserInterfaceBindersForFrame(
 #if BUILDFLAG(IS_LINUX)
 void ElectronBrowserClient::GetAdditionalMappedFilesForChildProcess(
     const base::CommandLine& command_line,
-    int child_process_id,
+    int /*child_process_id*/,
     content::PosixFileDescriptorInfo* mappings) {
-  int crash_signal_fd = GetCrashSignalFD(command_line);
+  int crash_signal_fd = GetCrashSignalFD();
   if (crash_signal_fd >= 0) {
     mappings->Share(kCrashDumpSignal, crash_signal_fd);
   }
@@ -1651,14 +1652,14 @@ std::unique_ptr<content::LoginDelegate>
 ElectronBrowserClient::CreateLoginDelegate(
     const net::AuthChallengeInfo& auth_info,
     content::WebContents* web_contents,
-    content::BrowserContext* browser_context,
-    const content::GlobalRequestID& request_id,
+    content::BrowserContext* /*browser_context*/,
+    const content::GlobalRequestID& /*request_id*/,
     bool is_request_for_primary_main_frame,
     bool is_request_for_navigation,
     const GURL& url,
     scoped_refptr<net::HttpResponseHeaders> response_headers,
     bool first_auth_attempt,
-    content::GuestPageHolder* guest_page_holder,
+    content::GuestPageHolder* /*guest_page_holder*/,
     LoginAuthRequiredCallback auth_required_callback) {
   return std::make_unique<LoginHandler>(
       auth_info, web_contents, is_request_for_primary_main_frame,
@@ -1669,9 +1670,9 @@ ElectronBrowserClient::CreateLoginDelegate(
 std::vector<std::unique_ptr<blink::URLLoaderThrottle>>
 ElectronBrowserClient::CreateURLLoaderThrottles(
     const network::ResourceRequest& request,
-    content::BrowserContext* browser_context,
-    const base::RepeatingCallback<content::WebContents*()>& wc_getter,
-    content::NavigationUIData* navigation_ui_data,
+    content::BrowserContext* /*browser_context*/,
+    const base::RepeatingCallback<content::WebContents*()>& /*wc_getter*/,
+    content::NavigationUIData* /*navigation_ui_data*/,
     content::FrameTreeNodeId frame_tree_node_id,
     std::optional<int64_t> navigation_id) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -1738,8 +1739,9 @@ void BindBadgeServiceForServiceWorker(
 }  // namespace
 
 void ElectronBrowserClient::RegisterBrowserInterfaceBindersForServiceWorker(
-    content::BrowserContext* browser_context,
-    const content::ServiceWorkerVersionBaseInfo& service_worker_version_info,
+    content::BrowserContext* /*browser_context*/,
+    const content::
+        ServiceWorkerVersionBaseInfo& /*service_worker_version_info*/,
     mojo::BinderMapWithContext<const content::ServiceWorkerVersionBaseInfo&>*
         map) {
   map->Add<blink::mojom::BadgeService>(

+ 2 - 5
shell/browser/electron_browser_context.cc

@@ -161,9 +161,7 @@ media::mojom::CaptureHandlePtr CreateCaptureHandle(
 }
 
 // Copied from chrome/browser/media/webrtc/desktop_capture_devices_util.cc.
-std::optional<int> GetZoomLevel(content::WebContents* capturer,
-                                const url::Origin& capturer_origin,
-                                const content::DesktopMediaID& captured_id) {
+std::optional<int> GetZoomLevel(const content::DesktopMediaID& captured_id) {
   content::RenderFrameHost* const captured_rfh =
       content::RenderFrameHost::FromID(
           captured_id.web_contents_id.render_process_id,
@@ -218,8 +216,7 @@ DesktopMediaIDToDisplayMediaInformation(
       display_surface = media::mojom::DisplayCaptureSurfaceType::BROWSER;
       cursor = media::mojom::CursorCaptureType::MOTION;
       capture_handle = CreateCaptureHandle(capturer, capturer_origin, media_id);
-      zoom_level =
-          GetZoomLevel(capturer, capturer_origin, media_id).value_or(100);
+      zoom_level = GetZoomLevel(media_id).value_or(100);
       break;
     case content::DesktopMediaID::TYPE_NONE:
       break;

+ 2 - 2
shell/browser/electron_browser_main_parts.cc

@@ -136,10 +136,10 @@ class LinuxUiGetterImpl : public ui::LinuxUiGetter {
   ~LinuxUiGetterImpl() override = default;
 
   // ui::LinuxUiGetter
-  ui::LinuxUiTheme* GetForWindow(aura::Window* window) override {
+  ui::LinuxUiTheme* GetForWindow(aura::Window* /*window*/) override {
     return GetForProfile(nullptr);
   }
-  ui::LinuxUiTheme* GetForProfile(Profile* profile) override {
+  ui::LinuxUiTheme* GetForProfile(Profile* /*profile*/) override {
     return ui::GetLinuxUiTheme(ui::SystemTheme::kGtk);
   }
 };

+ 1 - 1
shell/browser/electron_download_manager_delegate.cc

@@ -376,7 +376,7 @@ bool ElectronDownloadManagerDelegate::DetermineDownloadTarget(
 }
 
 bool ElectronDownloadManagerDelegate::ShouldOpenDownload(
-    download::DownloadItem* download,
+    download::DownloadItem* /*download*/,
     content::DownloadOpenDelayedCallback callback) {
   return true;
 }

+ 1 - 1
shell/browser/electron_permission_manager.cc

@@ -397,7 +397,7 @@ ElectronPermissionManager::GetPermissionStatusForCurrentDocument(
 blink::mojom::PermissionStatus
 ElectronPermissionManager::GetPermissionStatusForWorker(
     blink::PermissionType permission,
-    content::RenderProcessHost* render_process_host,
+    content::RenderProcessHost* /*render_process_host*/,
     const GURL& worker_origin) {
   return GetPermissionStatus(permission, worker_origin, worker_origin);
 }

+ 1 - 1
shell/browser/electron_speech_recognition_manager_delegate.cc

@@ -17,7 +17,7 @@ ElectronSpeechRecognitionManagerDelegate::
     ~ElectronSpeechRecognitionManagerDelegate() = default;
 
 void ElectronSpeechRecognitionManagerDelegate::CheckRecognitionIsAllowed(
-    int session_id,
+    int /*session_id*/,
     base::OnceCallback<void(bool ask_user, bool is_allowed)> callback) {
   std::move(callback).Run(true, true);
 }

+ 1 - 1
shell/browser/electron_web_ui_controller_factory.cc

@@ -23,7 +23,7 @@ ElectronWebUIControllerFactory::ElectronWebUIControllerFactory() = default;
 ElectronWebUIControllerFactory::~ElectronWebUIControllerFactory() = default;
 
 content::WebUI::TypeID ElectronWebUIControllerFactory::GetWebUIType(
-    content::BrowserContext* browser_context,
+    content::BrowserContext* /*browser_context*/,
     const GURL& url) {
   if (const std::string_view host = url.host_piece();
       host == chrome::kChromeUIDevToolsHost ||

+ 17 - 17
shell/browser/extensions/api/management/electron_management_api_delegate.cc

@@ -77,7 +77,7 @@ ElectronManagementAPIDelegate::~ElectronManagementAPIDelegate() = default;
 
 bool ElectronManagementAPIDelegate::LaunchAppFunctionDelegate(
     const extensions::Extension* extension,
-    content::BrowserContext* context) const {
+    content::BrowserContext* /*context*/) const {
   // Note: Chromium looks for an existing profile and determines whether
   // the user has set a launch preference
   // See: https://chromium-review.googlesource.com/c/chromium/src/+/4389621
@@ -94,8 +94,8 @@ GURL ElectronManagementAPIDelegate::GetFullLaunchURL(
 }
 
 extensions::LaunchType ElectronManagementAPIDelegate::GetLaunchType(
-    const extensions::ExtensionPrefs* prefs,
-    const extensions::Extension* extension) const {
+    const extensions::ExtensionPrefs* /*prefs*/,
+    const extensions::Extension* /*extension*/) const {
   // TODO(sentialx)
   return extensions::LAUNCH_TYPE_DEFAULT;
 }
@@ -120,24 +120,24 @@ ElectronManagementAPIDelegate::UninstallFunctionDelegate(
 }
 
 bool ElectronManagementAPIDelegate::CreateAppShortcutFunctionDelegate(
-    extensions::ManagementCreateAppShortcutFunction* function,
-    const extensions::Extension* extension,
-    std::string* error) const {
+    extensions::ManagementCreateAppShortcutFunction* /*function*/,
+    const extensions::Extension* /*extension*/,
+    std::string* /*error*/) const {
   return false;  // TODO(sentialx): route event and return true
 }
 
 std::unique_ptr<extensions::AppForLinkDelegate>
 ElectronManagementAPIDelegate::GenerateAppForLinkFunctionDelegate(
-    extensions::ManagementGenerateAppForLinkFunction* function,
-    content::BrowserContext* context,
-    const std::string& title,
-    const GURL& launch_url) const {
+    extensions::ManagementGenerateAppForLinkFunction* /*function*/,
+    content::BrowserContext* /*context*/,
+    const std::string& /*title*/,
+    const GURL& /*launch_url*/) const {
   // TODO(sentialx)
   return nullptr;
 }
 
 bool ElectronManagementAPIDelegate::CanContextInstallWebApps(
-    content::BrowserContext* context) const {
+    content::BrowserContext* /*context*/) const {
   // TODO(sentialx)
   return false;
 }
@@ -178,10 +178,10 @@ void ElectronManagementAPIDelegate::DisableExtension(
 }
 
 bool ElectronManagementAPIDelegate::UninstallExtension(
-    content::BrowserContext* context,
-    const extensions::ExtensionId& transient_extension_id,
-    extensions::UninstallReason reason,
-    std::u16string* error) const {
+    content::BrowserContext* /*context*/,
+    const extensions::ExtensionId& /*transient_extension_id*/,
+    extensions::UninstallReason /*reason*/,
+    std::u16string* /*error*/) const {
   // TODO(sentialx): we don't have ExtensionService
   // return extensions::ExtensionSystem::Get(context)
   //     ->extension_service()
@@ -211,8 +211,8 @@ GURL ElectronManagementAPIDelegate::GetIconURL(
 }
 
 GURL ElectronManagementAPIDelegate::GetEffectiveUpdateURL(
-    const extensions::Extension& extension,
-    content::BrowserContext* context) const {
+    const extensions::Extension& /*extension*/,
+    content::BrowserContext* /*context*/) const {
   // TODO(codebytere): we do not currently support ExtensionManagement.
   return GURL::EmptyGURL();
 }

+ 2 - 2
shell/browser/extensions/api/runtime/electron_runtime_api_delegate.cc

@@ -34,13 +34,13 @@ void ElectronRuntimeAPIDelegate::ReloadExtension(
 }
 
 bool ElectronRuntimeAPIDelegate::CheckForUpdates(
-    const std::string& extension_id,
+    const std::string& /*extension_id*/,
     UpdateCheckCallback callback) {
   LOG(INFO) << "chrome.runtime.requestUpdateCheck is not supported in Electron";
   return false;
 }
 
-void ElectronRuntimeAPIDelegate::OpenURL(const GURL& uninstall_url) {
+void ElectronRuntimeAPIDelegate::OpenURL(const GURL& /*uninstall_url*/) {
   LOG(INFO) << "chrome.runtime.openURL is not supported in Electron";
 }
 

+ 3 - 3
shell/browser/extensions/api/scripting/scripting_api.cc

@@ -383,8 +383,8 @@ bool CollectFramesForInjection(const api::scripting::InjectionTarget& target,
 // if the target cannot be accessed, populates `error_out`.
 bool CanAccessTarget(const PermissionsData& permissions,
                      const api::scripting::InjectionTarget& target,
-                     content::BrowserContext* browser_context,
-                     bool include_incognito_information,
+                     content::BrowserContext* /*browser_context*/,
+                     bool /*include_incognito_information*/,
                      ScriptExecutor** script_executor_out,
                      ScriptExecutor::FrameScope* frame_scope_out,
                      std::set<int>* frame_ids_out,
@@ -481,7 +481,7 @@ ConvertRegisteredContentScriptToSerializedUserScript(
 }
 
 std::unique_ptr<UserScript> ParseUserScript(
-    content::BrowserContext* browser_context,
+    content::BrowserContext* /*browser_context*/,
     const Extension& extension,
     bool allowed_in_incognito,
     api::scripting::RegisteredContentScript content_script,

+ 2 - 2
shell/browser/extensions/api/tabs/tabs_api.cc

@@ -189,7 +189,7 @@ bool ExecuteCodeInTabFunction::CanExecuteScriptOnPage(std::string* error) {
 }
 
 ScriptExecutor* ExecuteCodeInTabFunction::GetScriptExecutor(
-    std::string* error) {
+    std::string* /*error*/) {
   auto* contents = electron::api::WebContents::FromID(execute_tab_id_);
   if (!contents)
     return nullptr;
@@ -624,7 +624,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
 }
 
 bool TabsUpdateFunction::UpdateURL(const std::string& url_string,
-                                   int tab_id,
+                                   int /*tab_id*/,
                                    std::string* error) {
   auto url =
       PrepareURLForNavigation(url_string, extension(), browser_context());

+ 7 - 7
shell/browser/extensions/electron_extension_host_delegate.cc

@@ -29,10 +29,10 @@ void ElectronExtensionHostDelegate::OnExtensionHostCreated(
 
 void ElectronExtensionHostDelegate::CreateTab(
     std::unique_ptr<content::WebContents> web_contents,
-    const std::string& extension_id,
-    WindowOpenDisposition disposition,
-    const blink::mojom::WindowFeatures& window_features,
-    bool user_gesture) {
+    const std::string& /*extension_id*/,
+    WindowOpenDisposition /*disposition*/,
+    const blink::mojom::WindowFeatures& /*window_features*/,
+    bool /*user_gesture*/) {
   // TODO(jamescook): Should app_shell support opening popup windows?
   NOTREACHED();
 }
@@ -48,8 +48,8 @@ void ElectronExtensionHostDelegate::ProcessMediaAccessRequest(
 }
 
 bool ElectronExtensionHostDelegate::CheckMediaAccessPermission(
-    content::RenderFrameHost* render_frame_host,
-    const url::Origin& security_origin,
+    content::RenderFrameHost* /*render_frame_host*/,
+    const url::Origin& /*security_origin*/,
     blink::mojom::MediaStreamType type,
     const Extension* extension) {
   media_capture_util::VerifyMediaAccessPermission(type, extension);
@@ -58,7 +58,7 @@ bool ElectronExtensionHostDelegate::CheckMediaAccessPermission(
 
 content::PictureInPictureResult
 ElectronExtensionHostDelegate::EnterPictureInPicture(
-    content::WebContents* web_contents) {
+    content::WebContents* /*web_contents*/) {
   NOTREACHED();
 }
 

+ 8 - 5
shell/browser/extensions/electron_extension_loader.cc

@@ -159,7 +159,7 @@ void ElectronExtensionLoader::FinishExtensionLoad(
 }
 
 void ElectronExtensionLoader::FinishExtensionReload(
-    const ExtensionId& old_extension_id,
+    const ExtensionId& /*old_extension_id*/,
     std::pair<scoped_refptr<const Extension>, std::string> result) {
   scoped_refptr<const Extension> extension = result.first;
   if (extension) {
@@ -197,7 +197,7 @@ void ElectronExtensionLoader::PostDeactivateExtension(
 void ElectronExtensionLoader::LoadExtensionForReload(
     const ExtensionId& extension_id,
     const base::FilePath& path,
-    LoadErrorBehavior load_error_behavior) {
+    LoadErrorBehavior /*load_error_behavior*/) {
   CHECK(!path.empty());
 
   // TODO(nornagon): we should save whether file access was granted
@@ -211,16 +211,19 @@ void ElectronExtensionLoader::LoadExtensionForReload(
   did_schedule_reload_ = true;
 }
 
-bool ElectronExtensionLoader::CanEnableExtension(const Extension* extension) {
+bool ElectronExtensionLoader::CanEnableExtension(
+    const Extension* /*extension*/) {
   return true;
 }
 
-bool ElectronExtensionLoader::CanDisableExtension(const Extension* extension) {
+bool ElectronExtensionLoader::CanDisableExtension(
+    const Extension* /*extension*/) {
   // Extensions cannot be disabled by the user.
   return false;
 }
 
-bool ElectronExtensionLoader::ShouldBlockExtension(const Extension* extension) {
+bool ElectronExtensionLoader::ShouldBlockExtension(
+    const Extension* /*extension*/) {
   return false;
 }
 

+ 11 - 10
shell/browser/extensions/electron_extension_system.cc

@@ -72,7 +72,8 @@ void ElectronExtensionSystem::Shutdown() {
   extension_loader_.reset();
 }
 
-void ElectronExtensionSystem::InitForRegularProfile(bool extensions_enabled) {
+void ElectronExtensionSystem::InitForRegularProfile(
+    bool /*extensions_enabled*/) {
   service_worker_manager_ =
       std::make_unique<ServiceWorkerManager>(browser_context_);
   quota_service_ = std::make_unique<QuotaService>();
@@ -179,28 +180,28 @@ ContentVerifier* ElectronExtensionSystem::content_verifier() {
 }
 
 std::unique_ptr<ExtensionSet> ElectronExtensionSystem::GetDependentExtensions(
-    const Extension* extension) {
+    const Extension* /*extension*/) {
   return std::make_unique<ExtensionSet>();
 }
 
 void ElectronExtensionSystem::InstallUpdate(
-    const std::string& extension_id,
-    const std::string& public_key,
-    const base::FilePath& temp_dir,
-    bool install_immediately,
+    const std::string& /*extension_id*/,
+    const std::string& /*public_key*/,
+    const base::FilePath& /*temp_dir*/,
+    bool /*install_immediately*/,
     InstallUpdateCallback install_update_callback) {
   NOTREACHED();
 }
 
 bool ElectronExtensionSystem::FinishDelayedInstallationIfReady(
-    const std::string& extension_id,
-    bool install_immediately) {
+    const std::string& /*extension_id*/,
+    bool /*install_immediately*/) {
   NOTREACHED();
 }
 
 void ElectronExtensionSystem::PerformActionBasedOnOmahaAttributes(
-    const std::string& extension_id,
-    const base::Value::Dict& attributes) {
+    const std::string& /*extension_id*/,
+    const base::Value::Dict& /*attributes*/) {
   NOTREACHED();
 }
 

+ 1 - 1
shell/browser/extensions/electron_extensions_api_client.cc

@@ -103,7 +103,7 @@ ElectronExtensionsAPIClient::CreateManagementAPIDelegate() const {
 
 std::unique_ptr<MimeHandlerViewGuestDelegate>
 ElectronExtensionsAPIClient::CreateMimeHandlerViewGuestDelegate(
-    MimeHandlerViewGuest* guest) const {
+    MimeHandlerViewGuest* /*guest*/) const {
   return std::make_unique<ElectronMimeHandlerViewGuestDelegate>();
 }
 

+ 16 - 16
shell/browser/extensions/electron_extensions_browser_client.cc

@@ -79,8 +79,8 @@ bool ElectronExtensionsBrowserClient::IsShuttingDown() {
 }
 
 bool ElectronExtensionsBrowserClient::AreExtensionsDisabled(
-    const base::CommandLine& command_line,
-    BrowserContext* context) {
+    const base::CommandLine& /*command_line*/,
+    BrowserContext* /*context*/) {
   return false;
 }
 
@@ -99,12 +99,12 @@ bool ElectronExtensionsBrowserClient::IsSameContext(BrowserContext* first,
 }
 
 bool ElectronExtensionsBrowserClient::HasOffTheRecordContext(
-    BrowserContext* context) {
+    BrowserContext* /*context*/) {
   return false;
 }
 
 BrowserContext* ElectronExtensionsBrowserClient::GetOffTheRecordContext(
-    BrowserContext* context) {
+    BrowserContext* /*context*/) {
   // app_shell only supports a single context.
   return nullptr;
 }
@@ -137,24 +137,24 @@ ElectronExtensionsBrowserClient::GetContextForOriginalOnly(
 }
 
 bool ElectronExtensionsBrowserClient::AreExtensionsDisabledForContext(
-    content::BrowserContext* context) {
+    content::BrowserContext* /*context*/) {
   return false;
 }
 
 bool ElectronExtensionsBrowserClient::IsGuestSession(
-    BrowserContext* context) const {
+    BrowserContext* /*context*/) const {
   return false;
 }
 
 bool ElectronExtensionsBrowserClient::IsExtensionIncognitoEnabled(
-    const std::string& extension_id,
-    content::BrowserContext* context) const {
+    const std::string& /*extension_id*/,
+    content::BrowserContext* /*context*/) const {
   return false;
 }
 
 bool ElectronExtensionsBrowserClient::CanExtensionCrossIncognito(
-    const extensions::Extension* extension,
-    content::BrowserContext* context) const {
+    const extensions::Extension* /*extension*/,
+    content::BrowserContext* /*context*/) const {
   return false;
 }
 
@@ -268,9 +268,9 @@ ElectronExtensionsBrowserClient::GetProcessManagerDelegate() const {
 
 mojo::PendingRemote<network::mojom::URLLoaderFactory>
 ElectronExtensionsBrowserClient::GetControlledFrameEmbedderURLLoader(
-    const url::Origin& app_origin,
+    const url::Origin& /*app_origin*/,
     content::FrameTreeNodeId frame_tree_node_id,
-    content::BrowserContext* browser_context) {
+    content::BrowserContext* /*browser_context*/) {
   return mojo::PendingRemote<network::mojom::URLLoaderFactory>();
 }
 
@@ -281,7 +281,7 @@ ElectronExtensionsBrowserClient::
 }
 
 bool ElectronExtensionsBrowserClient::DidVersionUpdate(
-    BrowserContext* context) {
+    BrowserContext* /*context*/) {
   // TODO(jamescook): We might want to tell extensions when app_shell updates.
   return false;
 }
@@ -293,7 +293,7 @@ bool ElectronExtensionsBrowserClient::IsInDemoMode() {
 }
 
 bool ElectronExtensionsBrowserClient::IsScreensaverInDemoMode(
-    const std::string& app_id) {
+    const std::string& /*app_id*/) {
   return false;
 }
 
@@ -302,7 +302,7 @@ bool ElectronExtensionsBrowserClient::IsRunningInForcedAppMode() {
 }
 
 bool ElectronExtensionsBrowserClient::IsAppModeForcedForApp(
-    const extensions::ExtensionId& extension_id) {
+    const extensions::ExtensionId& /*extension_id*/) {
   return false;
 }
 
@@ -361,7 +361,7 @@ bool ElectronExtensionsBrowserClient::IsBackgroundUpdateAllowed() {
 }
 
 bool ElectronExtensionsBrowserClient::IsMinBrowserVersionSupported(
-    const std::string& min_version) {
+    const std::string& /*min_version*/) {
   return true;
 }
 

+ 1 - 1
shell/browser/extensions/electron_kiosk_delegate.cc

@@ -11,7 +11,7 @@ ElectronKioskDelegate::ElectronKioskDelegate() = default;
 ElectronKioskDelegate::~ElectronKioskDelegate() = default;
 
 bool ElectronKioskDelegate::IsAutoLaunchedKioskApp(
-    const extensions::ExtensionId& id) const {
+    const extensions::ExtensionId& /*id*/) const {
   return false;
 }
 

+ 13 - 13
shell/browser/extensions/electron_messaging_delegate.cc

@@ -32,8 +32,8 @@ ElectronMessagingDelegate::~ElectronMessagingDelegate() = default;
 
 MessagingDelegate::PolicyPermission
 ElectronMessagingDelegate::IsNativeMessagingHostAllowed(
-    content::BrowserContext* browser_context,
-    const std::string& native_host_name) {
+    content::BrowserContext* /*browser_context*/,
+    const std::string& /*native_host_name*/) {
   DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
 
   return PolicyPermission::DISALLOW;
@@ -56,7 +56,7 @@ std::optional<base::Value::Dict> ElectronMessagingDelegate::MaybeGetTabInfo(
 }
 
 content::WebContents* ElectronMessagingDelegate::GetWebContentsByTabId(
-    content::BrowserContext* browser_context,
+    content::BrowserContext* /*browser_context*/,
     int tab_id) {
   auto* contents = electron::api::WebContents::FromID(tab_id);
   if (!contents) {
@@ -114,22 +114,22 @@ std::unique_ptr<MessagePort> ElectronMessagingDelegate::CreateReceiverForTab(
 
 std::unique_ptr<MessagePort>
 ElectronMessagingDelegate::CreateReceiverForNativeApp(
-    content::BrowserContext* browser_context,
+    content::BrowserContext* /*browser_context*/,
     base::WeakPtr<MessagePort::ChannelDelegate> channel_delegate,
-    content::RenderFrameHost* source,
-    const std::string& extension_id,
-    const PortId& receiver_port_id,
-    const std::string& native_app_name,
-    bool allow_user_level,
-    std::string* error_out) {
+    content::RenderFrameHost* /*source*/,
+    const std::string& /*extension_id*/,
+    const PortId& /*receiver_port_id*/,
+    const std::string& /*native_app_name*/,
+    bool /*allow_user_level*/,
+    std::string* /*error_out*/) {
   return nullptr;
 }
 
 void ElectronMessagingDelegate::QueryIncognitoConnectability(
     content::BrowserContext* context,
-    const Extension* target_extension,
-    content::WebContents* source_contents,
-    const GURL& source_url,
+    const Extension* /*target_extension*/,
+    content::WebContents* /*source_contents*/,
+    const GURL& /*source_url*/,
     base::OnceCallback<void(bool)> callback) {
   DCHECK(context->IsOffTheRecord());
   std::move(callback).Run(false);

+ 4 - 4
shell/browser/extensions/electron_process_manager_delegate.cc

@@ -18,18 +18,18 @@ ElectronProcessManagerDelegate::ElectronProcessManagerDelegate() = default;
 ElectronProcessManagerDelegate::~ElectronProcessManagerDelegate() = default;
 
 bool ElectronProcessManagerDelegate::AreBackgroundPagesAllowedForContext(
-    content::BrowserContext* context) const {
+    content::BrowserContext* /*context*/) const {
   return true;
 }
 
 bool ElectronProcessManagerDelegate::IsExtensionBackgroundPageAllowed(
-    content::BrowserContext* context,
-    const Extension& extension) const {
+    content::BrowserContext* /*context*/,
+    const Extension& /*extension*/) const {
   return true;
 }
 
 bool ElectronProcessManagerDelegate::DeferCreatingStartupBackgroundHosts(
-    content::BrowserContext* context) const {
+    content::BrowserContext* /*context*/) const {
   return false;
 }
 

+ 2 - 2
shell/browser/file_select_helper.cc

@@ -76,7 +76,7 @@ FileSelectHelper::~FileSelectHelper() {
 }
 
 void FileSelectHelper::FileSelected(const ui::SelectedFileInfo& file,
-                                    int index) {
+                                    int /*index*/) {
   if (!render_frame_host_) {
     RunFileChooserEnd();
     return;
@@ -488,7 +488,7 @@ void FileSelectHelper::EnumerateDirectoryEnd() {
 
 void FileSelectHelper::RenderFrameHostChanged(
     content::RenderFrameHost* old_host,
-    content::RenderFrameHost* new_host) {
+    content::RenderFrameHost* /*new_host*/) {
   // The |old_host| and its children are now pending deletion. Do not give them
   // file access past this point.
   for (content::RenderFrameHost* host = render_frame_host_; host;

+ 10 - 10
shell/browser/file_system_access/file_system_access_permission_context.cc

@@ -229,7 +229,7 @@ class FileSystemAccessPermissionContext::PermissionGrantImpl
                       const content::PathInfo& path_info,
                       HandleType handle_type,
                       GrantType type,
-                      UserAction user_action)
+                      UserAction /*user_action*/)
       : context_{std::move(context)},
         origin_{origin},
         handle_type_{handle_type},
@@ -562,26 +562,26 @@ FileSystemAccessPermissionContext::GetWritePermissionGrant(
 }
 
 bool FileSystemAccessPermissionContext::IsFileTypeDangerous(
-    const base::FilePath& path,
-    const url::Origin& origin) {
+    const base::FilePath& /*path*/,
+    const url::Origin& /*origin*/) {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
   return false;
 }
 
 base::expected<void, std::string>
 FileSystemAccessPermissionContext::CanShowFilePicker(
-    content::RenderFrameHost* rfh) {
+    content::RenderFrameHost* /*rfh*/) {
   return base::ok();
 }
 
 bool FileSystemAccessPermissionContext::CanObtainReadPermission(
-    const url::Origin& origin) {
+    const url::Origin& /*origin*/) {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
   return true;
 }
 
 bool FileSystemAccessPermissionContext::CanObtainWritePermission(
-    const url::Origin& origin) {
+    const url::Origin& /*origin*/) {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
   return true;
 }
@@ -631,7 +631,7 @@ void FileSystemAccessPermissionContext::CheckPathAgainstBlocklist(
 
 void FileSystemAccessPermissionContext::PerformAfterWriteChecks(
     std::unique_ptr<content::FileSystemAccessWriteItem> item,
-    content::GlobalRenderFrameHostId frame_id,
+    content::GlobalRenderFrameHostId /*frame_id*/,
     base::OnceCallback<void(AfterWriteCheckResult)> callback) {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
   std::move(callback).Run(AfterWriteCheckResult::kAllow);
@@ -657,7 +657,7 @@ void FileSystemAccessPermissionContext::DidCheckPathAgainstBlocklist(
     const content::PathInfo& path_info,
     HandleType handle_type,
     UserAction user_action,
-    content::GlobalRenderFrameHostId frame_id,
+    content::GlobalRenderFrameHostId /*frame_id*/,
     bool should_block) {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
 
@@ -779,7 +779,7 @@ content::PathInfo FileSystemAccessPermissionContext::GetLastPickedDirectory(
 
 base::FilePath FileSystemAccessPermissionContext::GetWellKnownDirectoryPath(
     blink::mojom::WellKnownDirectory directory,
-    const url::Origin& origin) {
+    const url::Origin& /*origin*/) {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
 
   int key = base::PATH_START;
@@ -862,7 +862,7 @@ void FileSystemAccessPermissionContext::OnFileCreatedFromShowSaveFilePicker(
 
 void FileSystemAccessPermissionContext::CheckPathsAgainstEnterprisePolicy(
     std::vector<content::PathInfo> entries,
-    content::GlobalRenderFrameHostId frame_id,
+    content::GlobalRenderFrameHostId /*frame_id*/,
     EntriesAllowedByEnterprisePolicyCallback callback) {
   std::move(callback).Run(std::move(entries));
 }

+ 2 - 2
shell/browser/hid/electron_hid_delegate.cc

@@ -152,7 +152,7 @@ bool ElectronHidDelegate::CanRequestDevicePermission(
 
 bool ElectronHidDelegate::HasDevicePermission(
     content::BrowserContext* browser_context,
-    content::RenderFrameHost* render_frame_host,
+    content::RenderFrameHost* /*render_frame_host*/,
     const url::Origin& origin,
     const device::mojom::HidDeviceInfo& device) {
   return browser_context && GetChooserContext(browser_context)
@@ -161,7 +161,7 @@ bool ElectronHidDelegate::HasDevicePermission(
 
 void ElectronHidDelegate::RevokeDevicePermission(
     content::BrowserContext* browser_context,
-    content::RenderFrameHost* render_frame_host,
+    content::RenderFrameHost* /*render_frame_host*/,
     const url::Origin& origin,
     const device::mojom::HidDeviceInfo& device) {
   if (browser_context) {

+ 3 - 3
shell/browser/lib/bluetooth_chooser.cc

@@ -102,9 +102,9 @@ void BluetoothChooser::ShowDiscoveryState(DiscoveryState state) {
 void BluetoothChooser::AddOrUpdateDevice(const std::string& device_id,
                                          bool should_update_name,
                                          const std::u16string& device_name,
-                                         bool is_gatt_connected,
-                                         bool is_paired,
-                                         int signal_strength_level) {
+                                         bool /*is_gatt_connected*/,
+                                         bool /*is_paired*/,
+                                         int /*signal_strength_level*/) {
   if (refreshing_) {
     // If the list of bluetooth devices is currently being generated don't fire
     // an event

+ 2 - 2
shell/browser/media/media_capture_devices_dispatcher.cc

@@ -27,7 +27,7 @@ MediaCaptureDevicesDispatcher::~MediaCaptureDevicesDispatcher() = default;
 
 const std::optional<blink::MediaStreamDevice>
 MediaCaptureDevicesDispatcher::GetPreferredAudioDeviceForBrowserContext(
-    content::BrowserContext* browser_context,
+    content::BrowserContext* /*browser_context*/,
     const std::vector<std::string>& eligible_audio_device_ids) const {
   auto audio_devices = GetAudioCaptureDevices();
   if (!eligible_audio_device_ids.empty()) {
@@ -43,7 +43,7 @@ MediaCaptureDevicesDispatcher::GetPreferredAudioDeviceForBrowserContext(
 
 const std::optional<blink::MediaStreamDevice>
 MediaCaptureDevicesDispatcher::GetPreferredVideoDeviceForBrowserContext(
-    content::BrowserContext* browser_context,
+    content::BrowserContext* /*browser_context*/,
     const std::vector<std::string>& eligible_video_device_ids) const {
   auto video_devices = GetVideoCaptureDevices();
   if (!eligible_video_device_ids.empty()) {

+ 2 - 1
shell/browser/microtasks_runner.cc

@@ -16,7 +16,8 @@ MicrotasksRunner::MicrotasksRunner(v8::Isolate* isolate) : isolate_(isolate) {}
 void MicrotasksRunner::WillProcessTask(const base::PendingTask& pending_task,
                                        bool was_blocked_or_low_priority) {}
 
-void MicrotasksRunner::DidProcessTask(const base::PendingTask& pending_task) {
+void MicrotasksRunner::DidProcessTask(
+    const base::PendingTask& /*pending_task*/) {
   // In the browser process we follow Node.js microtask policy of kExplicit
   // and let the MicrotaskRunner which is a task observer for chromium UI thread
   // scheduler run the microtask checkpoint. This worked fine because Node.js

+ 2 - 2
shell/browser/native_window.cc

@@ -453,7 +453,7 @@ void NativeWindow::SetParentWindow(NativeWindow* parent) {
   parent_ = parent;
 }
 
-bool NativeWindow::AddTabbedWindow(NativeWindow* window) {
+bool NativeWindow::AddTabbedWindow(NativeWindow* /*window*/) {
   return true;  // for non-Mac platforms
 }
 
@@ -461,7 +461,7 @@ std::optional<std::string> NativeWindow::GetTabbingIdentifier() const {
   return "";  // for non-Mac platforms
 }
 
-void NativeWindow::SetVibrancy(const std::string& type, int duration) {
+void NativeWindow::SetVibrancy(const std::string& type, int /*duration*/) {
   vibrancy_ = type;
 }
 

+ 12 - 12
shell/browser/native_window_views.cc

@@ -793,7 +793,7 @@ bool NativeWindowViews::IsFullscreen() const {
   return widget()->IsFullscreen();
 }
 
-void NativeWindowViews::SetBounds(const gfx::Rect& bounds, bool animate) {
+void NativeWindowViews::SetBounds(const gfx::Rect& bounds, bool /*animate*/) {
 #if BUILDFLAG(IS_WIN)
   if (is_moving_ || is_resizing_) {
     pending_bounds_change_ = bounds;
@@ -1064,8 +1064,8 @@ bool NativeWindowViews::IsClosable() const {
 }
 
 void NativeWindowViews::SetAlwaysOnTop(ui::ZOrderLevel z_order,
-                                       const std::string& level,
-                                       int relativeLevel) {
+                                       const std::string& /*level*/,
+                                       int /*relativeLevel*/) {
   bool level_changed = z_order != widget()->GetZOrderLevel();
   widget()->SetZOrderLevel(z_order);
 
@@ -1217,7 +1217,7 @@ bool NativeWindowViews::HasShadow() const {
          wm::kShadowElevationNone;
 }
 
-void NativeWindowViews::SetOpacity(const double opacity) {
+void NativeWindowViews::SetOpacity(const double /*opacity*/) {
 #if BUILDFLAG(IS_WIN)
   const double boundedOpacity = std::clamp(opacity, 0.0, 1.0);
   HWND hwnd = GetAcceleratedWidget();
@@ -1238,7 +1238,7 @@ double NativeWindowViews::GetOpacity() const {
   return opacity_;
 }
 
-void NativeWindowViews::SetIgnoreMouseEvents(bool ignore, bool forward) {
+void NativeWindowViews::SetIgnoreMouseEvents(bool ignore, bool /*forward*/) {
 #if BUILDFLAG(IS_WIN)
   LONG ex_style = ::GetWindowLong(GetAcceleratedWidget(), GWL_EXSTYLE);
   if (ignore)
@@ -1421,7 +1421,7 @@ gfx::NativeWindow NativeWindowViews::GetNativeWindow() const {
 }
 
 void NativeWindowViews::SetProgressBar(double progress,
-                                       NativeWindow::ProgressState state) {
+                                       NativeWindow::ProgressState /*state*/) {
 #if BUILDFLAG(IS_WIN)
   taskbar_host_.SetProgressBar(GetAcceleratedWidget(), progress, state);
 #elif BUILDFLAG(IS_LINUX)
@@ -1489,8 +1489,8 @@ void NativeWindowViews::SetBackgroundMaterial(const std::string& material) {
 
 void NativeWindowViews::SetVisibleOnAllWorkspaces(
     bool visible,
-    bool visibleOnFullScreen,
-    bool skipTransformProcessType) {
+    bool /*visibleOnFullScreen*/,
+    bool /*skipTransformProcessType*/) {
   widget()->SetVisibleOnAllWorkspaces(visible);
 }
 
@@ -1660,7 +1660,7 @@ void NativeWindowViews::OnWidgetActivationChanged(views::Widget* changed_widget,
 }
 
 void NativeWindowViews::OnWidgetBoundsChanged(views::Widget* changed_widget,
-                                              const gfx::Rect& bounds) {
+                                              const gfx::Rect& /*bounds*/) {
   if (changed_widget != widget())
     return;
 
@@ -1691,13 +1691,13 @@ void NativeWindowViews::OnWidgetBoundsChanged(views::Widget* changed_widget,
   }
 }
 
-void NativeWindowViews::OnWidgetDestroying(views::Widget* widget) {
+void NativeWindowViews::OnWidgetDestroying(views::Widget* /*widget*/) {
   aura::Window* window = GetNativeWindow();
   if (window)
     window->RemovePreTargetHandler(this);
 }
 
-void NativeWindowViews::OnWidgetDestroyed(views::Widget* changed_widget) {
+void NativeWindowViews::OnWidgetDestroyed(views::Widget* /*changed_widget*/) {
   widget_destroyed_ = true;
 }
 
@@ -1726,7 +1726,7 @@ views::View* NativeWindowViews::GetContentsView() {
 }
 
 bool NativeWindowViews::ShouldDescendIntoChildForEventHandling(
-    gfx::NativeView child,
+    gfx::NativeView /*child*/,
     const gfx::Point& location) {
   return NonClientHitTest(location) == HTNOWHERE;
 }

+ 2 - 2
shell/browser/net/cert_verifier_client.cc

@@ -25,8 +25,8 @@ void CertVerifierClient::Verify(
     const net::CertVerifyResult& default_result,
     const scoped_refptr<net::X509Certificate>& certificate,
     const std::string& hostname,
-    int flags,
-    const std::optional<std::string>& ocsp_response,
+    int /*flags*/,
+    const std::optional<std::string>& /*ocsp_response*/,
     VerifyCallback callback) {
   VerifyRequestParams params;
   params.hostname = hostname;

+ 2 - 2
shell/browser/net/electron_url_loader_factory.cc

@@ -212,7 +212,7 @@ void ElectronURLLoaderFactory::RedirectedRequest::FollowRedirect(
     const std::vector<std::string>& removed_headers,
     const net::HttpRequestHeaders& modified_headers,
     const net::HttpRequestHeaders& modified_cors_exempt_headers,
-    const std::optional<GURL>& new_url) {
+    const std::optional<GURL>& /*new_url*/) {
   // Update |request_| with info from the redirect, so that it's accurate
   // The following references code in WorkerScriptLoader::FollowRedirect
   bool should_clear_upload = false;
@@ -307,7 +307,7 @@ void ElectronURLLoaderFactory::CreateLoaderAndStart(
 // static
 void ElectronURLLoaderFactory::OnComplete(
     mojo::PendingRemote<network::mojom::URLLoaderClient> client,
-    int32_t request_id,
+    int32_t /*request_id*/,
     const network::URLLoaderCompletionStatus& status) {
   if (client.is_valid()) {
     mojo::Remote<network::mojom::URLLoaderClient> client_remote(

+ 1 - 1
shell/browser/net/network_context_service.cc

@@ -46,7 +46,7 @@ NetworkContextService::~NetworkContextService() = default;
 void NetworkContextService::ConfigureNetworkContextParams(
     network::mojom::NetworkContextParams* network_context_params,
     cert_verifier::mojom::CertVerifierCreationParams*
-        cert_verifier_creation_params) {
+    /*cert_verifier_creation_params*/) {
   bool in_memory = browser_context_->IsOffTheRecord();
   const base::FilePath& path = browser_context_->GetPath();
 

+ 3 - 3
shell/browser/net/proxying_websocket.cc

@@ -25,7 +25,7 @@ ProxyingWebSocket::ProxyingWebSocket(
     bool has_extra_headers,
     int process_id,
     int render_frame_id,
-    content::BrowserContext* browser_context,
+    content::BrowserContext* /*browser_context*/,
     uint64_t* request_id_generator)
     : web_request_api_(web_request_api),
       request_(request),
@@ -209,7 +209,7 @@ void ProxyingWebSocket::OnBeforeSendHeaders(
 }
 
 void ProxyingWebSocket::OnHeadersReceived(const std::string& headers,
-                                          const net::IPEndPoint& endpoint,
+                                          const net::IPEndPoint& /*endpoint*/,
                                           OnHeadersReceivedCallback callback) {
   DCHECK(receiver_as_header_client_.is_bound());
 
@@ -391,7 +391,7 @@ void ProxyingWebSocket::OnAuthRequiredComplete(AuthRequiredResponse rv) {
 }
 
 void ProxyingWebSocket::OnHeadersReceivedCompleteForAuth(
-    const net::AuthChallengeInfo& auth_info,
+    const net::AuthChallengeInfo& /*auth_info*/,
     int rv) {
   if (rv != net::OK) {
     OnError(rv);

+ 1 - 1
shell/browser/net/resolve_host_function.cc

@@ -74,7 +74,7 @@ void ResolveHostFunction::Run() {
 }
 
 void ResolveHostFunction::OnComplete(
-    int result,
+    int /*result*/,
     const net::ResolveErrorInfo& resolve_error_info,
     const std::optional<net::AddressList>& resolved_addresses,
     const std::optional<net::HostResolverEndpointResults>&

+ 1 - 1
shell/browser/net/resolve_proxy_helper.cc

@@ -70,7 +70,7 @@ void ResolveProxyHelper::StartPendingRequest() {
 }
 
 void ResolveProxyHelper::OnProxyLookupComplete(
-    int32_t net_error,
+    int32_t /*net_error*/,
     const std::optional<net::ProxyInfo>& proxy_info) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   DCHECK(!pending_requests_.empty());

+ 12 - 12
shell/browser/net/url_loader_network_observer.cc

@@ -70,8 +70,8 @@ URLLoaderNetworkObserver::Bind() {
 }
 
 void URLLoaderNetworkObserver::OnAuthRequired(
-    const std::optional<base::UnguessableToken>& window_id,
-    int32_t request_id,
+    const std::optional<base::UnguessableToken>& /*window_id*/,
+    int32_t /*request_id*/,
     const GURL& url,
     bool first_auth_attempt,
     const net::AuthChallengeInfo& auth_info,
@@ -83,20 +83,20 @@ void URLLoaderNetworkObserver::OnAuthRequired(
 }
 
 void URLLoaderNetworkObserver::OnSSLCertificateError(
-    const GURL& url,
+    const GURL& /*url*/,
     int net_error,
-    const net::SSLInfo& ssl_info,
-    bool fatal,
+    const net::SSLInfo& /*ssl_info*/,
+    bool /*fatal*/,
     OnSSLCertificateErrorCallback response) {
   std::move(response).Run(net_error);
 }
 
 void URLLoaderNetworkObserver::OnClearSiteData(
-    const GURL& url,
-    const std::string& header_value,
-    int32_t load_flags,
-    const std::optional<net::CookiePartitionKey>& cookie_partition_key,
-    bool partitioned_state_allowed_only,
+    const GURL& /*url*/,
+    const std::string& /*header_value*/,
+    int32_t /*load_flags*/,
+    const std::optional<net::CookiePartitionKey>& /*cookie_partition_key*/,
+    bool /*partitioned_state_allowed_only*/,
     OnClearSiteDataCallback callback) {
   std::move(callback).Run();
 }
@@ -108,10 +108,10 @@ void URLLoaderNetworkObserver::OnLoadingStateUpdate(
 }
 
 void URLLoaderNetworkObserver::OnSharedStorageHeaderReceived(
-    const url::Origin& request_origin,
+    const url::Origin& /*request_origin*/,
     std::vector<network::mojom::SharedStorageModifierMethodWithOptionsPtr>
         methods,
-    const std::optional<std::string>& with_lock,
+    const std::optional<std::string>& /*with_lock*/,
     OnSharedStorageHeaderReceivedCallback callback) {
   std::move(callback).Run();
 }

+ 2 - 2
shell/browser/net/url_pipe_loader.cc

@@ -60,7 +60,7 @@ void URLPipeLoader::NotifyComplete(int result) {
 }
 
 void URLPipeLoader::OnResponseStarted(
-    const GURL& final_url,
+    const GURL& /*final_url*/,
     const network::mojom::URLResponseHead& response_head) {
   mojo::ScopedDataPipeProducerHandle producer;
   mojo::ScopedDataPipeConsumerHandle consumer;
@@ -93,7 +93,7 @@ void URLPipeLoader::OnDataReceived(std::string_view string_view,
                      std::move(resume)));
 }
 
-void URLPipeLoader::OnRetry(base::OnceClosure start_retry) {
+void URLPipeLoader::OnRetry(base::OnceClosure /*start_retry*/) {
   NOTREACHED();
 }
 

+ 5 - 4
shell/browser/notifications/linux/libnotify_notification.cc

@@ -177,13 +177,14 @@ void LibnotifyNotification::Dismiss() {
 }
 
 void LibnotifyNotification::OnNotificationClosed(
-    NotifyNotification* notification) {
+    NotifyNotification* /*notification*/) {
   NotificationDismissed(!on_dismissing_);
 }
 
-void LibnotifyNotification::OnNotificationView(NotifyNotification* notification,
-                                               char* action,
-                                               gpointer user_data) {
+void LibnotifyNotification::OnNotificationView(
+    NotifyNotification* /*notification*/,
+    char* /*action*/,
+    gpointer user_data) {
   LibnotifyNotification* that = static_cast<LibnotifyNotification*>(user_data);
   DCHECK(that);
   that->NotificationClicked();

+ 2 - 2
shell/browser/notifications/platform_notification_service.cc

@@ -85,8 +85,8 @@ PlatformNotificationService::~PlatformNotificationService() = default;
 void PlatformNotificationService::DisplayNotification(
     content::RenderFrameHost* render_frame_host,
     const std::string& notification_id,
-    const GURL& origin,
-    const GURL& document_url,
+    const GURL& /*origin*/,
+    const GURL& /*document_url*/,
     const blink::PlatformNotificationData& notification_data,
     const blink::NotificationResources& notification_resources) {
   auto* presenter = browser_client_->GetNotificationPresenter();

+ 4 - 4
shell/browser/osr/osr_render_widget_host_view.cc

@@ -358,13 +358,13 @@ gfx::Size OffScreenRenderWidgetHostView::GetVisibleViewportSize() {
 }
 
 blink::mojom::PointerLockResult OffScreenRenderWidgetHostView::LockPointer(
-    bool request_unadjusted_movement) {
+    bool /*request_unadjusted_movement*/) {
   return blink::mojom::PointerLockResult::kUnsupportedOptions;
 }
 
 blink::mojom::PointerLockResult
 OffScreenRenderWidgetHostView::ChangePointerLock(
-    bool request_unadjusted_movement) {
+    bool /*request_unadjusted_movement*/) {
   return blink::mojom::PointerLockResult::kUnsupportedOptions;
 }
 
@@ -397,7 +397,7 @@ void OffScreenRenderWidgetHostView::ResetFallbackToFirstNavigationSurface() {
 void OffScreenRenderWidgetHostView::InitAsPopup(
     content::RenderWidgetHostView* parent_host_view,
     const gfx::Rect& bounds,
-    const gfx::Rect& anchor_rect) {
+    const gfx::Rect& /*anchor_rect*/) {
   DCHECK_EQ(parent_host_view_, parent_host_view);
   DCHECK_EQ(widget_type_, content::WidgetType::kPopup);
 
@@ -511,7 +511,7 @@ content::RenderWidgetHostViewBase*
 OffScreenRenderWidgetHostView::CreateViewForWidget(
     content::RenderWidgetHost* render_widget_host,
     content::RenderWidgetHost* embedder_render_widget_host,
-    content::WebContentsView* web_contents_view) {
+    content::WebContentsView* /*web_contents_view*/) {
   if (auto* rwhv = render_widget_host->GetView())
     return static_cast<content::RenderWidgetHostViewBase*>(rwhv);
 

+ 1 - 1
shell/browser/osr/osr_video_consumer.cc

@@ -162,7 +162,7 @@ void OffScreenVideoConsumer::OnFrameCaptured(
       pixels,
       media::VideoFrame::RowBytes(media::VideoFrame::Plane::kARGB,
                                   info->pixel_format, info->coded_size.width()),
-      [](void* addr, void* context) {
+      [](void* /*addr*/, void* context) {
         delete static_cast<FramePinner*>(context);
       },
       new FramePinner{std::move(mapping), std::move(callbacks)});

+ 4 - 4
shell/browser/printing/print_view_manager_electron.cc

@@ -111,12 +111,12 @@ void PrintViewManagerElectron::ScriptedPrint(
 
 #if BUILDFLAG(ENABLE_PRINT_PREVIEW)
 void PrintViewManagerElectron::SetupScriptedPrintPreview(
-    SetupScriptedPrintPreviewCallback callback) {
+    SetupScriptedPrintPreviewCallback /*callback*/) {
   mojo::ReportBadMessage(kInvalidSetupScriptedPrintPreviewCall);
 }
 
 void PrintViewManagerElectron::ShowScriptedPrintPreview(
-    bool source_is_modifiable) {
+    bool /*source_is_modifiable*/) {
   mojo::ReportBadMessage(kInvalidShowScriptedPrintPreviewCall);
 }
 
@@ -125,8 +125,8 @@ void PrintViewManagerElectron::RequestPrintPreview(
   mojo::ReportBadMessage(kInvalidRequestPrintPreviewCall);
 }
 
-void PrintViewManagerElectron::CheckForCancel(int32_t preview_ui_id,
-                                              int32_t request_id,
+void PrintViewManagerElectron::CheckForCancel(int32_t /*preview_ui_id*/,
+                                              int32_t /*request_id*/,
                                               CheckForCancelCallback callback) {
   std::move(callback).Run(false);
 }

+ 1 - 1
shell/browser/printing/printing_utils.cc

@@ -41,7 +41,7 @@
 
 namespace electron {
 
-gfx::Size GetDefaultPrinterDPI(const std::u16string& device_name) {
+gfx::Size GetDefaultPrinterDPI(const std::u16string& /*device_name*/) {
 #if BUILDFLAG(IS_MAC)
   return gfx::Size(printing::kDefaultMacDpi, printing::kDefaultMacDpi);
 #elif BUILDFLAG(IS_WIN)

+ 1 - 1
shell/browser/relauncher.cc

@@ -159,7 +159,7 @@ bool RelaunchAppWithHelper(const base::FilePath& helper,
   return true;
 }
 
-int RelauncherMain(const content::MainFunctionParams& main_parameters) {
+int RelauncherMain(const content::MainFunctionParams& /*main_parameters*/) {
   const StringVector& argv = electron::ElectronCommandLine::argv();
 
   if (argv.size() < 4 || argv[1] != kRelauncherTypeArg) {

+ 1 - 1
shell/browser/relauncher_linux.cc

@@ -50,7 +50,7 @@ void RelauncherSynchronizeWithParent() {
   parentWaiter.Wait();
 }
 
-int LaunchProgram(const StringVector& relauncher_args,
+int LaunchProgram(const StringVector& /*relauncher_args*/,
                   const StringVector& argv) {
   // Redirect the stdout of child process to /dev/null, otherwise after
   // relaunch the child process will raise exception when writing to stdout.

+ 2 - 2
shell/browser/serial/serial_chooser_context.cc

@@ -86,7 +86,7 @@ SerialChooserContext::~SerialChooserContext() {
 void SerialChooserContext::GrantPortPermission(
     const url::Origin& origin,
     const device::mojom::SerialPortInfo& port,
-    content::RenderFrameHost* render_frame_host) {
+    content::RenderFrameHost* /*render_frame_host*/) {
   port_info_.insert({port.token, port.Clone()});
 
   if (CanStorePersistentEntry(port)) {
@@ -105,7 +105,7 @@ void SerialChooserContext::GrantPortPermission(
 bool SerialChooserContext::HasPortPermission(
     const url::Origin& origin,
     const device::mojom::SerialPortInfo& port,
-    content::RenderFrameHost* render_frame_host) {
+    content::RenderFrameHost* /*render_frame_host*/) {
   auto it = ephemeral_ports_.find(origin);
   if (it != ephemeral_ports_.end()) {
     const std::set<base::UnguessableToken>& ports = it->second;

+ 5 - 5
shell/browser/special_storage_policy.cc

@@ -12,23 +12,23 @@ SpecialStoragePolicy::SpecialStoragePolicy() = default;
 
 SpecialStoragePolicy::~SpecialStoragePolicy() = default;
 
-bool SpecialStoragePolicy::IsStorageProtected(const GURL& origin) {
+bool SpecialStoragePolicy::IsStorageProtected(const GURL& /*origin*/) {
   return true;
 }
 
-bool SpecialStoragePolicy::IsStorageUnlimited(const GURL& origin) {
+bool SpecialStoragePolicy::IsStorageUnlimited(const GURL& /*origin*/) {
   return true;
 }
 
-bool SpecialStoragePolicy::IsStorageDurable(const GURL& origin) {
+bool SpecialStoragePolicy::IsStorageDurable(const GURL& /*origin*/) {
   return true;
 }
 
-bool SpecialStoragePolicy::HasIsolatedStorage(const GURL& origin) {
+bool SpecialStoragePolicy::HasIsolatedStorage(const GURL& /*origin*/) {
   return false;
 }
 
-bool SpecialStoragePolicy::IsStorageSessionOnly(const GURL& origin) {
+bool SpecialStoragePolicy::IsStorageSessionOnly(const GURL& /*origin*/) {
   return false;
 }
 

+ 2 - 2
shell/browser/ui/autofill_popup.cc

@@ -248,12 +248,12 @@ gfx::Rect AutofillPopup::popup_bounds_in_view() {
   return {origin, popup_bounds_.size()};
 }
 
-void AutofillPopup::OnViewBoundsChanged(views::View* view) {
+void AutofillPopup::OnViewBoundsChanged(views::View* /*view*/) {
   UpdatePopupBounds();
   view_->DoUpdateBoundsAndRedrawPopup();
 }
 
-void AutofillPopup::OnViewIsDeleting(views::View* view) {
+void AutofillPopup::OnViewIsDeleting(views::View* /*view*/) {
   Hide();
 }
 

+ 3 - 2
shell/browser/ui/certificate_trust_win.cc

@@ -19,8 +19,9 @@ namespace certificate_trust {
 // store for the current user.
 //
 // This requires prompting the user to confirm they trust the certificate.
-BOOL AddToTrustedRootStore(const PCCERT_CONTEXT cert_context,
-                           const scoped_refptr<net::X509Certificate>& cert) {
+BOOL AddToTrustedRootStore(
+    const PCCERT_CONTEXT cert_context,
+    const scoped_refptr<net::X509Certificate>& /*cert*/) {
   auto* root_cert_store = CertOpenStore(
       CERT_STORE_PROV_SYSTEM, 0, 0, CERT_SYSTEM_STORE_CURRENT_USER, L"Root");
 

+ 4 - 4
shell/browser/ui/devtools_manager_delegate.cc

@@ -55,7 +55,7 @@ class TCPServerSocketFactory : public content::DevToolsSocketFactory {
     return socket;
   }
   std::unique_ptr<net::ServerSocket> CreateForTethering(
-      std::string* name) override {
+      std::string* /*name*/) override {
     return {};
   }
 
@@ -103,7 +103,7 @@ DevToolsManagerDelegate::~DevToolsManagerDelegate() = default;
 void DevToolsManagerDelegate::Inspect(content::DevToolsAgentHost* agent_host) {}
 
 void DevToolsManagerDelegate::HandleCommand(
-    content::DevToolsAgentHostClientChannel* channel,
+    content::DevToolsAgentHostClientChannel* /*channel*/,
     base::span<const uint8_t> message,
     NotHandledCallback callback) {
   crdtp::Dispatchable dispatchable(crdtp::SpanFrom(message));
@@ -124,8 +124,8 @@ void DevToolsManagerDelegate::HandleCommand(
 }
 
 scoped_refptr<content::DevToolsAgentHost>
-DevToolsManagerDelegate::CreateNewTarget(const GURL& url,
-                                         TargetType target_type) {
+DevToolsManagerDelegate::CreateNewTarget(const GURL& /*url*/,
+                                         TargetType /*target_type*/) {
   return nullptr;
 }
 

+ 1 - 1
shell/browser/ui/devtools_ui_bundle_data_source.cc

@@ -87,7 +87,7 @@ std::string BundledDataSource::GetSource() {
 
 void BundledDataSource::StartDataRequest(
     const GURL& url,
-    const content::WebContents::Getter& wc_getter,
+    const content::WebContents::Getter& /*wc_getter*/,
     GotDataCallback callback) {
   const std::string path = content::URLDataSource::URLToRequestPath(url);
   // Serve request from local bundle.

+ 2 - 2
shell/browser/ui/electron_desktop_window_tree_host_linux.cc

@@ -47,7 +47,7 @@ void ElectronDesktopWindowTreeHostLinux::OnWidgetInitDone() {
 }
 
 gfx::Insets ElectronDesktopWindowTreeHostLinux::CalculateInsetsInDIP(
-    ui::PlatformWindowState window_state) const {
+    ui::PlatformWindowState /*window_state*/) const {
   // If we are not showing frame, the insets should be zero.
   if (native_window_view_->IsFullscreen()) {
     return {};
@@ -142,7 +142,7 @@ void ElectronDesktopWindowTreeHostLinux::UpdateWindowState(
 }
 
 void ElectronDesktopWindowTreeHostLinux::OnNativeThemeUpdated(
-    ui::NativeTheme* observed_theme) {
+    ui::NativeTheme* /*observed_theme*/) {
   UpdateFrameHints();
 }
 

+ 1 - 1
shell/browser/ui/file_dialog_linux.cc

@@ -133,7 +133,7 @@ class FileChooserDialog : public ui::SelectFileDialog::Listener {
   }
 
   // ui::SelectFileDialog::Listener
-  void FileSelected(const ui::SelectedFileInfo& file, int index) override {
+  void FileSelected(const ui::SelectedFileInfo& file, int /*index*/) override {
     v8::Isolate* isolate = electron::JavascriptEnvironment::GetIsolate();
     v8::HandleScope scope(isolate);
     auto dict = gin_helper::Dictionary::CreateEmpty(isolate);

+ 7 - 6
shell/browser/ui/inspectable_web_contents.cc

@@ -150,7 +150,8 @@ GURL GetDevToolsURL(bool can_dock) {
   return GURL(url_string);
 }
 
-void OnOpenItemComplete(const base::FilePath& path, const std::string& result) {
+void OnOpenItemComplete(const base::FilePath& path,
+                        const std::string& /*result*/) {
   platform_util::ShowItemInFolder(path);
 }
 
@@ -816,8 +817,8 @@ void InspectableWebContents::DispatchProtocolMessageFromDevToolsFrontend(
 }
 
 void InspectableWebContents::SendJsonRequest(DispatchCallback callback,
-                                             const std::string& browser_id,
-                                             const std::string& url) {
+                                             const std::string& /*browser_id*/,
+                                             const std::string& /*url*/) {
   std::move(callback).Run(nullptr);
 }
 
@@ -898,7 +899,7 @@ void InspectableWebContents::HandleMessageFromDevToolsFrontend(
 }
 
 void InspectableWebContents::DispatchProtocolMessage(
-    content::DevToolsAgentHost* agent_host,
+    content::DevToolsAgentHost* /*agent_host*/,
     base::span<const uint8_t> message) {
   if (!frontend_loaded_)
     return;
@@ -924,7 +925,7 @@ void InspectableWebContents::DispatchProtocolMessage(
 }
 
 void InspectableWebContents::RenderFrameHostChanged(
-    content::RenderFrameHost* old_host,
+    content::RenderFrameHost* /*old_host*/,
     content::RenderFrameHost* new_host) {
   if (new_host->GetParent())
     return;
@@ -956,7 +957,7 @@ bool InspectableWebContents::HandleKeyboardEvent(
   return !delegate || delegate->HandleKeyboardEvent(source, event);
 }
 
-void InspectableWebContents::CloseContents(content::WebContents* source) {
+void InspectableWebContents::CloseContents(content::WebContents* /*source*/) {
   // This is where the devtools closes itself (by clicking the x button).
   CloseDevTools();
 }

+ 1 - 1
shell/browser/ui/inspectable_web_contents_view.cc

@@ -55,7 +55,7 @@ class DevToolsWindowDelegate : public views::ClientView,
   views::Widget* GetWidget() override { return widget_; }
   const views::Widget* GetWidget() const override { return widget_; }
   views::View* GetContentsView() override { return view_; }
-  views::ClientView* CreateClientView(views::Widget* widget) override {
+  views::ClientView* CreateClientView(views::Widget* /*widget*/) override {
     return this;
   }
 

Some files were not shown because too many files changed in this diff