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

Issue 2494653005: Support API aliases (Closed)

Created:
4 years, 1 month ago by tbarzic
Modified:
4 years ago
Reviewers:
Devlin
CC:
chromium-apps-reviews_chromium.org, chromium-reviews, extensions-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Support API aliases Introduce API feature properties to specify an API source and alias. |source| is set on API alias, and is used during API registration - if an API feature has source set, the bindings installed under API name will be the bindings of |source| API. |alias| is used on source API, and is used when checking API availability - when checking availability of an API that has alias set, the API will be deemed available if either one of the API and the API alias are available in the context. Note that this logic should not be used when determining API availability for binding registration - in this case alias availability should be ignored in order to avoid registering source API bindings when only alias bindings are needed. BUG=647415 Committed: https://crrev.com/feb4b052b4c86b9047f8c220e3ec3983e5483cdf Cr-Commit-Position: refs/heads/master@{#435034}

Patch Set 1 #

Patch Set 2 : Support API aliases #

Patch Set 3 : . #

Patch Set 4 : rebase #

Total comments: 14

Patch Set 5 : . #

Patch Set 6 : . #

Patch Set 7 : . #

Patch Set 8 : . #

Patch Set 9 : update docs #

Total comments: 18

Patch Set 10 : . #

Patch Set 11 : . #

Total comments: 12

Patch Set 12 : . #

Patch Set 13 : rebase #

Patch Set 14 : . #

Total comments: 17

Patch Set 15 : . #

Patch Set 16 : Fix issue with child features not being able to override parent shared values #

Total comments: 12

Patch Set 17 : . #

Patch Set 18 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+963 lines, -253 lines) Patch
M chrome/common/extensions/api/_features.md View 1 2 3 4 5 6 7 8 9 2 chunks +56 lines, -1 line 0 comments Download
M chrome/common/extensions/api/common_extension_api_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 16 chunks +203 lines, -155 lines 0 comments Download
M chrome/test/data/extensions/extension_api_unittest/api_features.json View 1 chunk +14 lines, -0 lines 0 comments Download
M extensions/browser/event_router.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -1 line 0 comments Download
M extensions/browser/extension_function.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M extensions/common/extension_api.h View 1 2 3 4 5 6 7 8 9 3 chunks +30 lines, -3 lines 0 comments Download
M extensions/common/extension_api.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +65 lines, -7 lines 0 comments Download
M extensions/common/features/feature.h View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download
M extensions/common/features/feature.cc View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download
M extensions/renderer/js_extension_bindings_system.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -1 line 0 comments Download
M extensions/renderer/js_extension_bindings_system.cc View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +19 lines, -11 lines 0 comments Download
M extensions/renderer/native_extension_bindings_system.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -1 line 0 comments Download
M extensions/renderer/script_context.h View 1 2 3 4 5 6 7 8 9 3 chunks +12 lines, -4 lines 0 comments Download
M extensions/renderer/script_context.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +12 lines, -4 lines 0 comments Download
M tools/json_schema_compiler/feature_compiler.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 chunks +206 lines, -48 lines 0 comments Download
M tools/json_schema_compiler/feature_compiler_test.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +200 lines, -16 lines 0 comments Download
M tools/json_schema_compiler/test/features_generation_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +59 lines, -0 lines 0 comments Download
M tools/json_schema_compiler/test/features_test.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +64 lines, -0 lines 0 comments Download

Messages

Total messages: 50 (34 generated)
tbarzic
4 years, 1 month ago (2016-11-12 00:06:06 UTC) #8
Devlin
https://codereview.chromium.org/2494653005/diff/60001/chrome/common/extensions/api/_features.md File chrome/common/extensions/api/_features.md (right): https://codereview.chromium.org/2494653005/diff/60001/chrome/common/extensions/api/_features.md#newcode125 chrome/common/extensions/api/_features.md:125: API features that have an alias. The value should ...
4 years, 1 month ago (2016-11-14 18:03:56 UTC) #11
tbarzic
https://codereview.chromium.org/2494653005/diff/60001/chrome/common/extensions/api/_features.md File chrome/common/extensions/api/_features.md (right): https://codereview.chromium.org/2494653005/diff/60001/chrome/common/extensions/api/_features.md#newcode125 chrome/common/extensions/api/_features.md:125: API features that have an alias. The value should ...
4 years, 1 month ago (2016-11-15 04:45:07 UTC) #15
Devlin
This mostly looks good, but it looks like a lot of complexity in the feature ...
4 years, 1 month ago (2016-11-17 01:11:16 UTC) #19
tbarzic
https://codereview.chromium.org/2494653005/diff/160001/chrome/common/extensions/api/_features.md File chrome/common/extensions/api/_features.md (right): https://codereview.chromium.org/2494653005/diff/160001/chrome/common/extensions/api/_features.md#newcode125 chrome/common/extensions/api/_features.md:125: Alias feature is a feature that provides the same ...
4 years, 1 month ago (2016-11-17 18:12:13 UTC) #20
Devlin
https://codereview.chromium.org/2494653005/diff/200001/tools/json_schema_compiler/feature_compiler.py File tools/json_schema_compiler/feature_compiler.py (right): https://codereview.chromium.org/2494653005/diff/200001/tools/json_schema_compiler/feature_compiler.py#newcode105 tools/json_schema_compiler/feature_compiler.py:105: # 'feature_reference': Only applicable for strings. An object that, ...
4 years, 1 month ago (2016-11-21 16:55:53 UTC) #21
tbarzic
https://codereview.chromium.org/2494653005/diff/200001/tools/json_schema_compiler/feature_compiler.py File tools/json_schema_compiler/feature_compiler.py (right): https://codereview.chromium.org/2494653005/diff/200001/tools/json_schema_compiler/feature_compiler.py#newcode105 tools/json_schema_compiler/feature_compiler.py:105: # 'feature_reference': Only applicable for strings. An object that, ...
4 years, 1 month ago (2016-11-21 23:49:48 UTC) #28
Devlin
https://codereview.chromium.org/2494653005/diff/260001/tools/json_schema_compiler/feature_compiler.py File tools/json_schema_compiler/feature_compiler.py (right): https://codereview.chromium.org/2494653005/diff/260001/tools/json_schema_compiler/feature_compiler.py#newcode232 tools/json_schema_compiler/feature_compiler.py:232: feature_values = feature.GetAllFeatureValues() This would be a lot more ...
4 years ago (2016-11-23 15:56:14 UTC) #29
tbarzic
https://codereview.chromium.org/2494653005/diff/260001/tools/json_schema_compiler/feature_compiler.py File tools/json_schema_compiler/feature_compiler.py (right): https://codereview.chromium.org/2494653005/diff/260001/tools/json_schema_compiler/feature_compiler.py#newcode232 tools/json_schema_compiler/feature_compiler.py:232: feature_values = feature.GetAllFeatureValues() On 2016/11/23 at 15:56:13, Devlin wrote: ...
4 years ago (2016-11-23 20:16:41 UTC) #32
tbarzic
ping? (note that I updated the cl this morning - patchset 16 - in order ...
4 years ago (2016-11-28 20:16:23 UTC) #37
Devlin
Nice! Just a few last small comments, but otherwise this looks good! https://codereview.chromium.org/2494653005/diff/300001/tools/json_schema_compiler/feature_compiler.py File tools/json_schema_compiler/feature_compiler.py ...
4 years ago (2016-11-28 20:42:22 UTC) #38
tbarzic
https://codereview.chromium.org/2494653005/diff/300001/tools/json_schema_compiler/feature_compiler.py File tools/json_schema_compiler/feature_compiler.py (right): https://codereview.chromium.org/2494653005/diff/300001/tools/json_schema_compiler/feature_compiler.py#newcode241 tools/json_schema_compiler/feature_compiler.py:241: if not parsed_value: On 2016/11/28 20:42:21, Devlin wrote: > ...
4 years ago (2016-11-28 21:43:52 UTC) #40
Devlin
lgtm
4 years ago (2016-11-29 16:10:30 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2494653005/340001
4 years ago (2016-11-29 18:12:07 UTC) #46
commit-bot: I haz the power
Committed patchset #18 (id:340001)
4 years ago (2016-11-29 18:23:47 UTC) #48
commit-bot: I haz the power
4 years ago (2016-11-29 18:26:02 UTC) #50
Message was sent while issue was closed.
Patchset 18 (id:??) landed as
https://crrev.com/feb4b052b4c86b9047f8c220e3ec3983e5483cdf
Cr-Commit-Position: refs/heads/master@{#435034}

Powered by Google App Engine
This is Rietveld 408576698