BUILD.gn 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. # Copyright 2021 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. import("//build/buildflag_header.gni")
  5. import("//build/config/chrome_build.gni")
  6. import("//mojo/public/tools/bindings/mojom.gni")
  7. static_library("core") {
  8. sources = [
  9. "cluster_finalizer.h",
  10. "cluster_metrics_utils.cc",
  11. "cluster_metrics_utils.h",
  12. "cluster_processor.h",
  13. "clusterer.cc",
  14. "clusterer.h",
  15. "clustering_backend.h",
  16. "config.cc",
  17. "config.h",
  18. "content_annotations_cluster_processor.cc",
  19. "content_annotations_cluster_processor.h",
  20. "content_visibility_cluster_finalizer.cc",
  21. "content_visibility_cluster_finalizer.h",
  22. "features.cc",
  23. "features.h",
  24. "history_clusters_db_tasks.cc",
  25. "history_clusters_db_tasks.h",
  26. "history_clusters_debug_jsons.cc",
  27. "history_clusters_debug_jsons.h",
  28. "history_clusters_prefs.cc",
  29. "history_clusters_prefs.h",
  30. "history_clusters_service.cc",
  31. "history_clusters_service.h",
  32. "history_clusters_service_task_get_most_recent_clusters.cc",
  33. "history_clusters_service_task_get_most_recent_clusters.h",
  34. "history_clusters_service_task_update_clusters.cc",
  35. "history_clusters_service_task_update_clusters.h",
  36. "history_clusters_types.cc",
  37. "history_clusters_types.h",
  38. "history_clusters_util.cc",
  39. "history_clusters_util.h",
  40. "keyword_cluster_finalizer.cc",
  41. "keyword_cluster_finalizer.h",
  42. "label_cluster_finalizer.cc",
  43. "label_cluster_finalizer.h",
  44. "metrics_cluster_finalizer.cc",
  45. "metrics_cluster_finalizer.h",
  46. "noisy_cluster_finalizer.cc",
  47. "noisy_cluster_finalizer.h",
  48. "on_device_clustering_backend.cc",
  49. "on_device_clustering_backend.h",
  50. "on_device_clustering_features.cc",
  51. "on_device_clustering_features.h",
  52. "on_device_clustering_util.cc",
  53. "on_device_clustering_util.h",
  54. "query_clusters_state.cc",
  55. "query_clusters_state.h",
  56. "ranking_cluster_finalizer.cc",
  57. "ranking_cluster_finalizer.h",
  58. "similar_visit_deduper_cluster_finalizer.cc",
  59. "similar_visit_deduper_cluster_finalizer.h",
  60. "single_domain_cluster_finalizer.cc",
  61. "single_domain_cluster_finalizer.h",
  62. "single_visit_cluster_finalizer.cc",
  63. "single_visit_cluster_finalizer.h",
  64. ]
  65. deps = [
  66. "//base",
  67. "//components/history/core/browser",
  68. "//components/keyed_service/core",
  69. "//components/optimization_guide/core",
  70. "//components/optimization_guide/core:entities",
  71. "//components/pref_registry",
  72. "//components/prefs",
  73. "//components/query_parser",
  74. "//components/search_engines",
  75. "//components/site_engagement/core",
  76. "//components/strings:components_strings_grit",
  77. "//components/url_formatter",
  78. "//net",
  79. "//services/network/public/cpp",
  80. "//services/network/public/mojom",
  81. "//ui/base",
  82. "//url",
  83. ]
  84. }
  85. source_set("unit_tests") {
  86. testonly = true
  87. sources = [
  88. "clusterer_unittest.cc",
  89. "config_unittest.cc",
  90. "content_annotations_cluster_processor_unittest.cc",
  91. "content_visibility_cluster_finalizer_unittest.cc",
  92. "history_clusters_db_tasks_unittest.cc",
  93. "history_clusters_service_unittest.cc",
  94. "history_clusters_util_unittest.cc",
  95. "keyword_cluster_finalizer_unittest.cc",
  96. "label_cluster_finalizer_unittest.cc",
  97. "metrics_cluster_finalizer_unittest.cc",
  98. "noisy_cluster_finalizer_unittest.cc",
  99. "on_device_clustering_backend_unittest.cc",
  100. "on_device_clustering_util_unittest.cc",
  101. "query_clusters_state_unittest.cc",
  102. "ranking_cluster_finalizer_unittest.cc",
  103. "similar_visit_deduper_cluster_finalizer_unittest.cc",
  104. "single_domain_cluster_finalizer_unittest.cc",
  105. "single_visit_cluster_finalizer_unittest.cc",
  106. ]
  107. deps = [
  108. ":core",
  109. ":test_support",
  110. "//base/test:test_support",
  111. "//components/history/core/browser",
  112. "//components/history/core/test",
  113. "//components/optimization_guide/core",
  114. "//components/optimization_guide/core:entities",
  115. "//components/search_engines",
  116. "//components/site_engagement/core",
  117. "//services/network:test_support",
  118. "//testing/gtest",
  119. ]
  120. }
  121. source_set("test_support") {
  122. testonly = true
  123. sources = [
  124. "clustering_test_utils.cc",
  125. "clustering_test_utils.h",
  126. "history_clusters_service_test_api.cc",
  127. "history_clusters_service_test_api.h",
  128. ]
  129. public_deps = [ ":core" ]
  130. deps = [
  131. "//base/test:test_support",
  132. "//components/history/core/browser",
  133. "//components/history/core/test",
  134. ]
  135. }