Skip to content

Commit

Permalink
Reland "Reland "Don't include hang_watcher.h from thread_restrictions…
Browse files Browse the repository at this point in the history
….h""

This is a reland of 087f254
This reland fixes more IWYU issues. Additionally, we reintroduce some
includes that would have been brought in from hang_watcher.h back into
thread_restrictions.h. These extra includes are those that are
frequently implicitly depended on by code outside of base/.
The intent is to have an overall reduction in included headers by
getting rid of hang_watcher.h in favour of more targeted, smaller
includes, while still having a CL that has a better chance of landing
when it has to race other CLs in the commit queue.

Original change's description:
> Reland "Don't include hang_watcher.h from thread_restrictions.h"
>
> This is a reland of 0e67334
> This reland fixes more IWYU issues.
>
> Original change's description:
> > Don't include hang_watcher.h from thread_restrictions.h
> >
> > This is only needed in thread_restrictions.cc.
> > We also fix IWYU issues that this removal revealed.
> >
> > Bug: 1227131
> > Change-Id: I68e19fc27b3ab32f3b423b44c6b4a431a9927732
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3060580
> > Auto-Submit: Kevin McNee <mcnee@chromium.org>
> > Reviewed-by: Lei Zhang <thestig@chromium.org>
> > Reviewed-by: Albert J. Wong <ajwong@chromium.org>
> > Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
> > Owners-Override: Lei Zhang <thestig@chromium.org>
> > Commit-Queue: Kevin McNee <mcnee@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#912313}
>
> Bug: 1227131
> Cq-Include-Trybots: luci.chromium.try:win-official;luci.chrome.try:win-chrome,mac-chrome,linux-chrome
> Change-Id: I436be161287647e132c49ec9a31ad0eeda202564
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3098329
> Reviewed-by: Lei Zhang <thestig@chromium.org>
> Owners-Override: Lei Zhang <thestig@chromium.org>
> Commit-Queue: Kevin McNee <mcnee@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#912712}

Bug: 1227131
Change-Id: I020d7cf646e481a99c85c7b5226d211f2c838eaa
Cq-Include-Trybots: luci.chromium.try:win-official,ios-device,linux_chromium_asan_rel_ng,mac_chromium_archive_rel_ng,win_archive;luci.chrome.try:win-chrome,mac-chrome,linux-chrome
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3101285
Reviewed-by: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Commit-Queue: Kevin McNee <mcnee@chromium.org>
Cr-Commit-Position: refs/heads/main@{#913170}
  • Loading branch information
kjmcnee authored and Chromium LUCI CQ committed Aug 18, 2021
1 parent 32f71f3 commit 5e754b1
Show file tree
Hide file tree
Showing 42 changed files with 46 additions and 1 deletion.
1 change: 1 addition & 0 deletions base/i18n/break_iterator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "base/i18n/break_iterator.h"

#include <stdint.h>
#include <ostream>

#include "base/check.h"
#include "base/lazy_instance.h"
Expand Down
1 change: 1 addition & 0 deletions base/mac/mach_port_rendezvous_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <utility>

#include "base/at_exit.h"
#include "base/cxx17_backports.h"
#include "base/mac/foundation_util.h"
#include "base/mac/mach_logging.h"
#include "base/strings/stringprintf.h"
Expand Down
1 change: 1 addition & 0 deletions base/threading/sequence_local_storage_map.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "base/threading/sequence_local_storage_map.h"

#include <ostream>
#include <utility>

#include "base/check_op.h"
Expand Down
1 change: 1 addition & 0 deletions base/threading/thread_restrictions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "base/threading/thread_restrictions.h"

#include "base/threading/hang_watcher.h"
#include "base/trace_event/base_tracing.h"

#if DCHECK_IS_ON()
Expand Down
4 changes: 3 additions & 1 deletion base/threading/thread_restrictions.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
#include "base/gtest_prod_util.h"
#include "base/location.h"
#include "base/macros.h"
#include "base/threading/hang_watcher.h"
#include "base/strings/string_number_conversions.h"
#include "base/threading/platform_thread.h"
#include "base/time/time.h"
#include "build/build_config.h"

// -----------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions base/win/win_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/notreached.h"
#include "base/scoped_native_library.h"
#include "base/strings/string_util.h"
#include "base/strings/string_util_win.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define CHROME_BROWSER_APPS_APP_SERVICE_APP_SERVICE_PROXY_FACTORY_H_

#include "base/memory/singleton.h"
#include "build/chromeos_buildflags.h"
#include "components/keyed_service/content/browser_context_keyed_service_factory.h"

class Profile;
Expand Down
1 change: 1 addition & 0 deletions chrome/browser/ash/customization/customization_document.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "base/macros.h"
#include "base/memory/singleton.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
#include "base/values.h"
#include "url/gurl.h"

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

#include "base/containers/queue.h"
#include "base/memory/weak_ptr.h"
#include "base/timer/timer.h"
#include "chrome/browser/chromeos/android_sms/connection_establisher.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "chrome/browser/chromeos/phonehub/browser_tabs_metadata_fetcher_impl.h"

#include <deque>

#include "base/strings/utf_string_conversions.h"
#include "chrome/common/webui_url_constants.h"
#include "components/favicon/core/history_ui_favicon_request_handler.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "chrome/browser/ui/toolbar/test_toolbar_actions_bar_bubble_delegate.h"

#include "base/callback.h"
#include "base/check.h"
#include "base/logging.h"
#include "base/macros.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "chrome/browser/ui/webui/settings/chromeos/os_settings_manager_factory.h"

#include "chrome/browser/apps/app_service/app_service_proxy_chromeos.h"
#include "chrome/browser/apps/app_service/app_service_proxy_factory.h"
#include "chrome/browser/ash/kerberos/kerberos_credentials_manager_factory.h"
#include "chrome/browser/ash/profiles/profile_helper.h"
Expand Down
1 change: 1 addition & 0 deletions chrome/chrome_cleaner/os/initializer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "base/rand_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/synchronization/waitable_event.h"
#include "base/time/time.h"
#include "base/win/scoped_handle.h"
#include "base/win/win_util.h"
#include "chrome/chrome_cleaner/constants/chrome_cleaner_switches.h"
Expand Down
1 change: 1 addition & 0 deletions chrome/chrome_cleaner/settings/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include "base/command_line.h"
#include "base/memory/singleton.h"
#include "base/time/time.h"
#include "chrome/chrome_cleaner/logging/proto/shared_data.pb.h"
#include "chrome/chrome_cleaner/settings/settings_definitions.h"
#include "components/chrome_cleaner/public/constants/constants.h"
Expand Down
1 change: 1 addition & 0 deletions chrome/credential_provider/gaiacp/gcp_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "base/macros.h"
#include "base/no_destructor.h"
#include "base/path_service.h"
#include "base/strings/string_number_conversions_win.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
Expand Down
1 change: 1 addition & 0 deletions chrome/installer/setup/downgrade_cleanup_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "chrome/installer/setup/downgrade_cleanup.h"

#include "base/command_line.h"
#include "base/notreached.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/multiprocess_test.h"
#include "base/test/test_reg_util_win.h"
Expand Down
1 change: 1 addition & 0 deletions chrome/updater/test/integration_tests_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "base/process/process.h"
#include "base/run_loop.h"
#include "base/strings/strcat.h"
#include "base/synchronization/waitable_event.h"
#include "base/task/post_task.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
Expand Down
1 change: 1 addition & 0 deletions chromeos/metrics/login_event_recorder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "base/logging.h"
#include "base/metrics/histogram_macros.h"
#include "base/sequenced_task_runner.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/system/sys_info.h"
#include "base/task/current_thread.h"
Expand Down
1 change: 1 addition & 0 deletions components/metrics/field_trials_provider_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "components/metrics/field_trials_provider.h"

#include "base/cxx17_backports.h"
#include "base/threading/platform_thread.h"
#include "components/variations/active_field_trials.h"
#include "components/variations/synthetic_trial_registry.h"
#include "testing/gtest/include/gtest/gtest.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "base/callback.h"
#include "base/cancelable_callback.h"
#include "base/containers/flat_map.h"
#include "base/containers/queue.h"
#include "base/memory/memory_pressure_listener.h"
#include "base/memory/weak_ptr.h"
#include "base/unguessable_token.h"
Expand Down
1 change: 1 addition & 0 deletions components/power_scheduler/power_scheduler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "base/no_destructor.h"
#include "base/process/process_handle.h"
#include "base/process/process_metrics.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/task/current_thread.h"
#include "base/task/thread_pool.h"
Expand Down
1 change: 1 addition & 0 deletions components/safe_browsing/core/common/features_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "components/safe_browsing/core/common/features.h"

#include "base/strings/string_number_conversions.h"
#include "base/system/sys_info.h"
#include "base/test/scoped_feature_list.h"
#include "testing/gtest/include/gtest/gtest.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "components/segmentation_platform/internal/signals/histogram_signal_handler.h"

#include "base/callback_helpers.h"
#include "base/metrics/metrics_hashes.h"
#include "components/segmentation_platform/internal/database/signal_database.h"

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

#include "base/callback_helpers.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/test/bind.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/un.h>
#include <unistd.h>

#include "base/files/scoped_file.h"
#include "base/logging.h"
Expand Down
1 change: 1 addition & 0 deletions content/browser/service_worker/service_worker_test_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "base/bind.h"
#include "base/callback.h"
#include "base/command_line.h"
#include "base/containers/queue.h"
#include "base/memory/weak_ptr.h"
#include "base/run_loop.h"
#include "components/services/storage/public/mojom/service_worker_storage_control.mojom.h"
Expand Down
1 change: 1 addition & 0 deletions device/gamepad/gamepad_id_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <vector>

#include "base/lazy_instance.h"
#include "base/strings/string_piece.h"
#include "device/gamepad/gamepad_export.h"

namespace device {
Expand Down
1 change: 1 addition & 0 deletions fuchsia/base/mem_buffer_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "base/files/file_util.h"
#include "base/files/memory_mapped_file.h"
#include "base/fuchsia/fuchsia_logging.h"
#include "base/notreached.h"
#include "base/threading/thread_restrictions.h"

namespace cr_fuchsia {
Expand Down
1 change: 1 addition & 0 deletions fuchsia/engine/browser/navigation_controller_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "fuchsia/engine/browser/navigation_controller_impl.h"

#include "base/bits.h"
#include "base/fuchsia/fuchsia_logging.h"
#include "base/memory/page_size.h"
#include "base/strings/strcat.h"
Expand Down
1 change: 1 addition & 0 deletions ios/chrome/browser/web/stop_loading_egtest.mm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include "base/strings/stringprintf.h"
#import "base/test/ios/wait_util.h"
#include "base/threading/platform_thread.h"
#include "base/time/time.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h"
Expand Down
1 change: 1 addition & 0 deletions media/base/use_after_free_checker.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef MEDIA_BASE_USE_AFTER_FREE_CHECKER_H_
#define MEDIA_BASE_USE_AFTER_FREE_CHECKER_H_

#include "base/debug/crash_logging.h"
#include "base/debug/dump_without_crashing.h"
#include "base/location.h"
#include "media/base/media_export.h"
Expand Down
1 change: 1 addition & 0 deletions media/cast/sender/video_sender_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <vector>

#include "base/bind.h"
#include "base/callback_helpers.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/memory/ptr_util.h"
Expand Down
1 change: 1 addition & 0 deletions media/cast/test/sender.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "base/at_exit.h"
#include "base/base_paths.h"
#include "base/bind.h"
#include "base/callback_helpers.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/json/json_writer.h"
Expand Down
1 change: 1 addition & 0 deletions media/cast/test/simulator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include "base/at_exit.h"
#include "base/base_paths.h"
#include "base/bind.h"
#include "base/callback_helpers.h"
#include "base/command_line.h"
#include "base/containers/queue.h"
#include "base/containers/span.h"
Expand Down
1 change: 1 addition & 0 deletions media/gpu/video_decode_accelerator_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include <limits>

#include "base/callback_helpers.h"
#include "base/command_line.h"
#include "base/files/file_util.h"
#include "base/numerics/safe_conversions.h"
Expand Down
1 change: 1 addition & 0 deletions media/gpu/video_encode_accelerator_perf_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "base/command_line.h"
#include "base/files/file_util.h"
#include "base/json/json_writer.h"
#include "base/strings/string_number_conversions.h"
#include "media/base/bitstream_buffer.h"
#include "media/base/media_util.h"
#include "media/base/test_data_util.h"
Expand Down
1 change: 1 addition & 0 deletions pdf/pdfium/pdfium_engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "base/location.h"
#include "base/notreached.h"
#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
Expand Down
1 change: 1 addition & 0 deletions remoting/protocol/webrtc_transport.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "base/command_line.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/memory/ptr_util.h"
#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
Expand Down
1 change: 1 addition & 0 deletions sandbox/win/src/app_container_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "base/rand_util.h"
#include "base/scoped_native_library.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/thread_pool.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <memory>
#include <string>
#include <utility>
#include "base/strings/string_number_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "services/network/public/cpp/features.h"
#include "testing/gtest/include/gtest/gtest.h"
Expand Down
1 change: 1 addition & 0 deletions ui/events/platform/platform_event_source.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "ui/events/platform/platform_event_source.h"

#include <algorithm>
#include <ostream>

#include "base/lazy_instance.h"
#include "base/threading/thread_local.h"
Expand Down
2 changes: 2 additions & 0 deletions ui/gfx/font_list.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "ui/gfx/font_list.h"

#include <ostream>

#include "base/lazy_instance.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
Expand Down

0 comments on commit 5e754b1

Please sign in to comment.