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/features.gni")
8 visibility = [ "//components/policy/*" ]
10 defines = [ "POLICY_COMPONENT_IMPLEMENTATION" ]
12 if (enable_configuration_policy) {
14 "../../policy_export.h",
15 "async_policy_loader.cc",
16 "async_policy_loader.h",
17 "async_policy_provider.cc",
18 "async_policy_provider.h",
19 "cloud/cloud_external_data_manager.cc",
20 "cloud/cloud_external_data_manager.h",
21 "cloud/cloud_policy_client.cc",
22 "cloud/cloud_policy_client.h",
23 "cloud/cloud_policy_client_registration_helper.cc",
24 "cloud/cloud_policy_client_registration_helper.h",
25 "cloud/cloud_policy_constants.cc",
26 "cloud/cloud_policy_constants.h",
27 "cloud/cloud_policy_core.cc",
28 "cloud/cloud_policy_core.h",
29 "cloud/cloud_policy_manager.cc",
30 "cloud/cloud_policy_manager.h",
31 "cloud/cloud_policy_refresh_scheduler.cc",
32 "cloud/cloud_policy_refresh_scheduler.h",
33 "cloud/cloud_policy_service.cc",
34 "cloud/cloud_policy_service.h",
35 "cloud/cloud_policy_store.cc",
36 "cloud/cloud_policy_store.h",
37 "cloud/cloud_policy_validator.cc",
38 "cloud/cloud_policy_validator.h",
39 "cloud/component_cloud_policy_service.cc",
40 "cloud/component_cloud_policy_service.h",
41 "cloud/component_cloud_policy_store.cc",
42 "cloud/component_cloud_policy_store.h",
43 "cloud/component_cloud_policy_updater.cc",
44 "cloud/component_cloud_policy_updater.h",
45 "cloud/device_management_service.cc",
46 "cloud/device_management_service.h",
47 "cloud/enterprise_metrics.cc",
48 "cloud/enterprise_metrics.h",
49 "cloud/external_policy_data_fetcher.cc",
50 "cloud/external_policy_data_fetcher.h",
51 "cloud/external_policy_data_updater.cc",
52 "cloud/external_policy_data_updater.h",
53 "cloud/policy_header_io_helper.cc",
54 "cloud/policy_header_io_helper.h",
55 "cloud/policy_header_service.cc",
56 "cloud/policy_header_service.h",
57 "cloud/resource_cache.cc",
58 "cloud/resource_cache.h",
59 "cloud/system_policy_request_context.cc",
60 "cloud/system_policy_request_context.h",
61 "cloud/user_cloud_policy_manager.cc",
62 "cloud/user_cloud_policy_manager.h",
63 "cloud/user_cloud_policy_store.cc",
64 "cloud/user_cloud_policy_store.h",
65 "cloud/user_cloud_policy_store_base.cc",
66 "cloud/user_cloud_policy_store_base.h",
67 "cloud/user_info_fetcher.cc",
68 "cloud/user_info_fetcher.h",
69 "config_dir_policy_loader.cc",
70 "config_dir_policy_loader.h",
71 "configuration_policy_provider.cc",
72 "configuration_policy_provider.h",
73 "external_data_fetcher.cc",
74 "external_data_fetcher.h",
75 "external_data_manager.h",
81 "policy_load_status.cc",
82 "policy_load_status.h",
83 "policy_loader_ios.h",
84 "policy_loader_ios.mm",
85 "policy_loader_mac.h",
86 "policy_loader_mac.mm",
87 "policy_loader_win.cc",
88 "policy_loader_win.h",
91 "policy_namespace.cc",
93 "policy_pref_names.cc",
94 "policy_pref_names.h",
97 "policy_service_impl.cc",
98 "policy_service_impl.h",
99 "policy_statistics_collector.cc",
100 "policy_statistics_collector.h",
101 "policy_switches.cc",
104 "preferences_mac.cc",
106 "preg_parser_win.cc",
108 "registry_dict_win.cc",
109 "registry_dict_win.h",
110 "remote_commands/remote_command_job.cc",
111 "remote_commands/remote_command_job.h",
112 "remote_commands/remote_commands_factory.cc",
113 "remote_commands/remote_commands_factory.h",
114 "remote_commands/remote_commands_queue.cc",
115 "remote_commands/remote_commands_queue.h",
116 "remote_commands/remote_commands_service.cc",
117 "remote_commands/remote_commands_service.h",
123 "schema_registry.cc",
125 "schema_registry_tracking_policy_provider.cc",
126 "schema_registry_tracking_policy_provider.h",
129 configs += [ "//build/config:precompiled_headers" ]
132 "//components/policy/proto",
136 "//base/third_party/dynamic_annotations",
137 "//components/json_schema",
138 "//components/policy",
146 libs = [ "netapi32.lib" ]
149 sources += [ "cloud/component_cloud_policy_service_stub.cc" ]
151 "cloud/component_cloud_policy_service.cc",
152 "cloud/component_cloud_policy_store.cc",
153 "cloud/component_cloud_policy_store.h",
154 "cloud/component_cloud_policy_updater.cc",
155 "cloud/component_cloud_policy_updater.h",
156 "cloud/external_policy_data_fetcher.cc",
157 "cloud/external_policy_data_fetcher.h",
158 "cloud/external_policy_data_updater.cc",
159 "cloud/external_policy_data_updater.h",
160 "cloud/resource_cache.cc",
161 "cloud/resource_cache.h",
162 "config_dir_policy_loader.cc",
163 "config_dir_policy_loader.h",
164 "policy_load_status.cc",
165 "policy_load_status.h",
170 "proxy_policy_provider.cc",
171 "proxy_policy_provider.h",
174 "cloud/cloud_policy_client_registration_helper.cc",
175 "cloud/cloud_policy_client_registration_helper.h",
176 "cloud/user_cloud_policy_manager.cc",
177 "cloud/user_cloud_policy_manager.h",
178 "cloud/user_cloud_policy_store.cc",
179 "cloud/user_cloud_policy_store.h",
182 if (!is_ios && !is_mac) {
189 # Some of the policy code is always enabled, so that other parts of Chrome
190 # can always interface with the PolicyService without having to #ifdef on
191 # ENABLE_CONFIGURATION_POLICY.
193 "external_data_fetcher.cc",
194 "external_data_fetcher.h",
195 "external_data_manager.h",
198 "policy_namespace.cc",
199 "policy_namespace.h",
200 "policy_pref_names.cc",
201 "policy_pref_names.h",
204 "policy_service_stub.cc",
205 "policy_service_stub.h",
213 source_set("unit_tests") {
216 "async_policy_provider_unittest.cc",
217 "cloud/cloud_policy_client_unittest.cc",
218 "cloud/cloud_policy_constants_unittest.cc",
219 "cloud/cloud_policy_core_unittest.cc",
220 "cloud/cloud_policy_manager_unittest.cc",
221 "cloud/cloud_policy_refresh_scheduler_unittest.cc",
222 "cloud/cloud_policy_service_unittest.cc",
223 "cloud/cloud_policy_validator_unittest.cc",
224 "cloud/component_cloud_policy_service_unittest.cc",
225 "cloud/component_cloud_policy_store_unittest.cc",
226 "cloud/component_cloud_policy_updater_unittest.cc",
227 "cloud/device_management_service_unittest.cc",
228 "cloud/external_policy_data_fetcher_unittest.cc",
229 "cloud/external_policy_data_updater_unittest.cc",
230 "cloud/policy_header_io_helper_unittest.cc",
231 "cloud/policy_header_service_unittest.cc",
232 "cloud/resource_cache_unittest.cc",
233 "cloud/user_cloud_policy_manager_unittest.cc",
234 "cloud/user_cloud_policy_store_unittest.cc",
235 "cloud/user_info_fetcher_unittest.cc",
236 "config_dir_policy_loader_unittest.cc",
237 "generate_policy_source_unittest.cc",
238 "policy_bundle_unittest.cc",
239 "policy_loader_ios_unittest.mm",
240 "policy_loader_mac_unittest.cc",
241 "policy_loader_win_unittest.cc",
242 "policy_map_unittest.cc",
243 "policy_service_impl_unittest.cc",
244 "policy_statistics_collector_unittest.cc",
245 "preg_parser_win_unittest.cc",
246 "registry_dict_win_unittest.cc",
247 "remote_commands/remote_commands_queue_unittest.cc",
248 "remote_commands/remote_commands_service_unittest.cc",
249 "schema_map_unittest.cc",
250 "schema_registry_tracking_policy_provider_unittest.cc",
251 "schema_registry_unittest.cc",
252 "schema_unittest.cc",
257 "cloud/user_cloud_policy_manager_unittest.cc",
258 "cloud/user_cloud_policy_store_unittest.cc",
263 "//components/policy:policy_component_test_support",