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

Unified Diff: tools/json_schema_compiler/h_generator.py

Issue 10907151: Extensions Docs Server: Enum values do not show up if enum is a type (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: schema compiler enum fix Created 8 years, 3 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/h_generator.py
diff --git a/tools/json_schema_compiler/h_generator.py b/tools/json_schema_compiler/h_generator.py
index c1df7ba221f773bef0d80cd19a9138cd85d1f0ce..8e90ff994946616ff9355a8281cf5ec9338a4ca0 100644
--- a/tools/json_schema_compiler/h_generator.py
+++ b/tools/json_schema_compiler/h_generator.py
@@ -193,6 +193,7 @@ class HGenerator(object):
if type_.description:
c.Comment(type_.description)
c.Sblock('enum %(classname)s {')
+ c.Append('%s_NONE,' % classname.upper())
for value in type_.enum_values:
c.Append('%s_%s,' % (classname.upper(), value.upper()))
(c.Eblock('};')

Powered by Google App Engine
This is Rietveld 408576698