diff options
author | scottbyer@chromium.org <scottbyer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-02 22:41:55 +0000 |
---|---|---|
committer | scottbyer@chromium.org <scottbyer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-02 22:41:55 +0000 |
commit | 06c1732ba7d024e0144759597df38289f7cc82da (patch) | |
tree | dbb764ae23bf12916e5d8094d87602a980971e49 /tools/grit | |
parent | d4d304a5532717d92098d66bf1063c687d764833 (diff) | |
download | chromium_src-06c1732ba7d024e0144759597df38289f7cc82da.zip chromium_src-06c1732ba7d024e0144759597df38289f7cc82da.tar.gz chromium_src-06c1732ba7d024e0144759597df38289f7cc82da.tar.bz2 |
Cloud print proxy enablement under policy control.
Implement policy control of the cloud print policy, in just the UI part for now
(in the service requires some refactoring).
BUG=59769
TEST=Change the policy and verifying that the UI in Under the Hood gets disabled or enabled properly, with the policy notification at the top.
Review URL: http://codereview.chromium.org/6344013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73523 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/grit')
-rw-r--r-- | tools/grit/grit/format/policy_templates/writers/template_writer.py | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/tools/grit/grit/format/policy_templates/writers/template_writer.py b/tools/grit/grit/format/policy_templates/writers/template_writer.py index 539953a..7311990 100644 --- a/tools/grit/grit/format/policy_templates/writers/template_writer.py +++ b/tools/grit/grit/format/policy_templates/writers/template_writer.py @@ -44,6 +44,18 @@ class TemplateWriter(object): ''' return False + def IsFuturePolicySupported(self, policy): + '''Checks if the given future policy is supported by the writer. + + Args: + policy: The dictionary of the policy. + + Returns: + True if the writer chooses to include the deprecated 'policy' in its + output. + ''' + return False + def IsPolicySupported(self, policy): '''Checks if the given policy is supported by the writer. In other words, the set of platforms supported by the writer @@ -60,6 +72,10 @@ class TemplateWriter(object): not self.IsDeprecatedPolicySupported(policy)): return False + if ('future' in policy and policy['future'] is True and + not self.IsFuturePolicySupported(policy)): + return False + if '*' in self.platforms: # Currently chrome_os is only catched here. return True @@ -231,6 +247,3 @@ class TemplateWriter(object): str_key = policy['name'] # Groups come before regular policies. return (not is_group, str_key) - - - |