Index: components/policy.gypi |
diff --git a/components/policy.gypi b/components/policy.gypi |
index 0b48cedffd309cd6e1ba7543fbfdfe3952774c06..6172091cc1306a336982d1c423e54c696347be5b 100644 |
--- a/components/policy.gypi |
+++ b/components/policy.gypi |
@@ -9,9 +9,6 @@ |
'type': '<(component)', |
'dependencies': [ |
'../base/base.gyp:base', |
- '../ui/ui.gyp:ui', |
- 'json_schema', |
- 'component_strings.gyp:component_strings', |
], |
'defines': [ |
'POLICY_COMPONENT_IMPLEMENTATION', |
@@ -21,13 +18,79 @@ |
], |
'conditions': [ |
['configuration_policy==1', { |
+ 'dependencies': [ |
+ '../base/base.gyp:base_prefs', |
+ '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', |
+ # TODO(joaodasilva): remove this dependency on the user policy protobuf. |
+ '../chrome/app/policy/cloud_policy_codegen.gyp:policy', |
+ '../google_apis/google_apis.gyp:google_apis', |
+ '../ui/ui.gyp:ui', |
+ '../url/url.gyp:url_lib', |
+ 'component_strings.gyp:component_strings', |
+ 'cloud_policy_proto', |
+ 'json_schema', |
+ ], |
'sources': [ |
+ 'policy/core/browser/cloud/message_util.cc', |
+ 'policy/core/browser/cloud/message_util.h', |
+ 'policy/core/browser/configuration_policy_handler.cc', |
+ 'policy/core/browser/configuration_policy_handler.h', |
+ 'policy/core/browser/configuration_policy_handler_list.cc', |
+ 'policy/core/browser/configuration_policy_handler_list.h', |
+ 'policy/core/browser/configuration_policy_pref_store.cc', |
+ 'policy/core/browser/configuration_policy_pref_store.h', |
'policy/core/browser/policy_error_map.cc', |
'policy/core/browser/policy_error_map.h', |
+ 'policy/core/common/cloud/cloud_external_data_manager.cc', |
+ 'policy/core/common/cloud/cloud_external_data_manager.h', |
+ 'policy/core/common/cloud/cloud_policy_client.cc', |
+ 'policy/core/common/cloud/cloud_policy_client.h', |
+ 'policy/core/common/cloud/cloud_policy_client_registration_helper.cc', |
+ 'policy/core/common/cloud/cloud_policy_client_registration_helper.h', |
+ 'policy/core/common/cloud/cloud_policy_constants.cc', |
+ 'policy/core/common/cloud/cloud_policy_constants.h', |
+ 'policy/core/common/cloud/cloud_policy_core.cc', |
+ 'policy/core/common/cloud/cloud_policy_core.h', |
+ 'policy/core/common/cloud/cloud_policy_manager.cc', |
+ 'policy/core/common/cloud/cloud_policy_manager.h', |
+ 'policy/core/common/cloud/cloud_policy_refresh_scheduler.cc', |
+ 'policy/core/common/cloud/cloud_policy_refresh_scheduler.h', |
+ 'policy/core/common/cloud/cloud_policy_service.cc', |
+ 'policy/core/common/cloud/cloud_policy_service.h', |
+ 'policy/core/common/cloud/cloud_policy_store.cc', |
+ 'policy/core/common/cloud/cloud_policy_store.h', |
+ 'policy/core/common/cloud/cloud_policy_validator.cc', |
+ 'policy/core/common/cloud/cloud_policy_validator.h', |
+ 'policy/core/common/cloud/component_cloud_policy_service.cc', |
+ 'policy/core/common/cloud/component_cloud_policy_service.h', |
+ 'policy/core/common/cloud/component_cloud_policy_store.cc', |
+ 'policy/core/common/cloud/component_cloud_policy_store.h', |
+ 'policy/core/common/cloud/component_cloud_policy_updater.cc', |
+ 'policy/core/common/cloud/component_cloud_policy_updater.h', |
+ 'policy/core/common/cloud/device_management_service.cc', |
+ 'policy/core/common/cloud/device_management_service.h', |
+ 'policy/core/common/cloud/enterprise_metrics.cc', |
+ 'policy/core/common/cloud/enterprise_metrics.h', |
+ 'policy/core/common/cloud/external_policy_data_fetcher.cc', |
+ 'policy/core/common/cloud/external_policy_data_fetcher.h', |
+ 'policy/core/common/cloud/external_policy_data_updater.cc', |
+ 'policy/core/common/cloud/external_policy_data_updater.h', |
+ 'policy/core/common/cloud/rate_limiter.cc', |
+ 'policy/core/common/cloud/rate_limiter.h', |
+ 'policy/core/common/cloud/resource_cache.cc', |
+ 'policy/core/common/cloud/resource_cache.h', |
+ 'policy/core/common/cloud/system_policy_request_context.cc', |
+ 'policy/core/common/cloud/system_policy_request_context.h', |
+ 'policy/core/common/cloud/user_info_fetcher.cc', |
+ 'policy/core/common/cloud/user_info_fetcher.h', |
+ 'policy/core/common/cloud/user_policy_request_context.cc', |
+ 'policy/core/common/cloud/user_policy_request_context.h', |
'policy/core/common/async_policy_loader.cc', |
'policy/core/common/async_policy_loader.h', |
'policy/core/common/async_policy_provider.cc', |
'policy/core/common/async_policy_provider.h', |
+ 'policy/core/common/config_dir_policy_loader.cc', |
+ 'policy/core/common/config_dir_policy_loader.h', |
'policy/core/common/configuration_policy_provider.cc', |
'policy/core/common/configuration_policy_provider.h', |
'policy/core/common/external_data_fetcher.cc', |
@@ -38,17 +101,31 @@ |
'policy/core/common/policy_bundle.cc', |
'policy/core/common/policy_bundle.h', |
'policy/core/common/policy_details.h', |
- 'policy/core/common/policy_namespace.cc', |
- 'policy/core/common/policy_namespace.h', |
+ 'policy/core/common/policy_loader_mac.cc', |
+ 'policy/core/common/policy_loader_mac.h', |
+ 'policy/core/common/policy_loader_win.cc', |
+ 'policy/core/common/policy_loader_win.h', |
+ 'policy/core/common/policy_load_status.cc', |
+ 'policy/core/common/policy_load_status.h', |
'policy/core/common/policy_map.cc', |
'policy/core/common/policy_map.h', |
+ 'policy/core/common/policy_namespace.cc', |
+ 'policy/core/common/policy_namespace.h', |
'policy/core/common/policy_pref_names.cc', |
'policy/core/common/policy_pref_names.h', |
+ 'policy/core/common/policy_service.cc', |
+ 'policy/core/common/policy_service.h', |
+ 'policy/core/common/policy_service_impl.cc', |
+ 'policy/core/common/policy_service_impl.h', |
+ 'policy/core/common/policy_statistics_collector.cc', |
+ 'policy/core/common/policy_statistics_collector.h', |
'policy/core/common/policy_switches.cc', |
'policy/core/common/policy_switches.h', |
'policy/core/common/policy_types.h', |
'policy/core/common/preferences_mac.cc', |
'policy/core/common/preferences_mac.h', |
+ 'policy/core/common/preg_parser_win.cc', |
+ 'policy/core/common/preg_parser_win.h', |
'policy/core/common/registry_dict_win.cc', |
'policy/core/common/registry_dict_win.h', |
'policy/core/common/schema.cc', |
@@ -62,11 +139,35 @@ |
], |
'conditions': [ |
['OS=="android"', { |
+ 'sources': [ |
+ 'policy/core/common/cloud/component_cloud_policy_service_stub.cc', |
+ ], |
'sources!': [ |
'policy/core/common/async_policy_loader.cc', |
'policy/core/common/async_policy_loader.h', |
'policy/core/common/async_policy_provider.cc', |
'policy/core/common/async_policy_provider.h', |
+ 'policy/core/common/cloud/component_cloud_policy_service.cc', |
+ 'policy/core/common/cloud/component_cloud_policy_store.cc', |
+ 'policy/core/common/cloud/component_cloud_policy_store.h', |
+ 'policy/core/common/cloud/component_cloud_policy_updater.cc', |
+ 'policy/core/common/cloud/component_cloud_policy_updater.h', |
+ 'policy/core/common/cloud/external_policy_data_fetcher.cc', |
+ 'policy/core/common/cloud/external_policy_data_fetcher.h', |
+ 'policy/core/common/cloud/external_policy_data_updater.cc', |
+ 'policy/core/common/cloud/external_policy_data_updater.h', |
+ 'policy/core/common/cloud/resource_cache.cc', |
+ 'policy/core/common/cloud/resource_cache.h', |
+ 'policy/core/common/config_dir_policy_loader.cc', |
+ 'policy/core/common/config_dir_policy_loader.h', |
+ 'policy/core/common/policy_load_status.cc', |
+ 'policy/core/common/policy_load_status.h', |
+ ], |
+ }], |
+ ['chromeos==1', { |
+ 'sources!': [ |
+ 'policy/core/common/cloud/cloud_policy_client_registration_helper.cc', |
+ 'policy/core/common/cloud/cloud_policy_client_registration_helper.h', |
], |
}], |
], |
@@ -82,10 +183,31 @@ |
'policy/core/common/policy_map.h', |
'policy/core/common/policy_namespace.cc', |
'policy/core/common/policy_namespace.h', |
+ 'policy/core/common/policy_service.cc', |
+ 'policy/core/common/policy_service.h', |
+ 'policy/core/common/policy_service_stub.cc', |
+ 'policy/core/common/policy_service_stub.h', |
], |
}], |
], |
}, |
+ { |
+ # Protobuf compiler / generator for cloud policy protocol buffers. |
+ # TODO(joaodasilva): move these protobufs outside of chrome/, |
+ # and update their output paths too. |
+ 'target_name': 'cloud_policy_proto', |
+ 'type': 'static_library', |
+ 'sources': [ |
+ '../chrome/browser/policy/proto/cloud/chrome_extension_policy.proto', |
+ '../chrome/browser/policy/proto/cloud/device_management_backend.proto', |
+ '../chrome/browser/policy/proto/cloud/device_management_local.proto', |
+ ], |
+ 'variables': { |
+ 'proto_in_dir': '../chrome/browser/policy/proto/cloud', |
+ 'proto_out_dir': 'chrome/browser/policy/proto/cloud', |
+ }, |
+ 'includes': [ '../build/protoc.gypi' ] |
+ }, |
], |
'conditions': [ |
['configuration_policy==1', { |
@@ -99,6 +221,9 @@ |
'POLICY_COMPONENT_IMPLEMENTATION', |
], |
'dependencies': [ |
+ # TODO(joaodasilva): remove this dependency. |
+ '../chrome/app/policy/cloud_policy_codegen.gyp:policy_test_support', |
+ 'cloud_policy_proto', |
'policy_component', |
'../testing/gmock.gyp:gmock', |
'../testing/gtest.gyp:gtest', |
@@ -107,10 +232,24 @@ |
'..', |
], |
'sources': [ |
+ 'policy/core/common/cloud/mock_cloud_external_data_manager.cc', |
+ 'policy/core/common/cloud/mock_cloud_external_data_manager.h', |
+ 'policy/core/common/cloud/mock_cloud_policy_client.cc', |
+ 'policy/core/common/cloud/mock_cloud_policy_client.h', |
+ 'policy/core/common/cloud/mock_cloud_policy_store.cc', |
+ 'policy/core/common/cloud/mock_cloud_policy_store.h', |
+ 'policy/core/common/cloud/mock_device_management_service.cc', |
+ 'policy/core/common/cloud/mock_device_management_service.h', |
+ 'policy/core/common/cloud/policy_builder.cc', |
+ 'policy/core/common/cloud/policy_builder.h', |
'policy/core/common/configuration_policy_provider_test.cc', |
'policy/core/common/configuration_policy_provider_test.h', |
'policy/core/common/mock_configuration_policy_provider.cc', |
'policy/core/common/mock_configuration_policy_provider.h', |
+ 'policy/core/common/mock_policy_service.cc', |
+ 'policy/core/common/mock_policy_service.h', |
+ 'policy/core/common/policy_test_utils.cc', |
+ 'policy/core/common/policy_test_utils.h', |
'policy/core/common/preferences_mock_mac.cc', |
'policy/core/common/preferences_mock_mac.h', |
], |