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

Issue 23594008: Initial code generation for features. (Closed)

Created:
7 years, 3 months ago by dhnishi (use Chromium)
Modified:
7 years, 1 month ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Patch Set 1 : . #

Total comments: 54

Patch Set 2 : Addressing #2 #

Total comments: 16

Patch Set 3 : Addressing comments. #

Total comments: 20

Patch Set 4 : Addressing #6. #

Total comments: 6

Patch Set 5 : Tests and namespaces. #

Total comments: 3

Patch Set 6 : Adding tests for real. #

Total comments: 13

Patch Set 7 : Generate the class name. #

Total comments: 2

Patch Set 8 : Remove leading '_' and spacing fix. #

Total comments: 2

Patch Set 9 : Addressing comment #20. #

Total comments: 1

Patch Set 10 : Removed underscore stripping. #

Patch Set 11 : Use newer SchemaLoader constructor. #

Patch Set 12 : GYP/GYPI removed. #

Patch Set 13 : Merged from Master. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+390 lines, -3 lines) Patch
M tools/json_schema_compiler/code.py View 1 1 chunk +1 line, -0 lines 0 comments Download
M tools/json_schema_compiler/cpp_util.py View 1 2 3 4 5 6 7 2 chunks +19 lines, -0 lines 0 comments Download
A tools/json_schema_compiler/features_cc_generator.py View 1 2 3 4 5 6 1 chunk +95 lines, -0 lines 0 comments Download
A tools/json_schema_compiler/features_compiler.py View 1 2 3 4 5 6 7 8 9 10 1 chunk +76 lines, -0 lines 0 comments Download
A tools/json_schema_compiler/features_h_generator.py View 1 2 3 4 5 6 1 chunk +95 lines, -0 lines 0 comments Download
M tools/json_schema_compiler/model.py View 1 2 3 4 5 6 7 8 9 10 11 12 16 chunks +57 lines, -0 lines 0 comments Download
M tools/json_schema_compiler/schema_loader.py View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -3 lines 0 comments Download
A tools/json_schema_compiler/test/features_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +22 lines, -0 lines 0 comments Download
A tools/json_schema_compiler/test/test_features.json View 1 2 3 4 5 6 1 chunk +25 lines, -0 lines 0 comments Download

Messages

Total messages: 41 (0 generated)
dhnishi (use Chromium)
First revision is ready to be torn into.
7 years, 3 months ago (2013-09-11 00:36:09 UTC) #1
not at google - send to devlin
excited https://codereview.chromium.org/23594008/diff/38001/chrome/common/extensions/api/feature.gyp File chrome/common/extensions/api/feature.gyp (right): https://codereview.chromium.org/23594008/diff/38001/chrome/common/extensions/api/feature.gyp#newcode7 chrome/common/extensions/api/feature.gyp:7: 'target_name': 'feature', it's simpler to just put this ...
7 years, 3 months ago (2013-09-12 16:20:42 UTC) #2
dhnishi (use Chromium)
https://codereview.chromium.org/23594008/diff/38001/chrome/common/extensions/api/feature.gyp File chrome/common/extensions/api/feature.gyp (right): https://codereview.chromium.org/23594008/diff/38001/chrome/common/extensions/api/feature.gyp#newcode7 chrome/common/extensions/api/feature.gyp:7: 'target_name': 'feature', On 2013/09/12 16:20:43, kalman wrote: > it's ...
7 years, 3 months ago (2013-09-13 17:36:42 UTC) #3
not at google - send to devlin
https://codereview.chromium.org/23594008/diff/38001/tools/json_schema_compiler/features_compiler.py File tools/json_schema_compiler/features_compiler.py (right): https://codereview.chromium.org/23594008/diff/38001/tools/json_schema_compiler/features_compiler.py#newcode26 tools/json_schema_compiler/features_compiler.py:26: schema = os.path.normpath(filenames[0]) On 2013/09/13 17:36:42, Daniel Nishi wrote: ...
7 years, 3 months ago (2013-09-13 21:37:51 UTC) #4
dhnishi (use Chromium)
Gists updated as well. https://codereview.chromium.org/23594008/diff/46001/tools/json_schema_compiler/cpp_util.py File tools/json_schema_compiler/cpp_util.py (right): https://codereview.chromium.org/23594008/diff/46001/tools/json_schema_compiler/cpp_util.py#newcode131 tools/json_schema_compiler/cpp_util.py:131: feature_set and not feature_set.add(feature.name)] On ...
7 years, 3 months ago (2013-09-16 22:26:21 UTC) #5
not at google - send to devlin
https://codereview.chromium.org/23594008/diff/14011/tools/json_schema_compiler/features_cc_generator.py File tools/json_schema_compiler/features_cc_generator.py (right): https://codereview.chromium.org/23594008/diff/14011/tools/json_schema_compiler/features_cc_generator.py#newcode45 tools/json_schema_compiler/features_cc_generator.py:45: c.Append('_featureMap.insert(std::pair<std::string, ' feature_map_[%s] = %s not feature_map_.insert(..) https://codereview.chromium.org/23594008/diff/14011/tools/json_schema_compiler/features_h_generator.py File ...
7 years, 3 months ago (2013-09-17 01:28:07 UTC) #6
dhnishi (use Chromium)
Gist updated as well. https://codereview.chromium.org/23594008/diff/14011/tools/json_schema_compiler/features_cc_generator.py File tools/json_schema_compiler/features_cc_generator.py (right): https://codereview.chromium.org/23594008/diff/14011/tools/json_schema_compiler/features_cc_generator.py#newcode45 tools/json_schema_compiler/features_cc_generator.py:45: c.Append('_featureMap.insert(std::pair<std::string, ' On 2013/09/17 01:28:07, ...
7 years, 3 months ago (2013-09-17 18:17:46 UTC) #7
not at google - send to devlin
This looks great, but you still need a test (sorry to have not mentioned this ...
7 years, 3 months ago (2013-09-17 18:26:19 UTC) #8
dhnishi (use Chromium)
Tests have been added. The namespace feature has been ported from the JSON Schema Compiler. ...
7 years, 3 months ago (2013-09-18 18:32:45 UTC) #9
not at google - send to devlin
Did you forget to upload the tests? https://codereview.chromium.org/23594008/diff/67001/chrome/common/extensions/api/api.gyp File chrome/common/extensions/api/api.gyp (right): https://codereview.chromium.org/23594008/diff/67001/chrome/common/extensions/api/api.gyp#newcode190 chrome/common/extensions/api/api.gyp:190: 'root_namespace': 'extensions::feature', ...
7 years, 3 months ago (2013-09-18 18:35:57 UTC) #10
not at google - send to devlin
could you call the gyp target name "features" as well?
7 years, 3 months ago (2013-09-18 18:37:21 UTC) #11
dhnishi (use Chromium)
Oops! I added the test for real now. https://codereview.chromium.org/23594008/diff/67001/chrome/common/extensions/api/api.gyp File chrome/common/extensions/api/api.gyp (right): https://codereview.chromium.org/23594008/diff/67001/chrome/common/extensions/api/api.gyp#newcode190 chrome/common/extensions/api/api.gyp:190: 'root_namespace': ...
7 years, 3 months ago (2013-09-18 19:11:56 UTC) #12
not at google - send to devlin
lgtm with a bit of test cleanup + remove the "permissions" references in the test ...
7 years, 3 months ago (2013-09-18 19:48:31 UTC) #13
dhnishi (use Chromium)
As of right now, "permissions" is in the name of the generated file because it ...
7 years, 3 months ago (2013-09-18 20:01:59 UTC) #14
not at google - send to devlin
https://codereview.chromium.org/23594008/diff/70001/tools/json_schema_compiler/features_cc_generator.py File tools/json_schema_compiler/features_cc_generator.py (right): https://codereview.chromium.org/23594008/diff/70001/tools/json_schema_compiler/features_cc_generator.py#newcode17 tools/json_schema_compiler/features_cc_generator.py:17: """A .cc generator for PermissionFeatures. sorry I totally missed ...
7 years, 3 months ago (2013-09-18 20:04:46 UTC) #15
dhnishi (use Chromium)
https://codereview.chromium.org/23594008/diff/70001/tools/json_schema_compiler/features_cc_generator.py File tools/json_schema_compiler/features_cc_generator.py (right): https://codereview.chromium.org/23594008/diff/70001/tools/json_schema_compiler/features_cc_generator.py#newcode17 tools/json_schema_compiler/features_cc_generator.py:17: """A .cc generator for PermissionFeatures. On 2013/09/18 20:04:47, kalman ...
7 years, 3 months ago (2013-09-18 22:00:22 UTC) #16
not at google - send to devlin
https://codereview.chromium.org/23594008/diff/70001/tools/json_schema_compiler/features_cc_generator.py File tools/json_schema_compiler/features_cc_generator.py (right): https://codereview.chromium.org/23594008/diff/70001/tools/json_schema_compiler/features_cc_generator.py#newcode17 tools/json_schema_compiler/features_cc_generator.py:17: """A .cc generator for PermissionFeatures. On 2013/09/18 22:00:23, Daniel ...
7 years, 3 months ago (2013-09-18 22:01:23 UTC) #17
not at google - send to devlin
https://codereview.chromium.org/23594008/diff/91001/tools/json_schema_compiler/cpp_util.py File tools/json_schema_compiler/cpp_util.py (right): https://codereview.chromium.org/23594008/diff/91001/tools/json_schema_compiler/cpp_util.py#newcode138 tools/json_schema_compiler/cpp_util.py:138: no \n at end of file; x2 \n between ...
7 years, 3 months ago (2013-09-18 22:01:54 UTC) #18
dhnishi (use Chromium)
Now lstripping the '_' off of the filename. https://codereview.chromium.org/23594008/diff/91001/tools/json_schema_compiler/cpp_util.py File tools/json_schema_compiler/cpp_util.py (right): https://codereview.chromium.org/23594008/diff/91001/tools/json_schema_compiler/cpp_util.py#newcode138 tools/json_schema_compiler/cpp_util.py:138: On ...
7 years, 3 months ago (2013-09-18 22:14:46 UTC) #19
not at google - send to devlin
lgtm https://codereview.chromium.org/23594008/diff/83002/tools/json_schema_compiler/test/features_unittest.cc File tools/json_schema_compiler/test/features_unittest.cc (right): https://codereview.chromium.org/23594008/diff/83002/tools/json_schema_compiler/test/features_unittest.cc#newcode23 tools/json_schema_compiler/test/features_unittest.cc:23: test_features.ToString(TestFeatures::kComplex)); these should be able to fit on ...
7 years, 3 months ago (2013-09-18 22:19:33 UTC) #20
dhnishi (use Chromium)
https://codereview.chromium.org/23594008/diff/83002/tools/json_schema_compiler/test/features_unittest.cc File tools/json_schema_compiler/test/features_unittest.cc (right): https://codereview.chromium.org/23594008/diff/83002/tools/json_schema_compiler/test/features_unittest.cc#newcode23 tools/json_schema_compiler/test/features_unittest.cc:23: test_features.ToString(TestFeatures::kComplex)); On 2013/09/18 22:19:33, kalman wrote: > these should ...
7 years, 3 months ago (2013-09-18 22:35:26 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/DHNishi@gmail.com/23594008/83003
7 years, 3 months ago (2013-09-18 22:59:11 UTC) #22
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=26180
7 years, 3 months ago (2013-09-18 23:16:20 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/DHNishi@gmail.com/23594008/83003
7 years, 3 months ago (2013-09-19 17:08:58 UTC) #24
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 3 months ago (2013-09-19 17:14:06 UTC) #25
dhnishi (use Chromium)
https://codereview.chromium.org/23594008/diff/83003/build/features_compile.gypi File build/features_compile.gypi (right): https://codereview.chromium.org/23594008/diff/83003/build/features_compile.gypi#newcode33 build/features_compile.gypi:33: '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/<(RULE_INPUT_ROOT).cc', The schema file used right now is the ...
7 years, 3 months ago (2013-09-20 16:46:50 UTC) #26
not at google - send to devlin
> 3. Do not strip the _ in the generated file. Yeah, sounds the easiest.
7 years, 3 months ago (2013-09-20 16:48:11 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/DHNishi@gmail.com/23594008/117001
7 years, 3 months ago (2013-09-20 19:32:05 UTC) #28
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests, chrome_frame_net_tests, chrome_frame_tests, chrome_frame_unittests, content_browsertests, mini_installer_test, ...
7 years, 3 months ago (2013-09-20 22:20:26 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/DHNishi@gmail.com/23594008/117001
7 years, 2 months ago (2013-09-26 19:03:53 UTC) #30
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) net_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=172691
7 years, 2 months ago (2013-09-26 19:54:28 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/DHNishi@gmail.com/23594008/168001
7 years, 2 months ago (2013-10-01 21:46:36 UTC) #32
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 2 months ago (2013-10-01 22:48:42 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/DHNishi@gmail.com/23594008/168001
7 years, 2 months ago (2013-10-03 17:17:09 UTC) #34
commit-bot: I haz the power
Change committed as 226826
7 years, 2 months ago (2013-10-03 20:10:33 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/DHNishi@gmail.com/23594008/201001
7 years, 1 month ago (2013-10-30 00:22:37 UTC) #36
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=215426
7 years, 1 month ago (2013-10-30 05:26:15 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/DHNishi@gmail.com/23594008/490001
7 years, 1 month ago (2013-11-05 19:12:25 UTC) #38
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests, content_unittests, unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=219938
7 years, 1 month ago (2013-11-05 22:13:40 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/DHNishi@gmail.com/23594008/490001
7 years, 1 month ago (2013-11-05 23:50:48 UTC) #40
commit-bot: I haz the power
7 years, 1 month ago (2013-11-06 05:14:35 UTC) #41
Message was sent while issue was closed.
Change committed as 233214

Powered by Google App Engine
This is Rietveld 408576698