1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
|
# Copyright 2022 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//components/compose/features.gni")
static_library("default_model") {
sources = [
"android_home_module_ranker.cc",
"android_home_module_ranker.h",
"chrome_user_engagement.cc",
"chrome_user_engagement.h",
"contextual_page_actions_model.cc",
"contextual_page_actions_model.h",
"cross_device_user_segment.cc",
"cross_device_user_segment.h",
"database_api_clients.cc",
"database_api_clients.h",
"device_switcher_model.cc",
"device_switcher_model.h",
"device_switcher_result_dispatcher.cc",
"device_switcher_result_dispatcher.h",
"fedcm_user_segment.cc",
"fedcm_user_segment.h",
"feed_user_segment.cc",
"feed_user_segment.h",
"ios_default_browser_promo.cc",
"ios_default_browser_promo.h",
"ios_module_ranker.cc",
"ios_module_ranker.h",
"low_user_engagement_model.cc",
"low_user_engagement_model.h",
"metrics_clustering.cc",
"metrics_clustering.h",
"most_visited_tiles_user.cc",
"most_visited_tiles_user.h",
"optimization_target_segmentation_dummy.cc",
"optimization_target_segmentation_dummy.h",
"password_manager_user_segment.cc",
"password_manager_user_segment.h",
"resume_heavy_user_model.cc",
"resume_heavy_user_model.h",
"search_user_model.cc",
"search_user_model.h",
"shopping_user_model.cc",
"shopping_user_model.h",
"tab_resumption_ranker.cc",
"tab_resumption_ranker.h",
"url_visit_resumption_ranker.cc",
"url_visit_resumption_ranker.h",
]
deps = [
"//base",
"//components/compose:buildflags",
"//components/prefs:prefs",
"//components/segmentation_platform/embedder",
"//components/segmentation_platform/internal",
"//components/segmentation_platform/internal/proto",
"//components/segmentation_platform/public",
"//components/sync/service",
"//components/sync_device_info",
"//components/visited_url_ranking/public",
"//services/metrics/public/cpp:ukm_builders",
"//ui/base",
]
if (is_android) {
sources += [
"device_tier_segment.cc",
"device_tier_segment.h",
"frequent_feature_user_model.cc",
"frequent_feature_user_model.h",
"intentional_user_model.cc",
"intentional_user_model.h",
"power_user_segment.cc",
"power_user_segment.h",
"tablet_productivity_user_model.cc",
"tablet_productivity_user_model.h",
]
}
if (enable_compose) {
sources += [
"compose_promotion.cc",
"compose_promotion.h",
]
deps += [ "//components/compose/core/browser:browser" ]
}
}
source_set("unit_tests") {
testonly = true
# IMPORTANT NOTE: When adding new tests, also remember to update the list of
# tests in //components/segmentation_platform/components_unittests.filter
sources = [
"android_home_module_ranker_unittest.cc",
"chrome_user_engagement_unittest.cc",
"contextual_page_actions_model_unittest.cc",
"cross_device_user_segment_unittest.cc",
"database_api_clients_unittest.cc",
"device_switcher_model_unittest.cc",
"device_switcher_result_dispatcher_unittest.cc",
"fedcm_user_segment_unittest.cc",
"feed_user_segment_unittest.cc",
"ios_module_ranker_unittest.cc",
"low_user_engagement_model_unittest.cc",
"metrics_clustering_unittest.cc",
"most_visited_tiles_user_unittest.cc",
"optimization_target_segmentation_dummy_unittest.cc",
"password_manager_user_segment_unittest.cc",
"resume_heavy_user_model_unittest.cc",
"search_user_model_unittest.cc",
"shopping_user_model_unittest.cc",
"tab_resumption_ranker_unittest.cc",
"url_visit_resumption_ranker_unittest.cc",
]
if (is_android) {
sources += [
"device_tier_segment_unittest.cc",
"frequent_feature_user_model_unittest.cc",
"intentional_user_model_unittest.cc",
"power_user_segment_unittest.cc",
"tablet_productivity_user_model_unittest.cc",
]
}
deps = [
":default_model",
":default_model_test_base",
"//base",
"//base/test:test_support",
"//components/prefs:test_support",
"//components/segmentation_platform/embedder",
"//components/segmentation_platform/internal",
"//components/segmentation_platform/internal/proto",
"//components/segmentation_platform/public:public",
"//components/segmentation_platform/public:test_support",
"//components/segmentation_platform/public/proto",
"//components/sync:test_support",
"//components/sync_device_info",
"//components/sync_device_info:test_support",
"//components/visited_url_ranking/public",
"//testing/gtest",
]
if (enable_compose) {
sources += [ "compose_promotion_unittest.cc" ]
deps += [ "//components/compose/core/browser:browser" ]
}
}
source_set("default_model_test_base") {
testonly = true
sources = [
"default_model_test_base.cc",
"default_model_test_base.h",
]
deps = [
":default_model",
"//base",
"//base/test:test_support",
"//components/segmentation_platform/internal",
"//components/segmentation_platform/internal/proto",
"//components/segmentation_platform/public",
"//testing/gtest",
]
}
|