Skip to content

Commit

Permalink
Remove unnecessary base/memory/ref_counted.h includes from headers.
Browse files Browse the repository at this point in the history
Header files that do not contain "RefCounted" and do not contain
scoped_refptr do not need to include base/memory/ref_counted.h. Remove
it and do IWYU to fix the build.

Bug: 242216
Change-Id: Ie70e43b0c926b8ef610419c99f43eea991ac8d81
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4005763
Reviewed-by: Kyle Charbonneau <kylechar@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Owners-Override: Kyle Charbonneau <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1067592}
  • Loading branch information
leizleiz authored and Chromium LUCI CQ committed Nov 4, 2022
1 parent 845db10 commit cc67230
Show file tree
Hide file tree
Showing 353 changed files with 6 additions and 357 deletions.
1 change: 0 additions & 1 deletion android_webview/lib/aw_main_delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#include "android_webview/browser/aw_feature_list_creator.h"
#include "android_webview/common/aw_content_client.h"
#include "base/memory/ref_counted.h"
#include "content/public/app/content_main_delegate.h"

namespace content {
Expand Down
1 change: 0 additions & 1 deletion ash/app_list/views/app_list_item_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "ash/app_list/model/app_icon_load_helper.h"
#include "ash/app_list/model/app_list_item_observer.h"
#include "ash/ash_export.h"
#include "base/memory/ref_counted.h"
#include "base/timer/timer.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "ui/compositor/layer_animation_observer.h"
Expand Down
1 change: 0 additions & 1 deletion base/android/application_status_listener.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "base/android/jni_android.h"
#include "base/base_export.h"
#include "base/callback_forward.h"
#include "base/memory/ref_counted.h"

namespace base {
namespace android {
Expand Down
1 change: 0 additions & 1 deletion base/message_loop/message_pump_io_ios.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "base/base_export.h"
#include "base/mac/scoped_cffiledescriptorref.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/message_loop/message_pump_mac.h"
#include "base/message_loop/watchable_io_message_pump_posix.h"
Expand Down
1 change: 0 additions & 1 deletion base/test/scoped_feature_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "base/feature_list.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/raw_ref.h"
#include "base/memory/ref_counted.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/field_trial_params.h"
#include "base/types/pass_key.h"
Expand Down
1 change: 0 additions & 1 deletion cc/raster/task_graph_runner.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <stddef.h>
#include <stdint.h>

#include "base/memory/ref_counted.h"
#include "cc/cc_export.h"
#include "cc/raster/task.h"

Expand Down
1 change: 0 additions & 1 deletion cc/resources/scoped_ui_resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <memory>

#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "cc/cc_export.h"
#include "cc/resources/ui_resource_bitmap.h"
#include "cc/resources/ui_resource_client.h"
Expand Down
1 change: 0 additions & 1 deletion cc/resources/ui_resource_bitmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#include <stdint.h>

#include "base/memory/ref_counted.h"
#include "cc/cc_export.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkCanvas.h"
Expand Down
1 change: 0 additions & 1 deletion cc/resources/ui_resource_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#define CC_RESOURCES_UI_RESOURCE_CLIENT_H_

#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "cc/cc_export.h"

namespace cc {
Expand Down
1 change: 0 additions & 1 deletion cc/scheduler/scheduler_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#include <memory>

#include "base/memory/ref_counted.h"
#include "cc/cc_export.h"

namespace base {
Expand Down
1 change: 0 additions & 1 deletion cc/test/fake_scoped_ui_resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#ifndef CC_TEST_FAKE_SCOPED_UI_RESOURCE_H_
#define CC_TEST_FAKE_SCOPED_UI_RESOURCE_H_

#include "base/memory/ref_counted.h"
#include "cc/resources/scoped_ui_resource.h"

namespace cc {
Expand Down
1 change: 0 additions & 1 deletion cc/tiles/software_image_decode_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <vector>

#include "base/containers/lru_cache.h"
#include "base/memory/ref_counted.h"
#include "base/numerics/safe_math.h"
#include "base/thread_annotations.h"
#include "base/trace_event/memory_dump_provider.h"
Expand Down
1 change: 0 additions & 1 deletion cc/trees/layer_tree_frame_sink_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <vector>

#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "cc/cc_export.h"
#include "components/viz/common/resources/returned_resource.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
Expand Down
1 change: 0 additions & 1 deletion cc/trees/layer_tree_host_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <memory>
#include <vector>

#include "base/memory/ref_counted.h"
#include "base/time/time.h"
#include "cc/input/browser_controls_state.h"
#include "cc/metrics/event_latency_tracker.h"
Expand Down
1 change: 0 additions & 1 deletion cc/trees/proxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <memory>
#include <string>

#include "base/memory/ref_counted.h"
#include "base/threading/platform_thread.h"
#include "base/time/time.h"
#include "cc/cc_export.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <memory>

#include "base/android/jni_weak_ref.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "components/prefs/pref_change_registrar.h"

Expand Down
1 change: 0 additions & 1 deletion chrome/browser/android/vr/gvr_scheduler_delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#include "base/cancelable_callback.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/time/time.h"
#include "chrome/browser/android/vr/android_vsync_helper.h"
#include "chrome/browser/android/vr/gvr_graphics_delegate.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <memory>
#include <string>

#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/thread_task_runner_handle.h"
#include "chrome/browser/apps/app_service/app_launch_params.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <utility>

#include "base/containers/flat_map.h"
#include "base/memory/ref_counted.h"
#include "chrome/browser/ash/android_sms/android_sms_app_setup_controller.h"
#include "chrome/browser/web_applications/web_app_id.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "ash/components/arc/mojom/file_system.mojom-forward.h"
#include "base/callback_forward.h"
#include "base/files/file_path.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
#include "chrome/browser/ash/arc/fileapi/arc_file_system_operation_runner.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#include <string>

#include "base/memory/ref_counted.h"
#include "chrome/browser/ash/arc/fileapi/arc_file_system_operation_runner.h"

class GURL;
Expand Down
1 change: 0 additions & 1 deletion chrome/browser/ash/file_system_provider/queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

#include "base/callback.h"
#include "base/containers/circular_deque.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/ash/file_system_provider/abort_callback.h"
#include "storage/browser/file_system/async_file_util.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <string>
#include <vector>

#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/ash/file_system_provider/abort_callback.h"
#include "chrome/browser/ash/file_system_provider/provided_file_system.h"
Expand Down
1 change: 0 additions & 1 deletion chrome/browser/ash/login/screens/welcome_screen.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "ash/public/cpp/system_tray_observer.h"
#include "base/callback.h"
#include "base/callback_list.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
// TODO(https://crbug.com/1164001): forward declare LanguageSwitchResult
Expand Down
1 change: 0 additions & 1 deletion chrome/browser/ash/login/signin/oauth2_login_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <string>
#include <vector>

#include "base/memory/ref_counted.h"
#include "base/observer_list.h"
#include "base/time/time.h"
#include "chrome/browser/ash/login/signin/oauth2_login_verifier.h"
Expand Down
1 change: 0 additions & 1 deletion chrome/browser/ash/login/signin_partition_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <vector>

#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "base/memory/singleton.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/profiles/profile_keyed_service_factory.h"
Expand Down
1 change: 0 additions & 1 deletion chrome/browser/ash/login/ui/webui_login_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#include "ash/public/cpp/login_accelerators.h"
#include "ash/public/cpp/system_tray_observer.h"
#include "base/memory/ref_counted.h"
#include "base/observer_list.h"
#include "base/scoped_observation.h"
#include "chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.h"
Expand Down
1 change: 0 additions & 1 deletion chrome/browser/ash/nearby/nearby_dependencies_provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#ifndef CHROME_BROWSER_ASH_NEARBY_NEARBY_DEPENDENCIES_PROVIDER_H_
#define CHROME_BROWSER_ASH_NEARBY_NEARBY_DEPENDENCIES_PROVIDER_H_

#include "base/memory/ref_counted.h"
#include "chromeos/ash/services/nearby/public/mojom/sharing.mojom.h"
#include "components/keyed_service/core/keyed_service.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <memory>
#include <string>

#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/scoped_observation.h"
#include "chrome/browser/ash/policy/handlers/device_name_policy_handler.h"
Expand Down
1 change: 0 additions & 1 deletion chrome/browser/ash/policy/login/wildcard_login_checker.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <memory>

#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "base/values.h"
#include "components/policy/core/common/cloud/user_info_fetcher.h"
#include "google_apis/gaia/google_service_auth_error.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#include <memory>

#include "base/memory/ref_counted.h"
#include "base/task/sequenced_task_runner.h"
#include "components/session_manager/core/session_manager_observer.h"

Expand Down
1 change: 0 additions & 1 deletion chrome/browser/ash/printing/print_servers_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <string>
#include <vector>

#include "base/memory/ref_counted.h"
#include "chrome/browser/ash/printing/print_server.h"
#include "chrome/browser/ash/printing/print_servers_policy_provider.h"
#include "chrome/browser/ash/printing/printer_detector.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "base/callback_forward.h"
#include "base/cancelable_callback.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/synchronization/waitable_event_watcher.h"
#include "base/task/cancelable_task_tracker.h"
Expand Down
1 change: 0 additions & 1 deletion chrome/browser/certificate_manager_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "base/callback.h"
#include "base/gtest_prod_util.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/net/nss_service.h"
#include "net/cert/nss_cert_database.h"
Expand Down
1 change: 0 additions & 1 deletion chrome/browser/download/download_target_determiner.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#include "base/files/file_path.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/task/cancelable_task_tracker.h"
#include "base/time/time.h"
Expand Down
1 change: 0 additions & 1 deletion chrome/browser/extensions/api/cookies/cookies_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <string>

#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/values.h"
#include "chrome/browser/ui/browser_list_observer.h"
#include "chrome/common/extensions/api/cookies.h"
Expand Down
1 change: 0 additions & 1 deletion chrome/browser/extensions/api/identity/identity_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "base/feature_list.h"
#include "base/gtest_prod_util.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "build/build_config.h"
#include "build/buildflag.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#include <string>

#include "base/memory/ref_counted.h"
#include "chrome/common/extensions/api/notifications.h"
#include "extensions/browser/extension_function.h"
#include "ui/message_center/public/cpp/notification_types.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <memory>
#include <string>

#include "base/memory/ref_counted.h"
#include "extensions/common/permissions/api_permission_set.h"
#include "extensions/common/url_pattern_set.h"

Expand Down
1 change: 0 additions & 1 deletion chrome/browser/extensions/api/storage/policy_value_store.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <string>
#include <vector>

#include "base/memory/ref_counted.h"
#include "components/value_store/value_store.h"
#include "extensions/browser/api/storage/settings_observer.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <string>
#include <vector>

#include "base/memory/ref_counted.h"
#include "base/values.h"
#include "chrome/browser/extensions/api/storage/setting_sync_data.h"
#include "components/sync/model/sync_change.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <string>

#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/system/system_monitor.h"
#include "chrome/common/extensions/api/webrtc_audio_private.h"
#include "content/public/browser/render_process_host.h"
Expand Down
1 change: 0 additions & 1 deletion chrome/browser/extensions/extension_function_test_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#include <string>

#include "base/memory/ref_counted.h"
#include "base/values.h"
#include "extensions/browser/api_test_utils.h"
#include "extensions/common/manifest.h"
Expand Down
1 change: 0 additions & 1 deletion chrome/browser/extensions/extension_management.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <vector>

#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/memory/singleton.h"
#include "base/observer_list.h"
#include "base/values.h"
Expand Down
1 change: 0 additions & 1 deletion chrome/browser/extensions/startup_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#include <string>

#include "base/memory/ref_counted.h"
#include "chrome/browser/extensions/pack_extension_job.h"

namespace base {
Expand Down
1 change: 0 additions & 1 deletion chrome/browser/extensions/tab_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <string>

#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/scoped_observation.h"
#include "chrome/browser/extensions/active_tab_permission_granter.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <vector>

#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "chrome/browser/extensions/extension_browsertest.h"
#include "chrome/browser/extensions/updater/chrome_update_client_config.h"
#include "components/update_client/update_client.h"
Expand Down
1 change: 0 additions & 1 deletion chrome/browser/google/google_update_win.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <string>

#include "base/callback_forward.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "google_update/google_update_idl.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <memory>

#include "base/callback_list.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/sequence_checker.h"
#include "base/task/sequenced_task_runner.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "base/feature_list.h"
#include "base/gtest_prod_util.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/task/sequenced_task_runner.h"
#include "chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl.h"
Expand Down

0 comments on commit cc67230

Please sign in to comment.