| Index: tools/grit/grit/format/policy_templates/writers/template_writer.py
|
| 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 8b742d56a686f33b4917301380357a0330391533..6bbd1dcc028020423a1614ea0450b0402a2a0e3b 100644
|
| --- a/tools/grit/grit/format/policy_templates/writers/template_writer.py
|
| +++ b/tools/grit/grit/format/policy_templates/writers/template_writer.py
|
| @@ -33,6 +33,18 @@ class TemplateWriter(object):
|
| self.config = config
|
| self.messages = messages
|
|
|
| + def IsDeprecatedPolicySupported(self, policy):
|
| + '''Checks if the given deprecated 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
|
| @@ -45,6 +57,9 @@ class TemplateWriter(object):
|
| Returns:
|
| True if the writer chooses to include 'policy' in its output.
|
| '''
|
| + if 'deprecated' in policy and policy['deprecated'] is True:
|
| + return self.IsDeprecatedPolicySupported(policy)
|
| +
|
| if '*' in self.platforms:
|
| # Currently chrome_os is only catched here.
|
| return True
|
|
|