Chromium Code Reviews| 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 ba7c5ca133a27b4a4ebc5e87089b5a77071a143c..8aed0aa626a6d17f0d09b7ae64b5a551b853832f 100644 |
| --- a/tools/json_schema_compiler/h_generator.py |
| +++ b/tools/json_schema_compiler/h_generator.py |
| @@ -35,6 +35,7 @@ class HGenerator(object): |
| .Append('#include <vector>') |
| .Append() |
| .Append('#include "base/basictypes.h"') |
| + .Append('#include "base/json/json_writer.h"') |
|
not at google - send to devlin
2012/07/24 23:04:29
this should go in the cc file not the header file.
mitchellwrosen
2012/07/25 17:08:20
Done.
|
| .Append('#include "base/logging.h"') |
| .Append('#include "base/memory/linked_ptr.h"') |
| .Append('#include "base/memory/scoped_ptr.h"') |
| @@ -340,6 +341,8 @@ class HGenerator(object): |
| param, self._cpp_type_generator.GetType(param))) |
| c.Append('scoped_ptr<base::ListValue> Create(%s);' % |
| ', '.join(declaration_list)) |
| + c.Append('scoped_ptr<std::string> ToJson(%s);' % |
|
not at google - send to devlin
2012/07/24 23:04:29
ditto, only return std::string, and only generate
mitchellwrosen
2012/07/25 17:08:20
Done.
|
| + ', '.join(declaration_list)) |
| return c |
| def _GenerateFunctionResults(self, callback): |