Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Side by Side Diff: tools/metrics/histograms/update_histogram_enum.py

Issue 2815773004: Fix update_histogram_enum.py when UpdateHistogramEnum is called. (Closed)
Patch Set: another callsite Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tools/metrics/histograms/update_use_counter_feature_enum.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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)
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/histograms/update_use_counter_feature_enum.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698