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

Issue 9309044: Supporting more APIs with json_schema_compiler (Closed)

Created:
8 years, 10 months ago by calamity
Modified:
8 years, 10 months ago
CC:
chromium-reviews, Aaron Boodman, pam+watch_chromium.org, mihaip+watch_chromium.org, battre, koz (OOO until 15th September), benwells
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Adds support for the "choices" and "any" types to json_schema_compiler, as well as miscellaneous improvements to get at least 3 more schema files compiling: windows, tabs, and the in-progress experimental.declarative. For description of the generator, see http://codereview.chromium.org/9114036/ BUG= TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=122082

Patch Set 1 #

Patch Set 2 : DictionaryValue* to linked_ptr<DictionaryValue> #

Total comments: 6

Patch Set 3 : fixed optional properties #

Total comments: 94

Patch Set 4 : a few comments, fixes #

Total comments: 16

Patch Set 5 : rework #

Total comments: 20

Patch Set 6 : support for choices #

Total comments: 52

Patch Set 7 : more rework #

Total comments: 41

Patch Set 8 : rework, updated base #

Total comments: 30

Patch Set 9 : rework #

Patch Set 10 : remove generated files, move gypi into api.gyp to make windows happy #

Patch Set 11 : fix win build for real this time? #

Patch Set 12 : rework, add a couple of tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5940 lines, -260 lines) Patch
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +5 lines, -0 lines 0 comments Download
A generated_files_will_not_submit/array.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +118 lines, -0 lines 0 comments Download
A generated_files_will_not_submit/array.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +201 lines, -0 lines 0 comments Download
A generated_files_will_not_submit/choices.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +160 lines, -0 lines 0 comments Download
A generated_files_will_not_submit/choices.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +229 lines, -0 lines 0 comments Download
A generated_files_will_not_submit/crossref.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +72 lines, -0 lines 0 comments Download
A generated_files_will_not_submit/crossref.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +64 lines, -0 lines 0 comments Download
A generated_files_will_not_submit/experimental.declarative.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +145 lines, -0 lines 0 comments Download
A generated_files_will_not_submit/experimental.declarative.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +228 lines, -0 lines 0 comments Download
A generated_files_will_not_submit/permissions.h View 1 2 3 4 5 6 7 10 11 1 chunk +132 lines, -0 lines 0 comments Download
A generated_files_will_not_submit/permissions.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +174 lines, -0 lines 0 comments Download
A generated_files_will_not_submit/simple_api.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +125 lines, -0 lines 0 comments Download
A generated_files_will_not_submit/simple_api.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +157 lines, -0 lines 0 comments Download
A generated_files_will_not_submit/tabs.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +706 lines, -0 lines 0 comments Download
A generated_files_will_not_submit/tabs.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1258 lines, -0 lines 0 comments Download
A generated_files_will_not_submit/windows.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +396 lines, -0 lines 0 comments Download
A generated_files_will_not_submit/windows.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +709 lines, -0 lines 0 comments Download
M tools/json_schema_compiler/cc_generator.py View 1 2 3 4 5 6 7 8 9 10 11 9 chunks +156 lines, -187 lines 0 comments Download
M tools/json_schema_compiler/compiler.py View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +5 lines, -8 lines 0 comments Download
M tools/json_schema_compiler/cpp_type_generator.py View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download
M tools/json_schema_compiler/cpp_util.py View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +29 lines, -50 lines 0 comments Download
M tools/json_schema_compiler/h_generator.py View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +5 lines, -4 lines 0 comments Download
M tools/json_schema_compiler/model.py View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +15 lines, -5 lines 0 comments Download
A tools/json_schema_compiler/test/array.json View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +120 lines, -0 lines 0 comments Download
A tools/json_schema_compiler/test/array_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +143 lines, -0 lines 0 comments Download
A tools/json_schema_compiler/test/choices.json View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +102 lines, -0 lines 0 comments Download
A tools/json_schema_compiler/test/choices_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +135 lines, -0 lines 0 comments Download
A tools/json_schema_compiler/test/crossref.json View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +43 lines, -0 lines 0 comments Download
A tools/json_schema_compiler/test/crossref_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +55 lines, -0 lines 0 comments Download
A tools/json_schema_compiler/test/json_schema_compiler_tests.gyp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +27 lines, -0 lines 0 comments Download
A tools/json_schema_compiler/test/simple_api.json View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +106 lines, -0 lines 0 comments Download
A tools/json_schema_compiler/test/simple_api_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +111 lines, -0 lines 0 comments Download
M tools/json_schema_compiler/util_cc_helper.py View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +6 lines, -6 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
not at google - send to devlin
Only started looking at this, but noticed that. I'll keep looking at it now, but ...
8 years, 10 months ago (2012-02-02 03:37:43 UTC) #1
calamity
http://codereview.chromium.org/9309044/diff/2001/generated_files_will_not_submit/experimental.declarative.cc File generated_files_will_not_submit/experimental.declarative.cc (right): http://codereview.chromium.org/9309044/diff/2001/generated_files_will_not_submit/experimental.declarative.cc#newcode30 generated_files_will_not_submit/experimental.declarative.cc:30: dict->GetInteger("priority", out->priority.get()); On 2012/02/02 03:37:43, kalman wrote: > I ...
8 years, 10 months ago (2012-02-03 02:42:35 UTC) #2
not at google - send to devlin
Awesome. I haven't really gone through the real gritty code generation stuff in the cc/h/cpp.py ...
8 years, 10 months ago (2012-02-05 23:42:12 UTC) #3
not at google - send to devlin
a couple of other comments. I'll hold off having another look until you've gone through ...
8 years, 10 months ago (2012-02-06 04:19:17 UTC) #4
calamity
http://codereview.chromium.org/9309044/diff/5001/chrome/common/extensions/api/cookies.json File chrome/common/extensions/api/cookies.json (right): http://codereview.chromium.org/9309044/diff/5001/chrome/common/extensions/api/cookies.json#newcode4 chrome/common/extensions/api/cookies.json:4: "compile": true, On 2012/02/05 23:42:12, kalman wrote: > better ...
8 years, 10 months ago (2012-02-06 11:51:18 UTC) #5
not at google - send to devlin
Looking really nice, adding back the CC list (plus koz/benwells) and reviewers (aa/yoz). Hi guys. ...
8 years, 10 months ago (2012-02-06 13:14:47 UTC) #6
not at google - send to devlin
http://codereview.chromium.org/9309044/diff/2003/tools/json_schema_compiler/model.py File tools/json_schema_compiler/model.py (right): http://codereview.chromium.org/9309044/diff/2003/tools/json_schema_compiler/model.py#newcode205 tools/json_schema_compiler/model.py:205: def _Choice(name, json): > - If a Property is ...
8 years, 10 months ago (2012-02-06 13:25:34 UTC) #7
calamity
Started supporting 'choices' and did some rework. Forgot to do line wrapping style fixes. Will ...
8 years, 10 months ago (2012-02-08 00:52:31 UTC) #8
not at google - send to devlin
Looking forward to that Choices stuff as discussed :) http://codereview.chromium.org/9309044/diff/10001/generated_files_will_not_submit/tabs.h File generated_files_will_not_submit/tabs.h (right): http://codereview.chromium.org/9309044/diff/10001/generated_files_will_not_submit/tabs.h#newcode48 generated_files_will_not_submit/tabs.h:48: ...
8 years, 10 months ago (2012-02-08 05:02:07 UTC) #9
calamity
Refactored choices and other small fixes. http://codereview.chromium.org/9309044/diff/10001/generated_files_will_not_submit/tabs.h File generated_files_will_not_submit/tabs.h (right): http://codereview.chromium.org/9309044/diff/10001/generated_files_will_not_submit/tabs.h#newcode48 generated_files_will_not_submit/tabs.h:48: // The ID ...
8 years, 10 months ago (2012-02-08 07:01:17 UTC) #10
battre
Hi. I had a look at the generated stuff and added some comments. This is ...
8 years, 10 months ago (2012-02-08 09:15:19 UTC) #11
Yoyo Zhou
I have a few comments (on older drafts) that I wanted to send out before ...
8 years, 10 months ago (2012-02-08 19:04:12 UTC) #12
calamity
Pulled from master so now I'm working against Dominic's actual code. http://codereview.chromium.org/9309044/diff/2003/tools/json_schema_compiler/cpp_type_generator.py File tools/json_schema_compiler/cpp_type_generator.py (right): ...
8 years, 10 months ago (2012-02-09 00:56:52 UTC) #13
not at google - send to devlin
I'm losing track of this patch a bit due to the number of changes that ...
8 years, 10 months ago (2012-02-09 02:49:36 UTC) #14
battre
http://codereview.chromium.org/9309044/diff/16005/generated_files_will_not_submit/experimental.declarative.h File generated_files_will_not_submit/experimental.declarative.h (right): http://codereview.chromium.org/9309044/diff/16005/generated_files_will_not_submit/experimental.declarative.h#newcode10 generated_files_will_not_submit/experimental.declarative.h:10: #define CHROME_COMMON_EXTENSIONS_API_EXPERIMENTAL_DECLARATIVE_H__ On 2012/02/09 00:56:52, calamity wrote: > On ...
8 years, 10 months ago (2012-02-09 09:00:47 UTC) #15
Yoyo Zhou
Looks pretty good for the most part. http://codereview.chromium.org/9309044/diff/16005/tools/json_schema_compiler/cc_generator.py File tools/json_schema_compiler/cc_generator.py (right): http://codereview.chromium.org/9309044/diff/16005/tools/json_schema_compiler/cc_generator.py#newcode281 tools/json_schema_compiler/cc_generator.py:281: # optional ...
8 years, 10 months ago (2012-02-10 01:49:33 UTC) #16
calamity
http://codereview.chromium.org/9309044/diff/16005/tools/json_schema_compiler/cc_generator.py File tools/json_schema_compiler/cc_generator.py (right): http://codereview.chromium.org/9309044/diff/16005/tools/json_schema_compiler/cc_generator.py#newcode123 tools/json_schema_compiler/cc_generator.py:123: self._util_cc_helper.GetArray(prop, src, prop.name, dst_member)) On 2012/02/09 02:49:36, kalman wrote: ...
8 years, 10 months ago (2012-02-10 03:52:50 UTC) #17
Yoyo Zhou
LGTM http://codereview.chromium.org/9309044/diff/22001/tools/json_schema_compiler/cc_generator.py File tools/json_schema_compiler/cc_generator.py (right): http://codereview.chromium.org/9309044/diff/22001/tools/json_schema_compiler/cc_generator.py#newcode292 tools/json_schema_compiler/cc_generator.py:292: .Append(return_line) On 2012/02/10 03:52:50, calamity wrote: > On ...
8 years, 10 months ago (2012-02-10 19:43:21 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/calamity@chromium.org/9309044/34001
8 years, 10 months ago (2012-02-15 03:58:35 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/calamity@chromium.org/9309044/42001
8 years, 10 months ago (2012-02-15 11:11:54 UTC) #20
commit-bot: I haz the power
8 years, 10 months ago (2012-02-15 14:52:36 UTC) #21
Change committed as 122082

Powered by Google App Engine
This is Rietveld 408576698