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

Issue 10022005: Let json schema compiler handle using arrays as types (Closed)

Created:
8 years, 8 months ago by cduvall
Modified:
8 years, 8 months ago
CC:
chromium-reviews, Aaron Boodman, pam+watch_chromium.org, mihaip+watch_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Allow json schema compiler to use arrays as types Right now the json schema compiler can only handle objects as types. This allows the schema compiler to use arrays as types. For an example look at browserAction. BUG=122075 TEST=cpp_type_generator_test.py Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=131927

Patch Set 1 #

Total comments: 15

Patch Set 2 : $refs are now resolved at use time #

Patch Set 3 : Small style changes #

Total comments: 8

Patch Set 4 : Cleaned up code #

Total comments: 2

Patch Set 5 : Minor style changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+81 lines, -28 lines) Patch
M chrome/common/extensions/api/api.gyp View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/extensions/api/browserAction.json View 1 chunk +0 lines, -1 line 0 comments Download
M tools/json_schema_compiler/cc_generator.py View 1 2 3 4 7 chunks +25 lines, -9 lines 0 comments Download
M tools/json_schema_compiler/cpp_type_generator.py View 1 2 3 4 3 chunks +17 lines, -5 lines 0 comments Download
M tools/json_schema_compiler/cpp_type_generator_test.py View 1 2 chunks +11 lines, -0 lines 0 comments Download
M tools/json_schema_compiler/cpp_util.py View 1 2 chunks +2 lines, -3 lines 0 comments Download
M tools/json_schema_compiler/h_generator.py View 1 1 chunk +7 lines, -0 lines 0 comments Download
M tools/json_schema_compiler/model.py View 1 2 1 chunk +14 lines, -5 lines 0 comments Download
A + tools/json_schema_compiler/test/browserAction.json View 1 chunk +0 lines, -1 line 0 comments Download
M tools/json_schema_compiler/util_cc_helper.py View 1 3 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
cduvall
Turned out to be not quite as bad as I thought. Just had to pass ...
8 years, 8 months ago (2012-04-07 00:39:23 UTC) #1
Aaron Boodman
redirecting to yoz
8 years, 8 months ago (2012-04-09 18:28:25 UTC) #2
Yoyo Zhou
http://codereview.chromium.org/10022005/diff/1/tools/json_schema_compiler/cc_generator.py File tools/json_schema_compiler/cc_generator.py (right): http://codereview.chromium.org/10022005/diff/1/tools/json_schema_compiler/cc_generator.py#newcode324 tools/json_schema_compiler/cc_generator.py:324: if prop.type_ == PropertyType.OBJECT or \ style nits: extra ...
8 years, 8 months ago (2012-04-09 23:48:46 UTC) #3
cduvall
http://codereview.chromium.org/10022005/diff/1/tools/json_schema_compiler/cc_generator.py File tools/json_schema_compiler/cc_generator.py (right): http://codereview.chromium.org/10022005/diff/1/tools/json_schema_compiler/cc_generator.py#newcode324 tools/json_schema_compiler/cc_generator.py:324: if prop.type_ == PropertyType.OBJECT or \ On 2012/04/09 23:48:47, ...
8 years, 8 months ago (2012-04-10 03:06:08 UTC) #4
Yoyo Zhou
Yes, this definitely looks better. https://chromiumcodereview.appspot.com/10022005/diff/1/tools/json_schema_compiler/cpp_type_generator_test.py File tools/json_schema_compiler/cpp_type_generator_test.py (right): https://chromiumcodereview.appspot.com/10022005/diff/1/tools/json_schema_compiler/cpp_type_generator_test.py#newcode96 tools/json_schema_compiler/cpp_type_generator_test.py:96: def testGetTypeArray(self): On 2012/04/10 ...
8 years, 8 months ago (2012-04-10 19:26:48 UTC) #5
cduvall
http://codereview.chromium.org/10022005/diff/9001/tools/json_schema_compiler/cc_generator.py File tools/json_schema_compiler/cc_generator.py (right): http://codereview.chromium.org/10022005/diff/9001/tools/json_schema_compiler/cc_generator.py#newcode633 tools/json_schema_compiler/cc_generator.py:633: def _GetRef(self, prop): On 2012/04/10 19:26:48, Yoyo Zhou wrote: ...
8 years, 8 months ago (2012-04-12 00:41:23 UTC) #6
Yoyo Zhou
LGTM, with a few cleanup comments. http://codereview.chromium.org/10022005/diff/12002/tools/json_schema_compiler/cc_generator.py File tools/json_schema_compiler/cc_generator.py (right): http://codereview.chromium.org/10022005/diff/12002/tools/json_schema_compiler/cc_generator.py#newcode16 tools/json_schema_compiler/cc_generator.py:16: def __init__(self, namespace, ...
8 years, 8 months ago (2012-04-12 00:54:57 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cduvall@chromium.org/10022005/12005
8 years, 8 months ago (2012-04-12 01:12:17 UTC) #8
commit-bot: I haz the power
8 years, 8 months ago (2012-04-12 04:30:25 UTC) #9
Change committed as 131927

Powered by Google App Engine
This is Rietveld 408576698