|
Overhaul JSON Schema Compiler to support a number of features required to
support the full range of JSON/IDL features, improve the interface of generated
code, and improve generated code formatting, notably:
* Make "choices" generate a struct containing each possible type, rather than
multiple fields with different names plus and enum. This makes it possible
to embed choices inside containers - notably within arrays (as in bug).
It also improves optional choices detection.
* Remove the Any C++ type generated by "any", and model it as a base::Value.
* Make "additionalProperties" generated a std::map with the actual types as
values, rather than just a DictionaryValue forcing callers to extract types.
* Fix enum naming, it was unnecessarily including the namespace as a prefix.
R=yoz@chromium.org
BUG= 162044
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=177361
Total comments: 55
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+1649 lines, -2176 lines) |
Patch |
|
M |
build/json_schema_compile.gypi
|
View
|
1
2
|
2 chunks |
+0 lines, -6 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/bookmarks/bookmarks_api.cc
|
View
|
1
2
|
2 chunks |
+3 lines, -4 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/content_settings/content_settings_api.cc
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/context_menus/context_menus_api.cc
|
View
|
1
2
|
4 chunks |
+32 lines, -41 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/declarative/declarative_rule.h
|
View
|
1
2
3
4
|
5 chunks |
+5 lines, -6 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/declarative/declarative_rule_unittest.cc
|
View
|
1
2
3
4
|
7 chunks |
+28 lines, -21 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/declarative_webrequest/webrequest_action_unittest.cc
|
View
|
1
2
3
4
|
2 chunks |
+43 lines, -5 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_unittest.cc
|
View
|
1
2
3
4
|
3 chunks |
+7 lines, -18 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry_unittest.cc
|
View
|
1
2
3
4
|
6 chunks |
+26 lines, -71 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/developer_private/developer_private_api.cc
|
View
|
1
2
|
1 chunk |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/media_galleries/media_galleries_api.cc
|
View
|
1
2
3
4
|
2 chunks |
+6 lines, -10 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/rtc_private/rtc_private_api.cc
|
View
|
1
2
3
|
1 chunk |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/socket/socket_api.cc
|
View
|
|
2 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer.cc
|
View
|
|
2 chunks |
+11 lines, -11 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/sync_file_system/sync_file_system_api.cc
|
View
|
|
1 chunk |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/system_info_storage/storage_info_provider_linux.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/system_info_storage/storage_info_provider_linux_unittest.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/system_info_storage/storage_info_provider_mac.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/system_info_storage/storage_info_provider_unittest.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/system_info_storage/storage_info_provider_win.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/system_info_storage/system_info_storage_apitest.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/tab_capture/tab_capture_api.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/tab_capture/tab_capture_registry.cc
|
View
|
|
2 chunks |
+9 lines, -10 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/usb/usb_api.cc
|
View
|
1
2
|
4 chunks |
+12 lines, -12 lines |
0 comments
|
Download
|
|
M |
chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
|
View
|
1
2
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
chrome/common/extensions/api/app.json
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
chrome/common/extensions/api/devtools/experimental_audits.json
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
chrome/common/extensions/api/runtime.json
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
chrome/common/extensions/api/sync_file_system.idl
|
View
|
|
2 chunks |
+11 lines, -11 lines |
0 comments
|
Download
|
|
M |
chrome/common/extensions/api/web_request_internal.json
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
chrome/common/extensions/docs/server2/api_data_source.py
|
View
|
1
2
|
4 chunks |
+41 lines, -32 lines |
0 comments
|
Download
|
|
M |
chrome/common/extensions/docs/server2/test_data/test_json/expected_test_file.json
|
View
|
1
2
|
1 chunk |
+132 lines, -147 lines |
0 comments
|
Download
|
|
D |
tools/json_schema_compiler/any.h
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -40 lines |
0 comments
|
Download
|
|
D |
tools/json_schema_compiler/any.cc
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -32 lines |
0 comments
|
Download
|
|
D |
tools/json_schema_compiler/any_helper.py
|
View
|
|
1 chunk |
+0 lines, -32 lines |
0 comments
|
Download
|
|
M |
tools/json_schema_compiler/api_gen_util.gyp
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
tools/json_schema_compiler/cc_generator.py
|
View
|
1
2
3
|
15 chunks |
+467 lines, -613 lines |
0 comments
|
Download
|
|
M |
tools/json_schema_compiler/code.py
|
View
|
1
2
|
1 chunk |
+7 lines, -0 lines |
0 comments
|
Download
|
|
M |
tools/json_schema_compiler/cpp_type_generator.py
|
View
|
1
2
3
|
9 chunks |
+104 lines, -169 lines |
0 comments
|
Download
|
|
M |
tools/json_schema_compiler/cpp_type_generator_test.py
|
View
|
1
2
3
|
3 chunks |
+30 lines, -104 lines |
0 comments
|
Download
|
|
M |
tools/json_schema_compiler/cpp_util.py
|
View
|
|
5 chunks |
+15 lines, -43 lines |
0 comments
|
Download
|
|
M |
tools/json_schema_compiler/h_generator.py
|
View
|
1
2
3
|
10 chunks |
+171 lines, -182 lines |
0 comments
|
Download
|
|
M |
tools/json_schema_compiler/idl_schema.py
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
tools/json_schema_compiler/idl_schema_test.py
|
View
|
|
4 chunks |
+14 lines, -14 lines |
0 comments
|
Download
|
|
M |
tools/json_schema_compiler/json_schema.py
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
tools/json_schema_compiler/model.py
|
View
|
1
2
|
7 chunks |
+224 lines, -240 lines |
0 comments
|
Download
|
|
M |
tools/json_schema_compiler/model_test.py
|
View
|
|
2 chunks |
+21 lines, -23 lines |
0 comments
|
Download
|
|
M |
tools/json_schema_compiler/preview.py
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
tools/json_schema_compiler/schema_util.py
|
View
|
|
1 chunk |
+0 lines, -26 lines |
0 comments
|
Download
|
|
M |
tools/json_schema_compiler/schema_util_test.py
|
View
|
|
2 chunks |
+0 lines, -54 lines |
0 comments
|
Download
|
|
M |
tools/json_schema_compiler/test/additional_properties.json
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
tools/json_schema_compiler/test/additional_properties_unittest.cc
|
View
|
1
|
3 chunks |
+13 lines, -19 lines |
0 comments
|
Download
|
|
M |
tools/json_schema_compiler/test/any_unittest.cc
|
View
|
|
3 chunks |
+7 lines, -9 lines |
0 comments
|
Download
|
|
M |
tools/json_schema_compiler/test/arrays.json
|
View
|
|
2 chunks |
+48 lines, -1 line |
0 comments
|
Download
|
|
M |
tools/json_schema_compiler/test/arrays_unittest.cc
|
View
|
|
4 chunks |
+20 lines, -23 lines |
0 comments
|
Download
|
|
M |
tools/json_schema_compiler/test/choices_unittest.cc
|
View
|
|
4 chunks |
+49 lines, -50 lines |
0 comments
|
Download
|
|
M |
tools/json_schema_compiler/test/enums.json
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
tools/json_schema_compiler/test/enums_unittest.cc
|
View
|
|
3 chunks |
+6 lines, -4 lines |
0 comments
|
Download
|
|
M |
tools/json_schema_compiler/test/functions_on_types_unittest.cc
|
View
|
1
|
4 chunks |
+13 lines, -13 lines |
0 comments
|
Download
|
|
M |
tools/json_schema_compiler/test/idl_schemas_unittest.cc
|
View
|
1
|
2 chunks |
+2 lines, -4 lines |
0 comments
|
Download
|
|
M |
tools/json_schema_compiler/test/objects_unittest.cc
|
View
|
|
1 chunk |
+0 lines, -5 lines |
0 comments
|
Download
|
|
M |
tools/json_schema_compiler/util.h
|
View
|
|
4 chunks |
+10 lines, -13 lines |
0 comments
|
Download
|
|
M |
tools/json_schema_compiler/util.cc
|
View
|
|
3 chunks |
+16 lines, -13 lines |
0 comments
|
Download
|
|
M |
tools/json_schema_compiler/util_cc_helper.py
|
View
|
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
Total messages: 10 (0 generated)
|