chromium/components/metrics/metrics_log.h

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

// This file defines a set of user experience metrics data recorded by the
// MetricsService. This is the unit of data that is sent to the server.

#ifndef COMPONENTS_METRICS_METRICS_LOG_H_
#define COMPONENTS_METRICS_METRICS_LOG_H_

#include <stdint.h>

#include <memory>
#include <optional>
#include <string>
#include <string_view>

#include "base/functional/callback_forward.h"
#include "base/memory/raw_ptr.h"
#include "base/metrics/histogram_base.h"
#include "base/time/time.h"
#include "build/chromeos_buildflags.h"
#include "components/metrics/metrics_reporting_default_state.h"
#include "third_party/metrics_proto/chrome_user_metrics_extension.pb.h"
#include "third_party/metrics_proto/system_profile.pb.h"

class PrefService;

namespace base {
class Clock;
class HistogramSamples;
}  // namespace base

namespace network_time {
class NetworkTimeTracker;
}  // namespace network_time

namespace metrics {

// This SourceType is saved in Local state by unsent_log_store.cc and entries
// should not be renumbered.
enum UkmLogSourceType {};

// Holds optional metadata associated with a log to be stored.
struct LogMetadata {};

class MetricsServiceClient;
class DelegatingProvider;

namespace internal {
// Maximum number of events before truncation.
constexpr int kOmniboxEventLimit =;
constexpr int kUserActionEventLimit =;

SystemProfileProto::InstallerPackage ToInstallerPackage(
    std::string_view installer_package_name);
}  // namespace internal

class MetricsLog {};

}  // namespace metrics

#endif  // COMPONENTS_METRICS_METRICS_LOG_H_