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

Unified Diff: tools/json_schema_compiler/schema_util.py

Issue 10639020: Switch the downloads API over to IDL/json_schema_compiler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 8 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 | « tools/json_schema_compiler/model.py ('k') | tools/json_schema_compiler/test/idl_basics.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/schema_util.py
diff --git a/tools/json_schema_compiler/schema_util.py b/tools/json_schema_compiler/schema_util.py
index 289d24df7c43770a270895657996629d5d16c2e4..177e77f9b1ba5ec847f559df1546daa10a17465f 100644
--- a/tools/json_schema_compiler/schema_util.py
+++ b/tools/json_schema_compiler/schema_util.py
@@ -4,6 +4,10 @@
"""Utilies for the processing of schema python structures.
"""
+def GetNamespace(ref_type):
+ if '.' in ref_type:
+ return ref_type[:ref_type.rindex('.')]
+
def StripSchemaNamespace(s):
last_dot = s.rfind('.')
if not last_dot == -1:
« no previous file with comments | « tools/json_schema_compiler/model.py ('k') | tools/json_schema_compiler/test/idl_basics.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698