Upload upstream chromium 71.0.3578.0
[platform/framework/web/chromium-efl.git] / components / ukm / BUILD.gn
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.
4
5 import("//testing/test.gni")
6
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") {
11   sources = [
12     "persisted_logs_metrics_impl.cc",
13     "persisted_logs_metrics_impl.h",
14     "ukm_pref_names.cc",
15     "ukm_pref_names.h",
16     "ukm_recorder_impl.cc",
17     "ukm_recorder_impl.h",
18     "ukm_reporting_service.cc",
19     "ukm_reporting_service.h",
20     "ukm_rotation_scheduler.cc",
21     "ukm_rotation_scheduler.h",
22     "ukm_service.cc",
23     "ukm_service.h",
24   ]
25
26   public_deps = [
27     "//services/metrics/public/cpp:metrics_cpp",
28     "//services/metrics/public/cpp:ukm_builders",
29     "//services/metrics/public/mojom",
30     "//third_party/metrics_proto",
31   ]
32
33   deps = [
34     "//base",
35     "//components/data_use_measurement/core",
36     "//components/metrics",
37     "//components/prefs",
38     "//components/variations",
39     "//url",
40   ]
41 }
42
43 # Helper library for observing signals that we need to clear any local data.
44 static_library("observers") {
45   sources = [
46     "observers/history_delete_observer.cc",
47     "observers/history_delete_observer.h",
48     "observers/sync_disable_observer.cc",
49     "observers/sync_disable_observer.h",
50   ]
51
52   deps = [
53     "//base",
54     "//components/history/core/browser",
55     "//components/sync",
56   ]
57
58   public_deps = [
59     "//components/unified_consent",
60   ]
61 }
62
63 static_library("test_support") {
64   testonly = true
65   sources = [
66     "test_ukm_recorder.cc",
67     "test_ukm_recorder.h",
68   ]
69
70   public_deps = [
71     ":ukm",
72     "//third_party/metrics_proto",
73   ]
74   deps = [
75     "//base",
76     "//components/metrics:test_support",
77     "//components/prefs:test_support",
78     "//testing/gtest:gtest",
79   ]
80 }
81
82 source_set("unit_tests") {
83   testonly = true
84   sources = [
85     "observers/sync_disable_observer_unittest.cc",
86     "ukm_service_unittest.cc",
87   ]
88
89   deps = [
90     ":observers",
91     ":test_support",
92     ":ukm",
93     "//base",
94     "//base/test:test_support",
95     "//components/metrics",
96     "//components/metrics:test_support",
97     "//components/prefs:test_support",
98     "//components/sync",
99     "//components/sync:test_support_driver",
100     "//components/sync_preferences:test_support",
101     "//components/unified_consent:test_support",
102     "//components/variations",
103     "//net:test_support",
104     "//services/metrics/public/cpp:ukm_builders",
105     "//testing/gtest",
106     "//third_party/zlib/google:compression_utils",
107     "//url",
108   ]
109 }
110
111 # Convenience testing target
112 test("ukm_unittests") {
113   deps = [
114     ":unit_tests",
115     "//base",
116     "//base/test:test_support",
117     "//components/test:run_all_unittests",
118   ]
119 }