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

Unified Diff: components/policy/tools/generate_policy_source.py

Issue 307993005: Enable the ManagedBookmarks policy on all platforms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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 | « components/policy/resources/policy_templates.json ('k') | components/policy_strings.grdp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/tools/generate_policy_source.py
diff --git a/components/policy/tools/generate_policy_source.py b/components/policy/tools/generate_policy_source.py
index 0be012abf272e7c6998a84d851e007416443d5ec..99b334251d6bb1cbd073e9e6b73e050b47f4c2f9 100755
--- a/components/policy/tools/generate_policy_source.py
+++ b/components/policy/tools/generate_policy_source.py
@@ -420,7 +420,8 @@ class SchemaNodesGenerator:
if schema['type'] == 'array':
# Special case for lists of strings, which is a common policy type.
- if schema['items']['type'] == 'string':
+ # The 'type' may be missing if the schema has a '$ref' attribute.
+ if schema['items'].get('type', '') == 'string':
return self.GetStringList()
return self.AppendSchema('TYPE_LIST',
self.GenerateAndCollectID(schema['items'], 'items of ' + name))
« no previous file with comments | « components/policy/resources/policy_templates.json ('k') | components/policy_strings.grdp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698