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

Issue 689802 link

Starred by 12 users

Issue metadata

Status: Fixed
Owner:
OOO until 4th Feb
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task
Team-Security-UX



Sign in to add a comment

Deprecate on-by-default Permissions in Cross-origin Iframes

Project Member Reported by raymes@chromium.org, Feb 8 2017

Issue description

It’s proposed that by default the following permissions cannot be requested or granted to content contained in cross-origin iframes:
-Geolocation
-Midi 
-Encrypted media extensions
-Microphone and Camera

In order for a cross-origin frame to get access to these permissions, the embedding page must specify a Feature Policy which enables the feature for the frame. For example, to enable geolocation in an iframe, the embedder could specify the iframe tag as:
<iframe src="https://example.com" allow="geolocation"></iframe>
 
Project Member

Comment 1 by bugdroid1@chromium.org, May 24 2017

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

commit d3da4b4f6567f5ceb91d12c5887dc49cca77cc06
Author: raymes <raymes@chromium.org>
Date: Wed May 24 00:06:24 2017

Add tests for FeaturePolicy integration with RenderFrameHost

This adds integration tests for FeaturePolicy in RenderFrameHosts. These tests
are not meant to cover every edge case as the FeaturePolicy class itself is
tested thoroughly in feature_policy_unittest.cc. Instead they are meant to
ensure that integration with RenderFrameHost works correctly.

BUG= 689802 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

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

[modify] https://crrev.com/d3da4b4f6567f5ceb91d12c5887dc49cca77cc06/content/browser/DEPS
[add] https://crrev.com/d3da4b4f6567f5ceb91d12c5887dc49cca77cc06/content/browser/frame_host/render_frame_host_feature_policy_unittest.cc
[modify] https://crrev.com/d3da4b4f6567f5ceb91d12c5887dc49cca77cc06/content/browser/frame_host/render_frame_host_impl.h
[modify] https://crrev.com/d3da4b4f6567f5ceb91d12c5887dc49cca77cc06/content/public/browser/render_frame_host.h
[modify] https://crrev.com/d3da4b4f6567f5ceb91d12c5887dc49cca77cc06/content/test/BUILD.gn

Project Member

Comment 2 by bugdroid1@chromium.org, May 29 2017

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

commit c2cf640fde6976075f3b8876ed68eec9d0e97a61
Author: raymes <raymes@chromium.org>
Date: Mon May 29 01:35:27 2017

Add a PermissionContext subclass for the midi permission

This adds a PermissionContext subclass for the midi permission, removing the
special casing from PermissionManager. This is necessary because the midi
permission will have a feature policy associated with it and feature policy
will take effect in the PermissionContext subclass in
GetPermissionStatusInternal. It needs to live here so that the permission
status checks in PermissionContextBase::RequestPermission return the
correct values. It is also just where all other permission checks live (like
secure origin, kill switch, etc.).

BUG= 689802 

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

[modify] https://crrev.com/c2cf640fde6976075f3b8876ed68eec9d0e97a61/chrome/browser/BUILD.gn
[modify] https://crrev.com/c2cf640fde6976075f3b8876ed68eec9d0e97a61/chrome/browser/media/midi_permission_context.cc
[modify] https://crrev.com/c2cf640fde6976075f3b8876ed68eec9d0e97a61/chrome/browser/media/midi_permission_context.h
[add] https://crrev.com/c2cf640fde6976075f3b8876ed68eec9d0e97a61/chrome/browser/media/midi_sysex_permission_context.cc
[add] https://crrev.com/c2cf640fde6976075f3b8876ed68eec9d0e97a61/chrome/browser/media/midi_sysex_permission_context.h
[rename] https://crrev.com/c2cf640fde6976075f3b8876ed68eec9d0e97a61/chrome/browser/media/midi_sysex_permission_context_unittest.cc
[modify] https://crrev.com/c2cf640fde6976075f3b8876ed68eec9d0e97a61/chrome/browser/permissions/permission_manager.cc
[modify] https://crrev.com/c2cf640fde6976075f3b8876ed68eec9d0e97a61/chrome/test/BUILD.gn

Project Member

Comment 3 by bugdroid1@chromium.org, May 29 2017

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

commit d93dbb23431e74ccc31aba4183fc2aef78a6553c
Author: raymes <raymes@chromium.org>
Date: Mon May 29 03:56:51 2017

Implement PermissionServiceImpl::RequestPermission in terms of RequestPermissions

This removes duplicate code from PermissionServiceImpl.
RequestPermissions and RequestPermission used to duplicate most of their
code. Instead RequestPermission is now implemented on top of the more
general RequestPermissions function, but with only a single item in the
request vector. This is in preparation for adding feature policy checks
to these functions, which would otherwise add more duplicated code.

This also fixes a small bug in ShellPermissionManager which was tickled by this change.

BUG= 689802 

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

[modify] https://crrev.com/d93dbb23431e74ccc31aba4183fc2aef78a6553c/content/browser/permissions/permission_service_impl.cc
[modify] https://crrev.com/d93dbb23431e74ccc31aba4183fc2aef78a6553c/content/browser/permissions/permission_service_impl.h
[modify] https://crrev.com/d93dbb23431e74ccc31aba4183fc2aef78a6553c/content/shell/browser/shell_permission_manager.cc

Project Member

Comment 4 by bugdroid1@chromium.org, May 31 2017

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

commit 21b9affc7f019d878b3118c2c0833822d78dfec4
Author: raymes <raymes@chromium.org>
Date: Wed May 31 06:15:26 2017

Implement permissions feature policy checks in the browser process

This adds feature policy checks for Geolocation, Midi/sysex, Protected media,
and Mic/Camera to the browser process. These checks are also implemented in
the content layer in the Permission Service
(see https://codereview.chromium.org/2874053003/). The reason to have these
checks implemented in the content/ layer is because they are standardized
checks and we want to ensure that other embedders of content implement the same
behavior.

However there are 2 pitfalls to this:
1) The results returned from the permission service are used to make decisions
in the renderer process and so are not trustworthy. Because of this, most
features that have permission will add additional checks in the browser
process.
2) The permission checks that happen in the browser process most often happen
in the chrome/ layer (through the PermissionManager) so this is also where
feature policy checks need to happen.

In the long term, both chrome/ and content/ should make permission checks
through the same API/mojo service where common permission checks like this one
can live.

BUG= 689802 
TBR=tommycli@chromium.org,peter@chromium.org

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

[modify] https://crrev.com/21b9affc7f019d878b3118c2c0833822d78dfec4/chrome/browser/background_sync/background_sync_permission_context.cc
[modify] https://crrev.com/21b9affc7f019d878b3118c2c0833822d78dfec4/chrome/browser/geolocation/geolocation_permission_context.cc
[modify] https://crrev.com/21b9affc7f019d878b3118c2c0833822d78dfec4/chrome/browser/media/midi_permission_context.cc
[modify] https://crrev.com/21b9affc7f019d878b3118c2c0833822d78dfec4/chrome/browser/media/midi_sysex_permission_context.cc
[modify] https://crrev.com/21b9affc7f019d878b3118c2c0833822d78dfec4/chrome/browser/media/protected_media_identifier_permission_context.cc
[modify] https://crrev.com/21b9affc7f019d878b3118c2c0833822d78dfec4/chrome/browser/media/webrtc/media_stream_device_permission_context.cc
[modify] https://crrev.com/21b9affc7f019d878b3118c2c0833822d78dfec4/chrome/browser/notifications/notification_permission_context.cc
[modify] https://crrev.com/21b9affc7f019d878b3118c2c0833822d78dfec4/chrome/browser/permissions/permission_context_base.cc
[modify] https://crrev.com/21b9affc7f019d878b3118c2c0833822d78dfec4/chrome/browser/permissions/permission_context_base.h
[add] https://crrev.com/21b9affc7f019d878b3118c2c0833822d78dfec4/chrome/browser/permissions/permission_context_base_feature_policy_unittest.cc
[modify] https://crrev.com/21b9affc7f019d878b3118c2c0833822d78dfec4/chrome/browser/permissions/permission_context_base_unittest.cc
[modify] https://crrev.com/21b9affc7f019d878b3118c2c0833822d78dfec4/chrome/browser/plugins/flash_permission_context.cc
[modify] https://crrev.com/21b9affc7f019d878b3118c2c0833822d78dfec4/chrome/browser/storage/durable_storage_permission_context.cc
[modify] https://crrev.com/21b9affc7f019d878b3118c2c0833822d78dfec4/chrome/test/BUILD.gn
[modify] https://crrev.com/21b9affc7f019d878b3118c2c0833822d78dfec4/content/public/common/content_features.cc
[modify] https://crrev.com/21b9affc7f019d878b3118c2c0833822d78dfec4/content/public/common/content_features.h
[modify] https://crrev.com/21b9affc7f019d878b3118c2c0833822d78dfec4/content/public/test/test_renderer_host.h
[modify] https://crrev.com/21b9affc7f019d878b3118c2c0833822d78dfec4/content/test/test_render_frame_host.cc
[modify] https://crrev.com/21b9affc7f019d878b3118c2c0833822d78dfec4/content/test/test_render_frame_host.h

Project Member

Comment 5 by bugdroid1@chromium.org, May 31 2017

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

commit 09bcca49766516c2b8a685420b7b075f39350500
Author: raymes <raymes@chromium.org>
Date: Wed May 31 06:53:03 2017

Add checks for Feature Policy to the mojo Permission Service

This adds Feature Policy checks to the mojo permission service and
corresponding tests. Because multiple permissions can be requested at the same
time, part of a request can be answered synchronously (by feature policy) and
the other part asynchronously (by quering the PermissionManager). Thus we need
to track the partially answered request in the PendingRequest class.

Feature policy checks are done here (in content) as they will form part of the
specifications for various features and thus it is best if other embedders of
content also benefit from these checks.

BUG= 689802 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

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

[modify] https://crrev.com/09bcca49766516c2b8a685420b7b075f39350500/content/browser/permissions/permission_service_context.h
[modify] https://crrev.com/09bcca49766516c2b8a685420b7b075f39350500/content/browser/permissions/permission_service_impl.cc
[modify] https://crrev.com/09bcca49766516c2b8a685420b7b075f39350500/content/browser/permissions/permission_service_impl.h
[add] https://crrev.com/09bcca49766516c2b8a685420b7b075f39350500/content/browser/permissions/permission_service_impl_unittest.cc
[modify] https://crrev.com/09bcca49766516c2b8a685420b7b075f39350500/content/test/BUILD.gn

Cc: mea...@chromium.org ainslie@chromium.org palmer@chromium.org mlamouri@chromium.org abarth@chromium.org markusheintz@chromium.org jww@chromium.org raymes@chromium.org leng@chromium.org lcamtuf@google.com jsc...@chromium.org
 Issue 342431  has been merged into this issue.
Project Member

Comment 7 by bugdroid1@chromium.org, Jun 13 2017

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

commit 7938f5d3da218f7d59feddd5cebda6079fd8f09b
Author: raymes <raymes@chromium.org>
Date: Tue Jun 13 22:19:14 2017

Check Feature Policy for Mic/Camera requests

Mic/Camera requests don't currently go through the permissions service so we
need to implement additional checks. These happen in
MediaDevicesPermissionChecker. Tests have also been added for these.

BUG= 689802 

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

[modify] https://crrev.com/7938f5d3da218f7d59feddd5cebda6079fd8f09b/content/browser/media/media_devices_permission_checker.cc
[add] https://crrev.com/7938f5d3da218f7d59feddd5cebda6079fd8f09b/content/browser/media/media_devices_permission_checker_unittest.cc
[modify] https://crrev.com/7938f5d3da218f7d59feddd5cebda6079fd8f09b/content/test/BUILD.gn

Comment 8 by raymes@chromium.org, Jun 20 2017

Cc: -leng@chromium.org -jww@chromium.org -lcamtuf@google.com -ainslie@chromium.org -jsc...@chromium.org -markusheintz@chromium.org -mlamouri@chromium.org -mea...@chromium.org -palmer@chromium.org -abarth@chromium.org
Project Member

Comment 10 by bugdroid1@chromium.org, Jul 4 2017

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

commit ba6175053f21d892273483c16b8e09b7d4b70fb3
Author: raymes <raymes@chromium.org>
Date: Tue Jul 04 01:28:54 2017

Update list of Feature Policy features

This makes 2 changes to the list of FP features:
1) Move microphone, camera, speaker encrypted-media, midi and geolocation out of
"experimental" features so that they will be succesfully parsed in the allow
attribute, even though they are not used yet.
2) Remove push, notifications and webrtc which are remnants from outdated
efforts/thinking.

BUG= 689802 

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

[modify] https://crrev.com/ba6175053f21d892273483c16b8e09b7d4b70fb3/content/common/feature_policy/feature_policy.cc
[modify] https://crrev.com/ba6175053f21d892273483c16b8e09b7d4b70fb3/third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp
[modify] https://crrev.com/ba6175053f21d892273483c16b8e09b7d4b70fb3/third_party/WebKit/public/platform/WebFeaturePolicyFeature.h

Project Member

Comment 11 by bugdroid1@chromium.org, Jul 11 2017

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

commit 6a2e6fd73be0892689832e9af7feb26413db51ea
Author: raymes <raymes@chromium.org>
Date: Tue Jul 11 01:55:45 2017

Add deprecation warnings for permission API usage from iframes

This adds deprecation warnings when the following APIs are used from cross
origin iframes:
-getCurrentPosition and watchPosition
-requestMIDIAccess
-requestMediaKeySystemAccess
-getUserMedia

A message is only logged if the feature would be disallowed by feature policy.

BUG= 689802 

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

[modify] https://crrev.com/6a2e6fd73be0892689832e9af7feb26413db51ea/third_party/WebKit/Source/core/frame/Deprecation.cpp
[modify] https://crrev.com/6a2e6fd73be0892689832e9af7feb26413db51ea/third_party/WebKit/Source/core/frame/Deprecation.h
[modify] https://crrev.com/6a2e6fd73be0892689832e9af7feb26413db51ea/third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp
[modify] https://crrev.com/6a2e6fd73be0892689832e9af7feb26413db51ea/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
[modify] https://crrev.com/6a2e6fd73be0892689832e9af7feb26413db51ea/third_party/WebKit/Source/modules/mediastream/UserMediaRequest.cpp
[modify] https://crrev.com/6a2e6fd73be0892689832e9af7feb26413db51ea/third_party/WebKit/Source/modules/webmidi/NavigatorWebMIDI.cpp
[modify] https://crrev.com/6a2e6fd73be0892689832e9af7feb26413db51ea/third_party/WebKit/public/platform/WebFeaturePolicyFeature.h
[modify] https://crrev.com/6a2e6fd73be0892689832e9af7feb26413db51ea/third_party/WebKit/public/platform/web_feature.mojom
[modify] https://crrev.com/6a2e6fd73be0892689832e9af7feb26413db51ea/tools/metrics/histograms/enums.xml

Project Member

Comment 12 by bugdroid1@chromium.org, Jul 26 2017

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

commit 4c9a102b2a307ef2f882dd824f8bb7fae4b57209
Author: Raymes Khoury <raymes@chromium.org>
Date: Wed Jul 26 03:14:34 2017

Add layout tests for midi usage with feature policy

This tests midi usage when feature policy is applied. The default feature
policy for midi is for the feature to be disabled in cross-origin iframes. The
tests are written in helper JS file in such a way that they can be reused for
other types of permissions tests.

Bug:  689802 
Change-Id: I2489e1ee738990f152550d358fca4f13daf860b5
Tbr: mkwst@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/576413
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489541}
[modify] https://crrev.com/4c9a102b2a307ef2f882dd824f8bb7fae4b57209/content/shell/browser/layout_test/layout_test_permission_manager.cc
[modify] https://crrev.com/4c9a102b2a307ef2f882dd824f8bb7fae4b57209/content/shell/browser/layout_test/layout_test_permission_manager.h
[modify] https://crrev.com/4c9a102b2a307ef2f882dd824f8bb7fae4b57209/third_party/WebKit/LayoutTests/VirtualTestSuites
[add] https://crrev.com/4c9a102b2a307ef2f882dd824f8bb7fae4b57209/third_party/WebKit/LayoutTests/http/tests/webmidi/midi-default-feature-policy.https.sub-expected.txt
[add] https://crrev.com/4c9a102b2a307ef2f882dd824f8bb7fae4b57209/third_party/WebKit/LayoutTests/http/tests/webmidi/midi-default-feature-policy.https.sub.html
[add] https://crrev.com/4c9a102b2a307ef2f882dd824f8bb7fae4b57209/third_party/WebKit/LayoutTests/http/tests/webmidi/resources/feature-policy-permissions-test.js
[add] https://crrev.com/4c9a102b2a307ef2f882dd824f8bb7fae4b57209/third_party/WebKit/LayoutTests/virtual/feature-policy-permissions/http/tests/webmidi/README.txt
[add] https://crrev.com/4c9a102b2a307ef2f882dd824f8bb7fae4b57209/third_party/WebKit/LayoutTests/virtual/feature-policy-permissions/http/tests/webmidi/midi-default-feature-policy.https.sub-expected.txt

Project Member

Comment 13 by bugdroid1@chromium.org, Jul 27 2017

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

commit f4f24e40db3f0fe99270961d00c4983ec4f42f15
Author: Raymes Khoury <raymes@chromium.org>
Date: Thu Jul 27 03:43:36 2017

Add layout tests for geolocation usage with feature policy

This tests geolocation usage when feature policy is applied. The default
feature policy for geolocation is for the feature to be disabled in
cross-origin iframes.

Bug:  689802 
Change-Id: Ida2c848af9ad337a49da46c0ca9f99696e122d11
Reviewed-on: https://chromium-review.googlesource.com/582262
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489844}
[modify] https://crrev.com/f4f24e40db3f0fe99270961d00c4983ec4f42f15/content/shell/browser/layout_test/layout_test_browser_context.cc
[modify] https://crrev.com/f4f24e40db3f0fe99270961d00c4983ec4f42f15/content/shell/browser/layout_test/layout_test_browser_context.h
[modify] https://crrev.com/f4f24e40db3f0fe99270961d00c4983ec4f42f15/third_party/WebKit/LayoutTests/VirtualTestSuites
[add] https://crrev.com/f4f24e40db3f0fe99270961d00c4983ec4f42f15/third_party/WebKit/LayoutTests/http/tests/geolocation-api/geolocation-default-feature-policy.https.sub-expected.txt
[add] https://crrev.com/f4f24e40db3f0fe99270961d00c4983ec4f42f15/third_party/WebKit/LayoutTests/http/tests/geolocation-api/geolocation-default-feature-policy.https.sub.html
[rename] https://crrev.com/f4f24e40db3f0fe99270961d00c4983ec4f42f15/third_party/WebKit/LayoutTests/http/tests/resources/feature-policy-permissions-test.js
[modify] https://crrev.com/f4f24e40db3f0fe99270961d00c4983ec4f42f15/third_party/WebKit/LayoutTests/http/tests/webmidi/midi-default-feature-policy.https.sub.html
[add] https://crrev.com/f4f24e40db3f0fe99270961d00c4983ec4f42f15/third_party/WebKit/LayoutTests/virtual/feature-policy-permissions/http/tests/geolocation-api/README.txt
[add] https://crrev.com/f4f24e40db3f0fe99270961d00c4983ec4f42f15/third_party/WebKit/LayoutTests/virtual/feature-policy-permissions/http/tests/geolocation-api/geolocation-default-feature-policy.https.sub-expected.txt

Project Member

Comment 14 by bugdroid1@chromium.org, Sep 6 2017

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

commit 12d8ad343da9aef1a0984a852efccf0a8c0c7e21
Author: Raymes Khoury <raymes@chromium.org>
Date: Wed Sep 06 01:42:30 2017

Check Feature Policy for Mic/Camera requests

Mic/Camera requests don't currently go through the permissions service so we
need to implement additional checks. This adds FP checks for requesting devices
which happen in MediaStreamUIProxy. Tests have also been added.

BUG= 689802 

Change-Id: If9169925deeb94d2fa4391ec6f78e274c3e148c3
Reviewed-on: https://chromium-review.googlesource.com/649927
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499838}
[modify] https://crrev.com/12d8ad343da9aef1a0984a852efccf0a8c0c7e21/content/browser/renderer_host/media/media_stream_ui_proxy.cc
[modify] https://crrev.com/12d8ad343da9aef1a0984a852efccf0a8c0c7e21/content/browser/renderer_host/media/media_stream_ui_proxy_unittest.cc

Project Member

Comment 15 by bugdroid1@chromium.org, Sep 8 2017

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

commit b308ebb13a4ef412e972d45d89be402ca05cd63a
Author: Raymes Khoury <raymes@chromium.org>
Date: Fri Sep 08 02:02:54 2017

Reject requestMediaSystemKeyAccess calls when EME is disabled by feature policy

This adds a check that rejects calls to requestMediaSystemKeyAccess when the
feature has been disabled by feature policy. A NotSupportedError is
returned.

Bug:  689802 
Change-Id: I6d48644ace2b416a500ef12b4fe9a896f66dd68a
Reviewed-on: https://chromium-review.googlesource.com/587702
Reviewed-by: John Rummell <jrummell@chromium.org>
Reviewed-by: Noel Gordon <noel@chromium.org>
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#500485}
[modify] https://crrev.com/b308ebb13a4ef412e972d45d89be402ca05cd63a/third_party/WebKit/LayoutTests/NeverFixTests
[add] https://crrev.com/b308ebb13a4ef412e972d45d89be402ca05cd63a/third_party/WebKit/LayoutTests/external/wpt/encrypted-media/encrypted-media-default-feature-policy.https.sub.html
[modify] https://crrev.com/b308ebb13a4ef412e972d45d89be402ca05cd63a/third_party/WebKit/LayoutTests/external/wpt/feature-policy/resources/featurepolicy.js
[modify] https://crrev.com/b308ebb13a4ef412e972d45d89be402ca05cd63a/third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp
[modify] https://crrev.com/b308ebb13a4ef412e972d45d89be402ca05cd63a/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5

Labels: migrated-launch-owp Type-Task
This issue has been automatically relabelled type=task because type=launch-owp issues are now officially deprecated. The deprecation is because they were creating confusion about how to get launch approvals, which should be instead done via type=launch issues.

We recommend this issue be used for implementation tracking (for public visibility), but if you already have an issue for that, you may mark this as duplicate.

For more details see here: https://docs.google.com/document/d/1JA6RohjtZQc26bTrGoIE_bSXGXUDQz8vc6G0n_sZJ2o/edit

For any questions, please contact owencm, sshruthi, larforge
Project Member

Comment 17 by bugdroid1@chromium.org, Sep 19 2017

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

commit 2803f82c928b974eaa5023348a7a2556b828a866
Author: Raymes Khoury <raymes@chromium.org>
Date: Tue Sep 19 09:14:24 2017

Add web platform test for getUserMedia with feature policy applied

A real UserMediaClient needs to be used to make these tests pass so that the
feature policy is checked correctly.

BUG= 689802 

Change-Id: I769c080c1e6eccb1791e032ab5d456b491e3760d
Reviewed-on: https://chromium-review.googlesource.com/654021
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502810}
[modify] https://crrev.com/2803f82c928b974eaa5023348a7a2556b828a866/content/shell/test_runner/web_frame_test_proxy.h
[modify] https://crrev.com/2803f82c928b974eaa5023348a7a2556b828a866/third_party/WebKit/LayoutTests/NeverFixTests
[modify] https://crrev.com/2803f82c928b974eaa5023348a7a2556b828a866/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/2803f82c928b974eaa5023348a7a2556b828a866/third_party/WebKit/LayoutTests/VirtualTestSuites
[modify] https://crrev.com/2803f82c928b974eaa5023348a7a2556b828a866/third_party/WebKit/LayoutTests/external/wpt/feature-policy/resources/featurepolicy.js
[add] https://crrev.com/2803f82c928b974eaa5023348a7a2556b828a866/third_party/WebKit/LayoutTests/external/wpt/mediacapture-streams/MediaStream-default-feature-policy.https.sub.html
[add] https://crrev.com/2803f82c928b974eaa5023348a7a2556b828a866/third_party/WebKit/LayoutTests/virtual/feature-policy-permissions/external/wpt/mediacapture-streams/GUM-impossible-constraint.https-expected.txt
[add] https://crrev.com/2803f82c928b974eaa5023348a7a2556b828a866/third_party/WebKit/LayoutTests/virtual/feature-policy-permissions/external/wpt/mediacapture-streams/README.txt

Project Member

Comment 18 by bugdroid1@chromium.org, Sep 27 2017

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

commit 0c5e9e8a3c6db3462dc9dfbd61ec43af44799713
Author: Raymes Khoury <raymes@chromium.org>
Date: Wed Sep 27 03:19:42 2017

Fix media tests that fail when feature policy is enabled

This CL fixes tests that fail when Feature Policy is enabled.
Specifically:

1) media_stream_ui_proxy_unittest.cc doesn't use real RFHs when
exercising code. FP checks require that. This CL adds a check to
media_stream_ui_proxy.cc to ensure that when these tests are running
the FP is simply ignored.

2) media_stream_dispatcher_host_unittest.cc also doesn't use real RFHs.
FakeMediaStreamUIProxy is modified so that the test can inform the
MediaStreamUIProxy about this so that FP checks are ignored in that
case. Because a new FakeMediaStreamUIProxy is created per request and
some tests involve multiple requests, MediaStreamManager is modified
such that a factory function is passed to create the appropriate
FakeMediaStreamUIProxy.

BUG= 689802 

Change-Id: Icb7b566af131ad4996c5e2c136759058495c3430
Reviewed-on: https://chromium-review.googlesource.com/683995
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504569}
[modify] https://crrev.com/0c5e9e8a3c6db3462dc9dfbd61ec43af44799713/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
[modify] https://crrev.com/0c5e9e8a3c6db3462dc9dfbd61ec43af44799713/content/browser/renderer_host/media/media_stream_manager.cc
[modify] https://crrev.com/0c5e9e8a3c6db3462dc9dfbd61ec43af44799713/content/browser/renderer_host/media/media_stream_manager.h
[modify] https://crrev.com/0c5e9e8a3c6db3462dc9dfbd61ec43af44799713/content/browser/renderer_host/media/media_stream_ui_proxy.cc
[modify] https://crrev.com/0c5e9e8a3c6db3462dc9dfbd61ec43af44799713/content/browser/renderer_host/media/media_stream_ui_proxy.h

Project Member

Comment 19 by bugdroid1@chromium.org, Sep 28 2017

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

commit 436135826534b9c2bbb4ca67b13469a350b30b1c
Author: Raymes Khoury <raymes@chromium.org>
Date: Thu Sep 28 09:22:36 2017

Fix tests that fail when feature policy is enabled

This CL fixes tests that fail when Feature Policy is enabled.
Specifically:
1) Tests in permission_context_base_feature_policy_unittest.cc,
media_devices_permission_checker_unittest.cc,
permission_service_impl_unittest.cc and
media_stream_ui_proxy_unittest.cc have explicit tests for behavior
when the feature flag is disabled, but don't explicitly disable the
flag themselves. This CL disables the feature flag in those cases.
2) geolocation_service_impl_unittest.cc test assume that the
geolocation feature policy has been allowed. This CL enables
geolocation in those cases.
3) permission_service_impl.cc currently assumes that FP checks should
fail in the absence of a RFH. But this is the case for workers and
currently we don't apply FP to workers. This CL fixes this case.

BUG= 689802 

Change-Id: Iab3837d2a541edf52dffcca59d985ca2d1447814
Reviewed-on: https://chromium-review.googlesource.com/683777
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Conley Owens <cco3@chromium.org>
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504953}
[modify] https://crrev.com/436135826534b9c2bbb4ca67b13469a350b30b1c/chrome/browser/permissions/permission_context_base_feature_policy_unittest.cc
[modify] https://crrev.com/436135826534b9c2bbb4ca67b13469a350b30b1c/chrome/test/data/extensions/api_test/webrtc_from_web_accessible_resource/content_script.js
[modify] https://crrev.com/436135826534b9c2bbb4ca67b13469a350b30b1c/chrome/test/data/geolocation/iframe_controller.js
[modify] https://crrev.com/436135826534b9c2bbb4ca67b13469a350b30b1c/content/browser/geolocation/geolocation_service_impl_unittest.cc
[modify] https://crrev.com/436135826534b9c2bbb4ca67b13469a350b30b1c/content/browser/media/media_devices_permission_checker_unittest.cc
[modify] https://crrev.com/436135826534b9c2bbb4ca67b13469a350b30b1c/content/browser/permissions/permission_service_impl.cc
[modify] https://crrev.com/436135826534b9c2bbb4ca67b13469a350b30b1c/content/browser/permissions/permission_service_impl_unittest.cc
[modify] https://crrev.com/436135826534b9c2bbb4ca67b13469a350b30b1c/content/browser/renderer_host/media/media_stream_ui_proxy_unittest.cc

Project Member

Comment 20 by bugdroid1@chromium.org, Oct 3 2017

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

commit 0d7cc8b3b2f5145860f3d05020450b0e16db9b40
Author: Raymes Khoury <raymes@chromium.org>
Date: Tue Oct 03 23:01:59 2017

Add a temporary hack to fix a race condition with FP layout tests

A race condition means that navigation may not reach the browser process
before a permission request does. This adds a hack to ensure that
navigation has reached the browser by waiting for a cross-origin iframe
to load.

BUG= 689802 , 769189 

Change-Id: I26dba360e322cf31c0ec200985a6908de9a82c35
Reviewed-on: https://chromium-review.googlesource.com/688382
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506221}
[modify] https://crrev.com/0d7cc8b3b2f5145860f3d05020450b0e16db9b40/third_party/WebKit/LayoutTests/http/tests/resources/feature-policy-permissions-test.js

Project Member

Comment 21 by bugdroid1@chromium.org, Oct 5 2017

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

commit 15deec03544ac4e4ddd5a47d2ac693f107efa400
Author: Raymes Khoury <raymes@chromium.org>
Date: Thu Oct 05 02:42:16 2017

Update deprecation date for FP permissions

The release is being pushed back from M63 to M64.

BUG= 689802 

Change-Id: I3528170d37d6b9725709afc61274447355d13d78
Reviewed-on: https://chromium-review.googlesource.com/700194
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506629}
[modify] https://crrev.com/15deec03544ac4e4ddd5a47d2ac693f107efa400/third_party/WebKit/LayoutTests/http/tests/geolocation-api/geolocation-default-feature-policy.https.sub-expected.txt
[modify] https://crrev.com/15deec03544ac4e4ddd5a47d2ac693f107efa400/third_party/WebKit/LayoutTests/http/tests/webmidi/midi-default-feature-policy.https.sub-expected.txt
[modify] https://crrev.com/15deec03544ac4e4ddd5a47d2ac693f107efa400/third_party/WebKit/LayoutTests/virtual/feature-policy-permissions/http/tests/geolocation-api/geolocation-default-feature-policy.https.sub-expected.txt
[modify] https://crrev.com/15deec03544ac4e4ddd5a47d2ac693f107efa400/third_party/WebKit/LayoutTests/virtual/feature-policy-permissions/http/tests/webmidi/midi-default-feature-policy.https.sub-expected.txt
[modify] https://crrev.com/15deec03544ac4e4ddd5a47d2ac693f107efa400/third_party/WebKit/Source/core/frame/Deprecation.cpp

Project Member

Comment 22 by bugdroid1@chromium.org, Oct 5 2017

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

commit 8b5a5becb70db786f23b0b4d9721fd7d8a47d7ba
Author: Raymes Khoury <raymes@chromium.org>
Date: Thu Oct 05 05:56:57 2017

Rename WebFeaturePolicyFeature::kEme to WebFeaturePolicyFeature::kEncryptedMedia

EncryptedMedia is more consistent with the rest of the code.

Bug:  689802 
Change-Id: I990212b8e3972ee1c2581ed1237d15321628fab5
Reviewed-on: https://chromium-review.googlesource.com/596617
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: David Dorwin <ddorwin@chromium.org>
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506662}
[modify] https://crrev.com/8b5a5becb70db786f23b0b4d9721fd7d8a47d7ba/chrome/browser/media/protected_media_identifier_permission_context.cc
[modify] https://crrev.com/8b5a5becb70db786f23b0b4d9721fd7d8a47d7ba/content/browser/permissions/permission_service_impl.cc
[modify] https://crrev.com/8b5a5becb70db786f23b0b4d9721fd7d8a47d7ba/content/common/feature_policy/feature_policy.cc
[modify] https://crrev.com/8b5a5becb70db786f23b0b4d9721fd7d8a47d7ba/third_party/WebKit/Source/core/frame/Deprecation.cpp
[modify] https://crrev.com/8b5a5becb70db786f23b0b4d9721fd7d8a47d7ba/third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp
[modify] https://crrev.com/8b5a5becb70db786f23b0b4d9721fd7d8a47d7ba/third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp
[modify] https://crrev.com/8b5a5becb70db786f23b0b4d9721fd7d8a47d7ba/third_party/WebKit/public/platform/WebFeaturePolicyFeature.h

Project Member

Comment 23 by bugdroid1@chromium.org, Oct 17 2017

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

commit 0e297dde0af8800861da2c347bee85c7196b3596
Author: Raymes Khoury <raymes@chromium.org>
Date: Tue Oct 17 01:20:29 2017

Make VideoCaptureTest work correctly with Feature Policy enabled

VideoCaptureTest uses fake RFH IDs which require the
FakeMediaStreamUIProxy to be configured correctly.

Bug:  689802 
Change-Id: I1568a326f32acde5a375a99b108edb4f626c44aa
Reviewed-on: https://chromium-review.googlesource.com/720589
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509205}
[modify] https://crrev.com/0e297dde0af8800861da2c347bee85c7196b3596/content/browser/renderer_host/media/video_capture_unittest.cc

Labels: M-64
Project Member

Comment 25 by bugdroid1@chromium.org, Oct 18 2017

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

commit 42aff11f80470162a8efc90707fb35bab29e9f7a
Author: Raymes Khoury <raymes@chromium.org>
Date: Wed Oct 18 06:47:06 2017

Add a console message if permission is denied due to Feature Policy

This also changes the log level for these type of messages to WARNING
since that seems more appropriate given their nature.

Bug:  689802 
Change-Id: I1ca15b71caa35ca941572d0fbca864855696bb6e
Reviewed-on: https://chromium-review.googlesource.com/722659
Reviewed-by: Timothy Loh <timloh@chromium.org>
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509704}
[modify] https://crrev.com/42aff11f80470162a8efc90707fb35bab29e9f7a/chrome/browser/permissions/permission_context_base.cc
[modify] https://crrev.com/42aff11f80470162a8efc90707fb35bab29e9f7a/chrome/browser/permissions/permission_result.h
[modify] https://crrev.com/42aff11f80470162a8efc90707fb35bab29e9f7a/chrome/browser/permissions/permission_uma_util.cc

Project Member

Comment 26 by bugdroid1@chromium.org, Oct 19 2017

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

commit b82e8b119b85a6c9e364a24624735b2c5c6e39da
Author: Raymes Khoury <raymes@chromium.org>
Date: Thu Oct 19 00:01:23 2017

Add a deprecation warning for Pepper Mic/Camera usage when disabled by FP

If microphone/camera usage are disabled by feature policy, this will
also impact usage by Pepper. Currently we only log a deprecation warning
for getUserMedia usage, but also log one for Flash explicitly.

Bug:  689802 ,  776167 
Change-Id: If8144099909cfbdb40582d360f4f1eb3265db918
Reviewed-on: https://chromium-review.googlesource.com/720583
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Timothy Loh <timloh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509933}
[modify] https://crrev.com/b82e8b119b85a6c9e364a24624735b2c5c6e39da/chrome/browser/media/webrtc/media_stream_devices_controller.cc

Project Member

Comment 27 by bugdroid1@chromium.org, Oct 19 2017

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

commit b611c403986fa21da38c5146b51e7053a91fa542
Author: Raymes Khoury <raymes@chromium.org>
Date: Thu Oct 19 01:35:05 2017

Pass the RFH when checking media permission status in the browser

This ensures that the Feature Policy for the frame can be queried
correctly.

BUG= 689802 

Change-Id: I80f331f7466406473125dd235c0ffc949584215f
Reviewed-on: https://chromium-review.googlesource.com/722541
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Timothy Loh <timloh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509963}
[modify] https://crrev.com/b611c403986fa21da38c5146b51e7053a91fa542/chrome/browser/media/webrtc/media_stream_devices_controller.cc
[modify] https://crrev.com/b611c403986fa21da38c5146b51e7053a91fa542/chrome/browser/permissions/permission_context_base.cc
[modify] https://crrev.com/b611c403986fa21da38c5146b51e7053a91fa542/chrome/browser/permissions/permission_context_base_feature_policy_unittest.cc

Project Member

Comment 28 by bugdroid1@chromium.org, Oct 20 2017

Labels: merge-merged-3239
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/816f296181b8d82d69e5ba26fa669a83146d711d

commit 816f296181b8d82d69e5ba26fa669a83146d711d
Author: Raymes Khoury <raymes@chromium.org>
Date: Fri Oct 20 02:50:15 2017

Add a deprecation warning for Pepper Mic/Camera usage when disabled by FP

If microphone/camera usage are disabled by feature policy, this will
also impact usage by Pepper. Currently we only log a deprecation warning
for getUserMedia usage, but also log one for Flash explicitly.

TBR=raymes@chromium.org

(cherry picked from commit b82e8b119b85a6c9e364a24624735b2c5c6e39da)

Bug:  689802 ,  776167 
Change-Id: If8144099909cfbdb40582d360f4f1eb3265db918
Reviewed-on: https://chromium-review.googlesource.com/720583
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Timothy Loh <timloh@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#509933}
Reviewed-on: https://chromium-review.googlesource.com/729609
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/branch-heads/3239@{#103}
Cr-Branched-From: adb61db19020ed8ecee5e91b1a0ea4c924ae2988-refs/heads/master@{#508578}
[modify] https://crrev.com/816f296181b8d82d69e5ba26fa669a83146d711d/chrome/browser/media/webrtc/media_stream_devices_controller.cc

Project Member

Comment 29 by bugdroid1@chromium.org, Oct 20 2017

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

commit 4f308f62a6fdc979677025f7d01c2cded433ee8f
Author: Raymes Khoury <raymes@chromium.org>
Date: Fri Oct 20 04:11:18 2017

Enable Feature Policy support for EME by default

BUG= 689802 

Change-Id: I20ded8fed7220d717c9552767d8d8ef798bf1261
Reviewed-on: https://chromium-review.googlesource.com/696944
Reviewed-by: David Dorwin <ddorwin@chromium.org>
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510332}
[modify] https://crrev.com/4f308f62a6fdc979677025f7d01c2cded433ee8f/third_party/WebKit/Source/platform/runtime_enabled_features.json5

Project Member

Comment 30 by bugdroid1@chromium.org, Oct 23 2017

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

commit a9873a1588050c59a58170387400d6a1c2f9211b
Author: Raymes Khoury <raymes@chromium.org>
Date: Mon Oct 23 07:15:08 2017

Fix media tests that fail when Feature Policy is enabled

These tests currently use URLs of non-existent pages. But because
navigation to these pages isn't successful, no feature policy is loaded
which causes the tests to fail. This CL changes the tests to use URLs of real
pages loaded from the embedded_test_server.

Bug:  689802 
Change-Id: I35796d9412296658badc02dd4294eb2d7b5aa55f
Tbr: pastarmovj@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/731989
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Timothy Loh <timloh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510726}
[modify] https://crrev.com/a9873a1588050c59a58170387400d6a1c2f9211b/chrome/browser/media/webrtc/media_stream_devices_controller_browsertest.cc
[modify] https://crrev.com/a9873a1588050c59a58170387400d6a1c2f9211b/chrome/browser/policy/policy_browsertest.cc

Project Member

Comment 31 by bugdroid1@chromium.org, Oct 23 2017

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

commit 019761d48e31234f812c7a1d8437ee0da182c49a
Author: Raymes Khoury <raymes@chromium.org>
Date: Mon Oct 23 20:31:46 2017

Enable Feature Policy for geolocation, camera, mic and midi

This enables Feature Policy support for geolocation, camera, mic and
midi. It also disables these features by default in cross-origin 
iframes.

BUG= 689802 

Change-Id: I16382e35841ff03613a20b09915e4d20e9921c5c
Reviewed-on: https://chromium-review.googlesource.com/672172
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Timothy Loh <timloh@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510904}
[modify] https://crrev.com/019761d48e31234f812c7a1d8437ee0da182c49a/content/public/common/content_features.cc
[delete] https://crrev.com/f232ce9c11c1580bd9a45bd3517f2c94514c4f96/third_party/WebKit/LayoutTests/http/tests/geolocation-api/geolocation-default-feature-policy.https.sub-expected.txt
[delete] https://crrev.com/f232ce9c11c1580bd9a45bd3517f2c94514c4f96/third_party/WebKit/LayoutTests/http/tests/webmidi/midi-default-feature-policy.https.sub-expected.txt
[delete] https://crrev.com/f232ce9c11c1580bd9a45bd3517f2c94514c4f96/third_party/WebKit/LayoutTests/virtual/feature-policy-permissions/http/tests/geolocation-api/geolocation-default-feature-policy.https.sub-expected.txt
[delete] https://crrev.com/f232ce9c11c1580bd9a45bd3517f2c94514c4f96/third_party/WebKit/LayoutTests/virtual/feature-policy-permissions/http/tests/webmidi/midi-default-feature-policy.https.sub-expected.txt

Project Member

Comment 32 by bugdroid1@chromium.org, Oct 24 2017

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

commit 4ebad7be6bcff6b279502f3cd80b2f566d92d46c
Author: Raymes Khoury <raymes@chromium.org>
Date: Tue Oct 24 02:44:34 2017

Add Feature Policy checks for geolocation to blink

Currently we check the feature policy for geolocation in the
PermissionService. This has a couple of disadvantages: (1) it's less
consistent with how do other checks like SecureContext and (2) it means
that we can't easily return a specific error message for denial due to
FP.

This CL adds these checks to Geolocation.cpp. It also logs a console
warning when the feature is disabled to help inform developers.
Furthermore, a UseCounter counts how many times the feature has been
blocked due to Feature Policy.

The RuntimeEnabledFeature that was previously only used for 
EncryptedMedia feature policy support is reused for geolocation (and
eventually midi and media) since these features will be released 
together.

Bug:  689802 
Change-Id: If29fda33c0f0dd528969d9f2653edb4f56901151
Reviewed-on: https://chromium-review.googlesource.com/724579
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511015}
[modify] https://crrev.com/4ebad7be6bcff6b279502f3cd80b2f566d92d46c/third_party/WebKit/LayoutTests/VirtualTestSuites
[modify] https://crrev.com/4ebad7be6bcff6b279502f3cd80b2f566d92d46c/third_party/WebKit/LayoutTests/http/tests/security/powerfulFeatureRestrictions/geolocation-on-secure-origin-in-insecure-origin.html
[modify] https://crrev.com/4ebad7be6bcff6b279502f3cd80b2f566d92d46c/third_party/WebKit/LayoutTests/http/tests/security/powerfulFeatureRestrictions/geolocation-on-secure-origin-in-secure-origin.html
[modify] https://crrev.com/4ebad7be6bcff6b279502f3cd80b2f566d92d46c/third_party/WebKit/LayoutTests/http/tests/security/powerfulFeatureRestrictions/resources/geolocation-in-iframe.html
[delete] https://crrev.com/2b4ca8748d57cf30daff14721ef23eb636196989/third_party/WebKit/LayoutTests/virtual/feature-policy-permissions/http/tests/geolocation-api/README.txt
[modify] https://crrev.com/4ebad7be6bcff6b279502f3cd80b2f566d92d46c/third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp
[modify] https://crrev.com/4ebad7be6bcff6b279502f3cd80b2f566d92d46c/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
[modify] https://crrev.com/4ebad7be6bcff6b279502f3cd80b2f566d92d46c/third_party/WebKit/Source/platform/runtime_enabled_features.json5
[modify] https://crrev.com/4ebad7be6bcff6b279502f3cd80b2f566d92d46c/third_party/WebKit/public/platform/web_feature.mojom
[modify] https://crrev.com/4ebad7be6bcff6b279502f3cd80b2f566d92d46c/tools/metrics/histograms/enums.xml

Project Member

Comment 33 by bugdroid1@chromium.org, Oct 24 2017

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

commit 260be941e19c953c37d147e42e2d031d1d6b1451
Author: Raymes Khoury <raymes@chromium.org>
Date: Tue Oct 24 03:13:55 2017

Make media permission requests always go through PermissionManager::RequestPermissions

Currently media requests will only go through
PermissionManager::RequestPermissions when the permission has not been
previously granted. The benefit of always taking this codepath is that
operations in RequestPermissions (such as console logging and UMA) will
get executed consistently regardless of whether we need to show a prompt
or not. It also makes the request process slightly more linear.

Bug:  689802 
Change-Id: Iae70af4f57dfc16450bff33e958b935e644b4b8c
Reviewed-on: https://chromium-review.googlesource.com/722485
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Timothy Loh <timloh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511026}
[modify] https://crrev.com/260be941e19c953c37d147e42e2d031d1d6b1451/chrome/browser/media/webrtc/media_stream_devices_controller.cc
[modify] https://crrev.com/260be941e19c953c37d147e42e2d031d1d6b1451/chrome/browser/media/webrtc/media_stream_devices_controller.h

Project Member

Comment 34 by bugdroid1@chromium.org, Oct 24 2017

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

commit 8d2c106923baf0f838c2a05a0dc3b398afb5a29e
Author: Raymes Khoury <raymes@chromium.org>
Date: Tue Oct 24 07:35:15 2017

Make EME return a SecurityError when disabled by Feature Policy

This changes the type of error returned to be a SecurityError, as
discussed in https://github.com/w3c/encrypted-media/pull/432#pullrequestreview-68165178.

This also makes 3 other small changes:
1) The deprecation warning is only shown when the feature is not
enabled.
2) A separate console message is logged when a request has been rejected
due to a Feature Policy in effect.
3) A UseCounter also counts the number of times that a request is
rejected due to Feature Policy.

Bug:  689802 
Change-Id: Ic067fea9df858ba5390f74073e67a350043fe8ce
Reviewed-on: https://chromium-review.googlesource.com/727319
Reviewed-by: Timothy Loh <timloh@chromium.org>
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: David Dorwin <ddorwin@chromium.org>
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511051}
[modify] https://crrev.com/8d2c106923baf0f838c2a05a0dc3b398afb5a29e/third_party/WebKit/LayoutTests/external/wpt/encrypted-media/encrypted-media-default-feature-policy.https.sub.html
[modify] https://crrev.com/8d2c106923baf0f838c2a05a0dc3b398afb5a29e/third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp
[modify] https://crrev.com/8d2c106923baf0f838c2a05a0dc3b398afb5a29e/third_party/WebKit/public/platform/web_feature.mojom
[modify] https://crrev.com/8d2c106923baf0f838c2a05a0dc3b398afb5a29e/tools/metrics/histograms/enums.xml

Project Member

Comment 35 by bugdroid1@chromium.org, Oct 24 2017

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

commit eb287e7932af019491bf206770374cd3493c571a
Author: Raymes Khoury <raymes@chromium.org>
Date: Tue Oct 24 22:51:57 2017

Tie together kUseFeaturePolicyForPermissions and FeaturePolicyForPermissions

This ties together the content and blink feature flags for feature policy
support for mic/camera/geolocation/midi/eme. There are various bits
implemented in blink and chrome so these flags should be tied together 
so the feature can easily be toggled.

Bug:  689802 
Change-Id: Iec2e612260f1ee0705ccff673cc34dd3d83e8148
Reviewed-on: https://chromium-review.googlesource.com/725060
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511291}
[modify] https://crrev.com/eb287e7932af019491bf206770374cd3493c571a/content/child/runtime_features.cc

Project Member

Comment 36 by bugdroid1@chromium.org, Oct 26 2017

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

commit ddbfc9bca23fd09a969c04e2a107809da3e2146c
Author: Raymes Khoury <raymes@chromium.org>
Date: Thu Oct 26 02:05:09 2017

Add Feature Policy checks for midi to blink

Currently we check the feature policy for midi in the PermissionService.
This means that we can't easily return a specific error message for denial due
to FP. Also, several permission features do not use the PermissionService
codepath and need to be checked individually anyway, so it seems more
appropriate to do this for all permissions.

This CL adds these checks to NavigatorWebMIDI.cpp. It also logs a console
warning when the feature is disabled to help inform developers.
Furthermore, a UseCounter counts how many times the feature has been
blocked due to Feature Policy.

Bug:  689802 
Change-Id: I527278323ea9662a29db24f9b35071b901e2b58f
Reviewed-on: https://chromium-review.googlesource.com/724580
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Timothy Loh <timloh@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511698}
[modify] https://crrev.com/ddbfc9bca23fd09a969c04e2a107809da3e2146c/third_party/WebKit/LayoutTests/VirtualTestSuites
[delete] https://crrev.com/ba416ac0e7132ccefc1f3e3a8517acae5370a34c/third_party/WebKit/LayoutTests/virtual/feature-policy-permissions/http/tests/webmidi/README.txt
[modify] https://crrev.com/ddbfc9bca23fd09a969c04e2a107809da3e2146c/third_party/WebKit/Source/modules/webmidi/NavigatorWebMIDI.cpp
[modify] https://crrev.com/ddbfc9bca23fd09a969c04e2a107809da3e2146c/third_party/WebKit/public/platform/web_feature.mojom
[modify] https://crrev.com/ddbfc9bca23fd09a969c04e2a107809da3e2146c/tools/metrics/histograms/enums.xml

Project Member

Comment 37 by bugdroid1@chromium.org, Oct 26 2017

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

commit b2ea20316f9337e8c47eadf0b0385d8c40a1d573
Author: Łukasz Anforowicz <lukasza@chromium.org>
Date: Thu Oct 26 17:36:14 2017

Revert "Add Feature Policy checks for midi to blink"

This reverts commit ddbfc9bca23fd09a969c04e2a107809da3e2146c.

Reason for revert: This CL caused flaky timeouts linux_site_isolation trybot and on Site Isolation FYI bots - see  https://crbug.com/778709 

Original change's description:
> Add Feature Policy checks for midi to blink
> 
> Currently we check the feature policy for midi in the PermissionService.
> This means that we can't easily return a specific error message for denial due
> to FP. Also, several permission features do not use the PermissionService
> codepath and need to be checked individually anyway, so it seems more
> appropriate to do this for all permissions.
> 
> This CL adds these checks to NavigatorWebMIDI.cpp. It also logs a console
> warning when the feature is disabled to help inform developers.
> Furthermore, a UseCounter counts how many times the feature has been
> blocked due to Feature Policy.
> 
> Bug:  689802 
> Change-Id: I527278323ea9662a29db24f9b35071b901e2b58f
> Reviewed-on: https://chromium-review.googlesource.com/724580
> Commit-Queue: Raymes Khoury <raymes@chromium.org>
> Reviewed-by: Timothy Loh <timloh@chromium.org>
> Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#511698}

TBR=raymes@chromium.org,toyoshim@chromium.org,timloh@chromium.org

Change-Id: I9fa08cbbcb8b02803a2fa6aab9c2e518fd5498f2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  689802 ,  778709 
Reviewed-on: https://chromium-review.googlesource.com/739882
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511865}
[modify] https://crrev.com/b2ea20316f9337e8c47eadf0b0385d8c40a1d573/third_party/WebKit/LayoutTests/VirtualTestSuites
[add] https://crrev.com/b2ea20316f9337e8c47eadf0b0385d8c40a1d573/third_party/WebKit/LayoutTests/virtual/feature-policy-permissions/http/tests/webmidi/README.txt
[modify] https://crrev.com/b2ea20316f9337e8c47eadf0b0385d8c40a1d573/third_party/WebKit/Source/modules/webmidi/NavigatorWebMIDI.cpp
[modify] https://crrev.com/b2ea20316f9337e8c47eadf0b0385d8c40a1d573/third_party/WebKit/public/platform/web_feature.mojom
[modify] https://crrev.com/b2ea20316f9337e8c47eadf0b0385d8c40a1d573/tools/metrics/histograms/enums.xml

Project Member

Comment 38 by bugdroid1@chromium.org, Oct 30 2017

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

commit 61377e588b14bbc07c9aef458cd2b413da6f079a
Author: Raymes Khoury <raymes@chromium.org>
Date: Mon Oct 30 00:53:06 2017

Don't show Feature Policy deprecation warnings for mic/camera

Currently we show deprecation warnings for mic/camera when they are 
disabled by feature policy in cross-origin iframes. However, once we 
enable Feature Policy for mic/camera an error will automatically be 
logged at the point where permission is requested. This is more 
accurate as currently it's possible to show the warning even when the
feature policy has no impact on the function call (for example when
the user is using getUserMedia for desktop capture).

Although we remove the warning, we add some use counters to count the 
cases where mic/camera are requested while feature policy is disabled.

Bug:  689802 
Change-Id: I2a1ddc5b1a77357cde222352ad0d0268c32d447f
Reviewed-on: https://chromium-review.googlesource.com/725004
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Timothy Loh <timloh@chromium.org>
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512428}
[modify] https://crrev.com/61377e588b14bbc07c9aef458cd2b413da6f079a/third_party/WebKit/Source/modules/mediastream/UserMediaRequest.cpp
[modify] https://crrev.com/61377e588b14bbc07c9aef458cd2b413da6f079a/third_party/WebKit/public/platform/web_feature.mojom
[modify] https://crrev.com/61377e588b14bbc07c9aef458cd2b413da6f079a/tools/metrics/histograms/enums.xml

Project Member

Comment 39 by bugdroid1@chromium.org, Oct 30 2017

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

commit 0387e70701286e6ca4aa8c7638e0f30e1af42b1d
Author: Raymes Khoury <raymes@chromium.org>
Date: Mon Oct 30 03:19:31 2017

[Reland] Add Feature Policy checks for midi to blink

Currently we check the feature policy for midi in the PermissionService.
This means that we can't easily return a specific error message for denial due
to FP. Also, several permission features do not use the PermissionService
codepath and need to be checked individually anyway, so it seems more
appropriate to do this for all permissions.

This CL adds these checks to NavigatorWebMIDI.cpp. It also logs a console
warning when the feature is disabled to help inform developers.
Furthermore, a UseCounter counts how many times the feature has been
blocked due to Feature Policy.

This CL was reverted in https://chromium-review.googlesource.com/c/chromium/src/+/739882
because it broke layout tests on the site isolation bots. This issue has been
worked around, see  crbug.com/779433 .

Bug:  689802 
Change-Id: I3ce66d6dc7dec644d8c11f23001ca73558970bf0
Tbr: timloh@chromium.org, toyoshim@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/743142
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512434}
[modify] https://crrev.com/0387e70701286e6ca4aa8c7638e0f30e1af42b1d/third_party/WebKit/LayoutTests/VirtualTestSuites
[modify] https://crrev.com/0387e70701286e6ca4aa8c7638e0f30e1af42b1d/third_party/WebKit/LayoutTests/http/tests/resources/feature-policy-permissions-test.js
[delete] https://crrev.com/71716930f260e22871135e8657f85f7e383e6dc8/third_party/WebKit/LayoutTests/virtual/feature-policy-permissions/http/tests/webmidi/README.txt
[modify] https://crrev.com/0387e70701286e6ca4aa8c7638e0f30e1af42b1d/third_party/WebKit/Source/modules/webmidi/NavigatorWebMIDI.cpp
[modify] https://crrev.com/0387e70701286e6ca4aa8c7638e0f30e1af42b1d/third_party/WebKit/public/platform/web_feature.mojom
[modify] https://crrev.com/0387e70701286e6ca4aa8c7638e0f30e1af42b1d/tools/metrics/histograms/enums.xml

Project Member

Comment 40 by bugdroid1@chromium.org, Oct 31 2017

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

commit 216b9e49ed9753a80198b164459dc7849913fedd
Author: Raymes Khoury <raymes@chromium.org>
Date: Tue Oct 31 04:58:18 2017

Don't display the media tab indicator if the request was blocked by feature policy

If a media permission request is fully blocked by feature policy, we
don't want to show the tab indicator as the user has no way to recover.
This is consistent with how we fail for insecure contexts and other
web-platform API requirements.

Bug:  689802 
Change-Id: I8921d5ac8d98f26f1e7ba7a624497846716ffdf4
Reviewed-on: https://chromium-review.googlesource.com/737494
Reviewed-by: Timothy Loh <timloh@chromium.org>
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512748}
[modify] https://crrev.com/216b9e49ed9753a80198b164459dc7849913fedd/chrome/browser/media/webrtc/media_stream_devices_controller.cc
[modify] https://crrev.com/216b9e49ed9753a80198b164459dc7849913fedd/chrome/browser/media/webrtc/media_stream_devices_controller.h
[modify] https://crrev.com/216b9e49ed9753a80198b164459dc7849913fedd/chrome/browser/media/webrtc/media_stream_devices_controller_browsertest.cc

Project Member

Comment 41 by bugdroid1@chromium.org, Nov 9 2017

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

commit 127adeb96f26e3e5594ad63aae1d1a2506e91457
Author: Raymes Khoury <raymes@chromium.org>
Date: Thu Nov 09 00:15:32 2017

Don't log Flash deprecation warning when kUseFeaturePolicyForPermissions is enabled

Currently we log a specific deprecation warning for Flash media
requests. This isn't necessary when kUseFeaturePolicyForPermissions is
enabled because we log a warning as a part of the failed permission
request.

Bug:  689802 
Change-Id: I4c332684ad61fa023136719e8461e4ef3bf4eade
Reviewed-on: https://chromium-review.googlesource.com/754462
Reviewed-by: Timothy Loh <timloh@chromium.org>
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515025}
[modify] https://crrev.com/127adeb96f26e3e5594ad63aae1d1a2506e91457/chrome/browser/media/webrtc/media_stream_devices_controller.cc

Labels: Hotlist-EnamelAndFriendsFixIt
The ideea looks good.

In chrome 62 there is no way to get user permission, or use the already saved preference for location in an iframe regardless of it's origin.

The only way you can get the permission popup, or use the permission is to be in the top window.

It would be great if the feature policy will be fixed in the next release, so <iframe allow="geolocation"> would grant the iframe right to use/ask for permission

> In chrome 62 there is no way to get user permission, or use the already saved preference for location in an iframe regardless of it's origin.

I'm not sure what you mean by that. It should be possible to request geolocation in an iframe in M62.

> It would be great if the feature policy will be fixed in the next release, so <iframe allow="geolocation"> would grant the iframe right to use/ask for permission

This is what it does as of Chrome M64.
Project Member

Comment 45 by bugdroid1@chromium.org, Dec 12 2017

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

commit 090cd7b58fc57101ab9dfe81e2edf276b234ad54
Author: Raymes Khoury <raymes@chromium.org>
Date: Tue Dec 12 06:40:03 2017

Revert "Add a temporary hack to fix a race condition with FP layout tests"

This reverts commit 0d7cc8b3b2f5145860f3d05020450b0e16db9b40.

Reason for revert: Should be fixed by https://chromium-review.googlesource.com/c/chromium/src/+/735686

Original change's description:
> Add a temporary hack to fix a race condition with FP layout tests
> 
> A race condition means that navigation may not reach the browser process
> before a permission request does. This adds a hack to ensure that
> navigation has reached the browser by waiting for a cross-origin iframe
> to load.
> 
> BUG= 689802 , 769189 
> 
> Change-Id: I26dba360e322cf31c0ec200985a6908de9a82c35
> Reviewed-on: https://chromium-review.googlesource.com/688382
> Reviewed-by: Ian Clelland <iclelland@chromium.org>
> Commit-Queue: Raymes Khoury <raymes@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#506221}

TBR=raymes@chromium.org,qyearsley@chromium.org,iclelland@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug:  689802 ,  769189 
Change-Id: I36cd26c2d2683e020237e038f658fb30fe55354d
Reviewed-on: https://chromium-review.googlesource.com/821952
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523358}
[modify] https://crrev.com/090cd7b58fc57101ab9dfe81e2edf276b234ad54/third_party/WebKit/LayoutTests/http/tests/resources/feature-policy-permissions-test.js

Project Member

Comment 46 by bugdroid1@chromium.org, Jan 15 2018

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

commit 9b209c3832d5f68055420aba08a76aef7bc31829
Author: Raymes Khoury <raymes@chromium.org>
Date: Mon Jan 15 02:37:35 2018

Remove redundant FP checks from PermissionService

These checks tend to need to be performed in feature-specific ways, so
having this general code doesn't turn out to be as useful as originally
anticipated.

Bug:  689802 
Change-Id: I4965de756746143d7074ba8e33609f321463e24d
Reviewed-on: https://chromium-review.googlesource.com/725002
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529189}
[modify] https://crrev.com/9b209c3832d5f68055420aba08a76aef7bc31829/base/threading/thread_restrictions.h
[modify] https://crrev.com/9b209c3832d5f68055420aba08a76aef7bc31829/content/browser/permissions/permission_service_impl.cc
[delete] https://crrev.com/6d5446d814467b001ec82ddba4cc2f862c2275b9/content/browser/permissions/permission_service_impl_unittest.cc
[modify] https://crrev.com/9b209c3832d5f68055420aba08a76aef7bc31829/content/test/BUILD.gn
[modify] https://crrev.com/9b209c3832d5f68055420aba08a76aef7bc31829/media/midi/task_service.cc

Labels: -Hotlist-EnamelAndFriendsFixIt
Labels: Hotlist-Interop
Status: Fixed (was: Assigned)
 Issue 661286  has been merged into this issue.
Cc: loonyb...@chromium.org
 Issue 666765  has been merged into this issue.
Project Member

Comment 52 by bugdroid1@chromium.org, Aug 8

Project Member

Comment 53 by bugdroid, Today (5 hours ago)

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

commit 35d1c33c83fc53b803bb90a27bf14dd3d97c57af
Author: Ryan Sleevi <rsleevi@chromium.org>
Date: Wed Jan 23 19:23:15 2019

Remove dead deprecation-tracking code

For features that were potentially blocked by Feature Policy,
a codepath existed to record usage that would be deprecated. That
usage was deprecated in M64, and retired in
https://crrev.com/581528, so there's no need to keep the dead code
path around.

Bug:  689802 
Change-Id: I235d37446f0d3065acadff0a8af7887fc13bc276
Reviewed-on: https://chromium-review.googlesource.com/c/1427455
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Ryan Sleevi <rsleevi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#625303}

Sign in to add a comment