Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / components / autofill / core / browser / BUILD.gn
blobce5b85d21040381eeb28d2fafaf559fe42a9ba0f
1 # Copyright 2014 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.
5 import("//build/config/chrome_build.gni")
7 # This config sets the define that controls which Wallet service to contact
8 # for features using Wallet integration. Unofficial builds won't have the
9 # proper API keys so it uses the "sandbox" test servers instead.
10 config("wallet_service") {
11   if (is_official_build) {
12     defines = [ "ENABLE_PROD_WALLET_SERVICE=1" ]
13   }
16 # GYP version: components/autofill.gyp:autofill_core_browser
17 source_set("browser") {
18   sources = [
19     "address.cc",
20     "address.h",
21     "address_field.cc",
22     "address_field.h",
23     "address_i18n.cc",
24     "address_i18n.h",
25     "autocomplete_history_manager.cc",
26     "autocomplete_history_manager.h",
27     "autofill-inl.h",
28     "autofill_cc_infobar_delegate.cc",
29     "autofill_cc_infobar_delegate.h",
30     "autofill_client.h",
31     "autofill_country.cc",
32     "autofill_country.h",
33     "autofill_data_model.cc",
34     "autofill_data_model.h",
35     "autofill_download_manager.cc",
36     "autofill_download_manager.h",
37     "autofill_driver.h",
38     "autofill_experiments.cc",
39     "autofill_experiments.h",
40     "autofill_external_delegate.cc",
41     "autofill_external_delegate.h",
42     "autofill_field.cc",
43     "autofill_field.h",
44     "autofill_ie_toolbar_import_win.cc",
45     "autofill_ie_toolbar_import_win.h",
46     "autofill_manager.cc",
47     "autofill_manager.h",
48     "autofill_manager_test_delegate.h",
49     "autofill_metrics.cc",
50     "autofill_metrics.h",
51     "autofill_popup_delegate.h",
52     "autofill_profile.cc",
53     "autofill_profile.h",
54     "autofill_regex_constants.cc",
55     "autofill_regex_constants.h",
56     "autofill_scanner.cc",
57     "autofill_scanner.h",
58     "autofill_server_field_info.h",
59     "autofill_sync_constants.cc",
60     "autofill_sync_constants.h",
61     "autofill_type.cc",
62     "autofill_type.h",
63     "autofill_xml_parser.cc",
64     "autofill_xml_parser.h",
65     "card_unmask_delegate.cc",
66     "card_unmask_delegate.h",
67     "contact_info.cc",
68     "contact_info.h",
69     "credit_card.cc",
70     "credit_card.h",
71     "credit_card_field.cc",
72     "credit_card_field.h",
73     "detail_input.cc",
74     "detail_input.h",
75     "dialog_section.h",
76     "email_field.cc",
77     "email_field.h",
78     "field_types.h",
79     "form_field.cc",
80     "form_field.h",
81     "form_group.cc",
82     "form_group.h",
83     "form_structure.cc",
84     "form_structure.h",
85     "name_field.cc",
86     "name_field.h",
87     "options_util.cc",
88     "options_util.h",
89     "password_generator.cc",
90     "password_generator.h",
91     "personal_data_manager.cc",
92     "personal_data_manager.h",
93     "personal_data_manager_observer.h",
94     "phone_field.cc",
95     "phone_field.h",
96     "phone_number.cc",
97     "phone_number.h",
98     "phone_number_i18n.cc",
99     "phone_number_i18n.h",
100     "popup_item_ids.h",
101     "server_field_types_util.cc",
102     "server_field_types_util.h",
103     "state_names.cc",
104     "state_names.h",
105     "suggestion.cc",
106     "suggestion.h",
107     "ui/card_unmask_prompt_controller.h",
108     "ui/card_unmask_prompt_controller_impl.cc",
109     "ui/card_unmask_prompt_controller_impl.h",
110     "ui/card_unmask_prompt_view.h",
111     "validation.cc",
112     "validation.h",
113     "wallet/real_pan_wallet_client.cc",
114     "wallet/real_pan_wallet_client.h",
115     "webdata/autocomplete_syncable_service.cc",
116     "webdata/autocomplete_syncable_service.h",
117     "webdata/autofill_change.cc",
118     "webdata/autofill_change.h",
119     "webdata/autofill_entry.cc",
120     "webdata/autofill_entry.h",
121     "webdata/autofill_profile_syncable_service.cc",
122     "webdata/autofill_profile_syncable_service.h",
123     "webdata/autofill_table.cc",
124     "webdata/autofill_table.h",
125     "webdata/autofill_wallet_metadata_syncable_service.cc",
126     "webdata/autofill_wallet_metadata_syncable_service.h",
127     "webdata/autofill_wallet_syncable_service.cc",
128     "webdata/autofill_wallet_syncable_service.h",
129     "webdata/autofill_webdata.h",
130     "webdata/autofill_webdata_backend.h",
131     "webdata/autofill_webdata_backend_impl.cc",
132     "webdata/autofill_webdata_backend_impl.h",
133     "webdata/autofill_webdata_service.cc",
134     "webdata/autofill_webdata_service.h",
135     "webdata/autofill_webdata_service_observer.h",
136   ]
138   configs += [ "//build/config:precompiled_headers" ]
140   deps = [
141     "//base",
142     "//base:i18n",
143     "//base:prefs",
144     "//components/autofill/core/common",
145     "//components/data_use_measurement/core",
146     "//components/infobars/core",
147     "//components/keyed_service/core",
148     "//components/os_crypt",
149     "//components/pref_registry",
150     "//components/rappor",
151     "//components/resources",
152     "//components/signin/core/browser",
153     "//components/signin/core/common",
154     "//components/strings",
155     "//components/sync_driver",
156     "//components/variations/net",
157     "//components/webdata/common",
158     "//google_apis",
159     "//net",
160     "//skia",
161     "//sql",
162     "//sync",
163     "//third_party/fips181",
164     "//third_party/icu",
165     "//third_party/libaddressinput:util",
166     "//third_party/libphonenumber",
167     "//third_party/libjingle",
168     "//ui/base",
169     "//ui/gfx",
170     "//ui/gfx/geometry",
171     "//url",
172   ]
174   configs += [
175     ":wallet_service",
176     "//build/config/compiler:no_size_t_to_int_warning",
177   ]
179   if (is_mac) {
180     libs = [ "AddressBook.framework" ]
181   }
184 source_set("test_support") {
185   testonly = true
186   sources = [
187     "autofill_test_utils.cc",
188     "autofill_test_utils.h",
189     "data_driven_test.cc",
190     "data_driven_test.h",
191     "suggestion_test_helpers.h",
192     "test_autofill_client.cc",
193     "test_autofill_client.h",
194     "test_autofill_driver.cc",
195     "test_autofill_driver.h",
196     "test_autofill_external_delegate.cc",
197     "test_autofill_external_delegate.h",
198     "test_personal_data_manager.cc",
199     "test_personal_data_manager.h",
200   ]
202   deps = [
203     ":browser",
204     "//base",
205     "//base:prefs",
206     "//base:prefs_test_support",
207     "//base/test:test_support",
208     "//components/autofill/core/browser",
209     "//components/autofill/core/common",
210     "//components/os_crypt",
211     "//components/pref_registry",
212     "//components/rappor",
213     "//components/rappor:test_support",
214     "//components/signin/core/browser",
215     "//components/signin/core/common",
216     "//google_apis:test_support",
217     "//skia",
218     "//testing/gtest",
219     "//ui/gfx/geometry",
220   ]
223 source_set("unit_tests") {
224   testonly = true
225   sources = [
226     "address_field_unittest.cc",
227     "address_i18n_unittest.cc",
228     "address_unittest.cc",
229     "autocomplete_history_manager_unittest.cc",
230     "autofill_country_unittest.cc",
231     "autofill_data_model_unittest.cc",
232     "autofill_download_manager_unittest.cc",
233     "autofill_external_delegate_unittest.cc",
234     "autofill_field_unittest.cc",
235     "autofill_ie_toolbar_import_win_unittest.cc",
236     "autofill_manager_unittest.cc",
237     "autofill_merge_unittest.cc",
238     "autofill_metrics_unittest.cc",
239     "autofill_profile_unittest.cc",
240     "autofill_type_unittest.cc",
241     "autofill_xml_parser_unittest.cc",
242     "contact_info_unittest.cc",
243     "credit_card_field_unittest.cc",
244     "credit_card_unittest.cc",
245     "form_field_unittest.cc",
246     "form_structure_unittest.cc",
247     "name_field_unittest.cc",
248     "options_util_unittest.cc",
249     "password_generator_unittest.cc",
250     "personal_data_manager_unittest.cc",
251     "phone_field_unittest.cc",
252     "phone_number_i18n_unittest.cc",
253     "phone_number_unittest.cc",
254     "ui/card_unmask_prompt_controller_impl_unittest.cc",
255     "validation_unittest.cc",
256     "webdata/autofill_profile_syncable_service_unittest.cc",
257     "webdata/autofill_table_unittest.cc",
258     "webdata/autofill_wallet_metadata_syncable_service_unittest.cc",
259     "webdata/web_data_service_unittest.cc",
260   ]
262   deps = [
263     ":browser",
264     ":test_support",
265     "//base",
266     "//base:prefs",
267     "//base:prefs_test_support",
268     "//base/test:test_support",
269     "//components/autofill/core/common",
270     "//components/os_crypt",
271     "//components/rappor:test_support",
272     "//components/resources",
273     "//components/signin/core/browser",
274     "//components/signin/core/browser:test_support",
275     "//components/signin/core/common",
276     "//components/strings",
277     "//components/sync_driver",
278     "//components/sync_driver:test_support",
279     "//components/variations",
280     "//components/webdata/common",
281     "//components/webdata_services:test_support",
282     "//google_apis",
283     "//google_apis:test_support",
284     "//net:test_support",
285     "//sql",
286     "//sync",
287     "//sync:test_support_sync_api",
288     "//testing/gmock",
289     "//testing/gtest",
290     "//third_party/libaddressinput:util",
291     "//third_party/libphonenumber",
292     "//third_party/libjingle",
293     "//ui/base",
294     "//url",
295   ]