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

Unified Diff: components/policy/tools/generate_policy_source.py

Issue 2529383003: [Android app restrictions] Hide unused and improve descriptions. (Closed)
Patch Set: Fix nit Created 4 years, 1 month 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 | « no previous file | tools/grit/grit/format/policy_templates/writers/android_policy_writer.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/tools/generate_policy_source.py
diff --git a/components/policy/tools/generate_policy_source.py b/components/policy/tools/generate_policy_source.py
index 04445612e51e84db03ddbd97a2e572c1794141c3..2bc7593de2c4803393046ef68c51d63a157546c2 100755
--- a/components/policy/tools/generate_policy_source.py
+++ b/components/policy/tools/generate_policy_source.py
@@ -74,6 +74,7 @@ class PolicyDetails:
self.can_be_mandatory = features.get('can_be_mandatory', True)
self.is_deprecated = policy.get('deprecated', False)
self.is_device_only = policy.get('device_only', False)
+ self.is_future = policy.get('future', False)
self.schema = policy.get('schema', {})
self.has_enterprise_default = 'default_for_enterprise_users' in policy
if self.has_enterprise_default:
@@ -1171,7 +1172,8 @@ def _WriteAppRestrictions(policies, os, f, riskTags):
f.write('<restrictions xmlns:android="'
'http://schemas.android.com/apk/res/android">\n\n')
for policy in policies:
- if policy.is_supported and policy.restriction_type != 'invalid':
+ if (policy.is_supported and policy.restriction_type != 'invalid' and
+ not policy.is_deprecated and not policy.is_future):
WriteAppRestriction(policy)
f.write('</restrictions>')
« no previous file with comments | « no previous file | tools/grit/grit/format/policy_templates/writers/android_policy_writer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698