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

Unified Diff: components/policy/tools/template_writers/writers/admx_writer.py

Issue 2653823006: Include 'external' policies in grit output (admx, adm, doc etc.) (Closed)
Patch Set: Whitespace fix Created 3 years, 3 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: components/policy/tools/template_writers/writers/admx_writer.py
diff --git a/components/policy/tools/template_writers/writers/admx_writer.py b/components/policy/tools/template_writers/writers/admx_writer.py
index 7a487c0893033408e815d3fec90f91c78fb0e4c6..88607bae2aced5bc57bde27846375d015cf5d693 100755
--- a/components/policy/tools/template_writers/writers/admx_writer.py
+++ b/components/policy/tools/template_writers/writers/admx_writer.py
@@ -126,7 +126,7 @@ class ADMXWriter(xml_formatted_writer.XMLFormattedWriter):
'''Generates the ADMX "categories" element and adds it to the categories
main node. The "categories" element defines the category for the policies
defined in this ADMX document. Here is an example of an ADMX "categories"
- element on Windows:
+ element:
<categories>
<category displayName="$(string.googlechrome)" name="googlechrome">
@@ -271,9 +271,6 @@ class ADMXWriter(xml_formatted_writer.XMLFormattedWriter):
policies_elem = self._active_policies_elem
policy_type = policy['type']
policy_name = policy['name']
- if policy_type == 'external':
- # This type can only be set through cloud policy.
- return
attributes = {
'name': name,
@@ -294,8 +291,9 @@ class ADMXWriter(xml_formatted_writer.XMLFormattedWriter):
if policy_type == 'main':
self.AddAttribute(policy_elem, 'valueName', policy_name)
self._AddMainPolicy(policy_elem)
- elif policy_type in ('string', 'dict'):
- # 'dict' policies are configured as JSON-encoded strings on Windows.
+ elif policy_type in ('string', 'dict', 'external'):
+ # 'dict' and 'external' policies are configured as JSON-encoded strings on
+ # Windows.
parent = self._GetElements(policy_elem)
self._AddStringPolicy(parent, policy_name)
elif policy_type == 'int':

Powered by Google App Engine
This is Rietveld 408576698