Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(629)

Side by Side Diff: components/policy.gypi

Issue 108513011: Move chrome/app/policy into components/policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « components/components_tests.gyp ('k') | components/policy/core/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 { 5 {
6 'includes': [
7 # Included to get 'mac_bundle_id' and other variables.
8 '../build/chrome_settings.gypi',
9 ],
10 'variables': {
11 'chromium_code': 1,
12 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chrome',
13 'policy_out_dir': '<(SHARED_INTERMEDIATE_DIR)/policy',
14 'protoc_out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out',
15 'generate_policy_source_script_path':
16 'policy/tools/generate_policy_source.py',
17 'policy_constant_header_path':
18 '<(policy_out_dir)/policy/policy_constants.h',
19 'policy_constant_source_path':
20 '<(policy_out_dir)/policy/policy_constants.cc',
21 'protobuf_decoder_path':
22 '<(policy_out_dir)/policy/cloud_policy_generated.cc',
23 # This is the "full" protobuf, which defines one protobuf message per
24 # policy. It is also the format currently used by the server.
25 'chrome_settings_proto_path':
26 '<(policy_out_dir)/policy/chrome_settings.proto',
27 # This protobuf is equivalent to chrome_settings.proto but shares messages
28 # for policies of the same type, so that less classes have to be generated
29 # and compiled.
30 'cloud_policy_proto_path':
31 '<(policy_out_dir)/policy/cloud_policy.proto',
32 },
6 'targets': [ 33 'targets': [
7 { 34 {
8 'target_name': 'policy_component', 35 'target_name': 'policy_component',
9 'type': '<(component)', 36 'type': '<(component)',
10 'dependencies': [ 37 'dependencies': [
11 '../base/base.gyp:base', 38 '../base/base.gyp:base',
12 ], 39 ],
13 'defines': [ 40 'defines': [
14 'POLICY_COMPONENT_IMPLEMENTATION', 41 'POLICY_COMPONENT_IMPLEMENTATION',
15 ], 42 ],
16 'include_dirs': [ 43 'include_dirs': [
17 '..', 44 '..',
18 ], 45 ],
19 'conditions': [ 46 'conditions': [
20 ['configuration_policy==1', { 47 ['configuration_policy==1', {
21 'dependencies': [ 48 'dependencies': [
22 '../base/base.gyp:base_prefs', 49 '../base/base.gyp:base_prefs',
23 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dyn amic_annotations', 50 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dyn amic_annotations',
24 # TODO(joaodasilva): remove this dependency on the user policy proto buf.
25 '../chrome/app/policy/cloud_policy_codegen.gyp:policy',
26 '../google_apis/google_apis.gyp:google_apis', 51 '../google_apis/google_apis.gyp:google_apis',
27 '../ui/ui.gyp:ui', 52 '../ui/ui.gyp:ui',
28 '../url/url.gyp:url_lib', 53 '../url/url.gyp:url_lib',
29 'component_strings.gyp:component_strings', 54 'component_strings.gyp:component_strings',
30 'cloud_policy_proto', 55 'cloud_policy_proto',
31 'json_schema', 56 'json_schema',
57 'policy',
32 ], 58 ],
33 'sources': [ 59 'sources': [
34 'policy/core/browser/cloud/message_util.cc', 60 'policy/core/browser/cloud/message_util.cc',
35 'policy/core/browser/cloud/message_util.h', 61 'policy/core/browser/cloud/message_util.h',
36 'policy/core/browser/configuration_policy_handler.cc', 62 'policy/core/browser/configuration_policy_handler.cc',
37 'policy/core/browser/configuration_policy_handler.h', 63 'policy/core/browser/configuration_policy_handler.h',
38 'policy/core/browser/configuration_policy_handler_list.cc', 64 'policy/core/browser/configuration_policy_handler_list.cc',
39 'policy/core/browser/configuration_policy_handler_list.h', 65 'policy/core/browser/configuration_policy_handler_list.h',
40 'policy/core/browser/configuration_policy_pref_store.cc', 66 'policy/core/browser/configuration_policy_pref_store.cc',
41 'policy/core/browser/configuration_policy_pref_store.h', 67 'policy/core/browser/configuration_policy_pref_store.h',
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 'policy/core/common/policy_namespace.cc', 224 'policy/core/common/policy_namespace.cc',
199 'policy/core/common/policy_namespace.h', 225 'policy/core/common/policy_namespace.h',
200 'policy/core/common/policy_service.cc', 226 'policy/core/common/policy_service.cc',
201 'policy/core/common/policy_service.h', 227 'policy/core/common/policy_service.h',
202 'policy/core/common/policy_service_stub.cc', 228 'policy/core/common/policy_service_stub.cc',
203 'policy/core/common/policy_service_stub.h', 229 'policy/core/common/policy_service_stub.h',
204 ], 230 ],
205 }], 231 }],
206 ], 232 ],
207 }, 233 },
208 {
209 'target_name': 'cloud_policy_proto',
210 'type': 'static_library',
211 'sources': [
212 'policy/proto/chrome_extension_policy.proto',
213 'policy/proto/device_management_backend.proto',
214 'policy/proto/device_management_local.proto',
215 ],
216 'variables': {
217 'proto_in_dir': 'policy/proto',
218 'proto_out_dir': 'policy/proto',
219 },
220 'includes': [ '../build/protoc.gypi' ],
221 'conditions': [
222 ['OS=="android"', {
223 'sources!': [
224 'policy/proto/chrome_extension_policy.proto',
225 ],
226 }],
227 ['chromeos==0', {
228 'sources!': [
229 'policy/proto/device_management_local.proto',
230 ],
231 }],
232 ],
233 },
234 ], 234 ],
235 'conditions': [ 235 'conditions': [
236 ['configuration_policy==1', { 236 ['configuration_policy==1', {
237 'targets': [ 237 'targets': [
238 { 238 {
239 'target_name': 'cloud_policy_code_generate',
240 'type': 'none',
241 'actions': [
242 {
243 'inputs': [
244 'policy/resources/policy_templates.json',
245 '<(generate_policy_source_script_path)',
246 ],
247 'outputs': [
248 '<(policy_constant_header_path)',
249 '<(policy_constant_source_path)',
250 '<(protobuf_decoder_path)',
251 '<(chrome_settings_proto_path)',
252 '<(cloud_policy_proto_path)',
253 ],
254 'action_name': 'generate_policy_source',
255 'action': [
256 'python',
257 '<@(generate_policy_source_script_path)',
258 '--policy-constants-header=<(policy_constant_header_path)',
259 '--policy-constants-source=<(policy_constant_source_path)',
260 '--chrome-settings-protobuf=<(chrome_settings_proto_path)',
261 '--cloud-policy-protobuf=<(cloud_policy_proto_path)',
262 '--cloud-policy-decoder=<(protobuf_decoder_path)',
263 '<(OS)',
264 '<(chromeos)',
265 'policy/resources/policy_templates.json',
266 ],
267 'message': 'Generating policy source',
268 },
269 ],
270 'direct_dependent_settings': {
271 'include_dirs': [
272 '<(policy_out_dir)',
273 '<(protoc_out_dir)',
274 ],
275 },
276 },
277 {
278 'target_name': 'cloud_policy_proto_generated_compile',
279 'type': 'static_library',
280 'sources': [
281 '<(cloud_policy_proto_path)',
282 ],
283 'variables': {
284 'proto_in_dir': '<(policy_out_dir)/policy',
285 'proto_out_dir': 'policy/proto',
286 },
287 'dependencies': [
288 'cloud_policy_code_generate',
289 ],
290 'includes': [
291 '../build/protoc.gypi',
292 ],
293 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
294 'msvs_disabled_warnings': [4267, ],
295 },
296 {
297 # This target builds the "full" protobuf, used for tests only.
298 'target_name': 'chrome_settings_proto_generated_compile',
299 'type': 'static_library',
300 'sources': [
301 '<(chrome_settings_proto_path)',
302 ],
303 'variables': {
304 'proto_in_dir': '<(policy_out_dir)/policy',
305 'proto_out_dir': 'policy/proto',
306 },
307 'dependencies': [
308 'cloud_policy_code_generate',
309 'cloud_policy_proto_generated_compile',
310 ],
311 'includes': [
312 '../build/protoc.gypi',
313 ],
314 },
315 {
316 'target_name': 'policy',
317 'type': 'static_library',
318 'hard_dependency': 1,
319 'direct_dependent_settings': {
320 'include_dirs': [
321 '<(policy_out_dir)',
322 '<(protoc_out_dir)',
323 ],
324 },
325 'sources': [
326 '<(policy_constant_header_path)',
327 '<(policy_constant_source_path)',
328 '<(protobuf_decoder_path)',
329 ],
330 'include_dirs': [
331 '<(DEPTH)',
332 ],
333 'dependencies': [
334 'cloud_policy_code_generate',
335 'cloud_policy_proto_generated_compile',
336 '<(DEPTH)/base/base.gyp:base',
337 '<(DEPTH)/third_party/protobuf/protobuf.gyp:protobuf_lite',
338 ],
339 'defines': [
340 'POLICY_COMPONENT_IMPLEMENTATION',
341 ],
342 },
343 {
344 'target_name': 'cloud_policy_proto',
345 'type': 'static_library',
346 'sources': [
347 'policy/proto/chrome_extension_policy.proto',
348 'policy/proto/device_management_backend.proto',
349 'policy/proto/device_management_local.proto',
350 ],
351 'variables': {
352 'proto_in_dir': 'policy/proto',
353 'proto_out_dir': 'policy/proto',
354 },
355 'includes': [
356 '../build/protoc.gypi',
357 ],
358 'conditions': [
359 ['OS=="android"', {
360 'sources!': [
361 'policy/proto/chrome_extension_policy.proto',
362 ],
363 }],
364 ['chromeos==0', {
365 'sources!': [
366 'policy/proto/device_management_local.proto',
367 ],
368 }],
369 ],
370 },
371 {
372 'target_name': 'policy_test_support',
373 'type': 'none',
374 'hard_dependency': 1,
375 'direct_dependent_settings': {
376 'include_dirs': [
377 '<(policy_out_dir)',
378 '<(protoc_out_dir)',
379 ],
380 },
381 'dependencies': [
382 'chrome_settings_proto_generated_compile',
383 'policy',
384 ],
385 },
386 {
239 'target_name': 'policy_component_test_support', 387 'target_name': 'policy_component_test_support',
240 'type': 'static_library', 388 'type': 'static_library',
241 # This must be undefined so that POLICY_EXPORT works correctly in 389 # This must be undefined so that POLICY_EXPORT works correctly in
242 # the static_library build. 390 # the static_library build.
243 'defines!': [ 391 'defines!': [
244 'POLICY_COMPONENT_IMPLEMENTATION', 392 'POLICY_COMPONENT_IMPLEMENTATION',
245 ], 393 ],
246 'dependencies': [ 394 'dependencies': [
247 # TODO(joaodasilva): remove this dependency.
248 '../chrome/app/policy/cloud_policy_codegen.gyp:policy_test_support',
249 'cloud_policy_proto', 395 'cloud_policy_proto',
250 'policy_component', 396 'policy_component',
397 'policy_test_support',
251 '../testing/gmock.gyp:gmock', 398 '../testing/gmock.gyp:gmock',
252 '../testing/gtest.gyp:gtest', 399 '../testing/gtest.gyp:gtest',
253 ], 400 ],
254 'include_dirs': [ 401 'include_dirs': [
255 '..', 402 '..',
256 ], 403 ],
257 'sources': [ 404 'sources': [
258 'policy/core/common/cloud/mock_cloud_external_data_manager.cc', 405 'policy/core/common/cloud/mock_cloud_external_data_manager.cc',
259 'policy/core/common/cloud/mock_cloud_external_data_manager.h', 406 'policy/core/common/cloud/mock_cloud_external_data_manager.h',
260 'policy/core/common/cloud/mock_cloud_policy_client.cc', 407 'policy/core/common/cloud/mock_cloud_policy_client.cc',
(...skipping 21 matching lines...) Expand all
282 ['chromeos==1', { 429 ['chromeos==1', {
283 'sources!': [ 430 'sources!': [
284 'policy/core/common/cloud/mock_user_cloud_policy_store.cc', 431 'policy/core/common/cloud/mock_user_cloud_policy_store.cc',
285 'policy/core/common/cloud/mock_user_cloud_policy_store.h', 432 'policy/core/common/cloud/mock_user_cloud_policy_store.h',
286 ], 433 ],
287 }], 434 }],
288 ], 435 ],
289 }, 436 },
290 ], 437 ],
291 }], 438 }],
439 ['OS=="win" and target_arch=="ia32" and configuration_policy==1', {
440 'targets': [
441 {
442 'target_name': 'policy_win64',
443 'type': 'static_library',
444 'hard_dependency': 1,
445 'sources': [
446 '<(policy_constant_header_path)',
447 '<(policy_constant_source_path)',
448 ],
449 'include_dirs': [
450 '<(DEPTH)',
451 ],
452 'direct_dependent_settings': {
453 'include_dirs': [
454 '<(policy_out_dir)'
455 ],
456 },
457 'dependencies': [
458 'cloud_policy_code_generate',
459 ],
460 'configurations': {
461 'Common_Base': {
462 'msvs_target_platform': 'x64',
463 },
464 },
465 },
466 ],
467 }],
468 ['OS=="win" or OS=="mac" or OS=="linux"', {
469 'targets': [
470 {
471 # policy_templates has different inputs and outputs, so it can't use
472 # the rules of chrome_strings
473 'target_name': 'policy_templates',
474 'type': 'none',
475 'variables': {
476 'grit_grd_file': 'policy/resources/policy_templates.grd',
477 'grit_info_cmd': [
478 'python',
479 '<(DEPTH)/tools/grit/grit_info.py',
480 '<@(grit_defines)',
481 ],
482 },
483 'includes': [
484 '../build/grit_target.gypi',
485 ],
486 'actions': [
487 {
488 'action_name': 'policy_templates',
489 'includes': [
490 '../build/grit_action.gypi',
491 ],
492 },
493 ],
494 },
495 ],
496 }],
497 ['OS=="mac"', {
498 'targets': [
499 {
500 # This is the bundle of the manifest file of Chrome.
501 # It contains the manifest file and its string tables.
502 'target_name': 'chrome_manifest_bundle',
503 'type': 'loadable_module',
504 'mac_bundle': 1,
505 'product_extension': 'manifest',
506 'product_name': '<(mac_bundle_id)',
507 'variables': {
508 # This avoids stripping debugging symbols from the target, which
509 # would fail because there is no binary code here.
510 'mac_strip': 0,
511 },
512 'dependencies': [
513 # Provides app-Manifest.plist and its string tables:
514 'policy_templates',
515 ],
516 'actions': [
517 {
518 'action_name': 'Copy MCX manifest file to manifest bundle',
519 'inputs': [
520 '<(grit_out_dir)/app/policy/mac/app-Manifest.plist',
521 ],
522 'outputs': [
523 '<(INTERMEDIATE_DIR)/app_manifest/<(mac_bundle_id).manifest',
524 ],
525 'action': [
526 # Use plutil -convert xml1 to put the plist into Apple's
527 # canonical format. As a side effect, this ensures that the
528 # plist is well-formed.
529 'plutil',
530 '-convert',
531 'xml1',
532 '<@(_inputs)',
533 '-o',
534 '<@(_outputs)',
535 ],
536 'message':
537 'Copying the MCX policy manifest file to the manifest bundle',
538 'process_outputs_as_mac_bundle_resources': 1,
539 },
540 {
541 'action_name':
542 'Copy Localizable.strings files to manifest bundle',
543 'variables': {
544 'input_path': '<(grit_out_dir)/app/policy/mac/strings',
545 # Directory to collect the Localizable.strings files before
546 # they are copied to the bundle.
547 'output_path': '<(INTERMEDIATE_DIR)/app_manifest',
548 # The reason we are not enumerating all the locales is that
549 # the translations would eat up 3.5MB disk space in the
550 # application bundle:
551 'available_locales': 'en',
552 },
553 'inputs': [
554 # TODO: remove this helper when we have loops in GYP
555 '>!@(<(apply_locales_cmd) -d \'<(input_path)/ZZLOCALE.lproj/Loca lizable.strings\' <(available_locales))',
556 ],
557 'outputs': [
558 # TODO: remove this helper when we have loops in GYP
559 '>!@(<(apply_locales_cmd) -d \'<(output_path)/ZZLOCALE.lproj/Loc alizable.strings\' <(available_locales))',
560 ],
561 'action': [
562 'cp', '-R',
563 '<(input_path)/',
564 '<(output_path)',
565 ],
566 'message':
567 'Copy the Localizable.strings files to the manifest bundle',
568 'process_outputs_as_mac_bundle_resources': 1,
569 'msvs_cygwin_shell': 1,
570 },
571 ],
572 },
573 ],
574 }],
292 ], 575 ],
293 } 576 }
OLDNEW
« no previous file with comments | « components/components_tests.gyp ('k') | components/policy/core/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698