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

Unified Diff: tools/json_schema_compiler/cpp_type_generator.py

Issue 10796114: Added ToJson to JSON schema compiler. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed scope Created 8 years, 5 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/cc_generator.py ('k') | tools/json_schema_compiler/cpp_type_generator_test.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
diff --git a/tools/json_schema_compiler/cpp_type_generator.py b/tools/json_schema_compiler/cpp_type_generator.py
index 0ccda1afe497bbd41ab088f94d1f599c86d31280..a305b7525bd5091563b1c29daca48bbbc1d4665a 100644
--- a/tools/json_schema_compiler/cpp_type_generator.py
+++ b/tools/json_schema_compiler/cpp_type_generator.py
@@ -222,6 +222,8 @@ class CppTypeGenerator(object):
self._cpp_namespaces[dependency])
for dependency in self._NamespaceTypeDependencies().keys()]):
c.Append('#include "%s"' % header)
+ if self._namespace.events:
+ c.Append('#include "base/json/json_writer.h"')
return c
def _ResolveTypeNamespace(self, ref_type):
« no previous file with comments | « tools/json_schema_compiler/cc_generator.py ('k') | tools/json_schema_compiler/cpp_type_generator_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698