# Copyright 2021 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
source_set("metrics_data_collection") {
sources = [
"collector_base.cc",
"collector_base.h",
"delayed_sampler.cc",
"delayed_sampler.h",
"event_driven_telemetry_collector_pool.h",
"manual_collector.cc",
"manual_collector.h",
"metric_event_observer.h",
"metric_event_observer_manager.cc",
"metric_event_observer_manager.h",
"metric_rate_controller.cc",
"metric_rate_controller.h",
"metric_report_queue.cc",
"metric_report_queue.h",
"metric_reporting_controller.cc",
"metric_reporting_controller.h",
"one_shot_collector.cc",
"one_shot_collector.h",
"periodic_collector.cc",
"periodic_collector.h",
"periodic_event_collector.cc",
"periodic_event_collector.h",
"reporting_settings.h",
"sampler.h",
]
deps = [
"//base",
"//components/reporting/client:report_queue",
"//components/reporting/proto:metric_data_proto",
"//components/reporting/proto:record_constants",
"//components/reporting/util:status",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"delayed_sampler_unittest.cc",
"manual_collector_unittest.cc",
"metric_event_observer_manager_unittest.cc",
"metric_rate_controller_unittest.cc",
"metric_report_queue_unittest.cc",
"metric_reporting_controller_unittest.cc",
"one_shot_collector_unittest.cc",
"periodic_collector_unittest.cc",
"periodic_event_collector_unittest.cc",
]
deps = [
":metrics_data_collection",
"//base",
"//base/test:test_support",
"//components/reporting/client:report_queue",
"//components/reporting/client:test_support",
"//components/reporting/metrics/fakes:test_support",
"//components/reporting/proto:metric_data_proto",
"//components/reporting/proto:record_constants",
"//components/reporting/util:status",
"//testing/gmock",
"//testing/gtest",
]
}