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

Side by Side Diff: content/browser/tracing/generate_trace_viewer_grd.py

Issue 2138583002: Use output_all_resource_defines=false in most grd files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert ui_resources.grd for now Created 4 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
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2013 The Chromium Authors. All rights reserved. 2 # Copyright 2013 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 """Creates a grd file for packaging the trace-viewer files. 6 """Creates a grd file for packaging the trace-viewer files.
7 7
8 This file is modified from the devtools generate_devtools_grd.py file. 8 This file is modified from the devtools generate_devtools_grd.py file.
9 """ 9 """
10 10
11 import errno 11 import errno
12 import os 12 import os
13 import shutil 13 import shutil
14 import sys 14 import sys
15 from xml.dom import minidom 15 from xml.dom import minidom
16 16
17 kTracingResourcePrefix = 'IDR_TRACING_' 17 kTracingResourcePrefix = 'IDR_TRACING_'
18 kGrdTemplate = '''<?xml version="1.0" encoding="UTF-8"?> 18 kGrdTemplate = '''<?xml version="1.0" encoding="UTF-8"?>
19 <grit latest_public_release="0" current_release="1"> 19 <grit latest_public_release="0" current_release="1"
20 output_all_resource_defines="false">
20 <outputs> 21 <outputs>
21 <output filename="grit/tracing_resources.h" type="rc_header"> 22 <output filename="grit/tracing_resources.h" type="rc_header">
22 <emit emit_type='prepend'></emit> 23 <emit emit_type='prepend'></emit>
23 </output> 24 </output>
24 <output filename="tracing_resources.pak" type="data_package" /> 25 <output filename="tracing_resources.pak" type="data_package" />
25 </outputs> 26 </outputs>
26 <release seq="1"> 27 <release seq="1">
27 <includes> 28 <includes>
28 <if expr="not is_android"></if> 29 <if expr="not is_android"></if>
29 </includes> 30 </includes>
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 doc = minidom.parseString(kGrdTemplate) 72 doc = minidom.parseString(kGrdTemplate)
72 for filename in parsed_args.source_files: 73 for filename in parsed_args.source_files:
73 add_file_to_grd(doc, os.path.basename(filename)) 74 add_file_to_grd(doc, os.path.basename(filename))
74 75
75 with open(parsed_args.output_filename, 'w') as output_file: 76 with open(parsed_args.output_filename, 'w') as output_file:
76 output_file.write(doc.toxml(encoding='UTF-8')) 77 output_file.write(doc.toxml(encoding='UTF-8'))
77 78
78 79
79 if __name__ == '__main__': 80 if __name__ == '__main__':
80 sys.exit(main(sys.argv)) 81 sys.exit(main(sys.argv))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698