1 # Copyright 2023 The Chromium Authors
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 # Generates an output file that contains all histograms which share the same
6 # variant name. This output file will act as an allow list.
9 # input_xml_file: Input file that contains the allow list. This should be a
10 # .xml file with histogram descriptions and should be a path starting with
11 # //tools/metrics/histograms/
14 # Namespace in which the generated code should be scoped.
17 # Name of the generated header file.
20 # Name of the generated source file.
23 # Name of the variants list that act as an allow list.
25 template("generate_histograms_variants_allowlist") {
27 header_filename = "$target_gen_dir/" + invoker.header_filename
28 source_filename = "$target_gen_dir/" + invoker.source_filename
31 "//tools/metrics/histograms/generate_histograms_variants_allowlist.py"
38 "-a" + invoker.allow_list_name,
39 "-n" + invoker.namespace,
40 "-o" + rebase_path(root_gen_dir, root_build_dir),
41 "-H" + rebase_path(header_filename, root_gen_dir),
42 "-s" + rebase_path(source_filename, root_gen_dir),
43 "-f" + rebase_path(invoker.input_xml_file, root_build_dir),