New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 763960 link

Starred by 2 users

Issue metadata

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



Sign in to add a comment

Make --enable-experimental-extension-apis enable non-stable-channel APIs as well

Project Member Reported by phistuck@gmail.com, Sep 11 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.79 Safari/537.36

Steps to reproduce the problem:
1. Launch Stable Chrome with --enable-experimental-extension-apis.
2. Load an unpacked extension that asks for the "processes" permission and calls chrome.processes.getProcessInfo([], true, console.log)

What is the expected behavior?
Process information.

What went wrong?
chrome.processes is undefined. The API is restricted to the Dev channel with no way (other than fiddling with the registry and faking the channel string) of enabling it elsewhere.

Did this work before? No 

Chrome version: 61.0.3163.79  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version:
 
Cc: rdevlin....@chromium.org
Components: Platform>Extensions>API
Labels: OS-Chrome OS-Linux OS-Mac
Status: Untriaged (was: Unconfirmed)
As requested, Devlin. :)

I guess it can be handled here -
https://cs.chromium.org/chromium/src/tools/json_schema_compiler/feature_compiler.py?type=cs&q=feature-%3Eset_+file:py&l=368

Or here -
https://cs.chromium.org/chromium/src/extensions/common/features/simple_feature.cc?type=cs&l=560
Cc: -rdevlin....@chromium.org nasko@chromium.org
Owner: rdevlin....@chromium.org
Status: Assigned (was: Untriaged)
Yeah, we'll just need to add a check to the simple feature code (we don't want to modify the compiler, since that's channel-agnostic).

+Nasko, quick sanity check - any qualms about this?  It could theoretically be a security risk in some way since the APIs aren't done, but a) we shouldn't have insecure APIs anywhere, b) we have way scarier commandline flags, and c) the channel isn't hard to spoof.
Cc: creis@chromium.org
nasko@'s out, creis@, please see question in #2. :)

Comment 4 by creis@chromium.org, Sep 11 2017

If you're worried about these APIs not being secure, there's a scary flag infobar we can show (e.g., as used for --no-sandbox).  I wouldn't have security concerns about the processes API, but I don't know what else is guarded by this flag.  At first glance, it seems like a reasonable proposal to me.

(Users of the flag should just be aware that these APIs can change without warning, since they're experimental.)
Project Member

Comment 5 by bugdroid1@chromium.org, Sep 23 2017

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

commit f20f29e66404594ace24fe64bd9c7c7dc1d3cc56
Author: Devlin Cronin <rdevlin.cronin@chromium.org>
Date: Sat Sep 23 02:06:26 2017

[Extensions] Allow channel-restricted APIs with experimental APIs enabled

The extensions platform restricts certain APIs to a given channel (such
as trunk, dev, or beta) when they are still in development and not ready
for release. It would be beneficial to allow developers to play around
with these APIs for experimentation/debuggery/curiosity. We already have
an "enable-experimental-extension-apis" flag; reuse that so that if that
flag is present, we ignore channel restrictions on extension APIs.

Add a unittest to cover the new behavior.

Bug:  763960 

Change-Id: I9c5a2cada4d5e71d28e3352d440cbde4ce3d4e14
Reviewed-on: https://chromium-review.googlesource.com/663561
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Reviewed-by: Karan Bhatia <karandeepb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#503930}
[modify] https://crrev.com/f20f29e66404594ace24fe64bd9c7c7dc1d3cc56/extensions/common/features/simple_feature.cc
[modify] https://crrev.com/f20f29e66404594ace24fe64bd9c7c7dc1d3cc56/extensions/common/features/simple_feature.h
[modify] https://crrev.com/f20f29e66404594ace24fe64bd9c7c7dc1d3cc56/extensions/common/features/simple_feature_unittest.cc

Status: Fixed (was: Assigned)
This should now be fixed.  Closing out.

Lemme know if there are any issues with this, phistuck@!

Comment 7 by phistuck@gmail.com, Sep 23 2017

Thank you for taking the time to implement this low priority feature!

Sign in to add a comment