# Copyright 2020 The Chromium Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import("//build/config/features.gni") import("//mojo/public/tools/bindings/mojom.gni") component("background_tracing") { sources = [ "background_tracing_agent_impl.cc", "background_tracing_agent_impl.h", "background_tracing_agent_provider_impl.cc", "background_tracing_agent_provider_impl.h", "background_tracing_manager.cc", "background_tracing_manager.h", "background_tracing_rule.cc", "background_tracing_rule.h", "trace_report_database.cc", "trace_report_database.h", "trace_upload_list.h", "tracing_agent_observer_manager.cc", "tracing_agent_observer_manager.h", "tracing_scenario.cc", "tracing_scenario.h", "triggers_data_source.cc", "triggers_data_source.h", ] defines = [ "IS_BACKGROUND_TRACING_CPP_IMPL" ] public_deps = [ "//services/tracing/public/mojom" ] deps = [ "//base", "//build:blink_buildflags", "//components/variations", "//net", "//services/tracing/public/cpp", "//sql", "//third_party/perfetto:libperfetto", "//third_party/zlib/google:compression_utils", ] } source_set("unit_tests") { testonly = true sources = [ "background_tracing_agent_impl_unittest.cc", "background_tracing_manager_unittest.cc", "background_tracing_rule_unittest.cc", "fake_tracing_manager.cc", "fake_tracing_manager.h", "trace_report_database_unittest.cc", ] if (!is_ios) { sources += [ "tracing_scenario_unittest.cc" ] } deps = [ ":background_tracing", "//base", "//base/test:proto_test_support", "//base/test:test_support", "//mojo/public/cpp/bindings", "//net", "//sql", "//sql:test_support", "//testing/gtest", "//third_party/perfetto:libperfetto", "//third_party/zlib/google:compression_utils", ] if (!is_ios) { deps += [ "//services/tracing:lib", "//services/tracing:test_utils", ] } data_deps = [ "//third_party/perfetto/protos/perfetto/config/chrome:scenario_descriptor", ] data = [ "$root_gen_dir/third_party/perfetto/protos/perfetto/config/chrome/scenario_config.descriptor" ] }