Chromium Code Reviews| Index: tools/metrics/histograms/update_extension_histograms.py |
| diff --git a/tools/metrics/histograms/update_extension_histograms.py b/tools/metrics/histograms/update_extension_histograms.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f3dfad214e572b3953f9358056f643242bf43107 |
| --- /dev/null |
| +++ b/tools/metrics/histograms/update_extension_histograms.py |
| @@ -0,0 +1,32 @@ |
| +# Copyright 2013 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +"""Updates ExtensionEvents and ExtensionFunctions enum in histograms.xml file |
| +with values read from extension_event_histogram_value.h and |
| +extension_function_histogram_value.h. |
| + |
| +If the file was pretty-printed, the updated version is pretty-printed too. |
| +""" |
| + |
| +import os |
| +import sys |
| + |
| +from update_histogram_enum import UpdateHistogramEnum |
| + |
| +if __name__ == '__main__': |
| + if len(sys.argv) > 1: |
| + print >>sys.stderr, 'No arguments expected!' |
| + sys.stderr.write(__doc__) |
| + sys.exit(1) |
| + |
| + histograms = ( |
| + ('ExtensionEvents', |
|
not at google - send to devlin
2015/06/22 23:42:11
This is just update_extension_functions.py moved,
|
| + 'extensions/browser/extension_event_histogram_value.h'), |
| + ('ExtensionFunctions', |
| + 'extensions/browser/extension_function_histogram_value.h')) |
| + for enum_name, source_header in histograms: |
| + UpdateHistogramEnum(histogram_enum_name=enum_name, |
| + source_enum_path=source_header, |
| + start_marker='^enum HistogramValue {', |
| + end_marker='^ENUM_BOUNDARY') |