chromium/components/reporting/metrics/periodic_event_collector.h

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

#ifndef COMPONENTS_REPORTING_METRICS_PERIODIC_EVENT_COLLECTOR_H_
#define COMPONENTS_REPORTING_METRICS_PERIODIC_EVENT_COLLECTOR_H_

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

#include "components/reporting/metrics/collector_base.h"
#include "components/reporting/metrics/metric_event_observer.h"
#include "components/reporting/proto/synced/metric_data.pb.h"

namespace base {

class TimeDelta;

}  // namespace base

namespace reporting {

class MetricRateController;
class ReportingSettings;
class Sampler;

// Class to periodically collect telemetry data, check the collected telemetry
// data for events using `PeriodicEventCollector::EventDetector`, and notify the
// subscriber that subscribed using `SetOnEventObservedCallback` if reporting is
// enabled.
class PeriodicEventCollector : public MetricEventObserver,
                               public CollectorBase {};
}  // namespace reporting

#endif  // COMPONENTS_REPORTING_METRICS_PERIODIC_EVENT_COLLECTOR_H_