Update V8 to version 4.6.62.
[chromium-blink-merge.git] / components / policy / core / common / BUILD.gn
blobc6cce1bc3e3a12fbb7a48ca3e6fb081f602a21f9
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")
7 source_set("common") {
8   visibility = [ "//components/policy/*" ]
10   defines = [ "POLICY_COMPONENT_IMPLEMENTATION" ]
12   if (enable_configuration_policy) {
13     sources = [
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",
76       "mac_util.cc",
77       "mac_util.h",
78       "policy_bundle.cc",
79       "policy_bundle.h",
80       "policy_details.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",
89       "policy_map.cc",
90       "policy_map.h",
91       "policy_namespace.cc",
92       "policy_namespace.h",
93       "policy_pref_names.cc",
94       "policy_pref_names.h",
95       "policy_service.cc",
96       "policy_service.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",
102       "policy_switches.h",
103       "policy_types.h",
104       "preferences_mac.cc",
105       "preferences_mac.h",
106       "preg_parser_win.cc",
107       "preg_parser_win.h",
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",
118       "schema.cc",
119       "schema.h",
120       "schema_internal.h",
121       "schema_map.cc",
122       "schema_map.h",
123       "schema_registry.cc",
124       "schema_registry.h",
125       "schema_registry_tracking_policy_provider.cc",
126       "schema_registry_tracking_policy_provider.h",
127     ]
129     configs += [ "//build/config:precompiled_headers" ]
131     deps = [
132       "//base:prefs",
133       "//base/third_party/dynamic_annotations",
134       "//components/json_schema",
135       "//components/policy",
136       "//components/policy/proto",
137       "//google_apis",
138       "//net",
139       "//third_party/re2",
140       "//url",
141     ]
143     if (is_win) {
144       libs = [ "netapi32.lib" ]
145     }
146     if (is_android) {
147       sources += [ "cloud/component_cloud_policy_service_stub.cc" ]
148       sources -= [
149         "cloud/component_cloud_policy_service.cc",
150         "cloud/component_cloud_policy_store.cc",
151         "cloud/component_cloud_policy_store.h",
152         "cloud/component_cloud_policy_updater.cc",
153         "cloud/component_cloud_policy_updater.h",
154         "cloud/external_policy_data_fetcher.cc",
155         "cloud/external_policy_data_fetcher.h",
156         "cloud/external_policy_data_updater.cc",
157         "cloud/external_policy_data_updater.h",
158         "cloud/resource_cache.cc",
159         "cloud/resource_cache.h",
160         "config_dir_policy_loader.cc",
161         "config_dir_policy_loader.h",
162         "policy_load_status.cc",
163         "policy_load_status.h",
164       ]
165     }
166     if (is_chromeos) {
167       sources += [
168         "proxy_policy_provider.cc",
169         "proxy_policy_provider.h",
170       ]
171       sources -= [
172         "cloud/cloud_policy_client_registration_helper.cc",
173         "cloud/cloud_policy_client_registration_helper.h",
174         "cloud/user_cloud_policy_manager.cc",
175         "cloud/user_cloud_policy_manager.h",
176         "cloud/user_cloud_policy_store.cc",
177         "cloud/user_cloud_policy_store.h",
178       ]
179     }
180     if (!is_ios && !is_mac) {
181       sources -= [
182         "mac_util.cc",
183         "mac_util.h",
184       ]
185     }
186   } else {
187     # Some of the policy code is always enabled, so that other parts of Chrome
188     # can always interface with the PolicyService without having to #ifdef on
189     # ENABLE_CONFIGURATION_POLICY.
190     sources = [
191       "external_data_fetcher.cc",
192       "external_data_fetcher.h",
193       "external_data_manager.h",
194       "policy_map.cc",
195       "policy_map.h",
196       "policy_namespace.cc",
197       "policy_namespace.h",
198       "policy_pref_names.cc",
199       "policy_pref_names.h",
200       "policy_service.cc",
201       "policy_service.h",
202       "policy_service_stub.cc",
203       "policy_service_stub.h",
204     ]
205     deps = [
206       "//base",
207     ]
208   }