0

Delete most remaining unused STL includes.

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}
This commit is contained in:
Lei Zhang
2021-05-16 06:40:14 +00:00
committed by Chromium LUCI CQ
parent e9773d0a9e
commit a613b275d8
65 changed files with 5 additions and 131 deletions
apps/ui/views
base/numerics
chrome
chromeos/dbus
components
infobars
password_manager
content
segmentation_platform
send_tab_to_self
viz
content/browser/indexed_db
courgette
crypto
fuchsia
gin
headless
ios/chrome/browser/infobars
ipc
ppapi
printing
rlz
skia/ext
third_party/blink/renderer/core/paint
tools/traceline/traceline
ui
base
ozone
platform
views
animation
controls

@ -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"

@ -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"

@ -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"

@ -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"

@ -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 {

@ -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"

@ -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

@ -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"

@ -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"

@ -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"

@ -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"

@ -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"

@ -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"

@ -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"

@ -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"

@ -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"

@ -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 {

@ -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 {

@ -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 {

@ -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"

@ -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"

@ -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"

@ -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"

@ -7,7 +7,6 @@
#include <stdint.h>
#include <string>
#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/macros.h"

@ -7,8 +7,6 @@
#include <windows.h>
#include <algorithm>
#include "base/check.h"
#include "base/macros.h"
#include "base/win/wincrypt_shim.h"

@ -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"

@ -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"

@ -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"

@ -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

@ -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"

@ -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"

@ -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"

@ -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 {

@ -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"

@ -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"

@ -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"

@ -7,8 +7,6 @@
#include <stdint.h>
#include <string>
#include "ppapi/cpp/completion_callback.h"
#include "ppapi/cpp/instance_handle.h"

@ -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"

@ -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"

@ -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"

@ -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"

@ -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"

@ -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"

@ -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"

@ -7,8 +7,6 @@
#include <stdint.h>
#include <vector>
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "ppapi/c/pp_instance.h"

@ -7,8 +7,6 @@
#include <stdint.h>
#include <string>
#include "base/macros.h"
#include "build/build_config.h"
#include "ipc/ipc_channel.h"

@ -8,8 +8,6 @@
#include "base/memory/ref_counted.h"
#include "ppapi/c/pp_var.h"
#include <string>
namespace ppapi {
namespace proxy {

@ -7,8 +7,6 @@
#include <stdint.h>
#include <limits>
#include "ppapi/shared_impl/ppapi_shared_export.h"
namespace ppapi {

@ -5,8 +5,6 @@
#ifndef PPAPI_SHARED_IMPL_PPB_URL_UTIL_SHARED_H_
#define PPAPI_SHARED_IMPL_PPB_URL_UTIL_SHARED_H_
#include <string>
#include "ppapi/c/dev/ppb_url_util_dev.h"
#include "ppapi/c/pp_var.h"
#include "ppapi/shared_impl/ppapi_shared_export.h"

@ -7,8 +7,6 @@
#include <stdint.h>
#include <string>
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "ppapi/c/pp_errors.h"

@ -7,8 +7,6 @@
#include <stdint.h>
#include <string>
#include "base/memory/ref_counted.h"
#include "ppapi/c/dev/ppb_audio_input_dev.h"

@ -7,8 +7,6 @@
#include <stdint.h>
#include <string>
#include "base/memory/ref_counted.h"
#include "ppapi/c/dev/ppb_audio_output_dev.h"

@ -7,8 +7,6 @@
#include <stdint.h>
#include <string>
#include "ppapi/c/private/ppb_camera_device_private.h"
#include "ppapi/thunk/ppapi_thunk_export.h"

@ -7,8 +7,6 @@
#include <stdint.h>
#include <vector>
#include "base/memory/ref_counted.h"
#include "ppapi/c/ppb_file_ref.h"
#include "ppapi/shared_impl/file_ref_create_info.h"

@ -7,8 +7,6 @@
#include <stdint.h>
#include <vector>
#include "ppapi/c/ppb_network_list.h"
#include "ppapi/thunk/ppapi_thunk_export.h"

@ -5,8 +5,6 @@
#ifndef PRINTING_PRINT_SETTINGS_INITIALIZER_WIN_H_
#define PRINTING_PRINT_SETTINGS_INITIALIZER_WIN_H_
#include <string>
#include "printing/page_range.h"
typedef struct HDC__* HDC;

@ -6,14 +6,16 @@
#ifndef RLZ_LIB_NET_RESPONSE_CHECK_H_
#define RLZ_LIB_NET_RESPONSE_CHECK_H_
#include <string>
#include <stddef.h>
#include "rlz/lib/rlz_api.h"
// Checksum validation convenience call for RLZ network responses.
namespace rlz_lib {
// The maximum length of a ping response we will parse in bytes. If the response
// is bigger, please break it up into separate calls.
const size_t kMaxPingResponseLength = 0x4000; // 16K
constexpr size_t kMaxPingResponseLength = 0x4000; // 16K
// Checks if a ping response is valid - ie. it has a checksum line which
// is the CRC-32 checksum of the message up to the checksum. If

@ -7,7 +7,6 @@
#ifndef RLZ_WIN_LIB_MACHINE_DEAL_H_
#define RLZ_WIN_LIB_MACHINE_DEAL_H_
#include <string>
#include "rlz/lib/rlz_enums.h"
namespace rlz_lib {
@ -24,7 +23,7 @@ class MachineDealCode {
static bool Get(AccessPoint point,
char* dcc,
int dcc_size,
const wchar_t* sid = NULL);
const wchar_t* sid = nullptr);
// Parses a ping response, checks if it is valid and sets the machine DCC
// from the response. The response should also contain the current value of

@ -6,7 +6,6 @@
#define SKIA_EXT_SKIA_UTILS_MAC_H_
#include <ApplicationServices/ApplicationServices.h>
#include <vector>
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkColor.h"

@ -46,8 +46,6 @@
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/hash_map.h"
#include <limits>
namespace blink {
class LayoutBoxModelObject;

@ -8,8 +8,6 @@
#include <windows.h>
#include <powrprof.h>
#include <map>
#include "logging.h"
class RDTSCNormalizer {

@ -7,10 +7,6 @@
#include <stdint.h>
#include <memory>
#include <set>
#include <string>
#include "base/macros.h"
#include "base/time/default_clock.h"
#include "base/time/time.h"

@ -7,8 +7,6 @@
#include <lib/ui/scenic/cpp/session.h>
#include <queue>
namespace ui {
using QueuePresentCallback = fit::function<void()>;

@ -5,8 +5,6 @@
#ifndef UI_VIEWS_ANIMATION_TEST_TEST_INK_DROP_HOST_H_
#define UI_VIEWS_ANIMATION_TEST_TEST_INK_DROP_HOST_H_
#include <memory>
#include "base/macros.h"
#include "ui/views/animation/ink_drop_host_view.h"

@ -5,8 +5,6 @@
#ifndef UI_VIEWS_CONTROLS_BUTTON_TOGGLE_BUTTON_H_
#define UI_VIEWS_CONTROLS_BUTTON_TOGGLE_BUTTON_H_
#include <memory>
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "ui/gfx/animation/slide_animation.h"
#include "ui/views/controls/button/button.h"