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

Issue 1034333002: Check USB device path access when prompting users to select a device. (Closed)

Created:
5 years, 9 months ago by Reilly Grant (use Gerrit)
Modified:
5 years, 8 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, hashimoto+watch_chromium.org, yurys, oshima+watch_chromium.org, devtools-reviews_chromium.org, chromium-apps-reviews_chromium.org, aandrey+blink_chromium.org, stevenjb+watch_chromium.org, pfeldman
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://crrev.com/556a9e9fddcc48e9b9650f2ac4a413ce4705efdf Cr-Commit-Position: refs/heads/master@{#324139}

Patch Set 1 #

Patch Set 2 : Remove more unnecessary #ifdef OS_CHROMEOS. #

Patch Set 3 : Roll system_api to include kCheckPathAccess. #

Patch Set 4 : Have MockPermissionBrokerClient extend FakePermissionBrokerClient to avoid adding mocks for unrelat… #

Total comments: 2

Patch Set 5 : Move MockPermissionBrokerClient into its own header. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+242 lines, -141 lines) Patch
M chrome/browser/devtools/device/usb/android_usb_browsertest.cc View 1 2 3 1 chunk +0 lines, -12 lines 0 comments Download
M chrome/browser/devtools/device/usb/android_usb_device.cc View 1 2 3 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/browser/extensions/api/device_permissions_manager_unittest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M chromeos/BUILD.gn View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M chromeos/chromeos.gyp View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M chromeos/dbus/fake_permission_broker_client.h View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M chromeos/dbus/fake_permission_broker_client.cc View 1 chunk +7 lines, -1 line 0 comments Download
A chromeos/dbus/mock_permission_broker_client.h View 1 2 3 4 1 chunk +51 lines, -0 lines 0 comments Download
A chromeos/dbus/mock_permission_broker_client.cc View 1 2 3 4 1 chunk +17 lines, -0 lines 0 comments Download
M chromeos/dbus/permission_broker_client.h View 1 chunk +7 lines, -0 lines 0 comments Download
M chromeos/dbus/permission_broker_client.cc View 1 2 3 2 chunks +11 lines, -0 lines 0 comments Download
M chromeos/network/firewall_hole_unittest.cc View 1 2 3 4 8 chunks +11 lines, -40 lines 0 comments Download
M device/usb/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M device/usb/usb.gyp View 1 chunk +1 line, -0 lines 0 comments Download
M device/usb/usb_device.h View 2 chunks +12 lines, -12 lines 0 comments Download
A device/usb/usb_device.cc View 1 2 3 1 chunk +26 lines, -0 lines 0 comments Download
M device/usb/usb_device_filter_unittest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M device/usb/usb_device_impl.h View 1 chunk +4 lines, -3 lines 0 comments Download
M device/usb/usb_device_impl.cc View 3 chunks +29 lines, -28 lines 0 comments Download
M extensions/browser/api/device_permissions_prompt.h View 1 chunk +7 lines, -0 lines 0 comments Download
M extensions/browser/api/device_permissions_prompt.cc View 5 chunks +50 lines, -19 lines 0 comments Download
M extensions/browser/api/usb/usb_api.cc View 1 4 chunks +0 lines, -10 lines 0 comments Download
M extensions/browser/api/usb/usb_apitest.cc View 3 chunks +0 lines, -8 lines 0 comments Download

Messages

Total messages: 18 (6 generated)
Reilly Grant (use Gerrit)
Please take a look.
5 years, 9 months ago (2015-03-26 23:45:06 UTC) #2
Ken Rockot(use gerrit already)
lgtm
5 years, 8 months ago (2015-03-28 19:16:01 UTC) #3
Reilly Grant (use Gerrit)
dgozman@, please take a look at the changes in chrome/browser/devtools/device/usb. pneubeck@, please take a look ...
5 years, 8 months ago (2015-03-31 19:45:05 UTC) #5
hashimoto
chromeos/dbus/ lgtm
5 years, 8 months ago (2015-04-01 04:48:02 UTC) #6
dgozman
chrome/browser/devtools lgtm, but can we please wait until branch point before landing this? This area ...
5 years, 8 months ago (2015-04-01 13:48:04 UTC) #7
Reilly Grant (use Gerrit)
On 2015/04/01 at 13:48:04, dgozman wrote: > chrome/browser/devtools lgtm, but can we please wait until ...
5 years, 8 months ago (2015-04-01 15:57:42 UTC) #8
Reilly Grant (use Gerrit)
stevenjb@, please take a look at the minor change in chromeos/network/firewall_hole_unittest.cc.
5 years, 8 months ago (2015-04-03 18:08:05 UTC) #10
pneubeck (no reviews)
ptal at my comment. As it's not a big deal, giving a lgtm already. https://codereview.chromium.org/1034333002/diff/60001/chromeos/network/firewall_hole_unittest.cc ...
5 years, 8 months ago (2015-04-07 07:57:38 UTC) #12
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1034333002/diff/60001/chromeos/network/firewall_hole_unittest.cc File chromeos/network/firewall_hole_unittest.cc (right): https://codereview.chromium.org/1034333002/diff/60001/chromeos/network/firewall_hole_unittest.cc#newcode27 chromeos/network/firewall_hole_unittest.cc:27: : public chromeos::FakePermissionBrokerClient { On 2015/04/07 07:57:38, pneubeck wrote: ...
5 years, 8 months ago (2015-04-07 20:12:10 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1034333002/80001
5 years, 8 months ago (2015-04-07 22:38:15 UTC) #16
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 8 months ago (2015-04-07 22:50:11 UTC) #17
commit-bot: I haz the power
5 years, 8 months ago (2015-04-07 22:51:04 UTC) #18
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/556a9e9fddcc48e9b9650f2ac4a413ce4705efdf
Cr-Commit-Position: refs/heads/master@{#324139}

Powered by Google App Engine
This is Rietveld 408576698