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

Unified Diff: tools/json_schema_compiler/schema_util.py

Issue 9617010: Move chrome.downloads out of experimental to dev (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 8 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 side-by-side diff with in-line comments
Download patch
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..a0a4d48bd9217d266bf1d40ff0e5b4997247b7ac 100644
--- a/tools/json_schema_compiler/schema_util.py
+++ b/tools/json_schema_compiler/schema_util.py
@@ -4,6 +4,13 @@
"""Utilies for the processing of schema python structures.
"""
+from model import PropertyType
+
+def IsLocalReference(prop, namespace):
+ return ((prop.type_ == PropertyType.REF) and
+ ((not '.' in prop.ref_type) or
+ prop.ref_type.startswith(namespace + '.')))
+
def StripSchemaNamespace(s):
last_dot = s.rfind('.')
if not last_dot == -1:

Powered by Google App Engine
This is Rietveld 408576698