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

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

Issue 1143323006: Histograms.xml python script housekeeping (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bad_message
Patch Set: Fix imports (sadface) Created 5 years, 6 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
OLDNEW
(Empty)
1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 """Updates the various BadMessage enums in histograms.xml file with values read
6 from the corresponding bad_message.h files.
7
8 If the file was pretty-printed, the updated version is pretty-printed too.
9 """
10
11 import sys
12
13 from update_histogram_enum import UpdateHistogramEnum
14
15 if __name__ == '__main__':
16 if len(sys.argv) > 1:
17 print >>sys.stderr, 'No arguments expected!'
18 sys.stderr.write(__doc__)
19 sys.exit(1)
20
21 histograms = {
22 'chrome/browser/bad_message.h': 'BadMessageReasonChrome',
23 'content/browser/bad_message.h': 'BadMessageReasonContent',
24 'components/nacl/browser/bad_message.h': 'BadMessageReasonNaCl',
25 'extensions/browser/bad_message.h': 'BadMessageReasonExtensions',
26 }
27
28 for header_file, histogram_name in histograms.items():
29 UpdateHistogramEnum(histogram_enum_name=histogram_name,
30 source_enum_path=header_file,
31 start_marker='^enum BadMessageReason {',
32 end_marker='^BAD_MESSAGE_MAX')
OLDNEW
« no previous file with comments | « tools/metrics/histograms/print_style.py ('k') | tools/metrics/histograms/update_editor_commands.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698