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

Unified Diff: tools/grit/grit/format/policy_templates/writers/template_writer.py

Issue 5958014: Policy: Add ProxyMode and deprecate ProxyServerMode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests on all platforms Created 9 years, 11 months 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
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)
gfeher 2011/01/10 14:20:33 It would be better to still respect platform filte
danno 2011/01/11 08:46:46 Done.
+
if '*' in self.platforms:
# Currently chrome_os is only catched here.
return True

Powered by Google App Engine
This is Rietveld 408576698