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

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 3
Type: Feature

Blocked on:
issue 921657
issue 923593
issue 931459



Sign in to add a comment
link

Issue 854329: Group policy to automatically grant USB device permissions

Reported by reillyg@chromium.org, Jun 19 2018 Project Member

Issue description

In enterprise deployments it may be desirable to grant an application access to a set of USB devices by policy. To accomplish this this feature request proposes adding a Group Policy option mapping a USB vendor and product ID pair to a set of origins. When this policy is in place for any matching device Chrome will behave as if the user granted permission for these origins to connect to the device through the normal chooser UI that is presented by the navigator.usb.requestDevice() method.

Example policy value:

[
  {
    'vendorId': 0xABCD,
    'productId': 0x1234, // optional, matches all products if missing
    'urls': [
      'https://[*.]google.com',
    ]
  }
]
 

Comment 1 by isandrk@chromium.org, Jun 20 2018

Labels: Enterprise-Triaged

Comment 2 by reillyg@chromium.org, Jul 14 2018

Cc: isandrk@chromium.org
isandrk@, I am planning to work on implementing this policy option soon. Is there anything I should do to get the concept reviewed before I start?

Comment 3 by isandrk@chromium.org, Jul 16 2018

Owner: reillyg@chromium.org
Hi reillyg, you can share the DD with managed-devices@ if you think it's related to enterprise infrastructure.

I've added the Enterprise-Triaged label to get this bug out of our triage queue as this is a tracking bug used for new feature development.  I'll assign the bug to you as the owner.  For the future - bugs with the Enterprise label without an owner pop up in our triage queue so please mark yourself as the owner for cases like this one :-)

Comment 4 by reillyg@chromium.org, Jul 16 2018

I will put together a design doc and share it with managed-devices@.

Comment 5 by benhenry@chromium.org, Aug 2

Status: Assigned (was: Available)

Comment 6 by soushi@chromium.org, Aug 22

Cc: soushi@chromium.org

Comment 7 by reillyg@chromium.org, Aug 22

Cc: reillyg@chromium.org
Owner: odejesush@chromium.org
I've gotten the design doc[1] (sorry, Google-only) reviewed by the managed-devices@ team and odejesush@ will be beginning implementation shortly.

[1] https://docs.google.com/document/d/1MPvsrWiVD_jAC8ELyk8njFpy6j1thfVU5aWT3TCWE8w/edit

Comment 8 by bugdroid1@chromium.org, Oct 2

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

commit abd74fa9635944e46d59b5db3b026fcabf3754d9
Author: Ovidio Henriquez <odejesush@chromium.org>
Date: Tue Oct 02 16:59:24 2018

Add WebUsbAllowDevicesForUrls policy

This change adds a new policy template for WebUsbAllowDevicesForUrls.
The new policy will allow a list of devices to be automatically granted
permission to be used for a list of URL patterns. This change also adds
a policy handler to validate the policy value and add the validated
value to Preferences using the pref name defined for this policy.

The design document for the new WebUSB policy is located at:
https://docs.google.com/document/d/1MPvsrWiVD_jAC8ELyk8njFpy6j1thfVU5aWT3TCWE8w/

Bug: 854329
Change-Id: I03657906834ba12f43735d7339a8ca404dc50718
Reviewed-on: https://chromium-review.googlesource.com/1225692
Commit-Queue: Ovidio Henriquez <odejesush@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Sergey Poromov <poromov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595880}
[modify] https://crrev.com/abd74fa9635944e46d59b5db3b026fcabf3754d9/chrome/browser/BUILD.gn
[modify] https://crrev.com/abd74fa9635944e46d59b5db3b026fcabf3754d9/chrome/browser/policy/configuration_policy_handler_list_factory.cc
[add] https://crrev.com/abd74fa9635944e46d59b5db3b026fcabf3754d9/chrome/browser/policy/webusb_allow_devices_for_urls_policy_handler.cc
[add] https://crrev.com/abd74fa9635944e46d59b5db3b026fcabf3754d9/chrome/browser/policy/webusb_allow_devices_for_urls_policy_handler.h
[add] https://crrev.com/abd74fa9635944e46d59b5db3b026fcabf3754d9/chrome/browser/policy/webusb_allow_devices_for_urls_policy_handler_unittest.cc
[modify] https://crrev.com/abd74fa9635944e46d59b5db3b026fcabf3754d9/chrome/test/BUILD.gn
[modify] https://crrev.com/abd74fa9635944e46d59b5db3b026fcabf3754d9/chrome/test/data/policy/policy_test_cases.json
[modify] https://crrev.com/abd74fa9635944e46d59b5db3b026fcabf3754d9/components/content_settings/core/browser/content_settings_policy_provider.cc
[modify] https://crrev.com/abd74fa9635944e46d59b5db3b026fcabf3754d9/components/content_settings/core/common/pref_names.cc
[modify] https://crrev.com/abd74fa9635944e46d59b5db3b026fcabf3754d9/components/content_settings/core/common/pref_names.h
[modify] https://crrev.com/abd74fa9635944e46d59b5db3b026fcabf3754d9/components/policy/resources/policy_templates.json
[modify] https://crrev.com/abd74fa9635944e46d59b5db3b026fcabf3754d9/tools/metrics/histograms/enums.xml

Comment 9 by bugdroid1@chromium.org, Oct 4

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

commit d69ab30242b326e6a1420f4b55d694e1167af3c9
Author: Ovidio Henriquez <odejesush@chromium.org>
Date: Thu Oct 04 16:55:24 2018

Implement UsbPolicyAllowedDevices class

This change creates a new UsbPolicyAllowedDevices class that reads the
preference value for kManagedWebUsbAllowedDevicesForUrls and creates a
mapping of the tuple (vendor_id, product_id) to a set of URL patterns.
The class also provides a method to check if a pair of requesting and
embedding origins are allowed to access a device with vendor_id and
product_id.

The design document for this feature can be found at:
https://docs.google.com/document/d/1MPvsrWiVD_jAC8ELyk8njFpy6j1thfVU5aWT3TCWE8w

Bug: 854329
Change-Id: I014849be2ef4779e45c28c6699ff34022d3e9b89
Reviewed-on: https://chromium-review.googlesource.com/c/1250060
Commit-Queue: Ovidio Henriquez <odejesush@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596710}
[modify] https://crrev.com/d69ab30242b326e6a1420f4b55d694e1167af3c9/chrome/browser/BUILD.gn
[add] https://crrev.com/d69ab30242b326e6a1420f4b55d694e1167af3c9/chrome/browser/usb/usb_policy_allowed_devices.cc
[add] https://crrev.com/d69ab30242b326e6a1420f4b55d694e1167af3c9/chrome/browser/usb/usb_policy_allowed_devices.h
[add] https://crrev.com/d69ab30242b326e6a1420f4b55d694e1167af3c9/chrome/browser/usb/usb_policy_allowed_devices_unittest.cc
[modify] https://crrev.com/d69ab30242b326e6a1420f4b55d694e1167af3c9/chrome/test/BUILD.gn

Comment 10 by bugdroid1@chromium.org, Oct 9

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

commit e3aa8a56706c4abe208934d5c294f7b594b8b693
Author: Ovidio Henriquez <odejesush@chromium.org>
Date: Tue Oct 09 15:49:15 2018

Enforce the WebUsbAllowDevicesForUrls policy

This change modifies UsbChooserContext to use the UsbAllowDevicesForUrls
class to consider devices allowed by the WebUsbAllowDevicesForUrls
policy. The WebUsbAllowDevicesForUrls policy overrides the other WebUSB
policies. Unit tests are also added to ensure that the policy is being
enforced correctly.

The design document for this feature is found at:
https://docs.google.com/document/d/1MPvsrWiVD_jAC8ELyk8njFpy6j1thfVU5aWT3TCWE8w

Bug: 854329
Change-Id: I5f82e662ca9dc544da5918eae766b5535a31296b
Reviewed-on: https://chromium-review.googlesource.com/c/1259289
Commit-Queue: Ovidio Henriquez <odejesush@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597926}
[modify] https://crrev.com/e3aa8a56706c4abe208934d5c294f7b594b8b693/chrome/browser/policy/policy_browsertest.cc
[modify] https://crrev.com/e3aa8a56706c4abe208934d5c294f7b594b8b693/chrome/browser/usb/usb_chooser_context.cc
[modify] https://crrev.com/e3aa8a56706c4abe208934d5c294f7b594b8b693/chrome/browser/usb/usb_chooser_context.h
[modify] https://crrev.com/e3aa8a56706c4abe208934d5c294f7b594b8b693/chrome/browser/usb/usb_chooser_context_unittest.cc

Comment 11 by bugdroid1@chromium.org, Oct 19

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2faba286f45587d104c80dceee4c2084e3eab5b3

commit 2faba286f45587d104c80dceee4c2084e3eab5b3
Author: Ovidio Henriquez <odejesush@chromium.org>
Date: Fri Oct 19 20:22:41 2018

Set WebUsbAllowDevicesForUrls policy to future

This change updates the WebUsbAllowDevicesForUrls policy entry in
policy_templates.json to have the future property set to true.
This prevents the policy from being in documentation and the
generated ADMX and linux.json file until the policy is visible
in Site settings.

Design document:
https://docs.google.com/document/d/1MPvsrWiVD_jAC8ELyk8njFpy6j1thfVU5aWT3TCWE8w

Bug: 854329
Change-Id: Ib2c9a04fd992d8c6c88a52ec9c954a48ff9a673d
Reviewed-on: https://chromium-review.googlesource.com/c/1262082
Commit-Queue: Ovidio Henriquez <odejesush@chromium.org>
Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601277}
[modify] https://crrev.com/2faba286f45587d104c80dceee4c2084e3eab5b3/components/policy/resources/policy_templates.json

Comment 12 by bugdroid1@chromium.org, Oct 23

Project Member
Labels: merge-merged-3578
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/27c01de8527b0435e634fbbe413dc1187e31b39d

commit 27c01de8527b0435e634fbbe413dc1187e31b39d
Author: Ovidio Henriquez <odejesush@chromium.org>
Date: Tue Oct 23 20:43:42 2018

Set WebUsbAllowDevicesForUrls policy to future

This change updates the WebUsbAllowDevicesForUrls policy entry in
policy_templates.json to have the future property set to true.
This prevents the policy from being in documentation and the
generated ADMX and linux.json file until the policy is visible
in Site settings.

Design document:
https://docs.google.com/document/d/1MPvsrWiVD_jAC8ELyk8njFpy6j1thfVU5aWT3TCWE8w

Bug: 854329,  897887 
Change-Id: Ib2c9a04fd992d8c6c88a52ec9c954a48ff9a673d
Reviewed-on: https://chromium-review.googlesource.com/c/1262082
Commit-Queue: Ovidio Henriquez <odejesush@chromium.org>
Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#601277}(cherry picked from commit 2faba286f45587d104c80dceee4c2084e3eab5b3)
Reviewed-on: https://chromium-review.googlesource.com/c/1297058
Reviewed-by: Ovidio Henriquez <odejesush@chromium.org>
Cr-Commit-Position: refs/branch-heads/3578@{#272}
Cr-Branched-From: 4226ddf99103e493d7afb23a4c7902ee496108b6-refs/heads/master@{#599034}
[modify] https://crrev.com/27c01de8527b0435e634fbbe413dc1187e31b39d/components/policy/resources/policy_templates.json

Comment 13 by cr-audit...@appspot.gserviceaccount.com, Oct 23

Project Member
Labels: Merge-Merged-71-3578
The following revision refers to this bug: 
https://chromium.googlesource.com/chromium/src.git/+/27c01de8527b0435e634fbbe413dc1187e31b39d

Commit: 27c01de8527b0435e634fbbe413dc1187e31b39d
Author: odejesush@chromium.org
Commiter: odejesush@chromium.org
Date: 2018-10-23 20:43:42 +0000 UTC

Set WebUsbAllowDevicesForUrls policy to future

This change updates the WebUsbAllowDevicesForUrls policy entry in
policy_templates.json to have the future property set to true.
This prevents the policy from being in documentation and the
generated ADMX and linux.json file until the policy is visible
in Site settings.

Design document:
https://docs.google.com/document/d/1MPvsrWiVD_jAC8ELyk8njFpy6j1thfVU5aWT3TCWE8w

Bug: 854329,  897887 
Change-Id: Ib2c9a04fd992d8c6c88a52ec9c954a48ff9a673d
Reviewed-on: https://chromium-review.googlesource.com/c/1262082
Commit-Queue: Ovidio Henriquez <odejesush@chromium.org>
Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#601277}(cherry picked from commit 2faba286f45587d104c80dceee4c2084e3eab5b3)
Reviewed-on: https://chromium-review.googlesource.com/c/1297058
Reviewed-by: Ovidio Henriquez <odejesush@chromium.org>
Cr-Commit-Position: refs/branch-heads/3578@{#272}
Cr-Branched-From: 4226ddf99103e493d7afb23a4c7902ee496108b6-refs/heads/master@{#599034}

Comment 14 by bugdroid1@chromium.org, Nov 15

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

commit c6b23f1ea2d6f6c44d561462c41f31ed44ca8a22
Author: Ovidio Henriquez <odejesush@chromium.org>
Date: Thu Nov 15 21:26:31 2018

Change WebUsbAllowDevicesForUrls to use GURLs

This change updates the WebUsbAllowDevicesForUrls policy to use GURL
instead of ContentSettingsPattern for allowing devices to origins.

Design doc:
https://docs.google.com/document/d/1MPvsrWiVD_jAC8ELyk8njFpy6j1thfVU5aWT3TCWE8w

Bug: 854329
Change-Id: Idaf4fb27b96fb63d6c182e164fef64b5df2dcf4d
Reviewed-on: https://chromium-review.googlesource.com/c/1327805
Commit-Queue: Ovidio Henriquez <odejesush@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Pavol Marko <pmarko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608514}
[modify] https://crrev.com/c6b23f1ea2d6f6c44d561462c41f31ed44ca8a22/chrome/browser/policy/policy_browsertest.cc
[modify] https://crrev.com/c6b23f1ea2d6f6c44d561462c41f31ed44ca8a22/chrome/browser/policy/webusb_allow_devices_for_urls_policy_handler.cc
[modify] https://crrev.com/c6b23f1ea2d6f6c44d561462c41f31ed44ca8a22/chrome/browser/policy/webusb_allow_devices_for_urls_policy_handler_unittest.cc
[modify] https://crrev.com/c6b23f1ea2d6f6c44d561462c41f31ed44ca8a22/chrome/browser/usb/usb_chooser_context_unittest.cc
[modify] https://crrev.com/c6b23f1ea2d6f6c44d561462c41f31ed44ca8a22/chrome/browser/usb/usb_policy_allowed_devices.cc
[modify] https://crrev.com/c6b23f1ea2d6f6c44d561462c41f31ed44ca8a22/chrome/browser/usb/usb_policy_allowed_devices.h
[modify] https://crrev.com/c6b23f1ea2d6f6c44d561462c41f31ed44ca8a22/chrome/browser/usb/usb_policy_allowed_devices_unittest.cc
[modify] https://crrev.com/c6b23f1ea2d6f6c44d561462c41f31ed44ca8a22/chrome/test/data/policy/policy_test_cases.json
[modify] https://crrev.com/c6b23f1ea2d6f6c44d561462c41f31ed44ca8a22/components/policy/resources/policy_templates.json

Comment 15 by bugdroid1@chromium.org, Nov 19

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/02f2ed13e2de11ae61504d5225bccd28c5bd8ed4

commit 02f2ed13e2de11ae61504d5225bccd28c5bd8ed4
Author: Ovidio Henriquez <odejesush@chromium.org>
Date: Mon Nov 19 22:55:32 2018

Include policy USB devices in GetAllGrantedObjects

This change updates the GetAllGrantedObjects() method of
UsbChooserContext to include the USB objects granted by the
WebUsbAllowDevicesForUrls policy. The GetAllGrantedObjects() method
removes user granted objects that are also granted permission by the
policy.

SiteSettingsHelper was modified to skip the policy objects until the UI
is ready to display them.

Design Doc:
https://docs.google.com/document/d/1MPvsrWiVD_jAC8ELyk8njFpy6j1thfVU5aWT3TCWE8w

Bug: 854329
Change-Id: I8442f588b0d7029062c67bbb2896cefeb558a887
Reviewed-on: https://chromium-review.googlesource.com/c/1297301
Commit-Queue: Ovidio Henriquez <odejesush@chromium.org>
Reviewed-by: Dave Schuyler <dschuyler@chromium.org>
Reviewed-by: Theresa <twellington@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609479}
[modify] https://crrev.com/02f2ed13e2de11ae61504d5225bccd28c5bd8ed4/chrome/browser/ui/webui/site_settings_helper.cc
[modify] https://crrev.com/02f2ed13e2de11ae61504d5225bccd28c5bd8ed4/chrome/browser/usb/usb_chooser_context.cc
[modify] https://crrev.com/02f2ed13e2de11ae61504d5225bccd28c5bd8ed4/chrome/browser/usb/usb_chooser_context.h
[modify] https://crrev.com/02f2ed13e2de11ae61504d5225bccd28c5bd8ed4/chrome/browser/usb/usb_chooser_context_unittest.cc
[modify] https://crrev.com/02f2ed13e2de11ae61504d5225bccd28c5bd8ed4/chrome/browser/usb/usb_policy_allowed_devices.cc
[modify] https://crrev.com/02f2ed13e2de11ae61504d5225bccd28c5bd8ed4/chrome/browser/usb/usb_policy_allowed_devices.h

Comment 16 by bugdroid1@chromium.org, Dec 3

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3a492656ad6ff7924af1abc8a1b2732c16cec4c3

commit 3a492656ad6ff7924af1abc8a1b2732c16cec4c3
Author: Ovidio Henriquez <odejesush@chromium.org>
Date: Mon Dec 03 22:09:24 2018

Restructure chooser object for site_settings

This change implements two new helper methods for site settings that
organize the chooser exceptions in a way that allows their corresponding
site exceptions to be grouped under the same exception. The structure of
the objects returned by GetChooserExceptionListFromProfile(), described
in jsdoc notation, is the following:

{
  chooserType: string,
  displayName: string,
  object: Object,
  sites: Array<!SiteException>
}

The objects in the sites array follow the same structure as the
non-chooser exceptions.

Design doc:
https://docs.google.com/document/d/1MPvsrWiVD_jAC8ELyk8njFpy6j1thfVU5aWT3TCWE8w

Bug: 854329
Change-Id: I92a654da2ef9d1d0f045df0a35eaf70a1940b44e
Reviewed-on: https://chromium-review.googlesource.com/c/1357605
Commit-Queue: Ovidio Henriquez <odejesush@chromium.org>
Reviewed-by: Dan Beam <dbeam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613280}
[modify] https://crrev.com/3a492656ad6ff7924af1abc8a1b2732c16cec4c3/chrome/browser/ui/webui/site_settings_helper.cc
[modify] https://crrev.com/3a492656ad6ff7924af1abc8a1b2732c16cec4c3/chrome/browser/ui/webui/site_settings_helper.h
[modify] https://crrev.com/3a492656ad6ff7924af1abc8a1b2732c16cec4c3/chrome/browser/ui/webui/site_settings_helper_unittest.cc

Comment 17 by bugdroid1@chromium.org, Dec 4

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/53cf78ca5207a49b798e94c81fffca5085525c63

commit 53cf78ca5207a49b798e94c81fffca5085525c63
Author: Ovidio Henriquez <odejesush@chromium.org>
Date: Tue Dec 04 23:22:45 2018

Add new chooser methods to SiteSettingsHandler

This change adds the HandleGetChooserExceptionList and
HandleResetChooserExceptionForSite methods to SiteSettingsHandler to
prepare them for use in site settings. These two methods will eventually
replace the existing HandleFetchUsbDevices and HandleRemoveUsbDevice and
allow future chooser exception types to use them. They will also make it
easier to create Polymer elements to handle chooser exceptions, instead
of the current Polymer element that only handles USB exceptions.

The HandleGetChooserExceptionList will return a list of chooser
exceptions using the new GetChooserExceptionListFromProfile method is
site_settings_helper.h. These new chooser objects will allow the
chooser's site exceptions to be grouped together under the same chooser
object in the UI.  The HandleResetChooserExceptionForSite will reset the
site exception for the given chooser.

Design doc:
https://docs.google.com/document/d/1MPvsrWiVD_jAC8ELyk8njFpy6j1thfVU5aWT3TCWE8w

Bug: 854329
Change-Id: I5536cae3946338b48042087c9b6d6b4abccbebdd
Reviewed-on: https://chromium-review.googlesource.com/c/1321850
Commit-Queue: Ovidio Henriquez <odejesush@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Dan Beam <dbeam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613750}
[modify] https://crrev.com/53cf78ca5207a49b798e94c81fffca5085525c63/chrome/browser/ui/webui/settings/site_settings_handler.cc
[modify] https://crrev.com/53cf78ca5207a49b798e94c81fffca5085525c63/chrome/browser/ui/webui/settings/site_settings_handler.h
[modify] https://crrev.com/53cf78ca5207a49b798e94c81fffca5085525c63/chrome/browser/ui/webui/settings/site_settings_handler_unittest.cc
[modify] https://crrev.com/53cf78ca5207a49b798e94c81fffca5085525c63/chrome/browser/usb/usb_chooser_context.cc
[modify] https://crrev.com/53cf78ca5207a49b798e94c81fffca5085525c63/chrome/browser/usb/usb_chooser_context.h

Comment 18 by bugdroid1@chromium.org, Dec 14

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

commit a4de93b3b7613a8ca42d73813c1a5f43ee8af63c
Author: Ovidio Henriquez <odejesush@chromium.org>
Date: Fri Dec 14 17:30:59 2018

Add chooser-exception-list-entry Polymer element

This change adds the chooser-exception-list-entry Polymer element to
site settings. This element will be used to display a chooser exception
in a row.

Design doc:
https://docs.google.com/document/d/1MPvsrWiVD_jAC8ELyk8njFpy6j1thfVU5aWT3TCWE8w

Bug: 854329
Change-Id: I4ac0d348a13180932af1d553b5640792f476999b
Reviewed-on: https://chromium-review.googlesource.com/c/1357610
Commit-Queue: Ovidio Henriquez <odejesush@chromium.org>
Reviewed-by: Dan Beam <dbeam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616726}
[modify] https://crrev.com/a4de93b3b7613a8ca42d73813c1a5f43ee8af63c/chrome/browser/resources/settings/privacy_page/privacy_page.html
[modify] https://crrev.com/a4de93b3b7613a8ca42d73813c1a5f43ee8af63c/chrome/browser/resources/settings/settings_resources.grd
[modify] https://crrev.com/a4de93b3b7613a8ca42d73813c1a5f43ee8af63c/chrome/browser/resources/settings/site_settings/BUILD.gn
[add] https://crrev.com/a4de93b3b7613a8ca42d73813c1a5f43ee8af63c/chrome/browser/resources/settings/site_settings/chooser_exception_list_entry.html
[add] https://crrev.com/a4de93b3b7613a8ca42d73813c1a5f43ee8af63c/chrome/browser/resources/settings/site_settings/chooser_exception_list_entry.js
[modify] https://crrev.com/a4de93b3b7613a8ca42d73813c1a5f43ee8af63c/chrome/browser/resources/settings/site_settings/constants.js
[modify] https://crrev.com/a4de93b3b7613a8ca42d73813c1a5f43ee8af63c/chrome/browser/resources/settings/site_settings/site_list_entry.js
[modify] https://crrev.com/a4de93b3b7613a8ca42d73813c1a5f43ee8af63c/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js
[add] https://crrev.com/a4de93b3b7613a8ca42d73813c1a5f43ee8af63c/chrome/test/data/webui/settings/chooser_exception_list_entry_tests.js
[modify] https://crrev.com/a4de93b3b7613a8ca42d73813c1a5f43ee8af63c/chrome/test/data/webui/settings/cr_settings_browsertest.js
[modify] https://crrev.com/a4de93b3b7613a8ca42d73813c1a5f43ee8af63c/chrome/test/data/webui/settings/test_site_settings_prefs_browser_proxy.js
[modify] https://crrev.com/a4de93b3b7613a8ca42d73813c1a5f43ee8af63c/testing/buildbot/filters/webui_polymer2_browser_tests.filter

Comment 19 by bugdroid1@chromium.org, Jan 11

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

commit 8aa631205932eed95e0851d7b783fc0cfd518b4c
Author: Ovidio Henriquez <odejesush@chromium.org>
Date: Fri Jan 11 18:17:42 2019

Add chooser-exception-list Polymer element

This change adds the chooser-exception-list Polymer element to site
settings. This element will fetch the chooser exceptions from the C++
site and process them for display. The element uses a
chooser-exception-list-entry to render each chooser exception in the
list.

This change also adds to ability for the paper-tooltip to have its
target set manually. This allows the target to be set on the common
paper-tooltip element used in chooser-exception-list and site-list
without having to access its private `_target` property.

Design doc:
https://docs.google.com/document/d/1MPvsrWiVD_jAC8ELyk8njFpy6j1thfVU5aWT3TCWE8w

Bug: 854329
Change-Id: I3f127d2cf655b2d75157d7174a9bd5e434b583a8
Reviewed-on: https://chromium-review.googlesource.com/c/1357556
Commit-Queue: Ovidio Henriquez <odejesush@chromium.org>
Reviewed-by: Dan Beam <dbeam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622059}
[modify] https://crrev.com/8aa631205932eed95e0851d7b783fc0cfd518b4c/chrome/browser/resources/settings/privacy_page/privacy_page.html
[modify] https://crrev.com/8aa631205932eed95e0851d7b783fc0cfd518b4c/chrome/browser/resources/settings/settings_resources.grd
[modify] https://crrev.com/8aa631205932eed95e0851d7b783fc0cfd518b4c/chrome/browser/resources/settings/site_settings/BUILD.gn
[add] https://crrev.com/8aa631205932eed95e0851d7b783fc0cfd518b4c/chrome/browser/resources/settings/site_settings/chooser_exception_list.html
[add] https://crrev.com/8aa631205932eed95e0851d7b783fc0cfd518b4c/chrome/browser/resources/settings/site_settings/chooser_exception_list.js
[modify] https://crrev.com/8aa631205932eed95e0851d7b783fc0cfd518b4c/chrome/browser/resources/settings/site_settings/site_list.js
[modify] https://crrev.com/8aa631205932eed95e0851d7b783fc0cfd518b4c/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js
[add] https://crrev.com/8aa631205932eed95e0851d7b783fc0cfd518b4c/chrome/test/data/webui/settings/chooser_exception_list_tests.js
[modify] https://crrev.com/8aa631205932eed95e0851d7b783fc0cfd518b4c/chrome/test/data/webui/settings/cr_settings_browsertest.js
[modify] https://crrev.com/8aa631205932eed95e0851d7b783fc0cfd518b4c/chrome/test/data/webui/settings/test_site_settings_prefs_browser_proxy.js
[modify] https://crrev.com/8aa631205932eed95e0851d7b783fc0cfd518b4c/chrome/test/data/webui/settings/test_util.js
[modify] https://crrev.com/8aa631205932eed95e0851d7b783fc0cfd518b4c/testing/buildbot/filters/webui_polymer2_browser_tests.filter
[modify] https://crrev.com/8aa631205932eed95e0851d7b783fc0cfd518b4c/third_party/polymer/v1_0/chromium.patch
[modify] https://crrev.com/8aa631205932eed95e0851d7b783fc0cfd518b4c/third_party/polymer/v1_0/components-chromium/paper-tooltip/paper-tooltip-extracted.js

Comment 20 by odejesush@chromium.org, Jan 14

Blockedon: 921657

Comment 21 by bugdroid1@chromium.org, Jan 16

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

commit 0e7c32a605f979176bfe86a4aafc394d045e627f
Author: Ovidio Henriquez <odejesush@chromium.org>
Date: Wed Jan 16 03:15:29 2019

Use SettingSource for ChooserContextBase

This change refactors the ChooserContextBase::Object class to accept a
content_settings::SettingSource enum for the source, instead of a
string. This change enables the Object class to also be used by
PageInfoUI to distinguish between user and policy permissions by
refactoring ChooserContextBase::GetGrantedObjects() to return list of
unique_ptrs to the Object class.

In addition, the DictionaryValue field of Object was renamed to `value`
to make it easier to differentiate from Object.

Design doc:
https://docs.google.com/document/d/1MPvsrWiVD_jAC8ELyk8njFpy6j1thfVU5aWT3TCWE8w

Bug: 854329
Change-Id: Ic320bf3709c464e5acc514cde7594aec90c1c7f6
Reviewed-on: https://chromium-review.googlesource.com/c/1399468
Commit-Queue: Ovidio de Jesús Ruiz-Henríquez <odejesush@chromium.org>
Reviewed-by: Dan Beam <dbeam@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Theresa <twellington@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623079}
[modify] https://crrev.com/0e7c32a605f979176bfe86a4aafc394d045e627f/chrome/browser/android/preferences/website_preference_bridge.cc
[modify] https://crrev.com/0e7c32a605f979176bfe86a4aafc394d045e627f/chrome/browser/permissions/chooser_context_base.cc
[modify] https://crrev.com/0e7c32a605f979176bfe86a4aafc394d045e627f/chrome/browser/permissions/chooser_context_base.h
[modify] https://crrev.com/0e7c32a605f979176bfe86a4aafc394d045e627f/chrome/browser/permissions/chooser_context_base_unittest.cc
[modify] https://crrev.com/0e7c32a605f979176bfe86a4aafc394d045e627f/chrome/browser/ui/page_info/page_info.cc
[modify] https://crrev.com/0e7c32a605f979176bfe86a4aafc394d045e627f/chrome/browser/ui/page_info/page_info_ui.cc
[modify] https://crrev.com/0e7c32a605f979176bfe86a4aafc394d045e627f/chrome/browser/ui/page_info/page_info_ui.h
[modify] https://crrev.com/0e7c32a605f979176bfe86a4aafc394d045e627f/chrome/browser/ui/page_info/page_info_unittest.cc
[modify] https://crrev.com/0e7c32a605f979176bfe86a4aafc394d045e627f/chrome/browser/ui/views/page_info/page_info_bubble_view.cc
[modify] https://crrev.com/0e7c32a605f979176bfe86a4aafc394d045e627f/chrome/browser/ui/webui/site_settings_helper.cc
[modify] https://crrev.com/0e7c32a605f979176bfe86a4aafc394d045e627f/chrome/browser/usb/usb_chooser_context.cc
[modify] https://crrev.com/0e7c32a605f979176bfe86a4aafc394d045e627f/chrome/browser/usb/usb_chooser_context.h
[modify] https://crrev.com/0e7c32a605f979176bfe86a4aafc394d045e627f/chrome/browser/usb/usb_chooser_context_unittest.cc
[modify] https://crrev.com/0e7c32a605f979176bfe86a4aafc394d045e627f/chrome/browser/usb/web_usb_service_impl_unittest.cc

Comment 22 by odejesush@chromium.org, Jan 19

Blockedon: 923593

Comment 23 by bugdroid, Jan 28

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

commit ed23c7dedf019d9b2a329630f4bfdcc32b42b491
Author: Ovidio Henriquez <odejesush@chromium.org>
Date: Mon Jan 28 20:00:20 2019

Show Policy Managed USB Devices in Site Settings

This change updates the site settings UI for
chrome://settings/content/usbDevices to display USB devices that have
been allowed by policy. This is done by two new Polymer elements that
were added to allow chooser permissions to be able to display the site
permissions in the same way that other site permissions do. As a result
the old usb-devices Polymer element is deleted to use
chooser-exception-list and chooser-exception-list-entry.

UI Screenshot:
https://drive.google.com/file/d/16aBT31_iTAnoj19vGcfTKrOgsew32RQx

Design doc:
https://docs.google.com/document/d/1MPvsrWiVD_jAC8ELyk8njFpy6j1thfVU5aWT3TCWE8w/

Bug: 854329
Change-Id: Ic3b426f595546c9b1e558ebdb976f40dd051dbd8
Reviewed-on: https://chromium-review.googlesource.com/c/1274186
Commit-Queue: Ovidio de Jesús Ruiz-Henríquez <odejesush@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Dan Beam (slow until 1/29) <dbeam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#626693}

Comment 24 by bugdroid, Feb 1

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/017d3b8fea436517e3cdbd5c00135224402e132e

commit 017d3b8fea436517e3cdbd5c00135224402e132e
Author: Ovidio Henriquez <odejesush@chromium.org>
Date: Fri Feb 01 18:51:24 2019

Update ChosenObjectView to display policy objects

This change updates ChosenObjectView to properly distinguish user and
policy objects. The policy objects will state that it is controlled by
the administrator and the delete icon will be disabled.

UI Screenshot:
https://drive.google.com/open?id=1U_6xFpGALEZDPXD7Ic5yHjRsAKpghOHy

Design doc:
https://docs.google.com/document/d/1MPvsrWiVD_jAC8ELyk8njFpy6j1thfVU5aWT3TCWE8w

Bug: 854329
Change-Id: Ic9c1166221e223983eb674521a037651fabab82f
Reviewed-on: https://chromium-review.googlesource.com/c/1383400
Commit-Queue: Ovidio de Jesús Ruiz-Henríquez <odejesush@chromium.org>
Reviewed-by: Ben Wells <benwells@chromium.org>
Reviewed-by: Balazs Engedy <engedy@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#628400}
[modify] https://crrev.com/017d3b8fea436517e3cdbd5c00135224402e132e/chrome/browser/ui/page_info/page_info.cc
[modify] https://crrev.com/017d3b8fea436517e3cdbd5c00135224402e132e/chrome/browser/ui/page_info/page_info.h
[modify] https://crrev.com/017d3b8fea436517e3cdbd5c00135224402e132e/chrome/browser/ui/views/page_info/chosen_object_view.cc
[modify] https://crrev.com/017d3b8fea436517e3cdbd5c00135224402e132e/chrome/browser/ui/views/page_info/page_info_bubble_view_unittest.cc
[modify] https://crrev.com/017d3b8fea436517e3cdbd5c00135224402e132e/chrome/browser/usb/usb_chooser_context.cc
[modify] https://crrev.com/017d3b8fea436517e3cdbd5c00135224402e132e/chrome/browser/usb/usb_chooser_context_unittest.cc
[modify] https://crrev.com/017d3b8fea436517e3cdbd5c00135224402e132e/components/page_info_strings.grdp

Comment 25 by bugdroid, Feb 7

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/47ae3dfdee9a0796a079cd4eadf2f75b34f257ae

commit 47ae3dfdee9a0796a079cd4eadf2f75b34f257ae
Author: Marek Haranczyk <mharanczyk@opera.com>
Date: Thu Feb 07 10:01:38 2019

Fix memory leak in ChooserContextBase::GetGrantedObjects.

Bug: 854329
Change-Id: Ia163d503a4207859cd41c847c9d5f67e77580fbc
Reviewed-on: https://chromium-review.googlesource.com/c/1456080
Reviewed-by: Balazs Engedy <engedy@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Queue: Marek Haranczyk <mharanczyk@opera.com>
Cr-Commit-Position: refs/heads/master@{#629919}
[modify] https://crrev.com/47ae3dfdee9a0796a079cd4eadf2f75b34f257ae/chrome/browser/permissions/chooser_context_base.cc

Comment 26 by bugdroid, Yesterday (35 hours ago)

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

commit 4dab44a20b8b9615fe837cd3e827bbc9e9ba5d66
Author: Ovidio Henriquez <odejesush@chromium.org>
Date: Thu Feb 21 18:44:53 2019

Enable WebUsbAllowDevicesForUrls for desktop

This change officially enables support for WebUsbAllowDevicesForUrls for
desktop. Android support is still pending on the appropriate UI changes
to properly display the permissions.

Design doc:
https://docs.google.com/document/d/1MPvsrWiVD_jAC8ELyk8njFpy6j1thfVU5aWT3TCWE8w

Bug: 854329
Change-Id: I3b05598fe1f68960ae9c0d25902342b19c294129
Reviewed-on: https://chromium-review.googlesource.com/c/1473546
Commit-Queue: Ovidio de Jesús Ruiz-Henríquez <odejesush@chromium.org>
Reviewed-by: Pavol Marko <pmarko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#634275}
[modify] https://crrev.com/4dab44a20b8b9615fe837cd3e827bbc9e9ba5d66/chrome/browser/BUILD.gn
[modify] https://crrev.com/4dab44a20b8b9615fe837cd3e827bbc9e9ba5d66/chrome/browser/policy/configuration_policy_handler_list_factory.cc
[modify] https://crrev.com/4dab44a20b8b9615fe837cd3e827bbc9e9ba5d66/chrome/test/BUILD.gn
[modify] https://crrev.com/4dab44a20b8b9615fe837cd3e827bbc9e9ba5d66/components/policy/resources/policy_templates.json

Comment 27 by odejesush@chromium.org, Yesterday (35 hours ago)

Blockedon: 931459
Hi all,

With this last CL, the policy is officially supported on M-74 for Linux, Windows, Mac, and ChromeOS. Once 931459 is resolved, Android can also be officially supported.

Sign in to add a comment