Browse Source

chore: remove unused std includes (#38795)

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <[email protected]>
trop[bot] 1 year ago
parent
commit
e5419bcf5a
60 changed files with 7 additions and 82 deletions
  1. 0 1
      shell/app/electron_crash_reporter_client.cc
  2. 0 2
      shell/browser/api/electron_api_browser_view.cc
  3. 0 1
      shell/browser/api/electron_api_browser_view.h
  4. 0 1
      shell/browser/api/electron_api_browser_window.h
  5. 0 1
      shell/browser/api/electron_api_debugger.cc
  6. 0 2
      shell/browser/api/electron_api_push_notifications.cc
  7. 0 1
      shell/browser/api/electron_api_safe_storage.cc
  8. 0 1
      shell/browser/api/electron_api_service_worker_context.cc
  9. 0 1
      shell/browser/api/electron_api_system_preferences_mac.mm
  10. 0 1
      shell/browser/api/electron_api_utility_process.h
  11. 0 1
      shell/browser/api/electron_api_web_contents.cc
  12. 0 1
      shell/browser/api/gpuinfo_manager.h
  13. 0 2
      shell/browser/badging/badge_manager_factory.cc
  14. 0 1
      shell/browser/electron_api_ipc_handler_impl.h
  15. 0 1
      shell/browser/electron_autofill_driver_factory.cc
  16. 0 1
      shell/browser/electron_web_contents_utility_handler_impl.h
  17. 0 1
      shell/browser/file_select_helper.h
  18. 0 2
      shell/browser/hid/hid_chooser_context.h
  19. 0 1
      shell/browser/linux/unity_service.cc
  20. 0 1
      shell/browser/mac/electron_application.mm
  21. 0 2
      shell/browser/media/media_capture_devices_dispatcher.h
  22. 0 2
      shell/browser/native_browser_view.h
  23. 0 1
      shell/browser/native_browser_view_mac.h
  24. 0 2
      shell/browser/native_browser_view_views.cc
  25. 0 3
      shell/browser/native_browser_view_views.h
  26. 0 1
      shell/browser/native_window_views.h
  27. 0 1
      shell/browser/net/resolve_host_function.cc
  28. 0 2
      shell/browser/net/resolve_host_function.h
  29. 0 1
      shell/browser/notifications/win/windows_toast_notification.h
  30. 0 1
      shell/browser/printing/print_view_manager_electron.h
  31. 0 1
      shell/browser/serial/serial_chooser_context.cc
  32. 0 1
      shell/browser/serial/serial_chooser_context.h
  33. 0 2
      shell/browser/ui/cocoa/electron_bundle_mover.h
  34. 0 1
      shell/browser/ui/inspectable_web_contents_view.h
  35. 0 2
      shell/browser/ui/inspectable_web_contents_view_mac.h
  36. 0 2
      shell/browser/ui/views/inspectable_web_contents_view_views.cc
  37. 0 1
      shell/browser/ui/views/inspectable_web_contents_view_views.h
  38. 1 1
      shell/browser/ui/views/submenu_button.h
  39. 0 1
      shell/browser/usb/usb_chooser_context.cc
  40. 0 2
      shell/browser/usb/usb_chooser_context.h
  41. 0 3
      shell/browser/usb/usb_chooser_controller.h
  42. 0 2
      shell/browser/web_contents_permission_helper.cc
  43. 0 1
      shell/browser/zoom_level_delegate.cc
  44. 1 1
      shell/common/asar/asar_util.cc
  45. 1 1
      shell/common/color_util.cc
  46. 2 2
      shell/common/crash_keys.cc
  47. 0 2
      shell/common/gin_converters/extension_converter.h
  48. 0 3
      shell/common/gin_converters/media_converter.cc
  49. 0 1
      shell/common/gin_converters/net_converter.cc
  50. 0 1
      shell/common/gin_converters/net_converter.h
  51. 0 1
      shell/common/node_bindings.cc
  52. 0 2
      shell/renderer/api/context_bridge/object_cache.cc
  53. 1 0
      shell/renderer/api/electron_api_context_bridge.cc
  54. 1 0
      shell/renderer/electron_api_service_impl.cc
  55. 0 2
      shell/renderer/electron_renderer_client.cc
  56. 0 1
      shell/renderer/electron_renderer_client.h
  57. 0 1
      shell/renderer/electron_sandboxed_renderer_client.h
  58. 0 1
      shell/renderer/renderer_client_base.h
  59. 0 1
      shell/services/node/node_service.cc
  60. 0 2
      shell/utility/electron_content_utility_client.h

+ 0 - 1
shell/app/electron_crash_reporter_client.cc

@@ -5,7 +5,6 @@
 #include "shell/app/electron_crash_reporter_client.h"
 
 #include <map>
-#include <memory>
 #include <string>
 
 #include "base/command_line.h"

+ 0 - 2
shell/browser/api/electron_api_browser_view.cc

@@ -4,8 +4,6 @@
 
 #include "shell/browser/api/electron_api_browser_view.h"
 
-#include <vector>
-
 #include "content/browser/renderer_host/render_widget_host_view_base.h"  // nogncheck
 #include "content/public/browser/render_widget_host_view.h"
 #include "shell/browser/api/electron_api_base_window.h"

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

@@ -7,7 +7,6 @@
 
 #include <memory>
 #include <string>
-#include <vector>
 
 #include "base/memory/raw_ptr.h"
 #include "content/public/browser/web_contents_observer.h"

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

@@ -6,7 +6,6 @@
 #define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_BROWSER_WINDOW_H_
 
 #include <string>
-#include <vector>
 
 #include "base/cancelable_callback.h"
 #include "shell/browser/api/electron_api_base_window.h"

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

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

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

@@ -4,8 +4,6 @@
 
 #include "shell/browser/api/electron_api_push_notifications.h"
 
-#include <string>
-
 #include "shell/common/gin_converters/value_converter.h"
 #include "shell/common/gin_helper/dictionary.h"
 #include "shell/common/node_includes.h"

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

@@ -5,7 +5,6 @@
 #include "shell/browser/api/electron_api_safe_storage.h"
 
 #include <string>
-#include <vector>
 
 #include "components/os_crypt/sync/os_crypt.h"
 #include "shell/browser/browser.h"

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

@@ -4,7 +4,6 @@
 
 #include "shell/browser/api/electron_api_service_worker_context.h"
 
-#include <string>
 #include <utility>
 
 #include "chrome/browser/browser_process.h"

+ 0 - 1
shell/browser/api/electron_api_system_preferences_mac.mm

@@ -5,7 +5,6 @@
 #include "shell/browser/api/electron_api_system_preferences.h"
 
 #include <map>
-#include <memory>
 #include <string>
 #include <utility>
 

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

@@ -8,7 +8,6 @@
 #include <map>
 #include <memory>
 #include <string>
-#include <vector>
 
 #include "base/containers/id_map.h"
 #include "base/environment.h"

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

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

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

@@ -5,7 +5,6 @@
 #ifndef ELECTRON_SHELL_BROWSER_API_GPUINFO_MANAGER_H_
 #define ELECTRON_SHELL_BROWSER_API_GPUINFO_MANAGER_H_
 
-#include <memory>
 #include <vector>
 
 #include "base/memory/raw_ptr.h"

+ 0 - 2
shell/browser/badging/badge_manager_factory.cc

@@ -4,8 +4,6 @@
 
 #include "shell/browser/badging/badge_manager_factory.h"
 
-#include <memory>
-
 #include "base/functional/bind.h"
 #include "base/memory/ptr_util.h"
 #include "base/memory/singleton.h"

+ 0 - 1
shell/browser/electron_api_ipc_handler_impl.h

@@ -6,7 +6,6 @@
 #define ELECTRON_SHELL_BROWSER_ELECTRON_API_IPC_HANDLER_IMPL_H_
 
 #include <string>
-#include <vector>
 
 #include "base/memory/weak_ptr.h"
 #include "content/public/browser/web_contents_observer.h"

+ 0 - 1
shell/browser/electron_autofill_driver_factory.cc

@@ -6,7 +6,6 @@
 
 #include <memory>
 #include <utility>
-#include <vector>
 
 #include "base/functional/bind.h"
 #include "base/functional/callback.h"

+ 0 - 1
shell/browser/electron_web_contents_utility_handler_impl.h

@@ -5,7 +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 <string>
 #include <vector>
 
 #include "base/memory/weak_ptr.h"

+ 0 - 1
shell/browser/file_select_helper.h

@@ -5,7 +5,6 @@
 #ifndef ELECTRON_SHELL_BROWSER_FILE_SELECT_HELPER_H_
 #define ELECTRON_SHELL_BROWSER_FILE_SELECT_HELPER_H_
 
-#include <map>
 #include <memory>
 #include <string>
 #include <vector>

+ 0 - 2
shell/browser/hid/hid_chooser_context.h

@@ -6,10 +6,8 @@
 #define ELECTRON_SHELL_BROWSER_HID_HID_CHOOSER_CONTEXT_H_
 
 #include <map>
-#include <memory>
 #include <set>
 #include <string>
-#include <utility>
 #include <vector>
 
 #include "base/containers/queue.h"

+ 0 - 1
shell/browser/linux/unity_service.cc

@@ -7,7 +7,6 @@
 #include <dlfcn.h>
 #include <gtk/gtk.h>
 
-#include <memory>
 #include <string>
 
 #include "base/environment.h"

+ 0 - 1
shell/browser/mac/electron_application.mm

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

+ 0 - 2
shell/browser/media/media_capture_devices_dispatcher.h

@@ -5,8 +5,6 @@
 #ifndef ELECTRON_SHELL_BROWSER_MEDIA_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_
 #define ELECTRON_SHELL_BROWSER_MEDIA_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_
 
-#include <string>
-
 #include "base/memory/singleton.h"
 #include "components/webrtc/media_stream_device_enumerator_impl.h"
 #include "content/public/browser/media_observer.h"

+ 0 - 2
shell/browser/native_browser_view.h

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

+ 0 - 1
shell/browser/native_browser_view_mac.h

@@ -6,7 +6,6 @@
 #define ELECTRON_SHELL_BROWSER_NATIVE_BROWSER_VIEW_MAC_H_
 
 #import <Cocoa/Cocoa.h>
-#include <vector>
 
 #include "base/mac/scoped_nsobject.h"
 #include "shell/browser/native_browser_view.h"

+ 0 - 2
shell/browser/native_browser_view_views.cc

@@ -4,8 +4,6 @@
 
 #include "shell/browser/native_browser_view_views.h"
 
-#include <vector>
-
 #include "shell/browser/ui/views/inspectable_web_contents_view_views.h"
 #include "ui/gfx/geometry/rect.h"
 #include "ui/views/background.h"

+ 0 - 3
shell/browser/native_browser_view_views.h

@@ -5,9 +5,6 @@
 #ifndef ELECTRON_SHELL_BROWSER_NATIVE_BROWSER_VIEW_VIEWS_H_
 #define ELECTRON_SHELL_BROWSER_NATIVE_BROWSER_VIEW_VIEWS_H_
 
-#include <memory>
-#include <vector>
-
 #include "shell/browser/native_browser_view.h"
 
 namespace electron {

+ 0 - 1
shell/browser/native_window_views.h

@@ -10,7 +10,6 @@
 #include <memory>
 #include <set>
 #include <string>
-#include <vector>
 
 #include "base/memory/raw_ptr.h"
 #include "shell/browser/ui/views/root_view.h"

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

@@ -5,7 +5,6 @@
 #include "shell/browser/net/resolve_host_function.h"
 
 #include <utility>
-#include <vector>
 
 #include "base/functional/bind.h"
 #include "base/values.h"

+ 0 - 2
shell/browser/net/resolve_host_function.h

@@ -5,9 +5,7 @@
 #ifndef ELECTRON_SHELL_BROWSER_NET_RESOLVE_HOST_FUNCTION_H_
 #define ELECTRON_SHELL_BROWSER_NET_RESOLVE_HOST_FUNCTION_H_
 
-#include <deque>
 #include <string>
-#include <vector>
 
 #include "base/memory/raw_ptr.h"
 #include "base/memory/ref_counted.h"

+ 0 - 1
shell/browser/notifications/win/windows_toast_notification.h

@@ -13,7 +13,6 @@
 #include <windows.ui.notifications.h>
 #include <wrl/implements.h>
 #include <string>
-#include <vector>
 
 #include "shell/browser/notifications/notification.h"
 

+ 0 - 1
shell/browser/printing/print_view_manager_electron.h

@@ -5,7 +5,6 @@
 #ifndef ELECTRON_SHELL_BROWSER_PRINTING_PRINT_VIEW_MANAGER_ELECTRON_H_
 #define ELECTRON_SHELL_BROWSER_PRINTING_PRINT_VIEW_MANAGER_ELECTRON_H_
 
-#include <memory>
 #include <string>
 #include <vector>
 

+ 0 - 1
shell/browser/serial/serial_chooser_context.cc

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

+ 0 - 1
shell/browser/serial/serial_chooser_context.h

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

+ 0 - 2
shell/browser/ui/cocoa/electron_bundle_mover.h

@@ -5,8 +5,6 @@
 #ifndef ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_BUNDLE_MOVER_H_
 #define ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_BUNDLE_MOVER_H_
 
-#include <string>
-
 #include "base/mac/foundation_util.h"
 #include "shell/common/gin_helper/error_thrower.h"
 

+ 0 - 1
shell/browser/ui/inspectable_web_contents_view.h

@@ -7,7 +7,6 @@
 #define ELECTRON_SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_VIEW_H_
 
 #include <string>
-#include <vector>
 
 #include "base/memory/raw_ptr.h"
 #include "shell/common/api/api.mojom.h"

+ 0 - 2
shell/browser/ui/inspectable_web_contents_view_mac.h

@@ -8,8 +8,6 @@
 
 #include "shell/browser/ui/inspectable_web_contents_view.h"
 
-#include <vector>
-
 #include "base/mac/scoped_nsobject.h"
 
 @class ElectronInspectableWebContentsView;

+ 0 - 2
shell/browser/ui/views/inspectable_web_contents_view_views.cc

@@ -5,9 +5,7 @@
 #include "shell/browser/ui/views/inspectable_web_contents_view_views.h"
 
 #include <memory>
-
 #include <utility>
-#include <vector>
 
 #include "base/memory/raw_ptr.h"
 #include "base/strings/utf_string_conversions.h"

+ 0 - 1
shell/browser/ui/views/inspectable_web_contents_view_views.h

@@ -6,7 +6,6 @@
 #define ELECTRON_SHELL_BROWSER_UI_VIEWS_INSPECTABLE_WEB_CONTENTS_VIEW_VIEWS_H_
 
 #include <memory>
-#include <vector>
 
 #include "base/compiler_specific.h"
 #include "base/memory/raw_ptr.h"

+ 1 - 1
shell/browser/ui/views/submenu_button.h

@@ -5,7 +5,7 @@
 #ifndef ELECTRON_SHELL_BROWSER_UI_VIEWS_SUBMENU_BUTTON_H_
 #define ELECTRON_SHELL_BROWSER_UI_VIEWS_SUBMENU_BUTTON_H_
 
-#include <memory>
+#include <string>
 
 #include "ui/accessibility/ax_node_data.h"
 #include "ui/views/animation/ink_drop_highlight.h"

+ 0 - 1
shell/browser/usb/usb_chooser_context.cc

@@ -4,7 +4,6 @@
 
 #include "shell/browser/usb/usb_chooser_context.h"
 
-#include <memory>
 #include <utility>
 #include <vector>
 

+ 0 - 2
shell/browser/usb/usb_chooser_context.h

@@ -6,10 +6,8 @@
 #define ELECTRON_SHELL_BROWSER_USB_USB_CHOOSER_CONTEXT_H_
 
 #include <map>
-#include <memory>
 #include <set>
 #include <string>
-#include <utility>
 #include <vector>
 
 #include "base/containers/queue.h"

+ 0 - 3
shell/browser/usb/usb_chooser_controller.h

@@ -5,9 +5,6 @@
 #ifndef ELECTRON_SHELL_BROWSER_USB_USB_CHOOSER_CONTROLLER_H_
 #define ELECTRON_SHELL_BROWSER_USB_USB_CHOOSER_CONTROLLER_H_
 
-#include <string>
-#include <unordered_map>
-#include <utility>
 #include <vector>
 
 #include "base/memory/raw_ptr.h"

+ 0 - 2
shell/browser/web_contents_permission_helper.cc

@@ -4,8 +4,6 @@
 
 #include "shell/browser/web_contents_permission_helper.h"
 
-#include <memory>
-#include <string>
 #include <utility>
 
 #include "content/public/browser/browser_context.h"

+ 0 - 1
shell/browser/zoom_level_delegate.cc

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

+ 1 - 1
shell/common/asar/asar_util.cc

@@ -5,8 +5,8 @@
 #include "shell/common/asar/asar_util.h"
 
 #include <map>
+#include <memory>
 #include <string>
-#include <utility>
 
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"

+ 1 - 1
shell/common/color_util.cc

@@ -4,8 +4,8 @@
 
 #include "shell/common/color_util.h"
 
+#include <algorithm>
 #include <cmath>
-#include <utility>
 #include <vector>
 
 #include "base/strings/string_util.h"

+ 2 - 2
shell/common/crash_keys.cc

@@ -5,8 +5,8 @@
 #include "shell/common/crash_keys.h"
 
 #include <deque>
-#include <utility>
-#include <vector>
+#include <map>
+#include <string>
 
 #include "base/command_line.h"
 #include "base/environment.h"

+ 0 - 2
shell/common/gin_converters/extension_converter.h

@@ -5,8 +5,6 @@
 #ifndef ELECTRON_SHELL_COMMON_GIN_CONVERTERS_EXTENSION_CONVERTER_H_
 #define ELECTRON_SHELL_COMMON_GIN_CONVERTERS_EXTENSION_CONVERTER_H_
 
-#include <string>
-
 #include "gin/converter.h"
 
 namespace extensions {

+ 0 - 3
shell/common/gin_converters/media_converter.cc

@@ -4,9 +4,6 @@
 
 #include "shell/common/gin_converters/media_converter.h"
 
-#include <string>
-#include <utility>
-
 #include "content/public/browser/media_stream_request.h"
 #include "content/public/browser/render_frame_host.h"
 #include "gin/data_object_builder.h"

+ 0 - 1
shell/common/gin_converters/net_converter.cc

@@ -4,7 +4,6 @@
 
 #include "shell/common/gin_converters/net_converter.h"
 
-#include <memory>
 #include <string>
 #include <utility>
 #include <vector>

+ 0 - 1
shell/common/gin_converters/net_converter.h

@@ -5,7 +5,6 @@
 #ifndef ELECTRON_SHELL_COMMON_GIN_CONVERTERS_NET_CONVERTER_H_
 #define ELECTRON_SHELL_COMMON_GIN_CONVERTERS_NET_CONVERTER_H_
 
-#include <string>
 #include <utility>
 #include <vector>
 

+ 0 - 1
shell/common/node_bindings.cc

@@ -5,7 +5,6 @@
 #include "shell/common/node_bindings.h"
 
 #include <algorithm>
-#include <memory>
 #include <string>
 #include <utility>
 #include <vector>

+ 0 - 2
shell/renderer/api/context_bridge/object_cache.cc

@@ -4,8 +4,6 @@
 
 #include "shell/renderer/api/context_bridge/object_cache.h"
 
-#include <utility>
-
 #include "shell/common/api/object_life_monitor.h"
 
 namespace electron::api::context_bridge {

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

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

+ 1 - 0
shell/renderer/electron_api_service_impl.cc

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

+ 0 - 2
shell/renderer/electron_renderer_client.cc

@@ -4,8 +4,6 @@
 
 #include "shell/renderer/electron_renderer_client.h"
 
-#include <string>
-
 #include "base/command_line.h"
 #include "base/containers/contains.h"
 #include "content/public/renderer/render_frame.h"

+ 0 - 1
shell/renderer/electron_renderer_client.h

@@ -7,7 +7,6 @@
 
 #include <memory>
 #include <set>
-#include <string>
 
 #include "shell/renderer/renderer_client_base.h"
 

+ 0 - 1
shell/renderer/electron_sandboxed_renderer_client.h

@@ -6,7 +6,6 @@
 
 #include <memory>
 #include <set>
-#include <string>
 
 #include "shell/renderer/renderer_client_base.h"
 

+ 0 - 1
shell/renderer/renderer_client_base.h

@@ -7,7 +7,6 @@
 
 #include <memory>
 #include <string>
-#include <vector>
 
 #include "content/public/renderer/content_renderer_client.h"
 #include "electron/buildflags/buildflags.h"

+ 0 - 1
shell/services/node/node_service.cc

@@ -5,7 +5,6 @@
 #include "shell/services/node/node_service.h"
 
 #include <utility>
-#include <vector>
 
 #include "base/command_line.h"
 #include "base/strings/utf_string_conversions.h"

+ 0 - 2
shell/utility/electron_content_utility_client.h

@@ -5,8 +5,6 @@
 #ifndef ELECTRON_SHELL_UTILITY_ELECTRON_CONTENT_UTILITY_CLIENT_H_
 #define ELECTRON_SHELL_UTILITY_ELECTRON_CONTENT_UTILITY_CLIENT_H_
 
-#include <memory>
-
 #include "base/compiler_specific.h"
 #include "content/public/utility/content_utility_client.h"
 #include "mojo/public/cpp/bindings/binder_map.h"