OLD | NEW |
1 # Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//testing/test.gni") | 5 import("//testing/test.gni") |
6 | 6 |
7 # The Url-Keyed Metrics (UKM) service is responsible for gathering and | 7 # The Url-Keyed Metrics (UKM) service is responsible for gathering and |
8 # uploading reports that contain fine grained performance metrics including | 8 # uploading reports that contain fine grained performance metrics including |
9 # URLs for top-level navigations. | 9 # URLs for top-level navigations. |
10 static_library("ukm") { | 10 static_library("ukm") { |
11 sources = [ | 11 sources = [ |
12 "metrics_reporting_scheduler.cc", | 12 "metrics_reporting_scheduler.cc", |
13 "metrics_reporting_scheduler.h", | 13 "metrics_reporting_scheduler.h", |
14 "persisted_logs_metrics_impl.cc", | 14 "persisted_logs_metrics_impl.cc", |
15 "persisted_logs_metrics_impl.h", | 15 "persisted_logs_metrics_impl.h", |
16 "ukm_pref_names.cc", | 16 "ukm_pref_names.cc", |
17 "ukm_pref_names.h", | 17 "ukm_pref_names.h", |
18 "ukm_service.cc", | 18 "ukm_service.cc", |
19 "ukm_service.h", | 19 "ukm_service.h", |
| 20 "ukm_source.cc", |
| 21 "ukm_source.h", |
20 ] | 22 ] |
21 | 23 |
22 deps = [ | 24 deps = [ |
23 "//base", | 25 "//base", |
24 "//components/data_use_measurement/core", | 26 "//components/data_use_measurement/core", |
25 "//components/metrics", | 27 "//components/metrics", |
26 "//components/prefs", | 28 "//components/prefs", |
27 "//components/variations", | 29 "//components/variations", |
| 30 "//url", |
28 ] | 31 ] |
29 } | 32 } |
30 | 33 |
31 # Helper library for observing signals that we need to clear any local data. | 34 # Helper library for observing signals that we need to clear any local data. |
32 static_library("observers") { | 35 static_library("observers") { |
33 sources = [ | 36 sources = [ |
34 "observers/history_delete_observer.cc", | 37 "observers/history_delete_observer.cc", |
35 "observers/history_delete_observer.h", | 38 "observers/history_delete_observer.h", |
36 ] | 39 ] |
37 | 40 |
38 deps = [ | 41 deps = [ |
39 "//base", | 42 "//base", |
40 "//components/history/core/browser", | 43 "//components/history/core/browser", |
41 ] | 44 ] |
42 } | 45 } |
43 | 46 |
| 47 static_library("test_support") { |
| 48 testonly = true |
| 49 sources = [ |
| 50 "test_ukm_service.cc", |
| 51 "test_ukm_service.h", |
| 52 ] |
| 53 |
| 54 public_deps = [ |
| 55 ":ukm", |
| 56 ] |
| 57 deps = [ |
| 58 "//base", |
| 59 "//components/metrics:test_support", |
| 60 "//components/prefs:test_support", |
| 61 ] |
| 62 } |
| 63 |
44 source_set("unit_tests") { | 64 source_set("unit_tests") { |
45 testonly = true | 65 testonly = true |
46 sources = [ | 66 sources = [ |
47 "ukm_service_unittest.cc", | 67 "ukm_service_unittest.cc", |
48 ] | 68 ] |
49 | 69 |
50 deps = [ | 70 deps = [ |
| 71 ":test_support", |
51 ":ukm", | 72 ":ukm", |
52 "//base", | 73 "//base", |
53 "//base/test:test_support", | 74 "//base/test:test_support", |
54 "//components/metrics", | 75 "//components/metrics", |
55 "//components/metrics:test_support", | 76 "//components/metrics:test_support", |
56 "//components/prefs:test_support", | 77 "//components/prefs:test_support", |
57 "//net:test_support", | 78 "//net:test_support", |
58 "//testing/gtest", | 79 "//testing/gtest", |
| 80 "//third_party/zlib:compression_utils", |
59 "//url", | 81 "//url", |
60 ] | 82 ] |
61 } | 83 } |
62 | 84 |
63 # Convenience testing target | 85 # Convenience testing target |
64 test("ukm_unittests") { | 86 test("ukm_unittests") { |
65 deps = [ | 87 deps = [ |
66 ":unit_tests", | 88 ":unit_tests", |
67 "//base", | 89 "//base", |
68 "//base/test:run_all_unittests", | 90 "//base/test:run_all_unittests", |
69 "//base/test:test_support", | 91 "//base/test:test_support", |
70 ] | 92 ] |
71 } | 93 } |
OLD | NEW |