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

Unified Diff: tools/json_schema_compiler/cpp_util.py

Issue 2539363004: Make base::Value::TYPE a scoped enum. (Closed)
Patch Set: Rebase Created 4 years 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/test/idl_schemas_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/cpp_util.py
diff --git a/tools/json_schema_compiler/cpp_util.py b/tools/json_schema_compiler/cpp_util.py
index c5350212e24c79011844c43b338c96ee52492e5d..881a6c7308dc7b3727a60f9874062b4c0b2a25d6 100644
--- a/tools/json_schema_compiler/cpp_util.py
+++ b/tools/json_schema_compiler/cpp_util.py
@@ -60,16 +60,16 @@ def GetValueType(type_):
"""Returns the Value::Type corresponding to the model.Type.
"""
return {
- PropertyType.ARRAY: 'base::Value::TYPE_LIST',
- PropertyType.BINARY: 'base::Value::TYPE_BINARY',
- PropertyType.BOOLEAN: 'base::Value::TYPE_BOOLEAN',
+ PropertyType.ARRAY: 'base::Value::Type::LIST',
+ PropertyType.BINARY: 'base::Value::Type::BINARY',
+ PropertyType.BOOLEAN: 'base::Value::Type::BOOLEAN',
# PropertyType.CHOICES can be any combination of types.
- PropertyType.DOUBLE: 'base::Value::TYPE_DOUBLE',
- PropertyType.ENUM: 'base::Value::TYPE_STRING',
- PropertyType.FUNCTION: 'base::Value::TYPE_DICTIONARY',
- PropertyType.INTEGER: 'base::Value::TYPE_INTEGER',
- PropertyType.OBJECT: 'base::Value::TYPE_DICTIONARY',
- PropertyType.STRING: 'base::Value::TYPE_STRING',
+ PropertyType.DOUBLE: 'base::Value::Type::DOUBLE',
+ PropertyType.ENUM: 'base::Value::Type::STRING',
+ PropertyType.FUNCTION: 'base::Value::Type::DICTIONARY',
+ PropertyType.INTEGER: 'base::Value::Type::INTEGER',
+ PropertyType.OBJECT: 'base::Value::Type::DICTIONARY',
+ PropertyType.STRING: 'base::Value::Type::STRING',
}[type_.property_type]
« no previous file with comments | « tools/json_schema_compiler/cc_generator.py ('k') | tools/json_schema_compiler/test/idl_schemas_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698