| Index: components/policy/BUILD.gn
|
| diff --git a/components/policy/BUILD.gn b/components/policy/BUILD.gn
|
| index 987142b4dbff1a87b46332fe56bc8b394cd40098..fc76b3518926abfd969e3b523c04ebc7e135fb5b 100644
|
| --- a/components/policy/BUILD.gn
|
| +++ b/components/policy/BUILD.gn
|
| @@ -111,7 +111,8 @@ if (enable_configuration_policy) {
|
| }
|
|
|
| policy_templates_grd_file = "resources/policy_templates.grd"
|
| - grit("policy_templates") {
|
| +
|
| + grit("grit_policy_templates") {
|
| source = policy_templates_grd_file
|
| use_qualified_include = true
|
| output_dir = "$root_gen_dir/chrome"
|
| @@ -143,6 +144,46 @@ if (enable_configuration_policy) {
|
| }
|
| }
|
|
|
| + if (gen_policy_templates_win && is_chrome_branded) {
|
| + # Creates google.admx and google.adml files that define a common 'Google'
|
| + # category used for Chrome, Chrome OS and possibly external tools, see
|
| + # crbug.com/665400.
|
| + action("create_google_admx") {
|
| + script = "tools/create_google_admx.py"
|
| + inputs = [
|
| + policy_templates_grd_file,
|
| + grit_info_script,
|
| + ] + policy_templates_windows_outputs
|
| + outputs = policy_templates_windows_google_outputs
|
| + deps = [
|
| + ":grit_policy_templates",
|
| + ]
|
| +
|
| + # Don't pass in outputs directly, it would exceed a limit on Windows!
|
| + args = [
|
| + "--basedir",
|
| + rebase_path(policy_templates_base_dir, root_build_dir),
|
| + "--grd_strip_path_prefix",
|
| + "app/policy/",
|
| + "--grd_input",
|
| + rebase_path(policy_templates_grd_file, root_build_dir),
|
| + "--grit_info",
|
| + rebase_path(grit_info_script, root_build_dir),
|
| + "-D",
|
| + "gen_policy_templates_win",
|
| + ] + grit_defines
|
| + }
|
| + }
|
| +
|
| + group("policy_templates") {
|
| + public_deps = [
|
| + ":grit_policy_templates",
|
| + ]
|
| + if (gen_policy_templates_win && is_chrome_branded) {
|
| + public_deps += [ ":create_google_admx" ]
|
| + }
|
| + }
|
| +
|
| # Run the proto compiler over the generated file and make it a component.
|
| component("cloud_policy_proto_generated_compile") {
|
| public_deps = [
|
| @@ -226,7 +267,7 @@ if (enable_configuration_policy) {
|
| [ "$_generated_resources_dir/xml-v21/app_restrictions.xml" ]
|
| deps = [
|
| ":app_restrictions_resources_copy",
|
| - ":policy_templates_grit",
|
| + ":grit_policy_templates",
|
| ]
|
| }
|
| } else if (gen_policy_templates_mac && is_mac) {
|
| @@ -341,6 +382,9 @@ if (enable_configuration_policy) {
|
| "-D",
|
| "gen_policy_templates_win",
|
| ] + grit_defines
|
| + if (is_chrome_branded) {
|
| + args += [ "--include_google_admx" ]
|
| + }
|
| deps = [
|
| ":add_version",
|
| ":policy_templates",
|
|
|