summaryrefslogtreecommitdiffstats
path: root/components/policy.gypi
diff options
context:
space:
mode:
authorknn <knn@chromium.org>2015-01-15 16:34:15 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-16 00:35:10 +0000
commitf946bbe6862f98c056288ec1242ed6aab9a7d717 (patch)
tree0dd552df86e3f432ff9773635b6d3457602aa6f9 /components/policy.gypi
parente8091802505a507bb6c11683fe77cf7b1d455e6d (diff)
downloadchromium_src-f946bbe6862f98c056288ec1242ed6aab9a7d717.zip
chromium_src-f946bbe6862f98c056288ec1242ed6aab9a7d717.tar.gz
chromium_src-f946bbe6862f98c056288ec1242ed6aab9a7d717.tar.bz2
Revert Revert "Expose chrome policies using Android's App Restrictions Schema"
Android generates alternate resources when dependent on a higher sdk version then the minsdkversion. This is conflicts with Playstore rules that only permit one resource for App Restrictions. I have now qualified the resource to apply only for sdk > 21 where the App Restriction API was exposed. BUG=448829 BUG=446795 TBR=bartfab@chromium.org Review URL: https://codereview.chromium.org/838263005 Cr-Commit-Position: refs/heads/master@{#311778}
Diffstat (limited to 'components/policy.gypi')
-rw-r--r--components/policy.gypi17
1 files changed, 17 insertions, 0 deletions
diff --git a/components/policy.gypi b/components/policy.gypi
index ebfbcdd..7e0533a 100644
--- a/components/policy.gypi
+++ b/components/policy.gypi
@@ -12,6 +12,7 @@
'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chrome',
'policy_out_dir': '<(SHARED_INTERMEDIATE_DIR)/policy',
'protoc_out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out',
+ 'android_resources_out_dir': '<(policy_out_dir)/android_resources',
'generate_policy_source_script_path':
'policy/tools/generate_policy_source.py',
'policy_constant_header_path':
@@ -20,6 +21,10 @@
'<(policy_out_dir)/policy/policy_constants.cc',
'protobuf_decoder_path':
'<(policy_out_dir)/policy/cloud_policy_generated.cc',
+ 'app_restrictions_path':
+ '<(android_resources_out_dir)/xml-v21/app_restrictions.xml',
+ 'app_resources_path':
+ '<(android_resources_out_dir)/values-v21/restriction_values.xml',
# This is the "full" protobuf, which defines one protobuf message per
# policy. It is also the format currently used by the server.
'chrome_settings_proto_path':
@@ -109,6 +114,8 @@
'<(protobuf_decoder_path)',
'<(chrome_settings_proto_path)',
'<(cloud_policy_proto_path)',
+ '<(app_restrictions_path)',
+ '<(app_resources_path)',
],
'action_name': 'generate_policy_source',
'action': [
@@ -119,11 +126,21 @@
'--chrome-settings-protobuf=<(chrome_settings_proto_path)',
'--cloud-policy-protobuf=<(cloud_policy_proto_path)',
'--cloud-policy-decoder=<(protobuf_decoder_path)',
+ '--app-restrictions-definition=<(app_restrictions_path)',
+ '--app-restrictions-resources=<(app_resources_path)',
'<(OS)',
'<(chromeos)',
'policy/resources/policy_templates.json',
],
'message': 'Generating policy source',
+ 'conditions': [
+ ['OS!="android"', {
+ 'outputs!': [
+ '<(app_restrictions_path)',
+ '<(app_resources_path)',
+ ],
+ }],
+ ],
},
],
'direct_dependent_settings': {