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

Side by Side Diff: tools/metrics/rappor/pretty_print.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
« no previous file with comments | « tools/metrics/histograms/validate_format.py ('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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2015 The Chromium Authors. All rights reserved. 2 # Copyright 2015 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import logging 6 import logging
7 import os
7 import sys 8 import sys
8 import os
9 9
10 # Import the metrics/common module for pretty print xml.
11 sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'common')) 10 sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'common'))
12 import models 11 import models
13 import presubmit_util 12 import presubmit_util
14 13
15 14
16 # Model definitions for rappor.xml content 15 # Model definitions for rappor.xml content
17 _SUMMARY_TYPE = models.TextNodeType('summary') 16 _SUMMARY_TYPE = models.TextNodeType('summary')
18 17
19 _PARAMETERS_TYPE = models.ObjectNodeType('parameters', 18 _PARAMETERS_TYPE = models.ObjectNodeType('parameters',
20 int_attributes=[ 19 int_attributes=[
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 return RAPPOR_XML_TYPE.PrettyPrint(comments, config) 175 return RAPPOR_XML_TYPE.PrettyPrint(comments, config)
177 176
178 177
179 def main(argv): 178 def main(argv):
180 presubmit_util.DoPresubmitMain(argv, 'rappor.xml', 'rappor.old.xml', 179 presubmit_util.DoPresubmitMain(argv, 'rappor.xml', 'rappor.old.xml',
181 'pretty_print.py', UpdateXML) 180 'pretty_print.py', UpdateXML)
182 181
183 182
184 if '__main__' == __name__: 183 if '__main__' == __name__:
185 sys.exit(main(sys.argv)) 184 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « tools/metrics/histograms/validate_format.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698