1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 """Updates the ExtensionEvents and ExtensionFunctions enums in histograms.xml
6 with values read from extension_event_histogram_value.h and
7 extension_function_histogram_value.h.
9 If the file was pretty-printed, the updated version is pretty-printed too.
15 from update_histogram_enum
import UpdateHistogramEnum
17 if __name__
== '__main__':
19 print >>sys
.stderr
, 'No arguments expected!'
20 sys
.stderr
.write(__doc__
)
25 'extensions/browser/extension_event_histogram_value.h'),
26 ('ExtensionFunctions',
27 'extensions/browser/extension_function_histogram_value.h'))
28 for enum_name
, source_header
in histograms
:
29 UpdateHistogramEnum(histogram_enum_name
=enum_name
,
30 source_enum_path
=source_header
,
31 start_marker
='^enum HistogramValue {',
32 end_marker
='^ENUM_BOUNDARY')