summaryrefslogtreecommitdiffstats
path: root/tools/metrics/histograms/update_extension_functions.py
blob: dd390a206625d464b49c48187b9ffe85ebb4f5dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 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 ExtensionFunctions enum in histograms.xml file with values read from
extension_function_histogram_value.h.

If the file was pretty-printed, the updated version is pretty-printed too.
"""

import os

from update_histogram_enum import UpdateHistogramEnum

if __name__ == '__main__':
  UpdateHistogramEnum(histogram_enum_name='ExtensionFunctions',
                      source_enum_path=
                          os.path.join('..', '..', '..', 'extensions',
                                       'browser',
                                       'extension_function_histogram_value.h'),
                      start_marker='^enum HistogramValue {',
                      end_marker='^ENUM_BOUNDARY')