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

Unified Diff: components/policy/core/common/BUILD.gn

Issue 2558043004: Remove enable_configuration_policy build define. (Closed)
Patch Set: Merge Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/policy/core/browser/BUILD.gn ('k') | components/search_engines/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/core/common/BUILD.gn
diff --git a/components/policy/core/common/BUILD.gn b/components/policy/core/common/BUILD.gn
index f5015307e7443e8b1e4d657d0d5bce0eb5bb2cf9..17a586048824a59d4f09aaee003e300ed6eeb9d2 100644
--- a/components/policy/core/common/BUILD.gn
+++ b/components/policy/core/common/BUILD.gn
@@ -21,355 +21,329 @@ source_set("internal") {
configs += [ "//components/policy:component_implementation" ]
- if (enable_configuration_policy) {
- sources = [
- "../../policy_export.h",
- "async_policy_loader.cc",
- "async_policy_loader.h",
- "async_policy_provider.cc",
- "async_policy_provider.h",
- "cloud/cloud_external_data_manager.cc",
- "cloud/cloud_external_data_manager.h",
- "cloud/cloud_policy_client.cc",
- "cloud/cloud_policy_client.h",
- "cloud/cloud_policy_client_registration_helper.cc",
- "cloud/cloud_policy_client_registration_helper.h",
- "cloud/cloud_policy_constants.cc",
- "cloud/cloud_policy_constants.h",
- "cloud/cloud_policy_core.cc",
- "cloud/cloud_policy_core.h",
- "cloud/cloud_policy_manager.cc",
- "cloud/cloud_policy_manager.h",
- "cloud/cloud_policy_refresh_scheduler.cc",
- "cloud/cloud_policy_refresh_scheduler.h",
- "cloud/cloud_policy_service.cc",
- "cloud/cloud_policy_service.h",
- "cloud/cloud_policy_store.cc",
- "cloud/cloud_policy_store.h",
- "cloud/cloud_policy_validator.cc",
- "cloud/cloud_policy_validator.h",
+ sources = [
+ "../../policy_export.h",
+ "async_policy_loader.cc",
+ "async_policy_loader.h",
+ "async_policy_provider.cc",
+ "async_policy_provider.h",
+ "cloud/cloud_external_data_manager.cc",
+ "cloud/cloud_external_data_manager.h",
+ "cloud/cloud_policy_client.cc",
+ "cloud/cloud_policy_client.h",
+ "cloud/cloud_policy_client_registration_helper.cc",
+ "cloud/cloud_policy_client_registration_helper.h",
+ "cloud/cloud_policy_constants.cc",
+ "cloud/cloud_policy_constants.h",
+ "cloud/cloud_policy_core.cc",
+ "cloud/cloud_policy_core.h",
+ "cloud/cloud_policy_manager.cc",
+ "cloud/cloud_policy_manager.h",
+ "cloud/cloud_policy_refresh_scheduler.cc",
+ "cloud/cloud_policy_refresh_scheduler.h",
+ "cloud/cloud_policy_service.cc",
+ "cloud/cloud_policy_service.h",
+ "cloud/cloud_policy_store.cc",
+ "cloud/cloud_policy_store.h",
+ "cloud/cloud_policy_validator.cc",
+ "cloud/cloud_policy_validator.h",
+ "cloud/component_cloud_policy_service.cc",
+ "cloud/component_cloud_policy_service.h",
+ "cloud/component_cloud_policy_store.cc",
+ "cloud/component_cloud_policy_store.h",
+ "cloud/component_cloud_policy_updater.cc",
+ "cloud/component_cloud_policy_updater.h",
+ "cloud/device_management_service.cc",
+ "cloud/device_management_service.h",
+ "cloud/enterprise_metrics.cc",
+ "cloud/enterprise_metrics.h",
+ "cloud/external_policy_data_fetcher.cc",
+ "cloud/external_policy_data_fetcher.h",
+ "cloud/external_policy_data_updater.cc",
+ "cloud/external_policy_data_updater.h",
+ "cloud/policy_header_io_helper.cc",
+ "cloud/policy_header_io_helper.h",
+ "cloud/policy_header_service.cc",
+ "cloud/policy_header_service.h",
+ "cloud/resource_cache.cc",
+ "cloud/resource_cache.h",
+ "cloud/signing_service.h",
+ "cloud/user_cloud_policy_manager.cc",
+ "cloud/user_cloud_policy_manager.h",
+ "cloud/user_cloud_policy_store.cc",
+ "cloud/user_cloud_policy_store.h",
+ "cloud/user_cloud_policy_store_base.cc",
+ "cloud/user_cloud_policy_store_base.h",
+ "cloud/user_info_fetcher.cc",
+ "cloud/user_info_fetcher.h",
+ "config_dir_policy_loader.cc",
+ "config_dir_policy_loader.h",
+ "configuration_policy_provider.cc",
+ "configuration_policy_provider.h",
+ "external_data_fetcher.cc",
+ "external_data_fetcher.h",
+ "external_data_manager.h",
+ "policy_bundle.cc",
+ "policy_bundle.h",
+ "policy_details.h",
+ "policy_load_status.cc",
+ "policy_load_status.h",
+ "policy_loader_ios.h",
+ "policy_loader_ios.mm",
+ "policy_loader_mac.h",
+ "policy_loader_mac.mm",
+ "policy_loader_win.cc",
+ "policy_loader_win.h",
+ "policy_map.cc",
+ "policy_map.h",
+ "policy_namespace.cc",
+ "policy_namespace.h",
+ "policy_pref_names.cc",
+ "policy_pref_names.h",
+ "policy_service.cc",
+ "policy_service.h",
+ "policy_service_impl.cc",
+ "policy_service_impl.h",
+ "policy_statistics_collector.cc",
+ "policy_statistics_collector.h",
+ "policy_switches.cc",
+ "policy_switches.h",
+ "policy_types.h",
+ "preferences_mac.cc",
+ "preferences_mac.h",
+ "remote_commands/remote_command_job.cc",
+ "remote_commands/remote_command_job.h",
+ "remote_commands/remote_commands_factory.cc",
+ "remote_commands/remote_commands_factory.h",
+ "remote_commands/remote_commands_queue.cc",
+ "remote_commands/remote_commands_queue.h",
+ "remote_commands/remote_commands_service.cc",
+ "remote_commands/remote_commands_service.h",
+ "schema.cc",
+ "schema.h",
+ "schema_internal.h",
+ "schema_map.cc",
+ "schema_map.h",
+ "schema_registry.cc",
+ "schema_registry.h",
+ "schema_registry_tracking_policy_provider.cc",
+ "schema_registry_tracking_policy_provider.h",
+ ]
+
+ configs += [ "//build/config:precompiled_headers" ]
+
+ public_deps = [
+ "//components/policy:generated",
+ "//components/policy/proto",
+ ]
+ deps = [
+ "//base:i18n",
+ "//base/third_party/dynamic_annotations",
+ "//components/data_use_measurement/core",
+ "//components/json_schema",
+ "//components/prefs",
+ "//extensions/features",
+ "//google_apis",
+ "//net",
+ "//third_party/re2",
+ "//url",
+ ]
+
+ if (is_win) {
+ libs = [
+ "shlwapi.lib",
+ "userenv.lib",
+ "ntdsapi.lib",
+ ]
+ }
+ if (is_win || is_chromeos) {
+ sources += [
+ "preg_parser.cc",
+ "preg_parser.h",
+ "registry_dict.cc",
+ "registry_dict.h",
+ ]
+ }
+ if (is_android) {
+ sources += [ "cloud/component_cloud_policy_service_stub.cc" ]
+ sources -= [
"cloud/component_cloud_policy_service.cc",
- "cloud/component_cloud_policy_service.h",
"cloud/component_cloud_policy_store.cc",
"cloud/component_cloud_policy_store.h",
"cloud/component_cloud_policy_updater.cc",
"cloud/component_cloud_policy_updater.h",
- "cloud/device_management_service.cc",
- "cloud/device_management_service.h",
- "cloud/enterprise_metrics.cc",
- "cloud/enterprise_metrics.h",
"cloud/external_policy_data_fetcher.cc",
"cloud/external_policy_data_fetcher.h",
"cloud/external_policy_data_updater.cc",
"cloud/external_policy_data_updater.h",
- "cloud/policy_header_io_helper.cc",
- "cloud/policy_header_io_helper.h",
- "cloud/policy_header_service.cc",
- "cloud/policy_header_service.h",
"cloud/resource_cache.cc",
"cloud/resource_cache.h",
- "cloud/signing_service.h",
- "cloud/user_cloud_policy_manager.cc",
- "cloud/user_cloud_policy_manager.h",
- "cloud/user_cloud_policy_store.cc",
- "cloud/user_cloud_policy_store.h",
- "cloud/user_cloud_policy_store_base.cc",
- "cloud/user_cloud_policy_store_base.h",
- "cloud/user_info_fetcher.cc",
- "cloud/user_info_fetcher.h",
"config_dir_policy_loader.cc",
"config_dir_policy_loader.h",
- "configuration_policy_provider.cc",
- "configuration_policy_provider.h",
- "external_data_fetcher.cc",
- "external_data_fetcher.h",
- "external_data_manager.h",
- "policy_bundle.cc",
- "policy_bundle.h",
- "policy_details.h",
"policy_load_status.cc",
"policy_load_status.h",
- "policy_loader_ios.h",
- "policy_loader_ios.mm",
- "policy_loader_mac.h",
- "policy_loader_mac.mm",
- "policy_loader_win.cc",
- "policy_loader_win.h",
- "policy_map.cc",
- "policy_map.h",
- "policy_namespace.cc",
- "policy_namespace.h",
- "policy_pref_names.cc",
- "policy_pref_names.h",
- "policy_service.cc",
- "policy_service.h",
- "policy_service_impl.cc",
- "policy_service_impl.h",
- "policy_statistics_collector.cc",
- "policy_statistics_collector.h",
- "policy_switches.cc",
- "policy_switches.h",
- "policy_types.h",
- "preferences_mac.cc",
- "preferences_mac.h",
- "remote_commands/remote_command_job.cc",
- "remote_commands/remote_command_job.h",
- "remote_commands/remote_commands_factory.cc",
- "remote_commands/remote_commands_factory.h",
- "remote_commands/remote_commands_queue.cc",
- "remote_commands/remote_commands_queue.h",
- "remote_commands/remote_commands_service.cc",
- "remote_commands/remote_commands_service.h",
- "schema.cc",
- "schema.h",
- "schema_internal.h",
- "schema_map.cc",
- "schema_map.h",
- "schema_registry.cc",
- "schema_registry.h",
- "schema_registry_tracking_policy_provider.cc",
- "schema_registry_tracking_policy_provider.h",
- ]
-
- configs += [ "//build/config:precompiled_headers" ]
-
- public_deps = [
- "//components/policy:generated",
- "//components/policy/proto",
]
- deps = [
- "//base:i18n",
- "//base/third_party/dynamic_annotations",
- "//components/data_use_measurement/core",
- "//components/json_schema",
- "//components/prefs",
- "//extensions/features",
- "//google_apis",
- "//net",
- "//third_party/re2",
- "//url",
+ }
+ if (is_chromeos) {
+ sources += [
+ "proxy_policy_provider.cc",
+ "proxy_policy_provider.h",
]
-
- if (is_win) {
- libs = [
- "shlwapi.lib",
- "userenv.lib",
- "ntdsapi.lib",
- ]
- }
- if (is_win || is_chromeos) {
- sources += [
- "preg_parser.cc",
- "preg_parser.h",
- "registry_dict.cc",
- "registry_dict.h",
- ]
- }
- if (is_android) {
- sources += [ "cloud/component_cloud_policy_service_stub.cc" ]
- sources -= [
- "cloud/component_cloud_policy_service.cc",
- "cloud/component_cloud_policy_store.cc",
- "cloud/component_cloud_policy_store.h",
- "cloud/component_cloud_policy_updater.cc",
- "cloud/component_cloud_policy_updater.h",
- "cloud/external_policy_data_fetcher.cc",
- "cloud/external_policy_data_fetcher.h",
- "cloud/external_policy_data_updater.cc",
- "cloud/external_policy_data_updater.h",
- "cloud/resource_cache.cc",
- "cloud/resource_cache.h",
- "config_dir_policy_loader.cc",
- "config_dir_policy_loader.h",
- "policy_load_status.cc",
- "policy_load_status.h",
- ]
- }
- if (is_chromeos) {
- sources += [
- "proxy_policy_provider.cc",
- "proxy_policy_provider.h",
- ]
- sources -= [
- "cloud/cloud_policy_client_registration_helper.cc",
- "cloud/cloud_policy_client_registration_helper.h",
- "cloud/user_cloud_policy_manager.cc",
- "cloud/user_cloud_policy_manager.h",
- "cloud/user_cloud_policy_store.cc",
- "cloud/user_cloud_policy_store.h",
- ]
- }
- if (is_mac) {
- libs = [ "CoreFoundation.framework" ]
- }
- if (is_ios || is_mac) {
- sources += [
- "mac_util.cc",
- "mac_util.h",
- ]
- }
- } else {
- # Some of the policy code is always enabled, so that other parts of Chrome
- # can always interface with the PolicyService without having to #ifdef on
- # ENABLE_CONFIGURATION_POLICY.
- sources = [
- "external_data_fetcher.cc",
- "external_data_fetcher.h",
- "external_data_manager.h",
- "policy_map.cc",
- "policy_map.h",
- "policy_namespace.cc",
- "policy_namespace.h",
- "policy_pref_names.cc",
- "policy_pref_names.h",
- "policy_service.cc",
- "policy_service.h",
- "policy_service_stub.cc",
- "policy_service_stub.h",
+ sources -= [
+ "cloud/cloud_policy_client_registration_helper.cc",
+ "cloud/cloud_policy_client_registration_helper.h",
+ "cloud/user_cloud_policy_manager.cc",
+ "cloud/user_cloud_policy_manager.h",
+ "cloud/user_cloud_policy_store.cc",
+ "cloud/user_cloud_policy_store.h",
]
- deps = [
- "//base",
+ }
+ if (is_mac) {
+ libs = [ "CoreFoundation.framework" ]
+ }
+ if (is_ios || is_mac) {
+ sources += [
+ "mac_util.cc",
+ "mac_util.h",
]
}
}
-if (enable_configuration_policy) {
- static_library("test_support") {
- testonly = true
- sources = [
- "cloud/mock_cloud_external_data_manager.cc",
- "cloud/mock_cloud_external_data_manager.h",
- "cloud/mock_cloud_policy_client.cc",
- "cloud/mock_cloud_policy_client.h",
- "cloud/mock_cloud_policy_store.cc",
- "cloud/mock_cloud_policy_store.h",
- "cloud/mock_device_management_service.cc",
- "cloud/mock_device_management_service.h",
- "cloud/mock_signing_service.cc",
- "cloud/mock_signing_service.h",
+static_library("test_support") {
+ testonly = true
+ sources = [
+ "cloud/mock_cloud_external_data_manager.cc",
+ "cloud/mock_cloud_external_data_manager.h",
+ "cloud/mock_cloud_policy_client.cc",
+ "cloud/mock_cloud_policy_client.h",
+ "cloud/mock_cloud_policy_store.cc",
+ "cloud/mock_cloud_policy_store.h",
+ "cloud/mock_device_management_service.cc",
+ "cloud/mock_device_management_service.h",
+ "cloud/mock_signing_service.cc",
+ "cloud/mock_signing_service.h",
+ "cloud/mock_user_cloud_policy_store.cc",
+ "cloud/mock_user_cloud_policy_store.h",
+ "cloud/policy_builder.cc",
+ "cloud/policy_builder.h",
+ "configuration_policy_provider_test.cc",
+ "configuration_policy_provider_test.h",
+ "fake_async_policy_loader.cc",
+ "fake_async_policy_loader.h",
+ "mock_configuration_policy_provider.cc",
+ "mock_configuration_policy_provider.h",
+ "mock_policy_service.cc",
+ "mock_policy_service.h",
+ "policy_test_utils.cc",
+ "policy_test_utils.h",
+ "preferences_mock_mac.cc",
+ "preferences_mock_mac.h",
+ "remote_commands/test_remote_command_job.cc",
+ "remote_commands/test_remote_command_job.h",
+ "remote_commands/testing_remote_commands_server.cc",
+ "remote_commands/testing_remote_commands_server.h",
+ ]
+
+ if (is_chromeos) {
+ sources -= [
"cloud/mock_user_cloud_policy_store.cc",
"cloud/mock_user_cloud_policy_store.h",
- "cloud/policy_builder.cc",
- "cloud/policy_builder.h",
- "configuration_policy_provider_test.cc",
- "configuration_policy_provider_test.h",
- "fake_async_policy_loader.cc",
- "fake_async_policy_loader.h",
- "mock_configuration_policy_provider.cc",
- "mock_configuration_policy_provider.h",
- "mock_policy_service.cc",
- "mock_policy_service.h",
- "policy_test_utils.cc",
- "policy_test_utils.h",
- "preferences_mock_mac.cc",
- "preferences_mock_mac.h",
- "remote_commands/test_remote_command_job.cc",
- "remote_commands/test_remote_command_job.h",
- "remote_commands/testing_remote_commands_server.cc",
- "remote_commands/testing_remote_commands_server.h",
]
+ }
- if (is_chromeos) {
- sources -= [
- "cloud/mock_user_cloud_policy_store.cc",
- "cloud/mock_user_cloud_policy_store.h",
- ]
- }
+ public_deps = [
+ ":common",
+ "//base",
- public_deps = [
- ":common",
- "//base",
+ # Explicitly link in the generated policy target into the test support
+ # so it will be linked to dependent targets. Otherwise in component
+ # build, it will be hidden inside the policy component.
+ "//components/policy:generated",
+ "//components/policy/proto",
+ "//crypto",
+ "//net",
+ "//testing/gmock",
+ "//testing/gtest",
+ ]
+}
- # Explicitly link in the generated policy target into the test support
- # so it will be linked to dependent targets. Otherwise in component
- # build, it will be hidden inside the policy component.
- "//components/policy:generated",
- "//components/policy/proto",
- "//crypto",
- "//net",
- "//testing/gmock",
- "//testing/gtest",
+source_set("unit_tests") {
+ testonly = true
+ sources = [
+ "//extensions/features",
+ "cloud/cloud_policy_client_unittest.cc",
+ "cloud/cloud_policy_core_unittest.cc",
+ "cloud/cloud_policy_manager_unittest.cc",
+ "cloud/cloud_policy_refresh_scheduler_unittest.cc",
+ "cloud/cloud_policy_service_unittest.cc",
+ "cloud/cloud_policy_validator_unittest.cc",
+ "cloud/device_management_service_unittest.cc",
+ "cloud/policy_header_io_helper_unittest.cc",
+ "cloud/policy_header_service_unittest.cc",
+ "cloud/user_info_fetcher_unittest.cc",
+ "generate_policy_source_unittest.cc",
+ "policy_bundle_unittest.cc",
+ "policy_loader_ios_unittest.mm",
+ "policy_loader_mac_unittest.cc",
+ "policy_loader_win_unittest.cc",
+ "policy_map_unittest.cc",
+ "policy_service_impl_unittest.cc",
+ "policy_statistics_collector_unittest.cc",
+ "remote_commands/remote_commands_queue_unittest.cc",
+ "remote_commands/remote_commands_service_unittest.cc",
+ "schema_map_unittest.cc",
+ "schema_registry_tracking_policy_provider_unittest.cc",
+ "schema_registry_unittest.cc",
+ "schema_unittest.cc",
+ ]
+ if (is_win || is_chromeos) {
+ sources += [
+ "preg_parser_unittest.cc",
+ "registry_dict_unittest.cc",
]
}
-
- source_set("unit_tests") {
- testonly = true
- sources = [
- "//extensions/features",
- "cloud/cloud_policy_client_unittest.cc",
- "cloud/cloud_policy_core_unittest.cc",
- "cloud/cloud_policy_manager_unittest.cc",
- "cloud/cloud_policy_refresh_scheduler_unittest.cc",
- "cloud/cloud_policy_service_unittest.cc",
- "cloud/cloud_policy_validator_unittest.cc",
- "cloud/device_management_service_unittest.cc",
- "cloud/policy_header_io_helper_unittest.cc",
- "cloud/policy_header_service_unittest.cc",
- "cloud/user_info_fetcher_unittest.cc",
- "generate_policy_source_unittest.cc",
- "policy_bundle_unittest.cc",
- "policy_loader_ios_unittest.mm",
- "policy_loader_mac_unittest.cc",
- "policy_loader_win_unittest.cc",
- "policy_map_unittest.cc",
- "policy_service_impl_unittest.cc",
- "policy_statistics_collector_unittest.cc",
- "remote_commands/remote_commands_queue_unittest.cc",
- "remote_commands/remote_commands_service_unittest.cc",
- "schema_map_unittest.cc",
- "schema_registry_tracking_policy_provider_unittest.cc",
- "schema_registry_unittest.cc",
- "schema_unittest.cc",
+ if (is_chromeos) {
+ sources += [ "proxy_policy_provider_unittest.cc" ]
+ } else {
+ sources += [
+ "cloud/user_cloud_policy_manager_unittest.cc",
+ "cloud/user_cloud_policy_store_unittest.cc",
]
- if (is_win || is_chromeos) {
- sources += [
- "preg_parser_unittest.cc",
- "registry_dict_unittest.cc",
- ]
- }
- if (is_chromeos) {
- sources += [ "proxy_policy_provider_unittest.cc" ]
- } else {
- sources += [
- "cloud/user_cloud_policy_manager_unittest.cc",
- "cloud/user_cloud_policy_store_unittest.cc",
- ]
- }
- if (!is_android) {
- sources += [ "async_policy_provider_unittest.cc" ]
- }
- if (!is_android && !is_ios) {
- sources += [
- "cloud/component_cloud_policy_service_unittest.cc",
- "cloud/component_cloud_policy_store_unittest.cc",
- "cloud/component_cloud_policy_updater_unittest.cc",
- "cloud/external_policy_data_fetcher_unittest.cc",
- "cloud/external_policy_data_updater_unittest.cc",
- "cloud/resource_cache_unittest.cc",
- "config_dir_policy_loader_unittest.cc",
- ]
- }
- if (is_mac || is_ios) {
- sources += [ "mac_util_unittest.cc" ]
- }
- if (is_win || is_chromeos) {
- # Needed by policy_loader_win_unittest.cc and preg_parser_unittest.cc
- data = [
- "//chrome/test/data/policy/",
- ]
- }
-
- deps = [
- ":test_support",
- "//base",
- "//base/test:test_support",
- "//components/policy:generated",
- "//components/prefs:test_support",
- "//extensions/features",
- "//google_apis",
- "//net:test_support",
- "//testing/gmock",
- "//testing/gtest",
+ }
+ if (!is_android) {
+ sources += [ "async_policy_provider_unittest.cc" ]
+ }
+ if (!is_android && !is_ios) {
+ sources += [
+ "cloud/component_cloud_policy_service_unittest.cc",
+ "cloud/component_cloud_policy_store_unittest.cc",
+ "cloud/component_cloud_policy_updater_unittest.cc",
+ "cloud/external_policy_data_fetcher_unittest.cc",
+ "cloud/external_policy_data_updater_unittest.cc",
+ "cloud/resource_cache_unittest.cc",
+ "config_dir_policy_loader_unittest.cc",
]
}
+ if (is_mac || is_ios) {
+ sources += [ "mac_util_unittest.cc" ]
+ }
+ if (is_win || is_chromeos) {
+ # Needed by policy_loader_win_unittest.cc and preg_parser_unittest.cc
+ data = [
+ "//chrome/test/data/policy/",
+ ]
+ }
+
+ deps = [
+ ":test_support",
+ "//base",
+ "//base/test:test_support",
+ "//components/policy:generated",
+ "//components/prefs:test_support",
+ "//extensions/features",
+ "//google_apis",
+ "//net:test_support",
+ "//testing/gmock",
+ "//testing/gtest",
+ ]
}
« no previous file with comments | « components/policy/core/browser/BUILD.gn ('k') | components/search_engines/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698