#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "services/tracing/public/cpp/trace_event_args_allowlist.h"
#include <string_view>
#include "base/functional/bind.h"
#include "base/memory/raw_ptr_exclusion.h"
#include "base/strings/pattern.h"
#include "base/strings/string_tokenizer.h"
#include "base/strings/string_util.h"
#include "base/trace_event/trace_event.h"
namespace tracing {
namespace {
struct AllowlistEntry { … };
const char* const kScopedBlockingCallAllowedArgs[] = …;
const char* const kPeekMessageAllowedArgs[] = …;
const char* const kMemoryDumpAllowedArgs[] = …;
const char* const kRendererHostAllowedArgs[] = …;
const char* const kUIAllowedArgs[] = …;
const char* const kV8GCAllowedArgs[] = …;
const char* const kTopLevelIpcRunTaskAllowedArgs[] = …;
const char* const kMemoryPressureEventsAllowedArgs[] = …;
const AllowlistEntry kEventArgsAllowlist[] = …;
const char* kMetadataAllowlist[] = …;
}
bool IsTraceArgumentNameAllowlisted(const char* const* granular_filter,
const char* arg_name) { … }
bool IsTraceEventArgsAllowlisted(
const char* category_group_name,
const char* event_name,
base::trace_event::ArgumentNameFilterPredicate* arg_name_filter) { … }
bool IsMetadataAllowlisted(const std::string& metadata_name) { … }
}