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

Issue 2698083008: Make the navigator.usb attribute accessible only in secure contexts. (Closed)

Created:
3 years, 10 months ago by Reilly Grant (use Gerrit)
Modified:
3 years, 8 months ago
Reviewers:
chasej, Mike West
CC:
blink-reviews, blink-reviews-bindings_chromium.org, chasej+watch_chromium.org, chromium-reviews, haraken, iclelland+watch_chromuim.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make the navigator.usb attribute accessible only in secure contexts. Instead of performing secure context checks inside every method of the USB object this change removes it from the Navigator object when not in a secure context. This is equivalent to adding the [SecureContext] extended attribute to the NavigatorUSB interface but the WebIDL code generator doesn't support mixing it with [OriginTrialEnabled]. Instead the secure context check is added to the hand-written Origin Trial code in ConditionalFeaturesForModules.cpp. BUG=691031 Review-Url: https://codereview.chromium.org/2698083008 Cr-Commit-Position: refs/heads/master@{#452256} Committed: https://chromium.googlesource.com/chromium/src/+/9a05ae84e268e91f39a684bc565484110c16da1b

Patch Set 1 #

Patch Set 2 : Moved [NoInterfaceObject] change to a separate patch. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -16 lines) Patch
A third_party/WebKit/LayoutTests/http/tests/usb/insecure-context.html View 1 chunk +17 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/usb/secure-context.html View 1 chunk +17 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/modules/v8/ConditionalFeaturesForModules.cpp View 2 chunks +6 lines, -2 lines 2 comments Download
M third_party/WebKit/Source/modules/webusb/NavigatorUSB.idl View 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webusb/USB.cpp View 2 chunks +6 lines, -14 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 27 (17 generated)
Reilly Grant (use Gerrit)
Moved [NoInterfaceObject] change to a separate patch.
3 years, 10 months ago (2017-02-17 23:12:37 UTC) #5
Reilly Grant (use Gerrit)
PTAL
3 years, 10 months ago (2017-02-17 23:16:22 UTC) #7
Mike West
It surprises me that we can't set both OriginTrial and SecureContext. :/ Mind filing a ...
3 years, 10 months ago (2017-02-18 11:19:49 UTC) #13
Reilly Grant (use Gerrit)
On 2017/02/18 11:19:49, Mike West (sloooooow) wrote: > It surprises me that we can't set ...
3 years, 10 months ago (2017-02-18 19:23:54 UTC) #14
Reilly Grant (use Gerrit)
On 2017/02/18 11:19:49, Mike West (sloooooow) wrote: > It surprises me that we can't set ...
3 years, 10 months ago (2017-02-18 19:23:54 UTC) #15
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/2698083008/20001
3 years, 10 months ago (2017-02-22 18:56:40 UTC) #17
chasej
Drive-by (and late) comments on the changes to ConditionalFeaturesForModules. In short, the changes there don't ...
3 years, 10 months ago (2017-02-22 19:34:18 UTC) #19
Reilly Grant (use Gerrit)
On 2017/02/22 19:34:18, chasej wrote: > Drive-by (and late) comments on the changes to > ...
3 years, 10 months ago (2017-02-22 19:59:39 UTC) #20
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/9a05ae84e268e91f39a684bc565484110c16da1b
3 years, 10 months ago (2017-02-22 23:06:47 UTC) #23
Matt Giuca
3 years, 8 months ago (2017-03-29 04:46:36 UTC) #25
Message was sent while issue was closed.
For those playing at home, the bug filed for SecureContext incompatibility is:
https://bugs.chromium.org/p/chromium/issues/detail?id=695123

Powered by Google App Engine
This is Rietveld 408576698