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

Unified Diff: tools/json_schema_compiler/cpp_type_generator.py

Issue 9701105: Revert 127159 - Refactor extension_function_dispatcher to extract ExtensionFunctionRegistry. This a… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 | « tools/json_schema_compiler/compiler.py ('k') | tools/json_schema_compiler/cpp_util.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/cpp_type_generator.py
===================================================================
--- tools/json_schema_compiler/cpp_type_generator.py (revision 127187)
+++ tools/json_schema_compiler/cpp_type_generator.py (working copy)
@@ -11,17 +11,16 @@
"""Manages the types of properties and provides utilities for getting the
C++ type out of a model.Property
"""
- def __init__(self, root_namespace, namespace=None, cpp_namespace=None):
+ def __init__(self, root_namespace, namespace, cpp_namespace):
"""Creates a cpp_type_generator. The given root_namespace should be of the
format extensions::api::sub. The generator will generate code suitable for
use in the given namespace.
"""
self._type_namespaces = {}
+ self._namespace = namespace
self._root_namespace = root_namespace.split('::')
self._cpp_namespaces = {}
- if namespace and cpp_namespace:
- self._namespace = namespace
- self.AddNamespace(namespace, cpp_namespace)
+ self.AddNamespace(namespace, cpp_namespace)
def AddNamespace(self, namespace, cpp_namespace):
"""Maps a model.Namespace to its C++ namespace name. All mappings are
« no previous file with comments | « tools/json_schema_compiler/compiler.py ('k') | tools/json_schema_compiler/cpp_util.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698