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

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

Issue 2149253003: Switch various ValueTypeToString()s to base::Value::GetTypeName(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@value
Patch Set: rebase Created 4 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 unified diff | Download patch
« no previous file with comments | « tools/json_schema_compiler/util.cc ('k') | no next file » | 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 _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
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)
OLDNEW
« no previous file with comments | « tools/json_schema_compiler/util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698