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

Unified Diff: tools/json_schema_compiler/cc_generator.py

Issue 10381089: Revert 136296 - Make all extension api types fully qualified. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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
Index: tools/json_schema_compiler/cc_generator.py
===================================================================
--- tools/json_schema_compiler/cc_generator.py (revision 136322)
+++ tools/json_schema_compiler/cc_generator.py (working copy)
@@ -7,7 +7,6 @@
import any_helper
import cpp_util
import model
-import schema_util
import sys
import util_cc_helper
@@ -72,8 +71,8 @@
.Append()
)
for type_ in self._namespace.types.values():
- (c.Concat(self._GenerateType(
- schema_util.StripSchemaNamespace(type_.name), type_)).Append()
+ (c.Concat(self._GenerateType(type_.name, type_))
+ .Append()
)
if self._namespace.functions:
(c.Append('//')
@@ -96,7 +95,7 @@
def _GenerateType(self, cpp_namespace, type_):
"""Generates the function definitions for a type.
"""
- classname = cpp_util.Classname(schema_util.StripSchemaNamespace(type_.name))
+ classname = cpp_util.Classname(type_.name)
c = Code()
if type_.functions:
@@ -175,7 +174,7 @@
E.g for type "Foo", generates Foo::Populate()
"""
- classname = cpp_util.Classname(schema_util.StripSchemaNamespace(type_.name))
+ classname = cpp_util.Classname(type_.name)
c = Code()
(c.Append('// static')
.Sblock('bool %(namespace)s::Populate'

Powered by Google App Engine
This is Rietveld 408576698