blob: cd86db8ce2ac0b8f99f781a4cb4892ca28993685 [file] [log] [blame]
Josh Hilkebe691d752023-01-09 18:50:571// Copyright 2023 The Chromium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef COMPONENTS_REPORTING_METRICS_MANUAL_COLLECTOR_H_
6#define COMPONENTS_REPORTING_METRICS_MANUAL_COLLECTOR_H_
7
8#include <memory>
9#include <string>
10
11#include "components/reporting/metrics/collector_base.h"
12#include "components/reporting/proto/synced/metric_data.pb.h"
13
14namespace reporting {
15
16class MetricReportQueue;
17class MetricReportingController;
18class ReportingSettings;
Vignesh Shenvi51b90be2023-12-01 01:15:5219
Josh Hilkebe691d752023-01-09 18:50:5720// Class to collect and report metric data when manually triggered. Does not
21// automatically collect data. Necessary reporting settings must be set or
22// `setting_enabled_default_value` must be set to True in order to trigger
23// collection.
24class ManualCollector : public CollectorBase {
25 public:
Vignesh Shenvi51b90be2023-12-01 01:15:5226 // Metrics name for reporting missing metric data to UMA.
27 static constexpr char kNoMetricDataMetricsName[] =
28 "Browser.ERP.MetricsReporting.ManualCollectorNoMetricData";
29
Josh Hilkebe691d752023-01-09 18:50:5730 ManualCollector(Sampler* sampler,
31 MetricReportQueue* metric_report_queue,
32 ReportingSettings* reporting_settings,
33 const std::string& setting_path,
34 bool setting_enabled_default_value);
35