components/policy/tools/template_writers/template_formatter.py
def _GetWriterConfiguration(grit_defines):
  '''Returns the writer configuration based on grit defines.

  Args:
    grit_defines: Array of grit defines, see grit_rule.gni.
  '''
  # Build a dictionary from grit defines, which can be plain DEFs or KEY=VALUEs.
  grit_defines_dict = {}
  for define in grit_defines:
    parts = define.split('=', 1)
    grit_defines_dict[parts[0]] = parts[1] if len(parts) > 1 else 1
  return writer_configuration.GetConfigurationForBuild(grit_defines_dict)
Returns the writer configuration based on grit defines.

  Args:
    grit_defines: Array of grit defines, see grit_rule.gni.
  
Returns the writer configuration based on grit defines.
Returns the writer configuration based on grit defines .
def _GetWriterConfiguration(grit_defines):
  grit_defines_dict = {}
  for define in grit_defines:
    parts = define.split('=', 1)
    grit_defines_dict[parts[0]] = parts[1] if len(parts) > 1 else 1
  return writer_configuration.GetConfigurationForBuild(grit_defines_dict)
def _GetWriterConfiguration ( grit_defines ) : grit_defines_dict = { } for define in grit_defines : parts = define . split ( '=' , 1 ) grit_defines_dict [ parts [ 0 ] ] = parts [ 1 ] if len ( parts ) > 1 else 1 return writer_configuration . GetConfigurationForBuild ( grit_defines_dict )
Returns the writer configuration based on grit defines.
Returns the writer configuration based on grit defines .
'''Returns the writer configuration based on grit defines.

  Args:
    grit_defines: Array of grit defines, see grit_rule.gni.
  ''' # Build a dictionary from grit defines, which can be plain DEFs or KEY=VALUEs.
grit_defines
Array of grit defines, see grit_rule.gni.
Array of grit defines see grit_rule . gni .