OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """Updates enums in histograms.xml file with values read from provided C++ enum. | 5 """Updates enums in histograms.xml file with values read from provided C++ enum. |
6 | 6 |
7 If the file was pretty-printed, the updated version is pretty-printed too. | 7 If the file was pretty-printed, the updated version is pretty-printed too. |
8 """ | 8 """ |
9 | 9 |
10 import logging | 10 import logging |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 | 220 |
221 Args: | 221 Args: |
222 histogram_enum_name: The name of the XML <enum> attribute to update. | 222 histogram_enum_name: The name of the XML <enum> attribute to update. |
223 source_enum_path: A unix-style path, relative to src/, giving | 223 source_enum_path: A unix-style path, relative to src/, giving |
224 the C++ header file from which to read the enum. | 224 the C++ header file from which to read the enum. |
225 start_marker: A regular expression that matches the start of the C++ enum. | 225 start_marker: A regular expression that matches the start of the C++ enum. |
226 end_marker: A regular expression that matches the end of the C++ enum. | 226 end_marker: A regular expression that matches the end of the C++ enum. |
227 """ | 227 """ |
228 | 228 |
229 Log('Reading histogram enum definition from "{0}".'.format(source_enum_path)) | 229 Log('Reading histogram enum definition from "{0}".'.format(source_enum_path)) |
230 source_enum_values = ReadHistogramValues(source_enum_path, start_marker, | 230 source_enum_values, ignored = ReadHistogramValues(source_enum_path, |
231 end_marker) | 231 start_marker, end_marker) |
232 | 232 |
233 UpdateHistogramFromDict(histogram_enum_name, source_enum_values, | 233 UpdateHistogramFromDict(histogram_enum_name, source_enum_values, |
234 source_enum_path) | 234 source_enum_path) |
OLD | NEW |