Browse Source

refactor: remove unused system header includes (#46043)

* chore: remove unused #include <string>

Co-authored-by: Charles Kerr <[email protected]>

* chore: remove unused #include <optional>

Co-authored-by: Charles Kerr <[email protected]>

* chore: remove unused #include <vector>

Co-authored-by: Charles Kerr <[email protected]>

* chore: remove unused #include <string_view>

Co-authored-by: Charles Kerr <[email protected]>

* chore: remove unused #include <memory>

Co-authored-by: Charles Kerr <[email protected]>

* chore: remove unused #include <utility>

Co-authored-by: Charles Kerr <[email protected]>

* chore: remove unused #include <tuple>

Co-authored-by: Charles Kerr <[email protected]>

* chore: remove unused #include <unordered_set>

Co-authored-by: Charles Kerr <[email protected]>

* chore: remove unused #include <functional>

Co-authored-by: Charles Kerr <[email protected]>

* chore: iwyu <set>

Co-authored-by: Charles Kerr <[email protected]>

* chore: iwyu <map>

Co-authored-by: Charles Kerr <[email protected]>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <[email protected]>
trop[bot] 1 month ago
parent
commit
4b72738b41
29 changed files with 3 additions and 36 deletions
  1. 0 1
      shell/app/electron_content_client.cc
  2. 0 1
      shell/app/electron_main_linux.cc
  3. 0 1
      shell/app/electron_main_win.cc
  4. 0 1
      shell/browser/api/electron_api_service_worker_main.cc
  5. 0 2
      shell/browser/api/electron_api_service_worker_main.h
  6. 0 2
      shell/browser/api/electron_api_web_contents.h
  7. 0 1
      shell/browser/api/gpu_info_enumerator.h
  8. 0 1
      shell/browser/electron_download_manager_delegate.cc
  9. 0 2
      shell/browser/electron_web_contents_utility_handler_impl.h
  10. 0 1
      shell/browser/extensions/api/extension_action/extension_action_api.cc
  11. 0 2
      shell/browser/extensions/api/extension_action/extension_action_api.h
  12. 1 1
      shell/browser/extensions/api/scripting/scripting_api.h
  13. 1 0
      shell/browser/file_system_access/file_system_access_permission_context.h
  14. 0 1
      shell/browser/javascript_environment.cc
  15. 1 0
      shell/browser/native_window.h
  16. 0 1
      shell/browser/net/asar/asar_file_validator.cc
  17. 0 1
      shell/browser/net/system_network_context_manager.cc
  18. 0 1
      shell/browser/osr/osr_render_widget_host_view.cc
  19. 0 2
      shell/browser/relauncher.cc
  20. 0 1
      shell/browser/ui/devtools_ui_bundle_data_source.cc
  21. 0 1
      shell/browser/ui/devtools_ui_theme_data_source.cc
  22. 0 1
      shell/browser/zoom_level_delegate.cc
  23. 0 1
      shell/common/process_util.h
  24. 0 1
      shell/renderer/api/electron_api_context_bridge.cc
  25. 0 2
      shell/renderer/electron_api_service_impl.cc
  26. 0 2
      shell/renderer/electron_render_frame_observer.cc
  27. 0 1
      shell/renderer/electron_sandboxed_renderer_client.cc
  28. 0 2
      shell/renderer/extensions/electron_extensions_renderer_client.cc
  29. 0 2
      shell/renderer/extensions/electron_extensions_renderer_client.h

+ 0 - 1
shell/app/electron_content_client.cc

@@ -6,7 +6,6 @@
 
 #include <string>
 #include <string_view>
-#include <utility>
 #include <vector>
 
 #include "base/command_line.h"

+ 0 - 1
shell/app/electron_main_linux.cc

@@ -3,7 +3,6 @@
 // found in the LICENSE file.
 
 #include <cstdlib>
-#include <utility>
 
 #include "base/at_exit.h"
 #include "base/command_line.h"

+ 0 - 1
shell/app/electron_main_win.cc

@@ -14,7 +14,6 @@
 #include <memory>
 #include <string>
 #include <utility>
-#include <vector>
 
 #include "base/at_exit.h"
 #include "base/debug/alias.h"

+ 0 - 1
shell/browser/api/electron_api_service_worker_main.cc

@@ -7,7 +7,6 @@
 #include <string>
 #include <unordered_map>
 #include <utility>
-#include <vector>
 
 #include "base/logging.h"
 #include "base/no_destructor.h"

+ 0 - 2
shell/browser/api/electron_api_service_worker_main.h

@@ -5,9 +5,7 @@
 #ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_SERVICE_WORKER_MAIN_H_
 #define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_SERVICE_WORKER_MAIN_H_
 
-#include <optional>
 #include <string>
-#include <vector>
 
 #include "base/memory/raw_ptr.h"
 #include "base/memory/weak_ptr.h"

+ 0 - 2
shell/browser/api/electron_api_web_contents.h

@@ -9,8 +9,6 @@
 #include <memory>
 #include <optional>
 #include <string>
-#include <string_view>
-#include <utility>
 #include <vector>
 
 #include "base/functional/callback_forward.h"

+ 0 - 1
shell/browser/api/gpu_info_enumerator.h

@@ -5,7 +5,6 @@
 #ifndef ELECTRON_SHELL_BROWSER_API_GPU_INFO_ENUMERATOR_H_
 #define ELECTRON_SHELL_BROWSER_API_GPU_INFO_ENUMERATOR_H_
 
-#include <memory>
 #include <stack>
 #include <string>
 

+ 0 - 1
shell/browser/electron_download_manager_delegate.cc

@@ -6,7 +6,6 @@
 
 #include <string>
 #include <string_view>
-#include <tuple>
 #include <utility>
 
 #include "base/files/file_util.h"

+ 0 - 2
shell/browser/electron_web_contents_utility_handler_impl.h

@@ -5,8 +5,6 @@
 #ifndef ELECTRON_SHELL_BROWSER_ELECTRON_WEB_CONTENTS_UTILITY_HANDLER_IMPL_H_
 #define ELECTRON_SHELL_BROWSER_ELECTRON_WEB_CONTENTS_UTILITY_HANDLER_IMPL_H_
 
-#include <vector>
-
 #include "base/memory/weak_ptr.h"
 #include "content/public/browser/global_routing_id.h"
 #include "content/public/browser/web_contents_observer.h"

+ 0 - 1
shell/browser/extensions/api/extension_action/extension_action_api.cc

@@ -6,7 +6,6 @@
 
 #include <stddef.h>
 
-#include <memory>
 #include <utility>
 
 #include "base/no_destructor.h"

+ 0 - 2
shell/browser/extensions/api/extension_action/extension_action_api.h

@@ -5,8 +5,6 @@
 #ifndef SHELL_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H_
 #define SHELL_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H_
 
-#include <string>
-
 #include "base/memory/raw_ptr.h"
 #include "extensions/browser/browser_context_keyed_api_factory.h"
 #include "extensions/browser/extension_action.h"

+ 1 - 1
shell/browser/extensions/api/scripting/scripting_api.h

@@ -7,8 +7,8 @@
 
 #include <memory>
 #include <optional>
+#include <set>
 #include <string>
-#include <utility>
 #include <vector>
 
 #include "chrome/common/extensions/api/scripting.h"

+ 1 - 0
shell/browser/file_system_access/file_system_access_permission_context.h

@@ -7,6 +7,7 @@
 
 #include "shell/browser/file_system_access/file_system_access_permission_context.h"
 
+#include <map>
 #include <memory>
 #include <string>
 #include <vector>

+ 0 - 1
shell/browser/javascript_environment.cc

@@ -6,7 +6,6 @@
 
 #include <memory>
 #include <string>
-#include <unordered_set>
 #include <utility>
 
 #include "base/allocator/partition_alloc_features.h"

+ 1 - 0
shell/browser/native_window.h

@@ -9,6 +9,7 @@
 #include <memory>
 #include <optional>
 #include <queue>
+#include <set>
 #include <string>
 #include <string_view>
 #include <vector>

+ 0 - 1
shell/browser/net/asar/asar_file_validator.cc

@@ -6,7 +6,6 @@
 
 #include <algorithm>
 #include <array>
-#include <string>
 #include <utility>
 #include <vector>
 

+ 0 - 1
shell/browser/net/system_network_context_manager.cc

@@ -7,7 +7,6 @@
 #include <memory>
 #include <string>
 #include <utility>
-#include <vector>
 
 #include "base/command_line.h"
 #include "base/memory/raw_ptr.h"

+ 0 - 1
shell/browser/osr/osr_render_widget_host_view.cc

@@ -8,7 +8,6 @@
 #include <memory>
 #include <optional>
 #include <utility>
-#include <vector>
 
 #include "base/functional/callback_helpers.h"
 #include "base/location.h"

+ 0 - 2
shell/browser/relauncher.cc

@@ -4,8 +4,6 @@
 
 #include "shell/browser/relauncher.h"
 
-#include <utility>
-
 #if BUILDFLAG(IS_WIN)
 #include <windows.h>
 #endif

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

@@ -4,7 +4,6 @@
 
 #include "shell/browser/ui/devtools_ui_bundle_data_source.h"
 
-#include <memory>
 #include <string>
 #include <utility>
 

+ 0 - 1
shell/browser/ui/devtools_ui_theme_data_source.cc

@@ -4,7 +4,6 @@
 
 #include "shell/browser/ui/devtools_ui_theme_data_source.h"
 
-#include <memory>
 #include <string>
 #include <string_view>
 #include <utility>

+ 0 - 1
shell/browser/zoom_level_delegate.cc

@@ -4,7 +4,6 @@
 
 #include "shell/browser/zoom_level_delegate.h"
 
-#include <functional>
 #include <utility>
 #include <vector>
 

+ 0 - 1
shell/common/process_util.h

@@ -6,7 +6,6 @@
 #define ELECTRON_SHELL_COMMON_PROCESS_UTIL_H_
 
 #include <string>
-#include <string_view>
 
 namespace electron {
 

+ 0 - 1
shell/renderer/api/electron_api_context_bridge.cc

@@ -7,7 +7,6 @@
 #include <memory>
 #include <set>
 #include <string>
-#include <tuple>
 #include <utility>
 #include <vector>
 

+ 0 - 2
shell/renderer/electron_api_service_impl.cc

@@ -4,9 +4,7 @@
 
 #include "electron/shell/renderer/electron_api_service_impl.h"
 
-#include <memory>
 #include <string_view>
-#include <tuple>
 #include <utility>
 #include <vector>
 

+ 0 - 2
shell/renderer/electron_render_frame_observer.cc

@@ -4,8 +4,6 @@
 
 #include "shell/renderer/electron_render_frame_observer.h"
 
-#include <utility>
-
 #include "base/memory/ref_counted_memory.h"
 #include "base/trace_event/trace_event.h"
 #include "content/public/renderer/render_frame.h"

+ 0 - 1
shell/renderer/electron_sandboxed_renderer_client.cc

@@ -5,7 +5,6 @@
 #include "shell/renderer/electron_sandboxed_renderer_client.h"
 
 #include <iterator>
-#include <tuple>
 #include <vector>
 
 #include "base/base_paths.h"

+ 0 - 2
shell/renderer/extensions/electron_extensions_renderer_client.cc

@@ -4,8 +4,6 @@
 
 #include "shell/renderer/extensions/electron_extensions_renderer_client.h"
 
-#include <string>
-
 #include "content/public/renderer/render_thread.h"
 #include "extensions/common/constants.h"
 #include "extensions/common/manifest_handlers/background_info.h"

+ 0 - 2
shell/renderer/extensions/electron_extensions_renderer_client.h

@@ -5,8 +5,6 @@
 #ifndef ELECTRON_SHELL_RENDERER_EXTENSIONS_ELECTRON_EXTENSIONS_RENDERER_CLIENT_H_
 #define ELECTRON_SHELL_RENDERER_EXTENSIONS_ELECTRON_EXTENSIONS_RENDERER_CLIENT_H_
 
-#include <memory>
-
 #include "extensions/renderer/extensions_renderer_client.h"
 
 namespace content {