chromium/components/metrics/debug/structured/structured_metrics_debug_provider.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 "components/metrics/debug/structured/structured_metrics_debug_provider.h"

#include <optional>
#include <string_view>
#include <utility>

#include "base/i18n/number_formatting.h"
#include "base/logging.h"
#include "base/memory/raw_ptr.h"
#include "base/strings/string_util.h"
#include "components/metrics/structured/event_validator.h"
#include "components/metrics/structured/project_validator.h"
#include "components/metrics/structured/proto/event_storage.pb.h"
#include "components/metrics/structured/recorder.h"
#include "components/metrics/structured/structured_metrics_service.h"
#include "components/metrics/structured/structured_metrics_validator.h"
#include "third_party/metrics_proto/structured_data.pb.h"

namespace metrics::structured {
namespace {

struct EventInfo {};

std::string Normalize(std::string_view value) {}

std::string EventInfo::NormalizeProjectName() const {}

std::string EventInfo::NormalizeEventName() const {}

// Retrieves information about an event that is needed for rendering.
std::optional<EventInfo> GetEventInfo(const StructuredEventProto& proto) {}

// Creates a dictionary that represents a key-value pair.
base::Value::Dict CreateKeyValue(std::string_view key, base::Value value) {}

std::optional<base::Value> MetricToValue(
    const StructuredEventProto::Metric& metric) {}

// Creates a list of metrics represented by a key-value pair from the metrics of
// an event.
base::Value::List CreateMetricsList(const google::protobuf::RepeatedPtrField<
                                        StructuredEventProto::Metric>& metrics,
                                    const EventValidator* event_validator) {}

// Creates an event metadata dictionary from an event.
base::Value::Dict CreateEventMetadataDict(
    const StructuredEventProto::EventSequenceMetadata& sequence_metadata) {}

// Creates a dictionary from an event.
base::Value::Dict CreateEventDict(const StructuredEventProto& proto) {}

}  // namespace

StructuredMetricsDebugProvider::StructuredMetricsDebugProvider(
    StructuredMetricsService* service)
    :{}

StructuredMetricsDebugProvider::~StructuredMetricsDebugProvider() {}

void StructuredMetricsDebugProvider::OnEventRecorded(
    const StructuredEventProto& event) {}

void StructuredMetricsDebugProvider::LoadRecordedEvents() {}

}  // namespace metrics::structured