components/policy/tools/template_writers/writers/admx_writer.py
def BeginTemplate(self):
    '''Generates the skeleton of the ADMX template. An ADMX template contains
    an ADMX "PolicyDefinitions" element with four child nodes: "policies"
    "policyNamspaces", "resources", "supportedOn" and "categories"
    '''
    dom_impl = minidom.getDOMImplementation('')
    self._doc = dom_impl.createDocument(None, 'policyDefinitions', None)
    if self._GetChromiumVersionString() is not None:
      self.AddComment(self._doc.documentElement, self.config['build'] + \
          ' version: ' + self._GetChromiumVersionString())
    policy_definitions_elem = self._doc.documentElement

    policy_definitions_elem.attributes['revision'] = '1.0'
    policy_definitions_elem.attributes['schemaVersion'] = '1.0'

    self._AddPolicyNamespaces(policy_definitions_elem,
                              self.config['admx_prefix'],
                              self.winconfig['namespace'])
    self.AddElement(policy_definitions_elem, 'resources',
                    {'minRequiredRevision': '1.0'})
    self._AddSupportedOn(
        policy_definitions_elem,
        [self.config['win_supported_os'], self.config['win_supported_os_win7']])
    self._categories_elem = self.AddElement(policy_definitions_elem,
                                            'categories')
    self._AddCategories(self.winconfig['mandatory_category_path'])
    self._AddCategories(self.winconfig['recommended_category_path'])
    self._active_policies_elem = self.AddElement(policy_definitions_elem,
                                                 'policies')
    self._active_mandatory_policy_group_name = \
        self.winconfig['mandatory_category_path'][-1]
    self._active_recommended_policy_group_name = \
        self.winconfig['recommended_category_path'][-1]
Generates the skeleton of the ADMX template. An ADMX template contains
    an ADMX "PolicyDefinitions" element with four child nodes: "policies"
    "policyNamspaces", "resources", "supportedOn" and "categories"
    
Generates the skeleton of the ADMX template.
Generates the skeleton of the ADMX template .
def BeginTemplate(self):
    dom_impl = minidom.getDOMImplementation('')
    self._doc = dom_impl.createDocument(None, 'policyDefinitions', None)
    if self._GetChromiumVersionString() is not None:
      self.AddComment(self._doc.documentElement, self.config['build'] + \
          ' version: ' + self._GetChromiumVersionString())
    policy_definitions_elem = self._doc.documentElement
    policy_definitions_elem.attributes['revision'] = '1.0'
    policy_definitions_elem.attributes['schemaVersion'] = '1.0'
    self._AddPolicyNamespaces(policy_definitions_elem,
                              self.config['admx_prefix'],
                              self.winconfig['namespace'])
    self.AddElement(policy_definitions_elem, 'resources',
                    {'minRequiredRevision': '1.0'})
    self._AddSupportedOn(
        policy_definitions_elem,
        [self.config['win_supported_os'], self.config['win_supported_os_win7']])
    self._categories_elem = self.AddElement(policy_definitions_elem,
                                            'categories')
    self._AddCategories(self.winconfig['mandatory_category_path'])
    self._AddCategories(self.winconfig['recommended_category_path'])
    self._active_policies_elem = self.AddElement(policy_definitions_elem,
                                                 'policies')
    self._active_mandatory_policy_group_name = \
        self.winconfig['mandatory_category_path'][-1]
    self._active_recommended_policy_group_name = \
        self.winconfig['recommended_category_path'][-1]
def BeginTemplate ( self ) : dom_impl = minidom . getDOMImplementation ( '' ) self . _doc = dom_impl . createDocument ( None , 'policyDefinitions' , None ) if self . _GetChromiumVersionString ( ) is not None : self . AddComment ( self . _doc . documentElement , self . config [ 'build' ] + ' version: ' + self . _GetChromiumVersionString ( ) ) policy_definitions_elem = self . _doc . documentElement policy_definitions_elem . attributes [ 'revision' ] = '1.0' policy_definitions_elem . attributes [ 'schemaVersion' ] = '1.0' self . _AddPolicyNamespaces ( policy_definitions_elem , self . config [ 'admx_prefix' ] , self . winconfig [ 'namespace' ] ) self . AddElement ( policy_definitions_elem , 'resources' , { 'minRequiredRevision' : '1.0' } ) self . _AddSupportedOn ( policy_definitions_elem , [ self . config [ 'win_supported_os' ] , self . config [ 'win_supported_os_win7' ] ] ) self . _categories_elem = self . AddElement ( policy_definitions_elem , 'categories' ) self . _AddCategories ( self . winconfig [ 'mandatory_category_path' ] ) self . _AddCategories ( self . winconfig [ 'recommended_category_path' ] ) self . _active_policies_elem = self . AddElement ( policy_definitions_elem , 'policies' ) self . _active_mandatory_policy_group_name = self . winconfig [ 'mandatory_category_path' ] [ - 1 ] self . _active_recommended_policy_group_name = self . winconfig [ 'recommended_category_path' ] [ - 1 ]
Generates the skeleton of the ADMX template.
Generates the skeleton of the ADMX template .
'''Generates the skeleton of the ADMX template. An ADMX template contains
    an ADMX "PolicyDefinitions" element with four child nodes: "policies"
    "policyNamspaces", "resources", "supportedOn" and "categories"
    '''
self