chromium/services/tracing/public/cpp/trace_event_args_allowlist.cc

// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#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 {

// Each allowlist entry is used to allowlist an array arguments for a
// single or group of trace events.
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[] =;
// TODO(ddrone): add args once creation_location_iid is parsed
const char* const kMemoryPressureEventsAllowedArgs[] =;

const AllowlistEntry kEventArgsAllowlist[] =;

const char* kMetadataAllowlist[] =;

}  // namespace

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) {}

}  // namespace tracing