Skip to content

Commit

Permalink
Delete most remaining unused STL includes.
Browse files Browse the repository at this point in the history
Headers that do not contain "std::" do not need STL includes.

This CL is first mechanically generated as follows:

INCL="algorithm|array|list|map|memory|queue|set|string|unordered_map|unordered_set|utility|vector"
git ls-files | grep '\.h$' | xargs grep -L std:: | \
    xargs grep -El "#include <($INCL)>$" > to_process.txt

Remove a bunch of third party files from to_process.txt.

INCL_ESCAPED="$(echo $INCL|sed 's/|/\\|/g')"
cat to_process.txt | xargs sed -i "/^#include <\($INCL_ESCAPED\)>$/d"
cat to_process.txt | xargs sed -i '/^$/N;/^\n$/D'

Then fix the build in rlz/.

Bug: 1200833
Change-Id: I7c48cdb53ec85412b6331df626f2f5c4c0174faa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2896225
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Owners-Override: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#883318}
  • Loading branch information
leizleiz authored and Chromium LUCI CQ committed May 16, 2021
1 parent e9773d0 commit a613b27
Show file tree
Hide file tree
Showing 65 changed files with 5 additions and 131 deletions.
2 changes: 0 additions & 2 deletions apps/ui/views/app_window_frame_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#ifndef APPS_UI_VIEWS_APP_WINDOW_FRAME_VIEW_H_
#define APPS_UI_VIEWS_APP_WINDOW_FRAME_VIEW_H_

#include <string>

#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/metadata/metadata_header_macros.h"
#include "ui/gfx/geometry/rect.h"
Expand Down
1 change: 0 additions & 1 deletion base/numerics/safe_math_arm_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#define BASE_NUMERICS_SAFE_MATH_ARM_IMPL_H_

#include <cassert>
#include <limits>
#include <type_traits>

#include "base/numerics/safe_conversions.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

#include <jni.h>

#include <memory>

#include "base/memory/ref_counted.h"
#include "chrome/browser/ui/android/layouts/scene_layer.h"
#include "third_party/skia/include/core/SkColor.h"
Expand Down
2 changes: 0 additions & 2 deletions chrome/browser/chromeos/full_restore/arc_window_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#ifndef CHROME_BROWSER_CHROMEOS_FULL_RESTORE_ARC_WINDOW_UTILS_H_
#define CHROME_BROWSER_CHROMEOS_FULL_RESTORE_ARC_WINDOW_UTILS_H_

#include <utility>

#include "components/services/app_service/public/mojom/types.mojom.h"
#include "third_party/abseil-cpp/absl/types/optional.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#ifndef CHROME_BROWSER_PASSWORD_MANAGER_CHROME_BIOMETRIC_AUTHENTICATOR_H_
#define CHROME_BROWSER_PASSWORD_MANAGER_CHROME_BIOMETRIC_AUTHENTICATOR_H_

#include <memory>

#include "components/password_manager/core/browser/biometric_authenticator.h"

namespace content {
Expand Down
2 changes: 0 additions & 2 deletions chrome/browser/sharing_hub/sharing_hub_service_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#ifndef CHROME_BROWSER_SHARING_HUB_SHARING_HUB_SERVICE_FACTORY_H_
#define CHROME_BROWSER_SHARING_HUB_SHARING_HUB_SERVICE_FACTORY_H_

#include <memory>

#include "base/macros.h"
#include "base/memory/singleton.h"
#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
Expand Down
3 changes: 0 additions & 3 deletions chrome/browser/ui/search/omnibox_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
#ifndef CHROME_BROWSER_UI_SEARCH_OMNIBOX_UTILS_H_
#define CHROME_BROWSER_UI_SEARCH_OMNIBOX_UTILS_H_

#include <string>


namespace content {
class WebContents;
} // namespace content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#ifndef CHROME_BROWSER_UI_VIEWS_SHARING_HUB_SHARING_HUB_BUBBLE_ACTION_BUTTON_H_
#define CHROME_BROWSER_UI_VIEWS_SHARING_HUB_SHARING_HUB_BUBBLE_ACTION_BUTTON_H_

#include <string>

#include "base/bind.h"
#include "chrome/browser/ui/views/hover_button.h"

Expand Down
2 changes: 0 additions & 2 deletions chrome/browser/ui/views/side_panel.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#ifndef CHROME_BROWSER_UI_VIEWS_SIDE_PANEL_H_
#define CHROME_BROWSER_UI_VIEWS_SIDE_PANEL_H_

#include <memory>

#include "ui/base/metadata/metadata_header_macros.h"
#include "ui/views/bubble/bubble_dialog_delegate_view.h"
#include "ui/views/view.h"
Expand Down
3 changes: 0 additions & 3 deletions chrome/browser/ui/views/toolbar/browser_app_menu_button.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
#ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_APP_MENU_BUTTON_H_
#define CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_APP_MENU_BUTTON_H_

#include <memory>
#include <set>

#include "base/memory/weak_ptr.h"
#include "base/scoped_observation.h"
#include "chrome/browser/ui/toolbar/app_menu_icon_controller.h"
Expand Down
2 changes: 0 additions & 2 deletions chrome/browser/ui/views/toolbar/toolbar_ink_drop_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_INK_DROP_UTIL_H_
#define CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_INK_DROP_UTIL_H_

#include <memory>

#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/gfx/geometry/point.h"
Expand Down
2 changes: 0 additions & 2 deletions chrome/common/search/mock_embedded_search_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#ifndef CHROME_COMMON_SEARCH_MOCK_EMBEDDED_SEARCH_CLIENT_H_
#define CHROME_COMMON_SEARCH_MOCK_EMBEDDED_SEARCH_CLIENT_H_

#include <string>

#include "chrome/common/search/instant_types.h"
#include "chrome/common/search/search.mojom.h"
#include "testing/gmock/include/gmock/gmock.h"
Expand Down
2 changes: 0 additions & 2 deletions chromeos/dbus/cicerone/cicerone_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#ifndef CHROMEOS_DBUS_CICERONE_CICERONE_CLIENT_H_
#define CHROMEOS_DBUS_CICERONE_CICERONE_CLIENT_H_

#include <memory>

#include "base/component_export.h"
#include "base/observer_list.h"
#include "chromeos/dbus/cicerone/cicerone_service.pb.h"
Expand Down
2 changes: 0 additions & 2 deletions chromeos/dbus/concierge/concierge_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#ifndef CHROMEOS_DBUS_CONCIERGE_CONCIERGE_CLIENT_H_
#define CHROMEOS_DBUS_CONCIERGE_CONCIERGE_CLIENT_H_

#include <memory>

#include "base/component_export.h"
#include "base/files/scoped_file.h"
#include "base/observer_list.h"
Expand Down
3 changes: 0 additions & 3 deletions components/infobars/content/content_infobar_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
#ifndef COMPONENTS_INFOBARS_CONTENT_CONTENT_INFOBAR_MANAGER_H_
#define COMPONENTS_INFOBARS_CONTENT_CONTENT_INFOBAR_MANAGER_H_

#include <memory>
#include <vector>

#include "base/macros.h"
#include "build/build_config.h"
#include "components/infobars/core/infobar_manager.h"
Expand Down
2 changes: 0 additions & 2 deletions components/password_manager/content/browser/bad_message.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#ifndef COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_BAD_MESSAGE_H_
#define COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_BAD_MESSAGE_H_

#include <vector>

#include "base/containers/span.h"
#include "components/autofill/core/common/form_data.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#ifndef COMPONENTS_SEGMENTATION_PLATFORM_INTERNAL_DATABASE_USER_ACTION_DATABASE_H_
#define COMPONENTS_SEGMENTATION_PLATFORM_INTERNAL_DATABASE_USER_ACTION_DATABASE_H_

#include <string>

#include "base/time/time.h"

namespace segmentation_platform {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#ifndef COMPONENTS_SEGMENTATION_PLATFORM_PUBLIC_SEGMENTATION_PLATFORM_SERVICE_H_
#define COMPONENTS_SEGMENTATION_PLATFORM_PUBLIC_SEGMENTATION_PLATFORM_SERVICE_H_

#include <memory>

#include "components/keyed_service/core/keyed_service.h"

namespace segmentation_platform {
Expand Down
2 changes: 0 additions & 2 deletions components/send_tab_to_self/metrics_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#ifndef COMPONENTS_SEND_TAB_TO_SELF_METRICS_UTIL_H_
#define COMPONENTS_SEND_TAB_TO_SELF_METRICS_UTIL_H_

#include <string>

namespace send_tab_to_self {

enum class ShareEntryPoint {
Expand Down
3 changes: 0 additions & 3 deletions components/viz/common/frame_sinks/copy_output_result.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
#ifndef COMPONENTS_VIZ_COMMON_FRAME_SINKS_COPY_OUTPUT_RESULT_H_
#define COMPONENTS_VIZ_COMMON_FRAME_SINKS_COPY_OUTPUT_RESULT_H_

#include <memory>
#include <utility>

#include "base/threading/thread_checker.h"
#include "components/viz/common/resources/release_callback.h"
#include "components/viz/common/viz_common_export.h"
Expand Down
2 changes: 0 additions & 2 deletions components/viz/common/transition_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#ifndef COMPONENTS_VIZ_COMMON_TRANSITION_UTILS_H_
#define COMPONENTS_VIZ_COMMON_TRANSITION_UTILS_H_

#include <vector>

#include "components/viz/common/quads/compositor_render_pass.h"
#include "components/viz/common/viz_common_export.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATA_FORMAT_VERSION_H_

#include <cstdint>
#include <limits>

#include "base/check_op.h"
#include "content/common/content_export.h"
Expand Down
2 changes: 0 additions & 2 deletions courgette/patch_generator_x86_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#ifndef COURGETTE_PATCH_GENERATOR_X86_32_H_
#define COURGETTE_PATCH_GENERATOR_X86_32_H_

#include <memory>

#include "base/logging.h"
#include "base/macros.h"
#include "courgette/courgette_flow.h"
Expand Down
1 change: 0 additions & 1 deletion crypto/nss_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#include <stdint.h>

#include <string>
#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/macros.h"
Expand Down
2 changes: 0 additions & 2 deletions crypto/scoped_capi_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

#include <windows.h>

#include <algorithm>

#include "base/check.h"
#include "base/macros.h"
#include "base/win/wincrypt_shim.h"
Expand Down
1 change: 0 additions & 1 deletion fuchsia/base/message_port.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <fuchsia/web/cpp/fidl.h>
#include <lib/fidl/cpp/interface_handle.h>
#include <lib/fidl/cpp/interface_request.h>
#include <memory>

#include "third_party/blink/public/common/messaging/web_message_port.h"

Expand Down
3 changes: 0 additions & 3 deletions fuchsia/engine/browser/content_directory_loader_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
#include <fuchsia/io/cpp/fidl.h>
#include <fuchsia/web/cpp/fidl.h>
#include <lib/fidl/cpp/interface_handle.h>
#include <memory>
#include <string>
#include <vector>

#include "fuchsia/engine/web_engine_export.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
Expand Down
1 change: 0 additions & 1 deletion fuchsia/engine/browser/event_filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#define FUCHSIA_ENGINE_BROWSER_EVENT_FILTER_H_

#include <fuchsia/web/cpp/fidl.h>
#include <memory>

#include "base/macros.h"
#include "fuchsia/engine/web_engine_export.h"
Expand Down
2 changes: 0 additions & 2 deletions fuchsia/engine/browser/web_engine_browser_main.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#ifndef FUCHSIA_ENGINE_BROWSER_WEB_ENGINE_BROWSER_MAIN_H_
#define FUCHSIA_ENGINE_BROWSER_WEB_ENGINE_BROWSER_MAIN_H_

#include <memory>

namespace content {
struct MainFunctionParams;
} // namespace content
Expand Down
1 change: 0 additions & 1 deletion fuchsia/engine/test/frame_test_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#include <fuchsia/web/cpp/fidl.h>
#include <lib/fidl/cpp/binding.h>
#include <memory>

#include "fuchsia/base/test/test_navigation_listener.h"

Expand Down
2 changes: 0 additions & 2 deletions gin/v8_isolate_memory_dump_provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#ifndef GIN_V8_ISOLATE_MEMORY_DUMP_PROVIDER_H_
#define GIN_V8_ISOLATE_MEMORY_DUMP_PROVIDER_H_

#include <string>

#include "base/single_thread_task_runner.h"
#include "base/trace_event/memory_dump_provider.h"
#include "gin/gin_export.h"
Expand Down
2 changes: 0 additions & 2 deletions gin/v8_shared_memory_dump_provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#ifndef GIN_V8_SHARED_MEMORY_DUMP_PROVIDER_H_
#define GIN_V8_SHARED_MEMORY_DUMP_PROVIDER_H_

#include <string>

#include "base/trace_event/memory_dump_provider.h"
#include "gin/gin_export.h"

Expand Down
2 changes: 0 additions & 2 deletions headless/lib/browser/headless_devtools.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#ifndef HEADLESS_LIB_BROWSER_HEADLESS_DEVTOOLS_H_
#define HEADLESS_LIB_BROWSER_HEADLESS_DEVTOOLS_H_

#include <memory>

#include "headless/lib/browser/headless_browser_impl.h"

namespace headless {
Expand Down
2 changes: 0 additions & 2 deletions headless/public/headless_devtools_channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#ifndef HEADLESS_PUBLIC_HEADLESS_DEVTOOLS_CHANNEL_H_
#define HEADLESS_PUBLIC_HEADLESS_DEVTOOLS_CHANNEL_H_

#include <string>

#include "base/containers/span.h"
#include "base/macros.h"
#include "headless/public/headless_export.h"
Expand Down
2 changes: 0 additions & 2 deletions ios/chrome/browser/infobars/infobar_manager_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#ifndef IOS_CHROME_BROWSER_INFOBARS_INFOBAR_MANAGER_IMPL_H_
#define IOS_CHROME_BROWSER_INFOBARS_INFOBAR_MANAGER_IMPL_H_

#include <memory>

#include "base/macros.h"
#include "components/infobars/core/infobar_manager.h"
#include "ios/web/public/web_state_observer.h"
Expand Down
2 changes: 0 additions & 2 deletions ipc/ipc_channel_handle.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#ifndef IPC_IPC_CHANNEL_HANDLE_H_
#define IPC_IPC_CHANNEL_HANDLE_H_

#include <string>

#include "build/build_config.h"
#include "mojo/public/cpp/system/message_pipe.h"

Expand Down
2 changes: 0 additions & 2 deletions ppapi/cpp/network_proxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

#include <stdint.h>

#include <string>

#include "ppapi/cpp/completion_callback.h"
#include "ppapi/cpp/instance_handle.h"

Expand Down
2 changes: 0 additions & 2 deletions ppapi/cpp/text_input_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

#include <stdint.h>

#include <string>

#include "ppapi/c/ppb_text_input_controller.h"
#include "ppapi/cpp/instance_handle.h"
#include "ppapi/cpp/var.h"
Expand Down
2 changes: 0 additions & 2 deletions ppapi/cpp/vpn_provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#ifndef PPAPI_CPP_VPN_PROVIDER_H_
#define PPAPI_CPP_VPN_PROVIDER_H_

#include <string>

#include "ppapi/c/ppb_vpn_provider.h"
#include "ppapi/cpp/completion_callback.h"

Expand Down
2 changes: 0 additions & 2 deletions ppapi/proxy/gamepad_resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#ifndef PPAPI_PROXY_GAMEPAD_RESOURCE_H_
#define PPAPI_PROXY_GAMEPAD_RESOURCE_H_

#include <memory>

#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/memory/shared_memory_mapping.h"
Expand Down
2 changes: 0 additions & 2 deletions ppapi/proxy/host_var_serialization_rules.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#ifndef PPAPI_PROXY_HOST_VAR_SERIALIZATION_RULES_H_
#define PPAPI_PROXY_HOST_VAR_SERIALIZATION_RULES_H_

#include <string>

#include "base/macros.h"
#include "ppapi/c/ppb_var.h"
#include "ppapi/proxy/var_serialization_rules.h"
Expand Down
3 changes: 0 additions & 3 deletions ppapi/proxy/network_list_resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@

#include <stdint.h>

#include <string>
#include <vector>

#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "ppapi/c/private/ppb_net_address_private.h"
Expand Down
2 changes: 0 additions & 2 deletions ppapi/proxy/network_monitor_resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

#include <stdint.h>

#include <list>

#include "base/macros.h"
#include "ppapi/proxy/network_list_resource.h"
#include "ppapi/proxy/plugin_resource.h"
Expand Down
2 changes: 0 additions & 2 deletions ppapi/proxy/ppb_audio_proxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

#include <stdint.h>

#include <utility>

#include "base/macros.h"
#include "base/memory/unsafe_shared_memory_region.h"
#include "base/sync_socket.h"
Expand Down
Loading

0 comments on commit a613b27

Please sign in to comment.