Check USB device path access when prompting users to select a device.
commit556a9e9fddcc48e9b9650f2ac4a413ce4705efdf
authorreillyg <reillyg@chromium.org>
Tue, 7 Apr 2015 22:49:58 +0000 (7 15:49 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 7 Apr 2015 22:50:33 +0000 (7 22:50 +0000)
tree670041bf13e18c4a98716581da2f5e740827e443
parentd6aece7c6748553aa11b9dbacd27b5ec4d2d363c
Check USB device path access when prompting users to select a device.

Use the permission_broker's new CheckPathAccess method to filter
devices presented to the user by whether or not Chrome will be able to
open them later.

By having FakePermissionBrokerClient and the base UsbDevice class always
return true to access requests a number of #if defined(OS_CHROMEOS)
checks can be removed.

//third_party/cros_system_api is rolled from 95c486f3 to aea83430 to
pull in the new kCheckPathAccess definition in service_constants.h.

BUG=441526

Review URL: https://codereview.chromium.org/1034333002

Cr-Commit-Position: refs/heads/master@{#324139}
23 files changed:
chrome/browser/devtools/device/usb/android_usb_browsertest.cc
chrome/browser/devtools/device/usb/android_usb_device.cc
chrome/browser/extensions/api/device_permissions_manager_unittest.cc
chromeos/BUILD.gn
chromeos/chromeos.gyp
chromeos/dbus/fake_permission_broker_client.cc
chromeos/dbus/fake_permission_broker_client.h
chromeos/dbus/mock_permission_broker_client.cc [new file with mode: 0644]
chromeos/dbus/mock_permission_broker_client.h [new file with mode: 0644]
chromeos/dbus/permission_broker_client.cc
chromeos/dbus/permission_broker_client.h
chromeos/network/firewall_hole_unittest.cc
device/usb/BUILD.gn
device/usb/usb.gyp
device/usb/usb_device.cc [new file with mode: 0644]
device/usb/usb_device.h
device/usb/usb_device_filter_unittest.cc
device/usb/usb_device_impl.cc
device/usb/usb_device_impl.h
extensions/browser/api/device_permissions_prompt.cc
extensions/browser/api/device_permissions_prompt.h
extensions/browser/api/usb/usb_api.cc
extensions/browser/api/usb/usb_apitest.cc