| OLD | NEW |
| 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 _API_UTIL_NAMESPACE = 'json_schema_compiler::util' | 5 _API_UTIL_NAMESPACE = 'json_schema_compiler::util' |
| 6 | 6 |
| 7 | 7 |
| 8 class UtilCCHelper(object): | 8 class UtilCCHelper(object): |
| 9 """A util class that generates code that uses | 9 """A util class that generates code that uses |
| 10 tools/json_schema_compiler/util.cc. | 10 tools/json_schema_compiler/util.cc. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 name = 'CreateValueFromArray' | 32 name = 'CreateValueFromArray' |
| 33 return '%s::%s(%s)' % (_API_UTIL_NAMESPACE, name, src) | 33 return '%s::%s(%s)' % (_API_UTIL_NAMESPACE, name, src) |
| 34 | 34 |
| 35 def GetIncludePath(self): | 35 def GetIncludePath(self): |
| 36 return '#include "tools/json_schema_compiler/util.h"' | 36 return '#include "tools/json_schema_compiler/util.h"' |
| 37 | 37 |
| 38 def GetValueTypeString(self, value, is_ptr=False): | 38 def GetValueTypeString(self, value, is_ptr=False): |
| 39 call = '.GetType()' | 39 call = '.GetType()' |
| 40 if is_ptr: | 40 if is_ptr: |
| 41 call = '->GetType()' | 41 call = '->GetType()' |
| 42 return 'json_schema_compiler::util::ValueTypeToString(%s%s)' % (value, call) | 42 return 'std::string(base::Value::GetTypeName(%s%s))' % (value, call) |
| OLD | NEW |