Use [SecureContext] for navigator.usb |
||
Issue descriptionUsing [SecureContext] on the NavigatorUsb partial interface seems strictly better than manually adding checks to all methods implemented on the USB interface.
,
Feb 22 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9a05ae84e268e91f39a684bc565484110c16da1b commit 9a05ae84e268e91f39a684bc565484110c16da1b Author: reillyg <reillyg@chromium.org> Date: Wed Feb 22 23:05:19 2017 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} [add] https://crrev.com/9a05ae84e268e91f39a684bc565484110c16da1b/third_party/WebKit/LayoutTests/http/tests/usb/insecure-context.html [add] https://crrev.com/9a05ae84e268e91f39a684bc565484110c16da1b/third_party/WebKit/LayoutTests/http/tests/usb/secure-context.html [modify] https://crrev.com/9a05ae84e268e91f39a684bc565484110c16da1b/third_party/WebKit/Source/bindings/modules/v8/ConditionalFeaturesForModules.cpp [modify] https://crrev.com/9a05ae84e268e91f39a684bc565484110c16da1b/third_party/WebKit/Source/modules/webusb/NavigatorUSB.idl [modify] https://crrev.com/9a05ae84e268e91f39a684bc565484110c16da1b/third_party/WebKit/Source/modules/webusb/USB.cpp
,
Mar 13 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by reillyg@chromium.org
, Feb 22 2017