chromium/components/page_load_metrics/browser/observers/ad_metrics/BUILD.gn

# 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("ad_metrics") {
  sources = [
    "ads_page_load_metrics_observer.cc",
    "ads_page_load_metrics_observer.h",
    "aggregate_frame_data.cc",
    "aggregate_frame_data.h",
    "frame_data_utils.cc",
    "frame_data_utils.h",
    "frame_tree_data.cc",
    "frame_tree_data.h",
    "page_ad_density_tracker.cc",
    "page_ad_density_tracker.h",
    "univariate_stats.cc",
    "univariate_stats.h",
  ]
  deps = [
    "//components/blocklist/opt_out_blocklist",
    "//components/heavy_ad_intervention",
    "//components/page_load_metrics/browser",
    "//components/page_load_metrics/common",
    "//components/page_load_metrics/common:page_load_metrics_mojom",
    "//components/subresource_filter/content/browser",
    "//components/subresource_filter/core/browser",
    "//components/subresource_filter/core/common",
    "//components/subresource_filter/core/mojom",
    "//components/ukm/content",
    "//content/public/browser",
    "//services/metrics/public/cpp:ukm_builders",
  ]
}

source_set("test_support") {
  testonly = true
  sources = [
    "ad_intervention_browser_test_utils.cc",
    "ad_intervention_browser_test_utils.h",
  ]
  deps = [
    ":ad_metrics",
    "//components/page_load_metrics/browser:test_support",
    "//content/test:test_support",
    "//net:test_support",
  ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "ads_page_load_metrics_observer_unittest.cc",
    "page_ad_density_tracker_unittest.cc",
    "univariate_stats_unittest.cc",
  ]
  deps = [
    ":ad_metrics",
    "//components/blocklist/opt_out_blocklist",
    "//components/heavy_ad_intervention",
    "//components/page_load_metrics/browser",
    "//components/page_load_metrics/browser:test_support",
    "//components/page_load_metrics/common",
    "//components/page_load_metrics/common:test_support",
    "//components/subresource_filter/content/browser",
    "//components/subresource_filter/content/browser:test_support",
    "//components/subresource_filter/core/common",
    "//components/ukm:test_support",
    "//content/test:test_support",
    "//services/metrics/public/cpp:ukm_builders",
  ]
}