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

Side by Side Diff: tools/json_schema_compiler/h_generator.py

Issue 1854993002: [Extensions] Remove linked_ptr entirely from extensions generated code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « tools/json_schema_compiler/cpp_type_generator.py ('k') | tools/json_schema_compiler/util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os 5 import os
6 6
7 from code import Code 7 from code import Code
8 from model import PropertyType 8 from model import PropertyType
9 import cpp_util 9 import cpp_util
10 import schema_util 10 import schema_util
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 (c.Append('#ifndef %s' % ifndef_name) 50 (c.Append('#ifndef %s' % ifndef_name)
51 .Append('#define %s' % ifndef_name) 51 .Append('#define %s' % ifndef_name)
52 .Append() 52 .Append()
53 .Append('#include <stdint.h>') 53 .Append('#include <stdint.h>')
54 .Append() 54 .Append()
55 .Append('#include <map>') 55 .Append('#include <map>')
56 .Append('#include <string>') 56 .Append('#include <string>')
57 .Append('#include <vector>') 57 .Append('#include <vector>')
58 .Append() 58 .Append()
59 .Append('#include "base/logging.h"') 59 .Append('#include "base/logging.h"')
60 .Append('#include "base/memory/linked_ptr.h"')
61 .Append('#include "base/memory/scoped_ptr.h"') 60 .Append('#include "base/memory/scoped_ptr.h"')
62 .Append('#include "base/values.h"') 61 .Append('#include "base/values.h"')
63 .Cblock(self._type_helper.GenerateIncludes(include_soft=include_soft)) 62 .Cblock(self._type_helper.GenerateIncludes(include_soft=include_soft))
64 .Append() 63 .Append()
65 ) 64 )
66 65
67 # Hack: we're not generating soft includes for tabs and windows, so we need 66 # Hack: we're not generating soft includes for tabs and windows, so we need
68 # to generate forward declarations for them. 67 # to generate forward declarations for them.
69 if not include_soft: 68 if not include_soft:
70 c.Cblock(self._type_helper.GenerateForwardDeclarations()) 69 c.Cblock(self._type_helper.GenerateForwardDeclarations())
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 """Builds the parameter list for a function, given an array of parameters. 396 """Builds the parameter list for a function, given an array of parameters.
398 """ 397 """
399 # |error| is populated with warnings and/or errors found during parsing. 398 # |error| is populated with warnings and/or errors found during parsing.
400 # |error| being set does not necessarily imply failure and may be 399 # |error| being set does not necessarily imply failure and may be
401 # recoverable. 400 # recoverable.
402 # For example, optional properties may have failed to parse, but the 401 # For example, optional properties may have failed to parse, but the
403 # parser was able to continue. 402 # parser was able to continue.
404 if self._generate_error_messages: 403 if self._generate_error_messages:
405 params += ('base::string16* error',) 404 params += ('base::string16* error',)
406 return ', '.join(str(p) for p in params) 405 return ', '.join(str(p) for p in params)
OLDNEW
« no previous file with comments | « tools/json_schema_compiler/cpp_type_generator.py ('k') | tools/json_schema_compiler/util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698