0

Forward declare base::NoDestructor in headers when missing

Various headers contains `friend class base::NoDestructor<T>`, but does
not directly include base/no_destructor.h or forward declare
base::NoDestructor. Add missing forward declarations and includes to
avoid build errors in CLs that remove transitive includes of
base/no_destructor.h.

Change-Id: I89b5cefec9caf58ae9cea4b11ea902d992d93152
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6451809
Owners-Override: Kyle Charbonneau <kylechar@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Kyle Charbonneau <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1446731}
This commit is contained in:
Lei Zhang
2025-04-14 13:10:59 -07:00
committed by Chromium LUCI CQ
parent 8c2198da4f
commit fd3036eef7
8 changed files with 32 additions and 0 deletions
base/allocator/partition_allocator/src/partition_alloc/stack
chromeos/ash/experiences/arc/app
components/media_effects
media/gpu/chromeos
services/tracing/public/cpp/perfetto
ui/views/accessibility/tree

@ -13,6 +13,11 @@
#include "base/trace_event/typed_macros.h"
#include "third_party/perfetto/include/perfetto/tracing/internal/track_event_internal.h"
namespace base {
template <typename T>
class NoDestructor;
}
namespace tracing {
// A class that accompanies TraceEventDataSource to record some additional

@ -16,6 +16,11 @@
#include "third_party/perfetto/include/perfetto/tracing/internal/track_event_internal.h"
#include "third_party/perfetto/protos/perfetto/trace/track_event/chrome_process_descriptor.gen.h"
namespace base {
template <typename T>
class NoDestructor;
}
namespace tracing {
// A class that emits track descriptors for Chrome processes and threads.