| 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", |
| 28 ] | 30 ] |
| 29 } | 31 } |
| 30 | 32 |
| 31 # Helper library for observing signals that we need to clear any local data. | 33 # Helper library for observing signals that we need to clear any local data. |
| 32 static_library("observers") { | 34 static_library("observers") { |
| 33 sources = [ | 35 sources = [ |
| 34 "observers/history_delete_observer.cc", | 36 "observers/history_delete_observer.cc", |
| 35 "observers/history_delete_observer.h", | 37 "observers/history_delete_observer.h", |
| 36 ] | 38 ] |
| 37 | 39 |
| 38 deps = [ | 40 deps = [ |
| 39 "//base", | 41 "//base", |
| 40 "//components/history/core/browser", | 42 "//components/history/core/browser", |
| 41 ] | 43 ] |
| 42 } | 44 } |
| 43 | 45 |
| 46 static_library("test_support") { |
| 47 testonly = true |
| 48 sources = [ |
| 49 "test_ukm_service.cc", |
| 50 "test_ukm_service.h", |
| 51 ] |
| 52 |
| 53 public_deps = [ |
| 54 ":ukm", |
| 55 ] |
| 56 deps = [ |
| 57 "//base", |
| 58 "//components/metrics:test_support", |
| 59 "//components/prefs:test_support", |
| 60 ] |
| 61 } |
| 62 |
| 44 source_set("unit_tests") { | 63 source_set("unit_tests") { |
| 45 testonly = true | 64 testonly = true |
| 46 sources = [ | 65 sources = [ |
| 47 "ukm_service_unittest.cc", | 66 "ukm_service_unittest.cc", |
| 48 ] | 67 ] |
| 49 | 68 |
| 50 deps = [ | 69 deps = [ |
| 70 ":test_support", |
| 51 ":ukm", | 71 ":ukm", |
| 52 "//base", | 72 "//base", |
| 53 "//base/test:test_support", | 73 "//base/test:test_support", |
| 54 "//components/metrics", | 74 "//components/metrics", |
| 55 "//components/metrics:test_support", | 75 "//components/metrics:test_support", |
| 56 "//components/prefs:test_support", | 76 "//components/prefs:test_support", |
| 57 "//net:test_support", | 77 "//net:test_support", |
| 58 "//testing/gtest", | 78 "//testing/gtest", |
| 59 "//url", | 79 "//url", |
| 60 ] | 80 ] |
| 61 } | 81 } |
| 62 | 82 |
| 63 # Convenience testing target | 83 # Convenience testing target |
| 64 test("ukm_unittests") { | 84 test("ukm_unittests") { |
| 65 deps = [ | 85 deps = [ |
| 66 ":unit_tests", | 86 ":unit_tests", |
| 67 "//base", | 87 "//base", |
| 68 "//base/test:run_all_unittests", | 88 "//base/test:run_all_unittests", |
| 69 "//base/test:test_support", | 89 "//base/test:test_support", |
| 70 ] | 90 ] |
| 71 } | 91 } |
| OLD | NEW |