Skip to content
  • reillyg's avatar
    Store USB device permissions in website settings. · 551eaa48
    reillyg authored
    This change adds a new class, ChooserContextBase, that stores a list of
    chosen objects for chooser-based permissions in website settings. It is
    similar to PermissionContextBase.
    
    UsbPermissionContext extends this and adds the concept of an ephemeral
    device permission (for devices that can't be recorded in persistent
    storage because they are not uniquely identifiable enough).
    
    WebUSB is the initial consumer of this new API. WebUSBPermissionProvider
    has been updated to check with the UsbPermissionContext and once there
    is a chooser UI to populate the list of allowed devices the
    --enable-webusb-on-any-origin flag can be removed.
    
    BUG=529950
    
    Review URL: https://codereview.chromium.org/1382783002
    
    Cr-Commit-Position: refs/heads/master@{#359001}
    551eaa48