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

Unified Diff: tools/json_schema_compiler/cc_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
« no previous file with comments | « no previous file | tools/json_schema_compiler/cpp_type_generator.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/cc_generator.py
diff --git a/tools/json_schema_compiler/cc_generator.py b/tools/json_schema_compiler/cc_generator.py
index f01479a2f612bb6c41b48a785a9de8898224ced0..f5452d727803a4dc3163c65f7082a3795f568012 100644
--- a/tools/json_schema_compiler/cc_generator.py
+++ b/tools/json_schema_compiler/cc_generator.py
@@ -749,11 +749,11 @@ class CCGenerator(object):
'%s_%s' % (classname.upper(), enum_value.upper()),
'scoped_ptr<base::Value>(base::Value::CreateStringValue("%s"))' %
enum_value))
- (c.Eblock('}')
- .Append('NOTREACHED();')
- .Append('return scoped_ptr<base::Value>();')
- .Eblock('}')
- )
+ (c.Append('default:')
+ .Append(' NOTREACHED();')
not at google - send to devlin 2012/09/11 23:07:43 is this necessary?
cduvall 2012/09/11 23:10:38 I just had it because that's what used to be there
not at google - send to devlin 2012/09/11 23:14:09 Used to be there when?
cduvall 2012/09/11 23:18:28 Were you talking about the NOTREACHED or the defau
not at google - send to devlin 2012/09/11 23:19:52 Yeah, the thing abou the default case vs the fall-
+ .Eblock('}')
+ .Append('return scoped_ptr<base::Value>();')
+ .Eblock('}'))
return c
# TODO(chebert): This is basically the same as GenerateCreateEnumTypeValue().
« no previous file with comments | « no previous file | tools/json_schema_compiler/cpp_type_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698