OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/features.gni") | 5 import("//build/config/features.gni") |
6 | 6 |
7 group("common") { | 7 group("common") { |
8 if (is_component_build) { | 8 if (is_component_build) { |
9 public_deps = [ | 9 public_deps = [ |
10 "//components/policy", | 10 "//components/policy", |
11 ] | 11 ] |
12 } else { | 12 } else { |
13 public_deps = [ | 13 public_deps = [ |
14 ":internal", | 14 ":internal", |
15 ] | 15 ] |
16 } | 16 } |
17 } | 17 } |
18 | 18 |
19 source_set("internal") { | 19 source_set("internal") { |
20 visibility = [ "//components/policy/*" ] | 20 visibility = [ "//components/policy/*" ] |
21 | 21 |
22 configs += [ "//components/policy:component_implementation" ] | 22 configs += [ "//components/policy:component_implementation" ] |
23 | 23 |
24 if (enable_configuration_policy) { | 24 sources = [ |
25 sources = [ | 25 "../../policy_export.h", |
26 "../../policy_export.h", | 26 "async_policy_loader.cc", |
27 "async_policy_loader.cc", | 27 "async_policy_loader.h", |
28 "async_policy_loader.h", | 28 "async_policy_provider.cc", |
29 "async_policy_provider.cc", | 29 "async_policy_provider.h", |
30 "async_policy_provider.h", | 30 "cloud/cloud_external_data_manager.cc", |
31 "cloud/cloud_external_data_manager.cc", | 31 "cloud/cloud_external_data_manager.h", |
32 "cloud/cloud_external_data_manager.h", | 32 "cloud/cloud_policy_client.cc", |
33 "cloud/cloud_policy_client.cc", | 33 "cloud/cloud_policy_client.h", |
34 "cloud/cloud_policy_client.h", | 34 "cloud/cloud_policy_client_registration_helper.cc", |
35 "cloud/cloud_policy_client_registration_helper.cc", | 35 "cloud/cloud_policy_client_registration_helper.h", |
36 "cloud/cloud_policy_client_registration_helper.h", | 36 "cloud/cloud_policy_constants.cc", |
37 "cloud/cloud_policy_constants.cc", | 37 "cloud/cloud_policy_constants.h", |
38 "cloud/cloud_policy_constants.h", | 38 "cloud/cloud_policy_core.cc", |
39 "cloud/cloud_policy_core.cc", | 39 "cloud/cloud_policy_core.h", |
40 "cloud/cloud_policy_core.h", | 40 "cloud/cloud_policy_manager.cc", |
41 "cloud/cloud_policy_manager.cc", | 41 "cloud/cloud_policy_manager.h", |
42 "cloud/cloud_policy_manager.h", | 42 "cloud/cloud_policy_refresh_scheduler.cc", |
43 "cloud/cloud_policy_refresh_scheduler.cc", | 43 "cloud/cloud_policy_refresh_scheduler.h", |
44 "cloud/cloud_policy_refresh_scheduler.h", | 44 "cloud/cloud_policy_service.cc", |
45 "cloud/cloud_policy_service.cc", | 45 "cloud/cloud_policy_service.h", |
46 "cloud/cloud_policy_service.h", | 46 "cloud/cloud_policy_store.cc", |
47 "cloud/cloud_policy_store.cc", | 47 "cloud/cloud_policy_store.h", |
48 "cloud/cloud_policy_store.h", | 48 "cloud/cloud_policy_validator.cc", |
49 "cloud/cloud_policy_validator.cc", | 49 "cloud/cloud_policy_validator.h", |
50 "cloud/cloud_policy_validator.h", | 50 "cloud/component_cloud_policy_service.cc", |
| 51 "cloud/component_cloud_policy_service.h", |
| 52 "cloud/component_cloud_policy_store.cc", |
| 53 "cloud/component_cloud_policy_store.h", |
| 54 "cloud/component_cloud_policy_updater.cc", |
| 55 "cloud/component_cloud_policy_updater.h", |
| 56 "cloud/device_management_service.cc", |
| 57 "cloud/device_management_service.h", |
| 58 "cloud/enterprise_metrics.cc", |
| 59 "cloud/enterprise_metrics.h", |
| 60 "cloud/external_policy_data_fetcher.cc", |
| 61 "cloud/external_policy_data_fetcher.h", |
| 62 "cloud/external_policy_data_updater.cc", |
| 63 "cloud/external_policy_data_updater.h", |
| 64 "cloud/policy_header_io_helper.cc", |
| 65 "cloud/policy_header_io_helper.h", |
| 66 "cloud/policy_header_service.cc", |
| 67 "cloud/policy_header_service.h", |
| 68 "cloud/resource_cache.cc", |
| 69 "cloud/resource_cache.h", |
| 70 "cloud/signing_service.h", |
| 71 "cloud/user_cloud_policy_manager.cc", |
| 72 "cloud/user_cloud_policy_manager.h", |
| 73 "cloud/user_cloud_policy_store.cc", |
| 74 "cloud/user_cloud_policy_store.h", |
| 75 "cloud/user_cloud_policy_store_base.cc", |
| 76 "cloud/user_cloud_policy_store_base.h", |
| 77 "cloud/user_info_fetcher.cc", |
| 78 "cloud/user_info_fetcher.h", |
| 79 "config_dir_policy_loader.cc", |
| 80 "config_dir_policy_loader.h", |
| 81 "configuration_policy_provider.cc", |
| 82 "configuration_policy_provider.h", |
| 83 "external_data_fetcher.cc", |
| 84 "external_data_fetcher.h", |
| 85 "external_data_manager.h", |
| 86 "policy_bundle.cc", |
| 87 "policy_bundle.h", |
| 88 "policy_details.h", |
| 89 "policy_load_status.cc", |
| 90 "policy_load_status.h", |
| 91 "policy_loader_ios.h", |
| 92 "policy_loader_ios.mm", |
| 93 "policy_loader_mac.h", |
| 94 "policy_loader_mac.mm", |
| 95 "policy_loader_win.cc", |
| 96 "policy_loader_win.h", |
| 97 "policy_map.cc", |
| 98 "policy_map.h", |
| 99 "policy_namespace.cc", |
| 100 "policy_namespace.h", |
| 101 "policy_pref_names.cc", |
| 102 "policy_pref_names.h", |
| 103 "policy_service.cc", |
| 104 "policy_service.h", |
| 105 "policy_service_impl.cc", |
| 106 "policy_service_impl.h", |
| 107 "policy_statistics_collector.cc", |
| 108 "policy_statistics_collector.h", |
| 109 "policy_switches.cc", |
| 110 "policy_switches.h", |
| 111 "policy_types.h", |
| 112 "preferences_mac.cc", |
| 113 "preferences_mac.h", |
| 114 "remote_commands/remote_command_job.cc", |
| 115 "remote_commands/remote_command_job.h", |
| 116 "remote_commands/remote_commands_factory.cc", |
| 117 "remote_commands/remote_commands_factory.h", |
| 118 "remote_commands/remote_commands_queue.cc", |
| 119 "remote_commands/remote_commands_queue.h", |
| 120 "remote_commands/remote_commands_service.cc", |
| 121 "remote_commands/remote_commands_service.h", |
| 122 "schema.cc", |
| 123 "schema.h", |
| 124 "schema_internal.h", |
| 125 "schema_map.cc", |
| 126 "schema_map.h", |
| 127 "schema_registry.cc", |
| 128 "schema_registry.h", |
| 129 "schema_registry_tracking_policy_provider.cc", |
| 130 "schema_registry_tracking_policy_provider.h", |
| 131 ] |
| 132 |
| 133 configs += [ "//build/config:precompiled_headers" ] |
| 134 |
| 135 public_deps = [ |
| 136 "//components/policy:generated", |
| 137 "//components/policy/proto", |
| 138 ] |
| 139 deps = [ |
| 140 "//base:i18n", |
| 141 "//base/third_party/dynamic_annotations", |
| 142 "//components/data_use_measurement/core", |
| 143 "//components/json_schema", |
| 144 "//components/prefs", |
| 145 "//extensions/features", |
| 146 "//google_apis", |
| 147 "//net", |
| 148 "//third_party/re2", |
| 149 "//url", |
| 150 ] |
| 151 |
| 152 if (is_win) { |
| 153 libs = [ |
| 154 "shlwapi.lib", |
| 155 "userenv.lib", |
| 156 "ntdsapi.lib", |
| 157 ] |
| 158 } |
| 159 if (is_win || is_chromeos) { |
| 160 sources += [ |
| 161 "preg_parser.cc", |
| 162 "preg_parser.h", |
| 163 "registry_dict.cc", |
| 164 "registry_dict.h", |
| 165 ] |
| 166 } |
| 167 if (is_android) { |
| 168 sources += [ "cloud/component_cloud_policy_service_stub.cc" ] |
| 169 sources -= [ |
51 "cloud/component_cloud_policy_service.cc", | 170 "cloud/component_cloud_policy_service.cc", |
52 "cloud/component_cloud_policy_service.h", | |
53 "cloud/component_cloud_policy_store.cc", | 171 "cloud/component_cloud_policy_store.cc", |
54 "cloud/component_cloud_policy_store.h", | 172 "cloud/component_cloud_policy_store.h", |
55 "cloud/component_cloud_policy_updater.cc", | 173 "cloud/component_cloud_policy_updater.cc", |
56 "cloud/component_cloud_policy_updater.h", | 174 "cloud/component_cloud_policy_updater.h", |
57 "cloud/device_management_service.cc", | |
58 "cloud/device_management_service.h", | |
59 "cloud/enterprise_metrics.cc", | |
60 "cloud/enterprise_metrics.h", | |
61 "cloud/external_policy_data_fetcher.cc", | 175 "cloud/external_policy_data_fetcher.cc", |
62 "cloud/external_policy_data_fetcher.h", | 176 "cloud/external_policy_data_fetcher.h", |
63 "cloud/external_policy_data_updater.cc", | 177 "cloud/external_policy_data_updater.cc", |
64 "cloud/external_policy_data_updater.h", | 178 "cloud/external_policy_data_updater.h", |
65 "cloud/policy_header_io_helper.cc", | |
66 "cloud/policy_header_io_helper.h", | |
67 "cloud/policy_header_service.cc", | |
68 "cloud/policy_header_service.h", | |
69 "cloud/resource_cache.cc", | 179 "cloud/resource_cache.cc", |
70 "cloud/resource_cache.h", | 180 "cloud/resource_cache.h", |
71 "cloud/signing_service.h", | 181 "config_dir_policy_loader.cc", |
| 182 "config_dir_policy_loader.h", |
| 183 "policy_load_status.cc", |
| 184 "policy_load_status.h", |
| 185 ] |
| 186 } |
| 187 if (is_chromeos) { |
| 188 sources += [ |
| 189 "proxy_policy_provider.cc", |
| 190 "proxy_policy_provider.h", |
| 191 ] |
| 192 sources -= [ |
| 193 "cloud/cloud_policy_client_registration_helper.cc", |
| 194 "cloud/cloud_policy_client_registration_helper.h", |
72 "cloud/user_cloud_policy_manager.cc", | 195 "cloud/user_cloud_policy_manager.cc", |
73 "cloud/user_cloud_policy_manager.h", | 196 "cloud/user_cloud_policy_manager.h", |
74 "cloud/user_cloud_policy_store.cc", | 197 "cloud/user_cloud_policy_store.cc", |
75 "cloud/user_cloud_policy_store.h", | 198 "cloud/user_cloud_policy_store.h", |
76 "cloud/user_cloud_policy_store_base.cc", | 199 ] |
77 "cloud/user_cloud_policy_store_base.h", | 200 } |
78 "cloud/user_info_fetcher.cc", | 201 if (is_mac) { |
79 "cloud/user_info_fetcher.h", | 202 libs = [ "CoreFoundation.framework" ] |
80 "config_dir_policy_loader.cc", | 203 } |
81 "config_dir_policy_loader.h", | 204 if (is_ios || is_mac) { |
82 "configuration_policy_provider.cc", | 205 sources += [ |
83 "configuration_policy_provider.h", | 206 "mac_util.cc", |
84 "external_data_fetcher.cc", | 207 "mac_util.h", |
85 "external_data_fetcher.h", | |
86 "external_data_manager.h", | |
87 "policy_bundle.cc", | |
88 "policy_bundle.h", | |
89 "policy_details.h", | |
90 "policy_load_status.cc", | |
91 "policy_load_status.h", | |
92 "policy_loader_ios.h", | |
93 "policy_loader_ios.mm", | |
94 "policy_loader_mac.h", | |
95 "policy_loader_mac.mm", | |
96 "policy_loader_win.cc", | |
97 "policy_loader_win.h", | |
98 "policy_map.cc", | |
99 "policy_map.h", | |
100 "policy_namespace.cc", | |
101 "policy_namespace.h", | |
102 "policy_pref_names.cc", | |
103 "policy_pref_names.h", | |
104 "policy_service.cc", | |
105 "policy_service.h", | |
106 "policy_service_impl.cc", | |
107 "policy_service_impl.h", | |
108 "policy_statistics_collector.cc", | |
109 "policy_statistics_collector.h", | |
110 "policy_switches.cc", | |
111 "policy_switches.h", | |
112 "policy_types.h", | |
113 "preferences_mac.cc", | |
114 "preferences_mac.h", | |
115 "remote_commands/remote_command_job.cc", | |
116 "remote_commands/remote_command_job.h", | |
117 "remote_commands/remote_commands_factory.cc", | |
118 "remote_commands/remote_commands_factory.h", | |
119 "remote_commands/remote_commands_queue.cc", | |
120 "remote_commands/remote_commands_queue.h", | |
121 "remote_commands/remote_commands_service.cc", | |
122 "remote_commands/remote_commands_service.h", | |
123 "schema.cc", | |
124 "schema.h", | |
125 "schema_internal.h", | |
126 "schema_map.cc", | |
127 "schema_map.h", | |
128 "schema_registry.cc", | |
129 "schema_registry.h", | |
130 "schema_registry_tracking_policy_provider.cc", | |
131 "schema_registry_tracking_policy_provider.h", | |
132 ] | |
133 | |
134 configs += [ "//build/config:precompiled_headers" ] | |
135 | |
136 public_deps = [ | |
137 "//components/policy:generated", | |
138 "//components/policy/proto", | |
139 ] | |
140 deps = [ | |
141 "//base:i18n", | |
142 "//base/third_party/dynamic_annotations", | |
143 "//components/data_use_measurement/core", | |
144 "//components/json_schema", | |
145 "//components/prefs", | |
146 "//extensions/features", | |
147 "//google_apis", | |
148 "//net", | |
149 "//third_party/re2", | |
150 "//url", | |
151 ] | |
152 | |
153 if (is_win) { | |
154 libs = [ | |
155 "shlwapi.lib", | |
156 "userenv.lib", | |
157 "ntdsapi.lib", | |
158 ] | |
159 } | |
160 if (is_win || is_chromeos) { | |
161 sources += [ | |
162 "preg_parser.cc", | |
163 "preg_parser.h", | |
164 "registry_dict.cc", | |
165 "registry_dict.h", | |
166 ] | |
167 } | |
168 if (is_android) { | |
169 sources += [ "cloud/component_cloud_policy_service_stub.cc" ] | |
170 sources -= [ | |
171 "cloud/component_cloud_policy_service.cc", | |
172 "cloud/component_cloud_policy_store.cc", | |
173 "cloud/component_cloud_policy_store.h", | |
174 "cloud/component_cloud_policy_updater.cc", | |
175 "cloud/component_cloud_policy_updater.h", | |
176 "cloud/external_policy_data_fetcher.cc", | |
177 "cloud/external_policy_data_fetcher.h", | |
178 "cloud/external_policy_data_updater.cc", | |
179 "cloud/external_policy_data_updater.h", | |
180 "cloud/resource_cache.cc", | |
181 "cloud/resource_cache.h", | |
182 "config_dir_policy_loader.cc", | |
183 "config_dir_policy_loader.h", | |
184 "policy_load_status.cc", | |
185 "policy_load_status.h", | |
186 ] | |
187 } | |
188 if (is_chromeos) { | |
189 sources += [ | |
190 "proxy_policy_provider.cc", | |
191 "proxy_policy_provider.h", | |
192 ] | |
193 sources -= [ | |
194 "cloud/cloud_policy_client_registration_helper.cc", | |
195 "cloud/cloud_policy_client_registration_helper.h", | |
196 "cloud/user_cloud_policy_manager.cc", | |
197 "cloud/user_cloud_policy_manager.h", | |
198 "cloud/user_cloud_policy_store.cc", | |
199 "cloud/user_cloud_policy_store.h", | |
200 ] | |
201 } | |
202 if (is_mac) { | |
203 libs = [ "CoreFoundation.framework" ] | |
204 } | |
205 if (is_ios || is_mac) { | |
206 sources += [ | |
207 "mac_util.cc", | |
208 "mac_util.h", | |
209 ] | |
210 } | |
211 } else { | |
212 # Some of the policy code is always enabled, so that other parts of Chrome | |
213 # can always interface with the PolicyService without having to #ifdef on | |
214 # ENABLE_CONFIGURATION_POLICY. | |
215 sources = [ | |
216 "external_data_fetcher.cc", | |
217 "external_data_fetcher.h", | |
218 "external_data_manager.h", | |
219 "policy_map.cc", | |
220 "policy_map.h", | |
221 "policy_namespace.cc", | |
222 "policy_namespace.h", | |
223 "policy_pref_names.cc", | |
224 "policy_pref_names.h", | |
225 "policy_service.cc", | |
226 "policy_service.h", | |
227 "policy_service_stub.cc", | |
228 "policy_service_stub.h", | |
229 ] | |
230 deps = [ | |
231 "//base", | |
232 ] | 208 ] |
233 } | 209 } |
234 } | 210 } |
235 | 211 |
236 if (enable_configuration_policy) { | 212 static_library("test_support") { |
237 static_library("test_support") { | 213 testonly = true |
238 testonly = true | 214 sources = [ |
239 sources = [ | 215 "cloud/mock_cloud_external_data_manager.cc", |
240 "cloud/mock_cloud_external_data_manager.cc", | 216 "cloud/mock_cloud_external_data_manager.h", |
241 "cloud/mock_cloud_external_data_manager.h", | 217 "cloud/mock_cloud_policy_client.cc", |
242 "cloud/mock_cloud_policy_client.cc", | 218 "cloud/mock_cloud_policy_client.h", |
243 "cloud/mock_cloud_policy_client.h", | 219 "cloud/mock_cloud_policy_store.cc", |
244 "cloud/mock_cloud_policy_store.cc", | 220 "cloud/mock_cloud_policy_store.h", |
245 "cloud/mock_cloud_policy_store.h", | 221 "cloud/mock_device_management_service.cc", |
246 "cloud/mock_device_management_service.cc", | 222 "cloud/mock_device_management_service.h", |
247 "cloud/mock_device_management_service.h", | 223 "cloud/mock_signing_service.cc", |
248 "cloud/mock_signing_service.cc", | 224 "cloud/mock_signing_service.h", |
249 "cloud/mock_signing_service.h", | 225 "cloud/mock_user_cloud_policy_store.cc", |
| 226 "cloud/mock_user_cloud_policy_store.h", |
| 227 "cloud/policy_builder.cc", |
| 228 "cloud/policy_builder.h", |
| 229 "configuration_policy_provider_test.cc", |
| 230 "configuration_policy_provider_test.h", |
| 231 "fake_async_policy_loader.cc", |
| 232 "fake_async_policy_loader.h", |
| 233 "mock_configuration_policy_provider.cc", |
| 234 "mock_configuration_policy_provider.h", |
| 235 "mock_policy_service.cc", |
| 236 "mock_policy_service.h", |
| 237 "policy_test_utils.cc", |
| 238 "policy_test_utils.h", |
| 239 "preferences_mock_mac.cc", |
| 240 "preferences_mock_mac.h", |
| 241 "remote_commands/test_remote_command_job.cc", |
| 242 "remote_commands/test_remote_command_job.h", |
| 243 "remote_commands/testing_remote_commands_server.cc", |
| 244 "remote_commands/testing_remote_commands_server.h", |
| 245 ] |
| 246 |
| 247 if (is_chromeos) { |
| 248 sources -= [ |
250 "cloud/mock_user_cloud_policy_store.cc", | 249 "cloud/mock_user_cloud_policy_store.cc", |
251 "cloud/mock_user_cloud_policy_store.h", | 250 "cloud/mock_user_cloud_policy_store.h", |
252 "cloud/policy_builder.cc", | 251 ] |
253 "cloud/policy_builder.h", | 252 } |
254 "configuration_policy_provider_test.cc", | 253 |
255 "configuration_policy_provider_test.h", | 254 public_deps = [ |
256 "fake_async_policy_loader.cc", | 255 ":common", |
257 "fake_async_policy_loader.h", | 256 "//base", |
258 "mock_configuration_policy_provider.cc", | 257 |
259 "mock_configuration_policy_provider.h", | 258 # Explicitly link in the generated policy target into the test support |
260 "mock_policy_service.cc", | 259 # so it will be linked to dependent targets. Otherwise in component |
261 "mock_policy_service.h", | 260 # build, it will be hidden inside the policy component. |
262 "policy_test_utils.cc", | 261 "//components/policy:generated", |
263 "policy_test_utils.h", | 262 "//components/policy/proto", |
264 "preferences_mock_mac.cc", | 263 "//crypto", |
265 "preferences_mock_mac.h", | 264 "//net", |
266 "remote_commands/test_remote_command_job.cc", | 265 "//testing/gmock", |
267 "remote_commands/test_remote_command_job.h", | 266 "//testing/gtest", |
268 "remote_commands/testing_remote_commands_server.cc", | 267 ] |
269 "remote_commands/testing_remote_commands_server.h", | |
270 ] | |
271 | |
272 if (is_chromeos) { | |
273 sources -= [ | |
274 "cloud/mock_user_cloud_policy_store.cc", | |
275 "cloud/mock_user_cloud_policy_store.h", | |
276 ] | |
277 } | |
278 | |
279 public_deps = [ | |
280 ":common", | |
281 "//base", | |
282 | |
283 # Explicitly link in the generated policy target into the test support | |
284 # so it will be linked to dependent targets. Otherwise in component | |
285 # build, it will be hidden inside the policy component. | |
286 "//components/policy:generated", | |
287 "//components/policy/proto", | |
288 "//crypto", | |
289 "//net", | |
290 "//testing/gmock", | |
291 "//testing/gtest", | |
292 ] | |
293 } | |
294 | |
295 source_set("unit_tests") { | |
296 testonly = true | |
297 sources = [ | |
298 "//extensions/features", | |
299 "cloud/cloud_policy_client_unittest.cc", | |
300 "cloud/cloud_policy_core_unittest.cc", | |
301 "cloud/cloud_policy_manager_unittest.cc", | |
302 "cloud/cloud_policy_refresh_scheduler_unittest.cc", | |
303 "cloud/cloud_policy_service_unittest.cc", | |
304 "cloud/cloud_policy_validator_unittest.cc", | |
305 "cloud/device_management_service_unittest.cc", | |
306 "cloud/policy_header_io_helper_unittest.cc", | |
307 "cloud/policy_header_service_unittest.cc", | |
308 "cloud/user_info_fetcher_unittest.cc", | |
309 "generate_policy_source_unittest.cc", | |
310 "policy_bundle_unittest.cc", | |
311 "policy_loader_ios_unittest.mm", | |
312 "policy_loader_mac_unittest.cc", | |
313 "policy_loader_win_unittest.cc", | |
314 "policy_map_unittest.cc", | |
315 "policy_service_impl_unittest.cc", | |
316 "policy_statistics_collector_unittest.cc", | |
317 "remote_commands/remote_commands_queue_unittest.cc", | |
318 "remote_commands/remote_commands_service_unittest.cc", | |
319 "schema_map_unittest.cc", | |
320 "schema_registry_tracking_policy_provider_unittest.cc", | |
321 "schema_registry_unittest.cc", | |
322 "schema_unittest.cc", | |
323 ] | |
324 if (is_win || is_chromeos) { | |
325 sources += [ | |
326 "preg_parser_unittest.cc", | |
327 "registry_dict_unittest.cc", | |
328 ] | |
329 } | |
330 if (is_chromeos) { | |
331 sources += [ "proxy_policy_provider_unittest.cc" ] | |
332 } else { | |
333 sources += [ | |
334 "cloud/user_cloud_policy_manager_unittest.cc", | |
335 "cloud/user_cloud_policy_store_unittest.cc", | |
336 ] | |
337 } | |
338 if (!is_android) { | |
339 sources += [ "async_policy_provider_unittest.cc" ] | |
340 } | |
341 if (!is_android && !is_ios) { | |
342 sources += [ | |
343 "cloud/component_cloud_policy_service_unittest.cc", | |
344 "cloud/component_cloud_policy_store_unittest.cc", | |
345 "cloud/component_cloud_policy_updater_unittest.cc", | |
346 "cloud/external_policy_data_fetcher_unittest.cc", | |
347 "cloud/external_policy_data_updater_unittest.cc", | |
348 "cloud/resource_cache_unittest.cc", | |
349 "config_dir_policy_loader_unittest.cc", | |
350 ] | |
351 } | |
352 if (is_mac || is_ios) { | |
353 sources += [ "mac_util_unittest.cc" ] | |
354 } | |
355 if (is_win || is_chromeos) { | |
356 # Needed by policy_loader_win_unittest.cc and preg_parser_unittest.cc | |
357 data = [ | |
358 "//chrome/test/data/policy/", | |
359 ] | |
360 } | |
361 | |
362 deps = [ | |
363 ":test_support", | |
364 "//base", | |
365 "//base/test:test_support", | |
366 "//components/policy:generated", | |
367 "//components/prefs:test_support", | |
368 "//extensions/features", | |
369 "//google_apis", | |
370 "//net:test_support", | |
371 "//testing/gmock", | |
372 "//testing/gtest", | |
373 ] | |
374 } | |
375 } | 268 } |
| 269 |
| 270 source_set("unit_tests") { |
| 271 testonly = true |
| 272 sources = [ |
| 273 "//extensions/features", |
| 274 "cloud/cloud_policy_client_unittest.cc", |
| 275 "cloud/cloud_policy_core_unittest.cc", |
| 276 "cloud/cloud_policy_manager_unittest.cc", |
| 277 "cloud/cloud_policy_refresh_scheduler_unittest.cc", |
| 278 "cloud/cloud_policy_service_unittest.cc", |
| 279 "cloud/cloud_policy_validator_unittest.cc", |
| 280 "cloud/device_management_service_unittest.cc", |
| 281 "cloud/policy_header_io_helper_unittest.cc", |
| 282 "cloud/policy_header_service_unittest.cc", |
| 283 "cloud/user_info_fetcher_unittest.cc", |
| 284 "generate_policy_source_unittest.cc", |
| 285 "policy_bundle_unittest.cc", |
| 286 "policy_loader_ios_unittest.mm", |
| 287 "policy_loader_mac_unittest.cc", |
| 288 "policy_loader_win_unittest.cc", |
| 289 "policy_map_unittest.cc", |
| 290 "policy_service_impl_unittest.cc", |
| 291 "policy_statistics_collector_unittest.cc", |
| 292 "remote_commands/remote_commands_queue_unittest.cc", |
| 293 "remote_commands/remote_commands_service_unittest.cc", |
| 294 "schema_map_unittest.cc", |
| 295 "schema_registry_tracking_policy_provider_unittest.cc", |
| 296 "schema_registry_unittest.cc", |
| 297 "schema_unittest.cc", |
| 298 ] |
| 299 if (is_win || is_chromeos) { |
| 300 sources += [ |
| 301 "preg_parser_unittest.cc", |
| 302 "registry_dict_unittest.cc", |
| 303 ] |
| 304 } |
| 305 if (is_chromeos) { |
| 306 sources += [ "proxy_policy_provider_unittest.cc" ] |
| 307 } else { |
| 308 sources += [ |
| 309 "cloud/user_cloud_policy_manager_unittest.cc", |
| 310 "cloud/user_cloud_policy_store_unittest.cc", |
| 311 ] |
| 312 } |
| 313 if (!is_android) { |
| 314 sources += [ "async_policy_provider_unittest.cc" ] |
| 315 } |
| 316 if (!is_android && !is_ios) { |
| 317 sources += [ |
| 318 "cloud/component_cloud_policy_service_unittest.cc", |
| 319 "cloud/component_cloud_policy_store_unittest.cc", |
| 320 "cloud/component_cloud_policy_updater_unittest.cc", |
| 321 "cloud/external_policy_data_fetcher_unittest.cc", |
| 322 "cloud/external_policy_data_updater_unittest.cc", |
| 323 "cloud/resource_cache_unittest.cc", |
| 324 "config_dir_policy_loader_unittest.cc", |
| 325 ] |
| 326 } |
| 327 if (is_mac || is_ios) { |
| 328 sources += [ "mac_util_unittest.cc" ] |
| 329 } |
| 330 if (is_win || is_chromeos) { |
| 331 # Needed by policy_loader_win_unittest.cc and preg_parser_unittest.cc |
| 332 data = [ |
| 333 "//chrome/test/data/policy/", |
| 334 ] |
| 335 } |
| 336 |
| 337 deps = [ |
| 338 ":test_support", |
| 339 "//base", |
| 340 "//base/test:test_support", |
| 341 "//components/policy:generated", |
| 342 "//components/prefs:test_support", |
| 343 "//extensions/features", |
| 344 "//google_apis", |
| 345 "//net:test_support", |
| 346 "//testing/gmock", |
| 347 "//testing/gtest", |
| 348 ] |
| 349 } |
OLD | NEW |