| Index: components/policy/BUILD.gn
|
| diff --git a/components/policy/BUILD.gn b/components/policy/BUILD.gn
|
| index 5e405f7acd68c937ee049082d7b888602a3868c9..d8d7c9266e6fac3a8b92c8423a57029ed5f41b35 100644
|
| --- a/components/policy/BUILD.gn
|
| +++ b/components/policy/BUILD.gn
|
| @@ -47,6 +47,9 @@ if (enable_configuration_policy) {
|
| # build puts everything into the following directory. We do the same for now.
|
| policy_gen_dir = "$root_gen_dir/policy"
|
|
|
| + # Directory for generating Android App Restrictions resources
|
| + android_resources_gen_dir = "$policy_gen_dir/android_resources"
|
| +
|
| # This protobuf is equivalent to chrome_settings.proto but shares messages
|
| # for policies of the same type, so that less classes have to be generated
|
| # and compiled.
|
| @@ -59,6 +62,10 @@ if (enable_configuration_policy) {
|
| constants_header_path = "$policy_gen_dir/policy_constants.h"
|
| constants_source_path = "$policy_gen_dir/policy_constants.cc"
|
| protobuf_decoder_path = "$policy_gen_dir/cloud_policy_generated.cc"
|
| + app_restrictions_path =
|
| + "$android_resources_gen_dir/xml-v21/app_restrictions.xml"
|
| + app_resources_path =
|
| + "$android_resources_gen_dir/values-v21/restriction_values.xml"
|
|
|
| action("cloud_policy_code_generate") {
|
| script = "tools/generate_policy_source.py"
|
| @@ -78,8 +85,17 @@ if (enable_configuration_policy) {
|
| protobuf_decoder_path,
|
| chrome_settings_proto_path,
|
| cloud_policy_proto_path,
|
| + app_restrictions_path,
|
| + app_resources_path,
|
| ]
|
|
|
| + if (os != "android") {
|
| + outputs -= [
|
| + app_restrictions_path,
|
| + app_resources_path,
|
| + ]
|
| + }
|
| +
|
| args = [
|
| "--policy-constants-header=" +
|
| rebase_path(constants_header_path, root_build_dir),
|
| @@ -91,6 +107,10 @@ if (enable_configuration_policy) {
|
| rebase_path(cloud_policy_proto_path, root_build_dir),
|
| "--cloud-policy-decoder=" +
|
| rebase_path(protobuf_decoder_path, root_build_dir),
|
| + "--app-restrictions-definition=" +
|
| + rebase_path(app_restrictions_path, root_build_dir),
|
| + "--app-restrictions-resources=" +
|
| + rebase_path(app_resources_path, root_build_dir),
|
| os,
|
| chromeos_flag,
|
| rebase_path("resources/policy_templates.json", root_build_dir),
|
|
|