| Index: tools/grit/grit/format/policy_templates/writers/admx_writer.py
|
| diff --git a/tools/grit/grit/format/policy_templates/writers/admx_writer.py b/tools/grit/grit/format/policy_templates/writers/admx_writer.py
|
| index 65f3df2ad13f7771e229edb05a2708614c758da8..c81fa8b8df70dbe60cbcbc6ff2cc7bcccaaa563e 100644
|
| --- a/tools/grit/grit/format/policy_templates/writers/admx_writer.py
|
| +++ b/tools/grit/grit/format/policy_templates/writers/admx_writer.py
|
| @@ -1,4 +1,4 @@
|
| -# Copyright (c) 2010 The Chromium Authors. All rights reserved.
|
| +# Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| # Use of this source code is governed by a BSD-style license that can be
|
| # found in the LICENSE file.
|
|
|
| @@ -158,6 +158,16 @@ class ADMXWriter(xml_formatted_writer.XMLFormattedWriter):
|
| }
|
| self.AddElement(parent, 'text', attributes)
|
|
|
| + def _AddIntPolicy(self, parent, name):
|
| + '''Generates ADMX elements for an Int-Policy and adds them to the passed
|
| + parent node.
|
| + '''
|
| + attributes = {
|
| + 'id': name,
|
| + 'valueName': name,
|
| + }
|
| + self.AddElement(parent, 'decimal', attributes)
|
| +
|
| def _AddEnumPolicy(self, parent, name, items, integer_enum):
|
| '''Generates ADMX elements for an Enum-Policy and adds them to the
|
| passed parent element.
|
| @@ -253,6 +263,9 @@ class ADMXWriter(xml_formatted_writer.XMLFormattedWriter):
|
| elif policy_type == 'string':
|
| parent = self._GetElements(policy_elem)
|
| self._AddStringPolicy(parent, policy_name)
|
| + elif policy_type == 'int':
|
| + parent = self._GetElements(policy_elem)
|
| + self._AddIntPolicy(parent, policy_name)
|
| elif policy_type in ('int-enum', 'string-enum'):
|
| parent = self._GetElements(policy_elem)
|
| self._AddEnumPolicy(parent, policy_name, policy['items'],
|
|
|