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

Issue 276603003: Support converting referenced enum array into string. (Closed)

Created:
6 years, 7 months ago by wjywbs
Modified:
6 years, 7 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Support converting referenced enum array into string. This patch in JSON Schema Compiler first generates a vector with strings of the enum array using the correct ToString() function of both inline and referenced enums. Then the result is created from the vector of strings. R=kalman@chromium.org BUG=371808, 368368 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=271244

Patch Set 1 #

Total comments: 2

Patch Set 2 : do not use scoped_ptr for optional enum #

Total comments: 3

Patch Set 3 : #

Total comments: 13

Patch Set 4 : #

Total comments: 8

Patch Set 5 : #

Patch Set 6 : #

Total comments: 1

Patch Set 7 : fix win compile error #

Unified diffs Side-by-side diffs Delta from patch set Stats (+193 lines, -59 lines) Patch
M tools/json_schema_compiler/cc_generator.py View 1 2 3 4 5 6 7 chunks +65 lines, -21 lines 0 comments Download
M tools/json_schema_compiler/test/arrays.json View 1 chunk +42 lines, -0 lines 0 comments Download
M tools/json_schema_compiler/test/arrays_unittest.cc View 1 2 3 4 2 chunks +82 lines, -0 lines 0 comments Download
M tools/json_schema_compiler/util.h View 1 chunk +0 lines, -18 lines 0 comments Download
M tools/json_schema_compiler/util_cc_helper.py View 2 chunks +4 lines, -20 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
wjywbs
Please take a look. This supports arrays with referencd enums in both current and external ...
6 years, 7 months ago (2014-05-09 14:13:20 UTC) #1
not at google - send to devlin
started looking at this but it's too much for me today. i'll have a look ...
6 years, 7 months ago (2014-05-12 21:46:13 UTC) #2
wjywbs
I fixed the code style. PTAL, thanks. https://codereview.chromium.org/276603003/diff/20001/tools/json_schema_compiler/cc_generator.py File tools/json_schema_compiler/cc_generator.py (right): https://codereview.chromium.org/276603003/diff/20001/tools/json_schema_compiler/cc_generator.py#newcode370 tools/json_schema_compiler/cc_generator.py:370: 'value->SetWithoutPathExpansion("' + ...
6 years, 7 months ago (2014-05-13 03:32:53 UTC) #3
not at google - send to devlin
https://codereview.chromium.org/276603003/diff/40001/tools/json_schema_compiler/cc_generator.py File tools/json_schema_compiler/cc_generator.py (right): https://codereview.chromium.org/276603003/diff/40001/tools/json_schema_compiler/cc_generator.py#newcode490 tools/json_schema_compiler/cc_generator.py:490: underlying_item_type = self._type_helper.FollowRef( just |item_type| will be fine. https://codereview.chromium.org/276603003/diff/40001/tools/json_schema_compiler/cc_generator.py#newcode496 ...
6 years, 7 months ago (2014-05-14 22:52:44 UTC) #4
wjywbs
I updated the code and test. PTAL. Thanks. https://codereview.chromium.org/276603003/diff/40001/tools/json_schema_compiler/cc_generator.py File tools/json_schema_compiler/cc_generator.py (right): https://codereview.chromium.org/276603003/diff/40001/tools/json_schema_compiler/cc_generator.py#newcode502 tools/json_schema_compiler/cc_generator.py:502: enum_list_var ...
6 years, 7 months ago (2014-05-16 00:47:37 UTC) #5
not at google - send to devlin
https://codereview.chromium.org/276603003/diff/40001/tools/json_schema_compiler/cc_generator.py File tools/json_schema_compiler/cc_generator.py (right): https://codereview.chromium.org/276603003/diff/40001/tools/json_schema_compiler/cc_generator.py#newcode502 tools/json_schema_compiler/cc_generator.py:502: enum_list_var = '%s_list' % prop_name On 2014/05/16 00:47:37, wjywbs ...
6 years, 7 months ago (2014-05-16 17:13:47 UTC) #6
not at google - send to devlin
lgtm https://codereview.chromium.org/276603003/diff/40001/tools/json_schema_compiler/cc_generator.py File tools/json_schema_compiler/cc_generator.py (right): https://codereview.chromium.org/276603003/diff/40001/tools/json_schema_compiler/cc_generator.py#newcode502 tools/json_schema_compiler/cc_generator.py:502: enum_list_var = '%s_list' % prop_name On 2014/05/16 17:13:47, ...
6 years, 7 months ago (2014-05-16 17:36:33 UTC) #7
wjywbs
PTAL, thanks. https://codereview.chromium.org/276603003/diff/40001/tools/json_schema_compiler/cc_generator.py File tools/json_schema_compiler/cc_generator.py (right): https://codereview.chromium.org/276603003/diff/40001/tools/json_schema_compiler/cc_generator.py#newcode502 tools/json_schema_compiler/cc_generator.py:502: enum_list_var = '%s_list' % prop_name On 2014/05/16 ...
6 years, 7 months ago (2014-05-16 19:12:23 UTC) #8
not at google - send to devlin
lgtm
6 years, 7 months ago (2014-05-16 19:51:47 UTC) #9
wjywbs
The CQ bit was checked by wjywbs@gmail.com
6 years, 7 months ago (2014-05-16 19:52:53 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wjywbs@gmail.com/276603003/100001
6 years, 7 months ago (2014-05-16 19:53:33 UTC) #11
wjywbs
The CQ bit was unchecked by wjywbs@gmail.com
6 years, 7 months ago (2014-05-16 20:52:12 UTC) #12
wjywbs
I removed the unused "typename" in the for loop to fix win compile errors, and ...
6 years, 7 months ago (2014-05-16 21:01:23 UTC) #13
not at google - send to devlin
lgtm
6 years, 7 months ago (2014-05-16 21:02:10 UTC) #14
wjywbs
The CQ bit was checked by wjywbs@gmail.com
6 years, 7 months ago (2014-05-16 21:03:03 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wjywbs@gmail.com/276603003/120001
6 years, 7 months ago (2014-05-16 21:03:34 UTC) #16
commit-bot: I haz the power
6 years, 7 months ago (2014-05-17 17:32:10 UTC) #17
Message was sent while issue was closed.
Change committed as 271244

Powered by Google App Engine
This is Rietveld 408576698