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

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

Issue 1212163007: Kill renderers for bad password forms in --site-per-process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 | « tools/metrics/histograms/histograms.xml ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 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 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 the various BadMessage enums in histograms.xml file with values read 5 """Updates the various BadMessage enums in histograms.xml file with values read
6 from the corresponding bad_message.h files. 6 from the corresponding bad_message.h files.
7 7
8 If the file was pretty-printed, the updated version is pretty-printed too. 8 If the file was pretty-printed, the updated version is pretty-printed too.
9 """ 9 """
10 10
11 import sys 11 import sys
12 12
13 from update_histogram_enum import UpdateHistogramEnum 13 from update_histogram_enum import UpdateHistogramEnum
14 14
15 if __name__ == '__main__': 15 if __name__ == '__main__':
16 if len(sys.argv) > 1: 16 if len(sys.argv) > 1:
17 print >>sys.stderr, 'No arguments expected!' 17 print >>sys.stderr, 'No arguments expected!'
18 sys.stderr.write(__doc__) 18 sys.stderr.write(__doc__)
19 sys.exit(1) 19 sys.exit(1)
20 20
21 histograms = { 21 histograms = {
22 'chrome/browser/bad_message.h': 'BadMessageReasonChrome', 22 'chrome/browser/bad_message.h': 'BadMessageReasonChrome',
23 'content/browser/bad_message.h': 'BadMessageReasonContent', 23 'content/browser/bad_message.h': 'BadMessageReasonContent',
24 'components/nacl/browser/bad_message.h': 'BadMessageReasonNaCl', 24 'components/nacl/browser/bad_message.h': 'BadMessageReasonNaCl',
25 'components/password_manager/content/browser/bad_message.h':
26 'BadMessageReasonPasswordManager',
25 'extensions/browser/bad_message.h': 'BadMessageReasonExtensions', 27 'extensions/browser/bad_message.h': 'BadMessageReasonExtensions',
26 } 28 }
27 29
28 for header_file, histogram_name in histograms.items(): 30 for header_file, histogram_name in histograms.items():
29 UpdateHistogramEnum(histogram_enum_name=histogram_name, 31 UpdateHistogramEnum(histogram_enum_name=histogram_name,
30 source_enum_path=header_file, 32 source_enum_path=header_file,
31 start_marker='^enum BadMessageReason {', 33 start_marker='^enum (class )?BadMessageReason {',
32 end_marker='^BAD_MESSAGE_MAX') 34 end_marker='^BAD_MESSAGE_MAX')
OLDNEW
« no previous file with comments | « tools/metrics/histograms/histograms.xml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698