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

Issue 38573008: Add "platforms" key in IDL schema compiler. (Closed)

Created:
7 years, 1 month ago by Haojian Wu
Modified:
7 years, 1 month ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Add "platforms" key in IDL schema compiler. Add analogue to JSON "platforms" key in IDL to restrict extension APIs' availability on different OS. The "platforms" key format like this: [platforms=("linux", "chromeos", "mac", "win", "chromeos_touch")] namespace Foo { ... }; BUG=119398 TEST=manual Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=231767

Patch Set 1 #

Patch Set 2 : Add test #

Total comments: 10

Patch Set 3 : Address kalman's comments #

Total comments: 4

Patch Set 4 : Fix comment issues #

Total comments: 6

Patch Set 5 : Update #

Patch Set 6 : Add more test #

Total comments: 3

Patch Set 7 : Update comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+89 lines, -25 lines) Patch
M tools/json_schema_compiler/idl_schema.py View 1 2 3 4 5 chunks +14 lines, -3 lines 0 comments Download
M tools/json_schema_compiler/idl_schema_test.py View 1 2 3 4 5 1 chunk +19 lines, -0 lines 0 comments Download
M tools/json_schema_compiler/model.py View 1 2 3 4 5 6 1 chunk +4 lines, -1 line 0 comments Download
M tools/json_schema_compiler/model_test.py View 1 2 3 4 5 3 chunks +28 lines, -1 line 0 comments Download
A + tools/json_schema_compiler/test/idl_namespace_all_platforms.idl View 1 2 3 1 chunk +10 lines, -9 lines 0 comments Download
A + tools/json_schema_compiler/test/idl_namespace_chromeos.idl View 1 2 3 1 chunk +10 lines, -8 lines 0 comments Download
A + tools/json_schema_compiler/test/idl_namespace_non_specific_platforms.idl View 1 2 3 4 5 1 chunk +4 lines, -3 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
Haojian Wu
Please review it, thanks.
7 years, 1 month ago (2013-10-24 16:00:52 UTC) #1
asargent_no_longer_on_chrome
Code changes seem fine. Can you please add some unit tests? You can see existing ...
7 years, 1 month ago (2013-10-24 16:06:46 UTC) #2
Haojian Wu
On 2013/10/24 16:06:46, Antony Sargent wrote: > Code changes seem fine. Can you please add ...
7 years, 1 month ago (2013-10-25 09:19:32 UTC) #3
asargent_no_longer_on_chrome
lgtm
7 years, 1 month ago (2013-10-25 16:45:03 UTC) #4
not at google - send to devlin
https://codereview.chromium.org/38573008/diff/40001/chrome/renderer/resources/extensions/binding.js File chrome/renderer/resources/extensions/binding.js (right): https://codereview.chromium.org/38573008/diff/40001/chrome/renderer/resources/extensions/binding.js#newcode117 chrome/renderer/resources/extensions/binding.js:117: return !schemaNode.platforms || schemaNode.platforms.length == 0 || if something ...
7 years, 1 month ago (2013-10-25 17:00:08 UTC) #5
Haojian Wu
https://codereview.chromium.org/38573008/diff/40001/chrome/renderer/resources/extensions/binding.js File chrome/renderer/resources/extensions/binding.js (right): https://codereview.chromium.org/38573008/diff/40001/chrome/renderer/resources/extensions/binding.js#newcode117 chrome/renderer/resources/extensions/binding.js:117: return !schemaNode.platforms || schemaNode.platforms.length == 0 || On 2013/10/25 ...
7 years, 1 month ago (2013-10-26 03:15:51 UTC) #6
hirono
lgtm with nits! Thank you for fixing it! https://codereview.chromium.org/38573008/diff/130001/tools/json_schema_compiler/test/idl_namespace_all_platforms.idl File tools/json_schema_compiler/test/idl_namespace_all_platforms.idl (right): https://codereview.chromium.org/38573008/diff/130001/tools/json_schema_compiler/test/idl_namespace_all_platforms.idl#newcode1 tools/json_schema_compiler/test/idl_namespace_all_platforms.idl:1: // ...
7 years, 1 month ago (2013-10-28 02:31:56 UTC) #7
Haojian Wu
https://codereview.chromium.org/38573008/diff/130001/tools/json_schema_compiler/test/idl_namespace_all_platforms.idl File tools/json_schema_compiler/test/idl_namespace_all_platforms.idl (right): https://codereview.chromium.org/38573008/diff/130001/tools/json_schema_compiler/test/idl_namespace_all_platforms.idl#newcode1 tools/json_schema_compiler/test/idl_namespace_all_platforms.idl:1: // Copyright (c) 2012 The Chromium Authors. All rights ...
7 years, 1 month ago (2013-10-28 03:12:51 UTC) #8
not at google - send to devlin
lgtm https://codereview.chromium.org/38573008/diff/190001/tools/json_schema_compiler/idl_schema.py File tools/json_schema_compiler/idl_schema.py (right): https://codereview.chromium.org/38573008/diff/190001/tools/json_schema_compiler/idl_schema.py#newcode317 tools/json_schema_compiler/idl_schema.py:317: platforms=None): bad news; now these need to all ...
7 years, 1 month ago (2013-10-28 17:04:47 UTC) #9
Haojian Wu
I also add more test cases and model test. Please review this part. https://codereview.chromium.org/38573008/diff/190001/tools/json_schema_compiler/idl_schema.py File ...
7 years, 1 month ago (2013-10-29 02:09:31 UTC) #10
not at google - send to devlin
lgtm assuming you can delete that ==None check. https://codereview.chromium.org/38573008/diff/190001/tools/json_schema_compiler/model.py File tools/json_schema_compiler/model.py (right): https://codereview.chromium.org/38573008/diff/190001/tools/json_schema_compiler/model.py#newcode489 tools/json_schema_compiler/model.py:489: if ...
7 years, 1 month ago (2013-10-29 14:36:51 UTC) #11
Haojian Wu
https://codereview.chromium.org/38573008/diff/190001/tools/json_schema_compiler/model.py File tools/json_schema_compiler/model.py (right): https://codereview.chromium.org/38573008/diff/190001/tools/json_schema_compiler/model.py#newcode489 tools/json_schema_compiler/model.py:489: if 'platforms' not in json or not json['platforms']: On ...
7 years, 1 month ago (2013-10-30 00:42:47 UTC) #12
not at google - send to devlin
ah I was forgetting about the IDL compiler case. I assumed it wasn't setting platforms ...
7 years, 1 month ago (2013-10-30 00:44:27 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/Hokein.Wu@gmail.com/38573008/390001
7 years, 1 month ago (2013-10-30 00:50:06 UTC) #14
commit-bot: I haz the power
7 years, 1 month ago (2013-10-30 05:29:02 UTC) #15
Message was sent while issue was closed.
Change committed as 231767

Powered by Google App Engine
This is Rietveld 408576698