1 # Copyright 2017 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//testing/test.gni")
7 # The Url-Keyed Metrics (UKM) service is responsible for gathering and
8 # uploading reports that contain fine grained performance metrics including
9 # URLs for top-level navigations.
10 static_library("ukm") {
12 "app_source_url_recorder.cc",
13 "app_source_url_recorder.h",
14 "persisted_logs_metrics_impl.cc",
15 "persisted_logs_metrics_impl.h",
18 "ukm_recorder_impl.cc",
19 "ukm_recorder_impl.h",
20 "ukm_reporting_service.cc",
21 "ukm_reporting_service.h",
22 "ukm_rotation_scheduler.cc",
23 "ukm_rotation_scheduler.h",
29 "//services/metrics/public/cpp:metrics_cpp",
30 "//services/metrics/public/cpp:ukm_builders",
31 "//services/metrics/public/mojom",
32 "//third_party/metrics_proto",
37 "//components/crx_file",
38 "//components/data_use_measurement/core",
39 "//components/metrics",
41 "//components/variations",
46 # Helper library for observing signals that we need to clear any local data.
47 static_library("observers") {
49 "observers/history_delete_observer.cc",
50 "observers/history_delete_observer.h",
51 "observers/sync_disable_observer.cc",
52 "observers/sync_disable_observer.h",
57 "//components/history/core/browser",
62 "//components/unified_consent",
66 static_library("test_support") {
69 "test_ukm_recorder.cc",
70 "test_ukm_recorder.h",
75 "//third_party/metrics_proto",
79 "//components/metrics:test_support",
80 "//components/prefs:test_support",
81 "//testing/gtest:gtest",
85 source_set("unit_tests") {
88 "app_source_url_recorder_test.cc",
89 "observers/sync_disable_observer_unittest.cc",
90 "ukm_recorder_impl_unittest.cc",
91 "ukm_service_unittest.cc",
99 "//base/test:test_support",
100 "//components/metrics",
101 "//components/metrics:test_support",
102 "//components/prefs:test_support",
104 "//components/sync:test_support_driver",
105 "//components/sync_preferences:test_support",
106 "//components/unified_consent:test_support",
107 "//components/variations",
108 "//net:test_support",
109 "//services/metrics/public/cpp:ukm_builders",
111 "//third_party/zlib/google:compression_utils",
116 # Convenience testing target
117 test("ukm_unittests") {
121 "//base/test:test_support",
122 "//components/test:run_all_unittests",