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

Unified Diff: tools/json_schema_compiler/compiler.py

Issue 1226353004: Generate all extension schema namespaces as "api" and instead vary the generated bundle names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/test/test_extensions_client.cc ('k') | tools/json_schema_compiler/cpp_bundle_generator.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/compiler.py
diff --git a/tools/json_schema_compiler/compiler.py b/tools/json_schema_compiler/compiler.py
index f3c4009f8c5b549145557b33f1ea7d72c669787f..1ed407bef6f9bf6ac77db9117bf60838a499b5cd 100755
--- a/tools/json_schema_compiler/compiler.py
+++ b/tools/json_schema_compiler/compiler.py
@@ -39,6 +39,7 @@ def GenerateSchema(generator_name,
root,
destdir,
cpp_namespace_pattern,
+ bundle_name,
impl_dir,
include_rules):
# Merge the source files into a single list of schemas.
@@ -97,6 +98,7 @@ def GenerateSchema(generator_name,
api_defs,
type_generator,
cpp_namespace_pattern,
+ bundle_name,
src_path,
impl_dir)
if generator_name == 'cpp-bundle-registration':
@@ -153,6 +155,10 @@ if __name__ == '__main__':
help='root directory to output generated files.')
parser.add_option('-n', '--namespace', default='generated_api_schemas',
help='C++ namespace for generated files. e.g extensions::api.')
+ parser.add_option('-b', '--bundle-name', default='',
+ help='A string to prepend to generated bundle class names, so that '
+ 'multiple bundle rules can be used without conflicting. '
+ 'Only used with one of the cpp-bundle generators.')
parser.add_option('-g', '--generator', default=GENERATORS[0],
choices=GENERATORS,
help='The generator to use to build the output code. Supported values are'
@@ -188,6 +194,7 @@ if __name__ == '__main__':
shlex.split(opts.include_rules))
result = GenerateSchema(opts.generator, file_paths, opts.root, opts.destdir,
- opts.namespace, opts.impl_dir, include_rules)
+ opts.namespace, opts.bundle_name, opts.impl_dir,
+ include_rules)
if not opts.destdir:
print result
« no previous file with comments | « extensions/test/test_extensions_client.cc ('k') | tools/json_schema_compiler/cpp_bundle_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698