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

Unified Diff: tools/json_schema_compiler/h_generator.py

Issue 9716003: Extract ExtensionFunctionRegistry from ExtensionFunctionDispatcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits; fix Windows build (thanks Brad Nelson!). 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
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 3c97bc62ef68688162ec1756a4b0bed3a6969471..dfc99cbea489a9f0d4f26938a8231fe60685f783 100644
--- a/tools/json_schema_compiler/h_generator.py
+++ b/tools/json_schema_compiler/h_generator.py
@@ -27,7 +27,8 @@ class HGenerator(object):
.Append()
)
- ifndef_name = self._GenerateIfndefName()
+ ifndef_name = cpp_util.GenerateIfndefName(self._namespace.source_file_dir,
+ self._target_namespace)
(c.Append('#ifndef %s' % ifndef_name)
.Append('#define %s' % ifndef_name)
.Append('#pragma once')
@@ -263,13 +264,3 @@ class HGenerator(object):
c.Eblock('};')
return c
-
- def _GenerateIfndefName(self):
- """Formats a path and filename as a #define name.
-
- e.g chrome/extensions/gen, file.h becomes CHROME_EXTENSIONS_GEN_FILE_H__.
- """
- return (('%s_%s_H__' %
- (self._namespace.source_file_dir, self._target_namespace))
- .upper().replace(os.sep, '_'))
-
« no previous file with comments | « tools/json_schema_compiler/h_bundle_generator.py ('k') | tools/json_schema_compiler/test/json_schema_compiler_tests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698