tools/metrics/histograms/update_histogram_enum.py
def UpdateHistogramEnum(histogram_enum_name,
                        source_enum_path,
                        start_marker,
                        end_marker,
                        strip_k_prefix=False,
                        calling_script=None):
  """Reads a C++ enum from a .h file and updates histograms.xml to match.

  Args:
      histogram_enum_name: The name of the XML <enum> attribute to update.
      source_enum_path: A unix-style path, relative to src/, giving
          the C++ header file from which to read the enum.
      start_marker: A regular expression that matches the start of the C++ enum.
      end_marker: A regular expression that matches the end of the C++ enum.
      strip_k_prefix: Set to True if enum values are declared as kFoo and the
          'k' should be stripped.
  """

  Log('Reading histogram enum definition from "{0}".'.format(source_enum_path))
  source_enum_values = ReadHistogramValues(source_enum_path,
      start_marker, end_marker, strip_k_prefix)

  UpdateHistogramFromDict(histogram_enum_name, source_enum_values,
                          source_enum_path, calling_script)
Reads a C++ enum from a .h file and updates histograms.xml to match.

  Args:
      histogram_enum_name: The name of the XML <enum> attribute to update.
      source_enum_path: A unix-style path, relative to src/, giving
          the C++ header file from which to read the enum.
      start_marker: A regular expression that matches the start of the C++ enum.
      end_marker: A regular expression that matches the end of the C++ enum.
      strip_k_prefix: Set to True if enum values are declared as kFoo and the
          'k' should be stripped.
  
Reads a C++ enum from a .h file and updates histograms.xml to match.
Reads a C ++ enum from a . h file and updates histograms . xml to match .
def UpdateHistogramEnum(histogram_enum_name,
                        source_enum_path,
                        start_marker,
                        end_marker,
                        strip_k_prefix=False,
                        calling_script=None):
  Log('Reading histogram enum definition from "{0}".'.format(source_enum_path))
  source_enum_values = ReadHistogramValues(source_enum_path,
      start_marker, end_marker, strip_k_prefix)
  UpdateHistogramFromDict(histogram_enum_name, source_enum_values,
                          source_enum_path, calling_script)
def UpdateHistogramEnum ( histogram_enum_name , source_enum_path , start_marker , end_marker , strip_k_prefix = False , calling_script = None ) : Log ( 'Reading histogram enum definition from "{0}".' . format ( source_enum_path ) ) source_enum_values = ReadHistogramValues ( source_enum_path , start_marker , end_marker , strip_k_prefix ) UpdateHistogramFromDict ( histogram_enum_name , source_enum_values , source_enum_path , calling_script )
Reads a C++ enum from a .h file and updates histograms.xml to match.
Reads a C ++ enum from a . h file and updates histograms . xml to match .
"""Reads a C++ enum from a .h file and updates histograms.xml to match.

  Args:
      histogram_enum_name: The name of the XML <enum> attribute to update.
      source_enum_path: A unix-style path, relative to src/, giving
          the C++ header file from which to read the enum.
      start_marker: A regular expression that matches the start of the C++ enum.
      end_marker: A regular expression that matches the end of the C++ enum.
      strip_k_prefix: Set to True if enum values are declared as kFoo and the
          'k' should be stripped.
  """
histogram_enum_name
The name of the XML  attribute to update.
The name of the XML attribute to update .
source_enum_path
A unix-style path, relative to src/, giving
the C++ header file from which to read the enum.
A unix - style path relative to src / giving the C ++ header file from which to read the enum .
start_marker
A regular expression that matches the start of the C++ enum.
A regular expression that matches the start of the C ++ enum .
end_marker
A regular expression that matches the end of the C++ enum.
A regular expression that matches the end of the C ++ enum .
strip_k_prefix
Set to True if enum values are declared as kFoo and the
'k' should be stripped.
Set to True if enum values are declared as kFoo and the ' k ' should be stripped .
calling_script