Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / components / policy / policy_common.gypi
blob55573e6596f88359f6144d2b6c4729af1074c49e
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.
6   # GN version: //components/policy/core/common
7   'dependencies': [
8     '../base/base.gyp:base',
9   ],
10   'defines': [
11     'POLICY_COMPONENT_IMPLEMENTATION',
12   ],
13   'include_dirs': [
14     '..',
15   ],
16   'conditions': [
17     ['configuration_policy==1', {
18       'dependencies': [
19         '../base/base.gyp:base_prefs',
20         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
21         '../google_apis/google_apis.gyp:google_apis',
22         '../net/net.gyp:net',
23         '../third_party/re2/re2.gyp:re2',
24         '../url/url.gyp:url_lib',
25         'cloud_policy_proto',
26         'data_use_measurement_core',
27         'json_schema',
28         'policy',
29       ],
30       'sources': [
31         'core/common/async_policy_loader.cc',
32         'core/common/async_policy_loader.h',
33         'core/common/async_policy_provider.cc',
34         'core/common/async_policy_provider.h',
35         'core/common/cloud/cloud_external_data_manager.cc',
36         'core/common/cloud/cloud_external_data_manager.h',
37         'core/common/cloud/cloud_policy_client.cc',
38         'core/common/cloud/cloud_policy_client.h',
39         'core/common/cloud/cloud_policy_client_registration_helper.cc',
40         'core/common/cloud/cloud_policy_client_registration_helper.h',
41         'core/common/cloud/cloud_policy_constants.cc',
42         'core/common/cloud/cloud_policy_constants.h',
43         'core/common/cloud/cloud_policy_core.cc',
44         'core/common/cloud/cloud_policy_core.h',
45         'core/common/cloud/cloud_policy_manager.cc',
46         'core/common/cloud/cloud_policy_manager.h',
47         'core/common/cloud/cloud_policy_refresh_scheduler.cc',
48         'core/common/cloud/cloud_policy_refresh_scheduler.h',
49         'core/common/cloud/cloud_policy_service.cc',
50         'core/common/cloud/cloud_policy_service.h',
51         'core/common/cloud/cloud_policy_store.cc',
52         'core/common/cloud/cloud_policy_store.h',
53         'core/common/cloud/cloud_policy_validator.cc',
54         'core/common/cloud/cloud_policy_validator.h',
55         'core/common/cloud/component_cloud_policy_service.cc',
56         'core/common/cloud/component_cloud_policy_service.h',
57         'core/common/cloud/component_cloud_policy_store.cc',
58         'core/common/cloud/component_cloud_policy_store.h',
59         'core/common/cloud/component_cloud_policy_updater.cc',
60         'core/common/cloud/component_cloud_policy_updater.h',
61         'core/common/cloud/device_management_service.cc',
62         'core/common/cloud/device_management_service.h',
63         'core/common/cloud/enterprise_metrics.cc',
64         'core/common/cloud/enterprise_metrics.h',
65         'core/common/cloud/external_policy_data_fetcher.cc',
66         'core/common/cloud/external_policy_data_fetcher.h',
67         'core/common/cloud/external_policy_data_updater.cc',
68         'core/common/cloud/external_policy_data_updater.h',
69         'core/common/cloud/policy_header_io_helper.cc',
70         'core/common/cloud/policy_header_io_helper.h',
71         'core/common/cloud/policy_header_service.cc',
72         'core/common/cloud/policy_header_service.h',
73         'core/common/cloud/resource_cache.cc',
74         'core/common/cloud/resource_cache.h',
75         'core/common/cloud/system_policy_request_context.cc',
76         'core/common/cloud/system_policy_request_context.h',
77         'core/common/cloud/user_cloud_policy_manager.cc',
78         'core/common/cloud/user_cloud_policy_manager.h',
79         'core/common/cloud/user_cloud_policy_store.cc',
80         'core/common/cloud/user_cloud_policy_store.h',
81         'core/common/cloud/user_cloud_policy_store_base.cc',
82         'core/common/cloud/user_cloud_policy_store_base.h',
83         'core/common/cloud/user_info_fetcher.cc',
84         'core/common/cloud/user_info_fetcher.h',
85         'core/common/config_dir_policy_loader.cc',
86         'core/common/config_dir_policy_loader.h',
87         'core/common/configuration_policy_provider.cc',
88         'core/common/configuration_policy_provider.h',
89         'core/common/external_data_fetcher.cc',
90         'core/common/external_data_fetcher.h',
91         'core/common/external_data_manager.h',
92         'core/common/mac_util.cc',
93         'core/common/mac_util.h',
94         'core/common/policy_bundle.cc',
95         'core/common/policy_bundle.h',
96         'core/common/policy_details.h',
97         'core/common/policy_load_status.cc',
98         'core/common/policy_load_status.h',
99         'core/common/policy_loader_ios.h',
100         'core/common/policy_loader_ios.mm',
101         'core/common/policy_loader_mac.h',
102         'core/common/policy_loader_mac.mm',
103         'core/common/policy_loader_win.cc',
104         'core/common/policy_loader_win.h',
105         'core/common/policy_map.cc',
106         'core/common/policy_map.h',
107         'core/common/policy_namespace.cc',
108         'core/common/policy_namespace.h',
109         'core/common/policy_pref_names.cc',
110         'core/common/policy_pref_names.h',
111         'core/common/policy_service.cc',
112         'core/common/policy_service.h',
113         'core/common/policy_service_impl.cc',
114         'core/common/policy_service_impl.h',
115         'core/common/policy_statistics_collector.cc',
116         'core/common/policy_statistics_collector.h',
117         'core/common/policy_switches.cc',
118         'core/common/policy_switches.h',
119         'core/common/policy_types.h',
120         'core/common/preferences_mac.cc',
121         'core/common/preferences_mac.h',
122         'core/common/preg_parser_win.cc',
123         'core/common/preg_parser_win.h',
124         'core/common/registry_dict_win.cc',
125         'core/common/registry_dict_win.h',
126         'core/common/remote_commands/remote_command_job.cc',
127         'core/common/remote_commands/remote_command_job.h',
128         'core/common/remote_commands/remote_commands_factory.cc',
129         'core/common/remote_commands/remote_commands_factory.h',
130         'core/common/remote_commands/remote_commands_queue.cc',
131         'core/common/remote_commands/remote_commands_queue.h',
132         'core/common/remote_commands/remote_commands_service.cc',
133         'core/common/remote_commands/remote_commands_service.h',
134         'core/common/schema.cc',
135         'core/common/schema.h',
136         'core/common/schema_internal.h',
137         'core/common/schema_map.cc',
138         'core/common/schema_map.h',
139         'core/common/schema_registry.cc',
140         'core/common/schema_registry.h',
141         'core/common/schema_registry_tracking_policy_provider.cc',
142         'core/common/schema_registry_tracking_policy_provider.h',
143         'policy_export.h',
144       ],
145       'conditions': [
146         ['OS=="android"', {
147           'sources!': [
148             'core/common/async_policy_loader.cc',
149             'core/common/async_policy_loader.h',
150             'core/common/async_policy_provider.cc',
151             'core/common/async_policy_provider.h',
152           ],
153         }],
154         ['OS=="android" or OS=="ios"', {
155           'sources': [
156             'core/common/cloud/component_cloud_policy_service_stub.cc',
157           ],
158           'sources!': [
159             'core/common/cloud/component_cloud_policy_service.cc',
160             'core/common/cloud/component_cloud_policy_store.cc',
161             'core/common/cloud/component_cloud_policy_store.h',
162             'core/common/cloud/component_cloud_policy_updater.cc',
163             'core/common/cloud/component_cloud_policy_updater.h',
164             'core/common/cloud/external_policy_data_fetcher.cc',
165             'core/common/cloud/external_policy_data_fetcher.h',
166             'core/common/cloud/external_policy_data_updater.cc',
167             'core/common/cloud/external_policy_data_updater.h',
168             'core/common/cloud/resource_cache.cc',
169             'core/common/cloud/resource_cache.h',
170             'core/common/config_dir_policy_loader.cc',
171             'core/common/config_dir_policy_loader.h',
172             'core/common/policy_load_status.cc',
173             'core/common/policy_load_status.h',
174           ],
175         }],
176         ['chromeos==1', {
177           'sources': [
178             'core/common/proxy_policy_provider.cc',
179             'core/common/proxy_policy_provider.h',
180           ],
181           'sources!': [
182             'core/common/cloud/cloud_policy_client_registration_helper.cc',
183             'core/common/cloud/cloud_policy_client_registration_helper.h',
184             'core/common/cloud/user_cloud_policy_manager.cc',
185             'core/common/cloud/user_cloud_policy_manager.h',
186             'core/common/cloud/user_cloud_policy_store.cc',
187             'core/common/cloud/user_cloud_policy_store.h',
188           ],
189         }],
190         ['OS!="ios" and OS!="mac"', {
191           'sources!': [
192             'core/common/mac_util.cc',
193             'core/common/mac_util.h',
194           ],
195         }],
196       ],
197     }, {  # configuration_policy==0
198       # Some of the policy code is always enabled, so that other parts of
199       # Chrome can always interface with the PolicyService without having
200       # to #ifdef on ENABLE_CONFIGURATION_POLICY.
201       'sources': [
202         'core/common/external_data_fetcher.cc',
203         'core/common/external_data_fetcher.h',
204         'core/common/external_data_manager.h',
205         'core/common/policy_map.cc',
206         'core/common/policy_map.h',
207         'core/common/policy_namespace.cc',
208         'core/common/policy_namespace.h',
209         'core/common/policy_pref_names.cc',
210         'core/common/policy_pref_names.h',
211         'core/common/policy_service.cc',
212         'core/common/policy_service.h',
213         'core/common/policy_service_stub.cc',
214         'core/common/policy_service_stub.h',
215       ],
216     }],
217   ],