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

Unified Diff: tools/json_schema_compiler/compiler.py

Issue 10025007: Convert tabs, windows, and extension APIs to feature system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: blah Created 8 years, 8 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 | « chrome/test/data/extensions/extension_api_feature_unittest/test1.json ('k') | no next file » | 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 38235e07f9c9833705f99c341b718ad1db3fdb11..ee33c2c2e2f3c0f2366f4d486dff1c854ef4dd34 100755
--- a/tools/json_schema_compiler/compiler.py
+++ b/tools/json_schema_compiler/compiler.py
@@ -53,13 +53,16 @@ def handle_single_schema(filename, dest_dir, root, root_namespace):
# Load type dependencies into the model.
# TODO(miket): do we need this in IDL?
for referenced_schema in referenced_schemas:
- referenced_schema_path = os.path.join(
- os.path.dirname(schema), referenced_schema + '.json')
- referenced_api_defs = json_schema.Load(referenced_schema_path)
-
- for namespace in referenced_api_defs:
- api_model.AddNamespace(namespace,
- os.path.relpath(referenced_schema_path, opts.root))
+ parts = referenced_schema.split(':')
+ api_name = parts[-1]
+ if len(parts) == 1 or parts[0] == 'api':
+ referenced_schema_path = os.path.join(
+ os.path.dirname(schema), api_name + '.json')
+ referenced_api_defs = json_schema.Load(referenced_schema_path)
+
+ for namespace in referenced_api_defs:
+ api_model.AddNamespace(namespace,
+ os.path.relpath(referenced_schema_path, opts.root))
# Gets the relative path from opts.root to the schema to correctly determine
# the include path.
« no previous file with comments | « chrome/test/data/extensions/extension_api_feature_unittest/test1.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698