New issue
Advanced search Search tips

Issue 647415 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Feature

Blocking:
issue 629931



Sign in to add a comment

Add support for extension API aliases

Project Member Reported by tbarzic@chromium.org, Sep 15 2016

Issue description

As part of an effort to make some private APIs available to apps running in Chrome OS kiosk (issue 629931), it is planned to rename said APIs to new names which do not contain "private".

To make transition to new API names smoother for current API users, it would be desirable to have the APIs available under both new and the old names for some time (e.g. a release or two).
This could be achieved by maintaining two versions of the same API (only difference being the name under which they are available), but a more elegant way of doing this would be preferable. This bug is a request for that - a way to (more) easily declare an alias for an API. The only difference between an alias API and the actual API should be the name under which they are available to apps/extensions.

Added plus would be to enforce temporal nature of added aliases in code.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6844aad556802f24338385f23a8c1aa0cf19bf3e

commit 6844aad556802f24338385f23a8c1aa0cf19bf3e
Author: tbarzic <tbarzic@chromium.org>
Date: Fri Oct 07 23:53:35 2016

Extract permission alias info from PermissionsProvider

Move the methods for getting lists of extension permission aliases
to standalone methods extensions::GetChromePermissionAliases and
extensions::GetExtensionsPermissionAliases (depending on whether
aliases refer to Chrome permissions, or code extensions
permissions).

This is done in preparation of adding suppport of API aliases, in
order to be able to declare sets of aliases (API and permission
aliases) together.

BUG= 647415 

Review-Url: https://codereview.chromium.org/2379763003
Cr-Commit-Position: refs/heads/master@{#424018}

[modify] https://crrev.com/6844aad556802f24338385f23a8c1aa0cf19bf3e/chrome/common/BUILD.gn
[add] https://crrev.com/6844aad556802f24338385f23a8c1aa0cf19bf3e/chrome/common/extensions/chrome_aliases.cc
[add] https://crrev.com/6844aad556802f24338385f23a8c1aa0cf19bf3e/chrome/common/extensions/chrome_aliases.h
[modify] https://crrev.com/6844aad556802f24338385f23a8c1aa0cf19bf3e/chrome/common/extensions/chrome_extensions_client.cc
[modify] https://crrev.com/6844aad556802f24338385f23a8c1aa0cf19bf3e/chrome/common/extensions/permissions/chrome_api_permissions.cc
[modify] https://crrev.com/6844aad556802f24338385f23a8c1aa0cf19bf3e/chrome/common/extensions/permissions/chrome_api_permissions.h
[modify] https://crrev.com/6844aad556802f24338385f23a8c1aa0cf19bf3e/extensions/common/BUILD.gn
[add] https://crrev.com/6844aad556802f24338385f23a8c1aa0cf19bf3e/extensions/common/alias.h
[add] https://crrev.com/6844aad556802f24338385f23a8c1aa0cf19bf3e/extensions/common/extensions_aliases.cc
[add] https://crrev.com/6844aad556802f24338385f23a8c1aa0cf19bf3e/extensions/common/extensions_aliases.h
[modify] https://crrev.com/6844aad556802f24338385f23a8c1aa0cf19bf3e/extensions/common/permissions/extensions_api_permissions.cc
[modify] https://crrev.com/6844aad556802f24338385f23a8c1aa0cf19bf3e/extensions/common/permissions/extensions_api_permissions.h
[modify] https://crrev.com/6844aad556802f24338385f23a8c1aa0cf19bf3e/extensions/common/permissions/permissions_info.cc
[modify] https://crrev.com/6844aad556802f24338385f23a8c1aa0cf19bf3e/extensions/common/permissions/permissions_info.h
[modify] https://crrev.com/6844aad556802f24338385f23a8c1aa0cf19bf3e/extensions/common/permissions/permissions_provider.h
[modify] https://crrev.com/6844aad556802f24338385f23a8c1aa0cf19bf3e/extensions/shell/common/shell_extensions_client.cc
[modify] https://crrev.com/6844aad556802f24338385f23a8c1aa0cf19bf3e/extensions/test/test_extensions_client.cc

Comment 2 by st...@chromium.org, Oct 18 2016

Cc: steve...@chromium.org
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 29 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/feb4b052b4c86b9047f8c220e3ec3983e5483cdf

commit feb4b052b4c86b9047f8c220e3ec3983e5483cdf
Author: tbarzic <tbarzic@chromium.org>
Date: Tue Nov 29 18:23:09 2016

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 

Review-Url: https://codereview.chromium.org/2494653005
Cr-Commit-Position: refs/heads/master@{#435034}

[modify] https://crrev.com/feb4b052b4c86b9047f8c220e3ec3983e5483cdf/chrome/common/extensions/api/_features.md
[modify] https://crrev.com/feb4b052b4c86b9047f8c220e3ec3983e5483cdf/chrome/common/extensions/api/common_extension_api_unittest.cc
[modify] https://crrev.com/feb4b052b4c86b9047f8c220e3ec3983e5483cdf/chrome/test/data/extensions/extension_api_unittest/api_features.json
[modify] https://crrev.com/feb4b052b4c86b9047f8c220e3ec3983e5483cdf/extensions/browser/event_router.cc
[modify] https://crrev.com/feb4b052b4c86b9047f8c220e3ec3983e5483cdf/extensions/browser/extension_function.cc
[modify] https://crrev.com/feb4b052b4c86b9047f8c220e3ec3983e5483cdf/extensions/common/extension_api.cc
[modify] https://crrev.com/feb4b052b4c86b9047f8c220e3ec3983e5483cdf/extensions/common/extension_api.h
[modify] https://crrev.com/feb4b052b4c86b9047f8c220e3ec3983e5483cdf/extensions/common/features/feature.cc
[modify] https://crrev.com/feb4b052b4c86b9047f8c220e3ec3983e5483cdf/extensions/common/features/feature.h
[modify] https://crrev.com/feb4b052b4c86b9047f8c220e3ec3983e5483cdf/extensions/renderer/js_extension_bindings_system.cc
[modify] https://crrev.com/feb4b052b4c86b9047f8c220e3ec3983e5483cdf/extensions/renderer/js_extension_bindings_system.h
[modify] https://crrev.com/feb4b052b4c86b9047f8c220e3ec3983e5483cdf/extensions/renderer/native_extension_bindings_system.cc
[modify] https://crrev.com/feb4b052b4c86b9047f8c220e3ec3983e5483cdf/extensions/renderer/script_context.cc
[modify] https://crrev.com/feb4b052b4c86b9047f8c220e3ec3983e5483cdf/extensions/renderer/script_context.h
[modify] https://crrev.com/feb4b052b4c86b9047f8c220e3ec3983e5483cdf/tools/json_schema_compiler/feature_compiler.py
[modify] https://crrev.com/feb4b052b4c86b9047f8c220e3ec3983e5483cdf/tools/json_schema_compiler/feature_compiler_test.py
[modify] https://crrev.com/feb4b052b4c86b9047f8c220e3ec3983e5483cdf/tools/json_schema_compiler/test/features_generation_unittest.cc
[modify] https://crrev.com/feb4b052b4c86b9047f8c220e3ec3983e5483cdf/tools/json_schema_compiler/test/features_test.json

Status: Fixed (was: Started)

Comment 5 by st...@chromium.org, Mar 3 2017

Cc: r...@chromium.org

Comment 6 by st...@chromium.org, Mar 3 2017

Cc: -st...@chromium.org

Sign in to add a comment