tools/metrics/histograms/suffixes_to_variants.py
def MigrateToOutOflinePatterenedHistogram(doc, histogram, histogram_suffixes):
  """Migates a histogram suffixes to out-of-line patterned histogram."""
  # Update histogram's name with the histogram_suffixes' name.
  histogram_suffixes_name = histogram_suffixes.getAttribute('name')
  _UpdateHistogramName(histogram, histogram_suffixes)

  # Append |histogram_suffixes_name| placeholder string to the summary text.
  _UpdateSummary(histogram, histogram_suffixes_name)

  # Create a <token> node that links to an out-of-line <variants>.
  token = doc.createElement('token')
  token.setAttribute('key', histogram_suffixes_name)
  token.setAttribute('variants', histogram_suffixes_name)
  token.appendChild(_GetBaseVariant(doc, histogram))
  histogram.appendChild(token)
  # Remove obsolete comments from the histogram node.
  _RemoveSuffixesComment(histogram, histogram_suffixes_name)
Migates a histogram suffixes to out-of-line patterned histogram.
Migates a histogram suffixes to out-of-line patterned histogram.
Migates a histogram suffixes to out - of - line patterned histogram .
def MigrateToOutOflinePatterenedHistogram(doc, histogram, histogram_suffixes):
  histogram_suffixes_name = histogram_suffixes.getAttribute('name')
  _UpdateHistogramName(histogram, histogram_suffixes)
  _UpdateSummary(histogram, histogram_suffixes_name)
  token = doc.createElement('token')
  token.setAttribute('key', histogram_suffixes_name)
  token.setAttribute('variants', histogram_suffixes_name)
  token.appendChild(_GetBaseVariant(doc, histogram))
  histogram.appendChild(token)
  _RemoveSuffixesComment(histogram, histogram_suffixes_name)
def MigrateToOutOflinePatterenedHistogram ( doc , histogram , histogram_suffixes ) : histogram_suffixes_name = histogram_suffixes . getAttribute ( 'name' ) _UpdateHistogramName ( histogram , histogram_suffixes ) _UpdateSummary ( histogram , histogram_suffixes_name ) token = doc . createElement ( 'token' ) token . setAttribute ( 'key' , histogram_suffixes_name ) token . setAttribute ( 'variants' , histogram_suffixes_name ) token . appendChild ( _GetBaseVariant ( doc , histogram ) ) histogram . appendChild ( token ) _RemoveSuffixesComment ( histogram , histogram_suffixes_name )
Migates a histogram suffixes to out-of-line patterned histogram.
Migates a histogram suffixes to out - of - line patterned histogram .
"""Migates a histogram suffixes to out-of-line patterned histogram.""" # Update histogram's name with the histogram_suffixes' name. # Append |histogram_suffixes_name| placeholder string to the summary text. # Create a <token> node that links to an out-of-line <variants>. # Remove obsolete comments from the histogram node.
doc
histogram
histogram_suffixes