chromium/base/trace_event/trace_arguments.cc

// Copyright 2018 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/40284755): Remove this and spanify to fix the errors.
#pragma allow_unsafe_buffers
#endif

#include "base/trace_event/trace_arguments.h"

#include <inttypes.h>
#include <stddef.h>
#include <stdio.h>
#include <string.h>

#include <cmath>
#include <ostream>

#include "base/check_op.h"
#include "base/json/string_escape.h"
#include "base/memory/raw_ptr.h"
#include "base/notreached.h"
#include "base/strings/strcat.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"

namespace base {
namespace trace_event {

namespace {

size_t GetAllocLength(const char* str) {}

// Copies |*member| into |*buffer|, sets |*member| to point to this new
// location, and then advances |*buffer| by the amount written.
void CopyTraceEventParameter(char** buffer,
                             const char** member,
                             const char* end) {}

// Append |val| as a JSON output value to |*out|.
void AppendDouble(double val, bool as_json, std::string* out) {}

const char* TypeToString(unsigned char arg_type) {}

void AppendValueDebugString(const TraceArguments& args,
                            size_t idx,
                            std::string* out) {}

class PerfettoProtoAppender : public ConvertableToTraceFormat::ProtoAppender {};

}  // namespace

void StringStorage::Reset(size_t alloc_size) {}

bool StringStorage::Contains(const TraceArguments& args) const {}

static_assert;

void TraceValue::AppendAsJSON(unsigned char type, std::string* out) const {}

void TraceValue::AppendAsString(unsigned char type, std::string* out) const {}

void TraceValue::Append(unsigned char type,
                        bool as_json,
                        std::string* out) const {}

TraceArguments& TraceArguments::operator=(TraceArguments&& other) noexcept {}

TraceArguments::TraceArguments(int num_args,
                               const char* const* arg_names,
                               const unsigned char* arg_types,
                               const unsigned long long* arg_values) {}

void TraceArguments::Reset() {}

void TraceArguments::CopyStringsTo(StringStorage* storage,
                                   bool copy_all_strings,
                                   const char** extra_string1,
                                   const char** extra_string2) {}

void TraceArguments::AppendDebugString(std::string* out) {}

void ConvertableToTraceFormat::Add(
    perfetto::protos::pbzero::DebugAnnotation* annotation) const {}

}  // namespace trace_event
}  // namespace base