diff options
author | mnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-11 15:13:15 +0000 |
---|---|---|
committer | mnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-11 15:13:15 +0000 |
commit | 92a74fefd0706825f781f9fa0fe9d968bf806dd2 (patch) | |
tree | cfaa1a6fd9432ec896b35f2d7db0c4830b487be4 /chrome/app/policy | |
parent | 78bb39d6bcc913c986729d2c1455d1fe95f7a9ba (diff) | |
download | chromium_src-92a74fefd0706825f781f9fa0fe9d968bf806dd2.zip chromium_src-92a74fefd0706825f781f9fa0fe9d968bf806dd2.tar.gz chromium_src-92a74fefd0706825f781f9fa0fe9d968bf806dd2.tar.bz2 |
Add a presubmit check for per_profile feature flag on user policies.
BUG=None
TEST=Compiles.
Review URL: https://chromiumcodereview.appspot.com/11538004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172329 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app/policy')
-rw-r--r-- | chrome/app/policy/policy_templates.json | 2 | ||||
-rwxr-xr-x | chrome/app/policy/syntax_check_policy_template_json.py | 13 |
2 files changed, 15 insertions, 0 deletions
diff --git a/chrome/app/policy/policy_templates.json b/chrome/app/policy/policy_templates.json index e83b60b..3a86a2a 100644 --- a/chrome/app/policy/policy_templates.json +++ b/chrome/app/policy/policy_templates.json @@ -471,6 +471,7 @@ 'supported_on': ['chrome.*:14-'], 'features': { 'dynamic_refresh': True, + 'per_profile': False, }, 'example_value': False, 'id': 95, @@ -2775,6 +2776,7 @@ 'supported_on': ['chrome.*:14-'], 'features': { 'dynamic_refresh': False, + 'per_profile': False, }, 'example_value': 32, 'id': 92, diff --git a/chrome/app/policy/syntax_check_policy_template_json.py b/chrome/app/policy/syntax_check_policy_template_json.py index 3e58055..06f600c 100755 --- a/chrome/app/policy/syntax_check_policy_template_json.py +++ b/chrome/app/policy/syntax_check_policy_template_json.py @@ -256,6 +256,19 @@ class PolicyTemplateChecker(object): 'documentation string in the messages dictionary.' % feature, 'policy', policy.get('name', policy)) + # All user policies must have a per_profile feature flag. + if (not policy.get('device_only', False) and + not policy.get('deprecated', False) and + not filter(re.compile('^chrome_frame:.*').match, supported_on)): + self._CheckContains(features, 'per_profile', bool, + container_name='features', + identifier=policy.get('name')) + + # All policies must declare whether they allow changes at runtime. + self._CheckContains(features, 'dynamic_refresh', bool, + container_name='features', + identifier=policy.get('name')) + # Each policy must have an 'example_value' of appropriate type. if policy_type == 'main': value_type = bool |