summaryrefslogtreecommitdiffstats
path: root/chromium/components/ntp_snippets/BUILD.gn
blob: 64b1abd65b57d119941b5e014512e5606dd985a6 (plain)
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/ui.gni")

import("//third_party/protobuf/proto_library.gni")

static_library("ntp_snippets") {
  sources = [
    "callbacks.h",
    "category.cc",
    "category.h",
    "category_info.cc",
    "category_info.h",
    "category_rankers/category_ranker.h",
    "category_rankers/click_based_category_ranker.cc",
    "category_rankers/click_based_category_ranker.h",
    "category_rankers/constant_category_ranker.cc",
    "category_rankers/constant_category_ranker.h",
    "category_status.cc",
    "category_status.h",
    "content_suggestion.cc",
    "content_suggestion.h",
    "content_suggestions_metrics.cc",
    "content_suggestions_metrics.h",
    "content_suggestions_provider.cc",
    "content_suggestions_provider.h",
    "content_suggestions_service.cc",
    "content_suggestions_service.h",
    "features.cc",
    "features.h",
    "ntp_snippets_constants.cc",
    "ntp_snippets_constants.h",
    "pref_names.cc",
    "pref_names.h",
    "pref_util.cc",
    "pref_util.h",
    "reading_list/reading_list_suggestions_provider.cc",
    "reading_list/reading_list_suggestions_provider.h",
    "remote/cached_image_fetcher.cc",
    "remote/cached_image_fetcher.h",
    "remote/json_request.cc",
    "remote/json_request.h",
    "remote/json_to_categories.cc",
    "remote/json_to_categories.h",
    "remote/persistent_scheduler.h",
    "remote/remote_suggestion.cc",
    "remote/remote_suggestion.h",
    "remote/remote_suggestions_database.cc",
    "remote/remote_suggestions_database.h",
    "remote/remote_suggestions_fetcher.cc",
    "remote/remote_suggestions_fetcher.h",
    "remote/remote_suggestions_fetcher_impl.cc",
    "remote/remote_suggestions_fetcher_impl.h",
    "remote/remote_suggestions_provider.cc",
    "remote/remote_suggestions_provider.h",
    "remote/remote_suggestions_provider_impl.cc",
    "remote/remote_suggestions_provider_impl.h",
    "remote/remote_suggestions_scheduler.h",
    "remote/remote_suggestions_scheduler_impl.cc",
    "remote/remote_suggestions_scheduler_impl.h",
    "remote/remote_suggestions_status_service.h",
    "remote/remote_suggestions_status_service_impl.cc",
    "remote/remote_suggestions_status_service_impl.h",
    "remote/request_params.cc",
    "remote/request_params.h",
    "remote/request_throttler.cc",
    "remote/request_throttler.h",
    "status.cc",
    "status.h",
    "switches.cc",
    "switches.h",
    "time_serialization.cc",
    "time_serialization.h",
    "user_classifier.cc",
    "user_classifier.h",
  ]

  public_deps = [
    "//base",
    "//components/keyed_service/core",
    "//components/leveldb_proto",
    "//components/prefs",
    "//components/resources",
    "//components/sync",
    "//components/version_info",
    "//net",
    "//ui/base",
    "//url",
  ]

  deps = [
    "//components/favicon/core",
    "//components/favicon_base",
    "//components/feed/core/shared_prefs:feed_shared_prefs",
    "//components/history/core/browser",
    "//components/image_fetcher/core",
    "//components/language/core/browser",
    "//components/metrics",
    "//components/ntp_snippets/remote/proto",
    "//components/reading_list/core",
    "//components/signin/public/identity_manager",
    "//components/strings",
    "//components/unified_consent",
    "//components/url_formatter",
    "//components/variations",
    "//components/variations/net",
    "//components/variations/service",
    "//components/web_resource",
    "//services/metrics/public/cpp:metrics_cpp",
    "//services/metrics/public/cpp:ukm_builders",
    "//services/network/public/cpp",
    "//services/network/public/mojom",
    "//third_party/icu/",
    "//third_party/protobuf:protobuf_lite",
    "//ui/gfx",
  ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "category_rankers/click_based_category_ranker_unittest.cc",
    "category_rankers/constant_category_ranker_unittest.cc",
    "category_unittest.cc",
    "content_suggestions_metrics_unittest.cc",
    "content_suggestions_service_unittest.cc",
    "features_unittest.cc",
    "reading_list/reading_list_suggestions_provider_unittest.cc",
    "remote/cached_image_fetcher_unittest.cc",
    "remote/json_request_unittest.cc",
    "remote/remote_suggestion_unittest.cc",
    "remote/remote_suggestions_database_unittest.cc",
    "remote/remote_suggestions_fetcher_impl_unittest.cc",
    "remote/remote_suggestions_provider_impl_unittest.cc",
    "remote/remote_suggestions_scheduler_impl_unittest.cc",
    "remote/remote_suggestions_status_service_impl_unittest.cc",
    "remote/request_throttler_unittest.cc",
    "remote/test_utils.cc",
    "remote/test_utils.h",
    "time_serialization_unittest.cc",
    "user_classifier_unittest.cc",
  ]

  deps = [
    ":ntp_snippets",
    ":test_support",
    "//base",
    "//base/test:test_support",
    "//components/feed/core/shared_prefs:feed_shared_prefs",
    "//components/image_fetcher/core",
    "//components/image_fetcher/core:test_support",
    "//components/leveldb_proto:test_support",
    "//components/ntp_snippets/remote/proto",
    "//components/prefs:test_support",
    "//components/reading_list/core",
    "//components/signin/public/identity_manager:test_support",
    "//components/strings",
    "//components/sync:test_support",
    "//components/sync_preferences:test_support",
    "//components/ukm:test_support",
    "//components/variations:test_support",
    "//components/variations/net",
    "//components/web_resource:web_resource",
    "//net:test_support",
    "//services/metrics/public/cpp:ukm_builders",
    "//services/network:test_support",
    "//services/network/public/cpp",
    "//services/network/public/mojom",
    "//testing/gtest",
    "//third_party/icu/",
    "//ui/gfx:test_support",
  ]
}

source_set("test_support") {
  testonly = true
  sources = [
    "category_rankers/fake_category_ranker.cc",
    "category_rankers/fake_category_ranker.h",
    "category_rankers/mock_category_ranker.cc",
    "category_rankers/mock_category_ranker.h",
    "fake_content_suggestions_provider_observer.cc",
    "fake_content_suggestions_provider_observer.h",
    "mock_content_suggestions_provider.cc",
    "mock_content_suggestions_provider.h",
    "mock_content_suggestions_provider_observer.cc",
    "mock_content_suggestions_provider_observer.h",
    "remote/remote_suggestion_builder.cc",
    "remote/remote_suggestion_builder.h",
  ]

  deps = [
    ":ntp_snippets",
    "//base",
    "//components/ntp_snippets/remote/proto",
    "//testing/gmock",
    "//testing/gtest",
  ]
}