chromium/content/browser/tracing/tracing_scenario.cc

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

#include "content/browser/tracing/tracing_scenario.h"

#include <memory>

#include "base/hash/md5.h"
#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted_memory.h"
#include "base/metrics/histogram_functions.h"
#include "base/strings/stringprintf.h"
#include "base/token.h"
#include "base/tracing/trace_time.h"
#include "components/variations/hashing.h"
#include "content/browser/tracing/background_tracing_manager_impl.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "services/tracing/public/cpp/perfetto/perfetto_config.h"
#include "services/tracing/public/cpp/perfetto/perfetto_traced_process.h"
#include "services/tracing/public/cpp/triggers_data_source.h"
#include "third_party/perfetto/protos/perfetto/config/track_event/track_event_config.gen.h"

namespace content {

namespace {

constexpr uint32_t kStartupTracingTimeoutMs =;  // 30 sec

}  // namespace

void TracingScenario::TracingSessionDeleter::operator()(
    perfetto::TracingSession* ptr) const {}

class TracingScenario::TraceReader
    : public base::RefCountedThreadSafe<TraceReader> {};

Metrics;

TracingScenarioBase::~TracingScenarioBase() = default;

void TracingScenarioBase::Disable() {}

void TracingScenarioBase::Enable() {}

uint32_t TracingScenarioBase::TriggerNameHash(
    const BackgroundTracingRule* triggered_rule) const {}

TracingScenarioBase::TracingScenarioBase(const std::string scenario_name)
    :{}

// static
std::unique_ptr<NestedTracingScenario> NestedTracingScenario::Create(
    const perfetto::protos::gen::NestedScenarioConfig& config,
    Delegate* scenario_delegate) {}

NestedTracingScenario::NestedTracingScenario(
    const perfetto::protos::gen::NestedScenarioConfig& config,
    Delegate* scenario_delegate)
    :{}

NestedTracingScenario::~NestedTracingScenario() = default;

void NestedTracingScenario::Disable() {}

void NestedTracingScenario::Enable() {}

void NestedTracingScenario::Stop() {}

bool NestedTracingScenario::Initialize(
    const perfetto::protos::gen::NestedScenarioConfig& config) {}

bool NestedTracingScenario::OnStartTrigger(
    const BackgroundTracingRule* triggered_rule) {}

bool NestedTracingScenario::OnStopTrigger(
    const BackgroundTracingRule* triggered_rule) {}

bool NestedTracingScenario::OnUploadTrigger(
    const BackgroundTracingRule* triggered_rule) {}

void NestedTracingScenario::SetState(State new_state) {}

// static
std::unique_ptr<TracingScenario> TracingScenario::Create(
    const perfetto::protos::gen::ScenarioConfig& config,
    bool enable_privacy_filter,
    bool enable_package_name_filter,
    bool request_startup_tracing,
    Delegate* scenario_delegate) {}

TracingScenario::TracingScenario(
    const perfetto::protos::gen::ScenarioConfig& config,
    Delegate* scenario_delegate,
    bool enable_privacy_filter,
    bool request_startup_tracing)
    :{}

TracingScenario::~TracingScenario() = default;

bool TracingScenario::Initialize(
    const perfetto::protos::gen::ScenarioConfig& config,
    bool enable_package_name_filter) {}

void TracingScenario::Disable() {}

void TracingScenario::Enable() {}

void TracingScenario::Abort() {}

void TracingScenario::GenerateMetadataProto(
    perfetto::protos::pbzero::ChromeMetadataPacket* metadata) {}

std::unique_ptr<perfetto::TracingSession>
TracingScenario::CreateTracingSession() {}

void TracingScenario::SetupTracingSession() {}

void TracingScenario::OnNestedScenarioStart(
    NestedTracingScenario* active_scenario) {}

void TracingScenario::OnNestedScenarioStop(
    NestedTracingScenario* nested_scenario) {}

void TracingScenario::OnNestedScenarioUpload(
    NestedTracingScenario* scenario,
    const BackgroundTracingRule* triggered_rule) {}

bool TracingScenario::OnSetupTrigger(
    const BackgroundTracingRule* triggered_rule) {}

bool TracingScenario::OnStartTrigger(
    const BackgroundTracingRule* triggered_rule) {}

bool TracingScenario::OnStopTrigger(
    const BackgroundTracingRule* triggered_rule) {}

bool TracingScenario::OnUploadTrigger(
    const BackgroundTracingRule* triggered_rule) {}

void TracingScenario::OnTracingError(perfetto::TracingError error) {}

void TracingScenario::OnTracingStart() {}

void TracingScenario::OnTracingStop() {}

void TracingScenario::OnFinalizingDone(
    base::Token trace_uuid,
    std::string&& serialized_trace,
    TracingSession tracing_session,
    const BackgroundTracingRule* triggered_rule) {}

void TracingScenario::DisableNestedScenarios() {}

void TracingScenario::SetState(State new_state) {}

base::WeakPtr<TracingScenario> TracingScenario::GetWeakPtr() {}

}  // namespace content