New issue
Advanced search Search tips
Starred by 5 users

Issue metadata

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

Blocked on: View detail
issue 716557
issue 716628
issue 791498
issue 711443
issue 716629

Blocking:
issue 612328


Participants' hotlists:
USB


Sign in to add a comment
link

Issue 699790: Content Modularization Project: Web USB

Reported by wangjimmy@chromium.org, Mar 8 2017 Project Member

Issue description

Note: Some work started, please see comments below.
---- 

First, we need to separate the core USB interfaces and impl from permissions management and UI for device selection / permissions via Mojo

Consolidates all permissions checks within //chrome, removing them from //device entirely. Whenever Blink wants to connect to a device, it does so via //chrome, which ensures that the user has given permission for the connection.

After that is done, we can host the implementation of the core USB interfaces in the Device Service rather than //chrome
 

Comment 1 by blundell@chromium.org, Mar 9 2017

Labels: DeviceService
Note that following the work described above, we will need to convert the browser process clients of //device/usb to instead consume USB via the Device Service.

Comment 2 by reillyg@chromium.org, Mar 29 2017

Status: Assigned (was: Untriaged)

Comment 3 by reillyg@chromium.org, Mar 29 2017

Labels: OS-Android OS-Chrome OS-Linux OS-Mac OS-Windows

Comment 4 by reillyg@chromium.org, Apr 14 2017

Blockedon: 711443

Comment 5 by bugdroid1@chromium.org, Apr 19 2017

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

commit c961656d2eb17624ee36f3bde2617aa73fb6f246
Author: reillyg <reillyg@chromium.org>
Date: Wed Apr 19 02:06:11 2017

Move classes in the device.usb Mojo namespace to device.mojom

The USB Mojo service was added before there was clear guidance on what
namespace Mojo modules should use. The convention is now to use
foo.mojom.

The USB Mojo service implementation is still in the device::usb
namespace which violates the general Chromium style guide recommendation
to not use nested namespaces. This will be fixed in a later patch.

BUG=699790

Review-Url: https://codereview.chromium.org/2821723002
Cr-Commit-Position: refs/heads/master@{#465467}

[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/chrome/browser/android/usb/web_usb_chooser_service_android.cc
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/chrome/browser/android/usb/web_usb_chooser_service_android.h
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/chrome/browser/chrome_content_browser_manifest_overlay.json
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/chrome/browser/ui/android/usb_chooser_dialog_android.cc
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/chrome/browser/ui/android/usb_chooser_dialog_android.h
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/chrome/browser/usb/usb_browsertest.cc
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/chrome/browser/usb/usb_chooser_controller.cc
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/chrome/browser/usb/usb_chooser_controller.h
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/chrome/browser/usb/usb_chooser_controller_unittest.cc
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/chrome/browser/usb/usb_tab_helper.cc
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/chrome/browser/usb/usb_tab_helper.h
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/chrome/browser/usb/web_usb_chooser_service.cc
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/chrome/browser/usb/web_usb_chooser_service.h
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/device/usb/mojo/device_impl.cc
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/device/usb/mojo/device_impl.h
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/device/usb/mojo/device_impl_unittest.cc
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/device/usb/mojo/device_manager_impl.cc
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/device/usb/mojo/device_manager_impl.h
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/device/usb/mojo/device_manager_impl_unittest.cc
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/device/usb/mojo/type_converters.cc
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/device/usb/mojo/type_converters.h
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/device/usb/public/interfaces/OWNERS
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/device/usb/public/interfaces/chooser_service.mojom
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/device/usb/public/interfaces/device.mojom
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/device/usb/public/interfaces/device_manager.mojom
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/device/usb/public/interfaces/device_manager.typemap
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/device/usb/public/interfaces/device_manager_struct_traits.cc
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/device/usb/public/interfaces/device_manager_struct_traits.h
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/device/usb/usb_descriptors_fuzzer.cc
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/third_party/WebKit/LayoutTests/usb/resources/fake-devices.js
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/third_party/WebKit/LayoutTests/usb/resources/webusb-test.js
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/third_party/WebKit/Source/modules/webusb/USB.cpp
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/third_party/WebKit/Source/modules/webusb/USB.h
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/third_party/WebKit/Source/modules/webusb/USBAlternateInterface.cpp
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/third_party/WebKit/Source/modules/webusb/USBAlternateInterface.h
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/third_party/WebKit/Source/modules/webusb/USBConfiguration.cpp
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/third_party/WebKit/Source/modules/webusb/USBConfiguration.h
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/third_party/WebKit/Source/modules/webusb/USBDevice.cpp
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/third_party/WebKit/Source/modules/webusb/USBDevice.h
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/third_party/WebKit/Source/modules/webusb/USBEndpoint.cpp
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/third_party/WebKit/Source/modules/webusb/USBEndpoint.h
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/third_party/WebKit/Source/modules/webusb/USBInterface.cpp
[modify] https://crrev.com/c961656d2eb17624ee36f3bde2617aa73fb6f246/third_party/WebKit/Source/modules/webusb/USBInterface.h

Comment 6 by bugdroid1@chromium.org, Apr 19 2017

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

commit 70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69
Author: reillyg <reillyg@chromium.org>
Date: Wed Apr 19 06:44:24 2017

Use Mojo enum types in the C++ USB interface

This change removes a number of type converters and will make it easier
to port existing code over to the Mojo USB service in the future.

BUG=699790

Review-Url: https://codereview.chromium.org/2821813002
Cr-Commit-Position: refs/heads/master@{#465513}

[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/chrome/browser/devtools/device/usb/android_usb_browsertest.cc
[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/chrome/browser/devtools/device/usb/android_usb_device.cc
[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/device/usb/BUILD.gn
[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/device/usb/fake_usb_device_handle.cc
[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/device/usb/fake_usb_device_handle.h
[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/device/usb/mock_usb_device_handle.h
[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/device/usb/mojo/device_impl.cc
[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/device/usb/mojo/device_impl_unittest.cc
[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/device/usb/mojo/type_converters.cc
[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/device/usb/mojo/type_converters.h
[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/device/usb/public/interfaces/device.mojom
[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/device/usb/usb_descriptors.cc
[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/device/usb/usb_descriptors.h
[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/device/usb/usb_descriptors_unittest.cc
[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/device/usb/usb_device_handle.h
[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/device/usb/usb_device_handle_impl.cc
[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/device/usb/usb_device_handle_impl.h
[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/device/usb/usb_device_handle_unittest.cc
[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/device/usb/usb_device_handle_usbfs.cc
[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/device/usb/usb_device_handle_usbfs.h
[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/device/usb/usb_device_handle_win.cc
[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/device/usb/usb_device_handle_win.h
[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/device/usb/webusb_descriptors.cc
[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/device/usb/webusb_descriptors_unittest.cc
[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/extensions/browser/api/BUILD.gn
[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/extensions/browser/api/printer_provider/BUILD.gn
[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/extensions/browser/api/usb/BUILD.gn
[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/extensions/browser/api/usb/usb_api.cc
[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/extensions/browser/api/usb/usb_apitest.cc
[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/third_party/WebKit/LayoutTests/usb/resources/webusb-test.js
[modify] https://crrev.com/70e5417cbbad78ff3e5ce8dc3d21517c6f4eee69/third_party/WebKit/Source/modules/webusb/USBEndpoint.cpp

Comment 7 by wangjimmy@chromium.org, Apr 26 2017

Owner: ----
Status: Available (was: Assigned)

Comment 8 by reillyg@chromium.org, Apr 26 2017

Owner: reillyg@chromium.org
Status: Started (was: Available)

Comment 9 by reillyg@chromium.org, Apr 28 2017

Blockedon: 716557

Comment 10 by reillyg@chromium.org, Apr 28 2017

Blockedon: 716628

Comment 11 by reillyg@chromium.org, Apr 28 2017

Blockedon: 716629

Comment 12 by scheib@chromium.org, Sep 13 2017

Status: Available (was: Started)
Work paused.

Comment 13 by scheib@chromium.org, Sep 13 2017

Description: Show this description

Comment 15 by blundell@chromium.org, Nov 7 2017

Components: Internals>Services>Device

Comment 16 by laforge@google.com, Nov 7 2017

Labels: Type-Task
Migrating S13N meta bugs to Type=Task, so that they can be distinguished from technical work.

Comment 17 by lafo...@chromium.org, Nov 8 2017

Components: Internals>Services

Comment 18 by blundell@chromium.org, Nov 28 2017

Cc: reillyg@chromium.org
Owner: sdefresne@chromium.org
Status: Assigned (was: Available)

Comment 19 by blundell@chromium.org, Dec 4 2017

Blockedon: 791498

Comment 20 by blundell@chromium.org, Mar 7 2018

Cc: sdefresne@chromium.org
Owner: ----
Status: Available (was: Assigned)

Comment 21 by donna...@intel.com, Jul 2 2018

Cc: donna...@intel.com

Comment 22 by bugdroid1@chromium.org, Jul 27 2018

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

commit 2fd87fc92e02f8a1d35ba75d532f60b72e951527
Author: Donna Wu <donna.wu@intel.com>
Date: Fri Jul 27 01:32:19 2018

Add WebUsbDeviceManager for permission moving out of device/usb.

This is a preparing CL for USB servicification which introduced
WebUsbDeviceManager and its unit test. As designed, all permission
management for USB devices will be consolidated within //chrome.
Permission checking code in //device/usb will be moved out to this
new class WebUsbDeviceManager.


BUG=699790

Change-Id: I60580152ec31d1962dfdce616bd5b3729a3e60cc
Reviewed-on: https://chromium-review.googlesource.com/1121971
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Donna Wu <donna.wu@intel.com>
Cr-Commit-Position: refs/heads/master@{#578508}
[modify] https://crrev.com/2fd87fc92e02f8a1d35ba75d532f60b72e951527/chrome/browser/BUILD.gn
[modify] https://crrev.com/2fd87fc92e02f8a1d35ba75d532f60b72e951527/chrome/browser/usb/usb_tab_helper.cc
[add] https://crrev.com/2fd87fc92e02f8a1d35ba75d532f60b72e951527/chrome/browser/usb/web_usb_device_manager.cc
[add] https://crrev.com/2fd87fc92e02f8a1d35ba75d532f60b72e951527/chrome/browser/usb/web_usb_device_manager.h
[add] https://crrev.com/2fd87fc92e02f8a1d35ba75d532f60b72e951527/chrome/browser/usb/web_usb_device_manager_unittest.cc
[modify] https://crrev.com/2fd87fc92e02f8a1d35ba75d532f60b72e951527/chrome/test/BUILD.gn
[modify] https://crrev.com/2fd87fc92e02f8a1d35ba75d532f60b72e951527/device/BUILD.gn
[modify] https://crrev.com/2fd87fc92e02f8a1d35ba75d532f60b72e951527/device/usb/mojo/BUILD.gn
[modify] https://crrev.com/2fd87fc92e02f8a1d35ba75d532f60b72e951527/device/usb/mojo/mock_permission_provider.cc
[modify] https://crrev.com/2fd87fc92e02f8a1d35ba75d532f60b72e951527/device/usb/mojo/mock_permission_provider.h

Comment 23 by bugdroid1@chromium.org, Aug 10

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

commit 838ac3604d917b78db1492344ead40d36cbd2b12
Author: Donna Wu <donna.wu@intel.com>
Date: Fri Aug 10 10:36:33 2018

Introduced blink::mojom::WebUsbService with restricted methods.

This CL introduced blink::mojom::WebUsbService implemented
by WebUsbServiceImpl in chrome/browser/usb which used to be
WebDeviceManager.
Paralleling with device::mojom::UsbDeviceManager, the new interface
aims to simplify the interactions with Blink, and a meaningless
argument of GetDevices() method has been reduced in this CL.
device::mojom::UsbChooserService will be merged to this interface in
subsequent CLs.

BUG=699790

Change-Id: I891c56460425c20d2e8d067f9335091f6945ae7d
Reviewed-on: https://chromium-review.googlesource.com/1151065
Commit-Queue: Donna Wu <donna.wu@intel.com>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582108}
[modify] https://crrev.com/838ac3604d917b78db1492344ead40d36cbd2b12/chrome/browser/BUILD.gn
[modify] https://crrev.com/838ac3604d917b78db1492344ead40d36cbd2b12/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/838ac3604d917b78db1492344ead40d36cbd2b12/chrome/browser/chrome_content_browser_client.h
[modify] https://crrev.com/838ac3604d917b78db1492344ead40d36cbd2b12/chrome/browser/usb/usb_tab_helper.cc
[modify] https://crrev.com/838ac3604d917b78db1492344ead40d36cbd2b12/chrome/browser/usb/usb_tab_helper.h
[rename] https://crrev.com/838ac3604d917b78db1492344ead40d36cbd2b12/chrome/browser/usb/web_usb_service_impl.cc
[rename] https://crrev.com/838ac3604d917b78db1492344ead40d36cbd2b12/chrome/browser/usb/web_usb_service_impl.h
[rename] https://crrev.com/838ac3604d917b78db1492344ead40d36cbd2b12/chrome/browser/usb/web_usb_service_impl_unittest.cc
[modify] https://crrev.com/838ac3604d917b78db1492344ead40d36cbd2b12/chrome/test/BUILD.gn
[modify] https://crrev.com/838ac3604d917b78db1492344ead40d36cbd2b12/content/browser/dedicated_worker/dedicated_worker_host.cc
[modify] https://crrev.com/838ac3604d917b78db1492344ead40d36cbd2b12/content/browser/frame_host/render_frame_host_impl.cc
[modify] https://crrev.com/838ac3604d917b78db1492344ead40d36cbd2b12/content/browser/frame_host/render_frame_host_impl.h
[modify] https://crrev.com/838ac3604d917b78db1492344ead40d36cbd2b12/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/838ac3604d917b78db1492344ead40d36cbd2b12/content/public/browser/content_browser_client.cc
[modify] https://crrev.com/838ac3604d917b78db1492344ead40d36cbd2b12/content/public/browser/content_browser_client.h
[modify] https://crrev.com/838ac3604d917b78db1492344ead40d36cbd2b12/device/usb/public/mojom/BUILD.gn
[add] https://crrev.com/838ac3604d917b78db1492344ead40d36cbd2b12/third_party/WebKit/LayoutTests/external/wpt/resources/chromium/web_usb_service.mojom.js
[add] https://crrev.com/838ac3604d917b78db1492344ead40d36cbd2b12/third_party/WebKit/LayoutTests/external/wpt/resources/chromium/web_usb_service.mojom.js.headers
[modify] https://crrev.com/838ac3604d917b78db1492344ead40d36cbd2b12/third_party/WebKit/LayoutTests/external/wpt/resources/chromium/webusb-test.js
[modify] https://crrev.com/838ac3604d917b78db1492344ead40d36cbd2b12/third_party/WebKit/LayoutTests/external/wpt/webusb/resources/usb-helpers.js
[modify] https://crrev.com/838ac3604d917b78db1492344ead40d36cbd2b12/third_party/WebKit/LayoutTests/usb/protected-interface-classes.html
[modify] https://crrev.com/838ac3604d917b78db1492344ead40d36cbd2b12/third_party/WebKit/LayoutTests/usb/usbDevice-iframe.html
[modify] https://crrev.com/838ac3604d917b78db1492344ead40d36cbd2b12/third_party/blink/public/mojom/BUILD.gn
[add] https://crrev.com/838ac3604d917b78db1492344ead40d36cbd2b12/third_party/blink/public/mojom/usb/BUILD.gn
[add] https://crrev.com/838ac3604d917b78db1492344ead40d36cbd2b12/third_party/blink/public/mojom/usb/OWNERS
[add] https://crrev.com/838ac3604d917b78db1492344ead40d36cbd2b12/third_party/blink/public/mojom/usb/web_usb_service.mojom
[modify] https://crrev.com/838ac3604d917b78db1492344ead40d36cbd2b12/third_party/blink/renderer/modules/webusb/BUILD.gn
[modify] https://crrev.com/838ac3604d917b78db1492344ead40d36cbd2b12/third_party/blink/renderer/modules/webusb/usb.cc
[modify] https://crrev.com/838ac3604d917b78db1492344ead40d36cbd2b12/third_party/blink/renderer/modules/webusb/usb.h

Comment 24 by bugdroid1@chromium.org, Aug 13

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

commit 656439c4678cf9a76f24c955cec292b30898f83b
Author: Donna Wu <donna.wu@intel.com>
Date: Mon Aug 13 09:31:16 2018

Move permission checking in UsbDevice to WebUsbService.

This CL moves the permission checking in UsbDevice implementation
to WebUsbService by adjusting some mojo interfaces.

BUG=699790

Change-Id: Ie5842f1a433a8b05275b06f31f25320bcc10a4d7
Reviewed-on: https://chromium-review.googlesource.com/1166592
Commit-Queue: Donna Wu <donna.wu@intel.com>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582538}
[modify] https://crrev.com/656439c4678cf9a76f24c955cec292b30898f83b/chrome/browser/usb/web_usb_service_impl.cc
[modify] https://crrev.com/656439c4678cf9a76f24c955cec292b30898f83b/chrome/browser/usb/web_usb_service_impl.h
[modify] https://crrev.com/656439c4678cf9a76f24c955cec292b30898f83b/device/usb/mojo/device_impl.cc
[modify] https://crrev.com/656439c4678cf9a76f24c955cec292b30898f83b/device/usb/mojo/device_impl.h
[modify] https://crrev.com/656439c4678cf9a76f24c955cec292b30898f83b/device/usb/mojo/device_impl_unittest.cc
[modify] https://crrev.com/656439c4678cf9a76f24c955cec292b30898f83b/device/usb/mojo/device_manager_impl.cc
[modify] https://crrev.com/656439c4678cf9a76f24c955cec292b30898f83b/device/usb/mojo/device_manager_impl.h
[modify] https://crrev.com/656439c4678cf9a76f24c955cec292b30898f83b/device/usb/mojo/device_manager_impl_unittest.cc
[modify] https://crrev.com/656439c4678cf9a76f24c955cec292b30898f83b/device/usb/public/mojom/device.mojom
[modify] https://crrev.com/656439c4678cf9a76f24c955cec292b30898f83b/device/usb/public/mojom/device_manager.mojom

Comment 25 by bugdroid1@chromium.org, Aug 16

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

commit c98e12a20acd5e4cb2dcf25fef71066f0a5023eb
Author: Donna Wu <donna.wu@intel.com>
Date: Thu Aug 16 07:24:02 2018

Merge ChooserService mojom interface into WebUsbService.

BUG=699790

Change-Id: I4f1d5d6815a2c5cf220c6ee556ba068e03e3b90d
Reviewed-on: https://chromium-review.googlesource.com/1164639
Commit-Queue: Donna Wu <donna.wu@intel.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583574}
[modify] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/chrome/browser/BUILD.gn
[add] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/chrome/browser/android/usb/web_usb_chooser_android.cc
[add] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/chrome/browser/android/usb/web_usb_chooser_android.h
[delete] https://crrev.com/746e6f9c72b6114ca778f44c0801ef4ed160ef0e/chrome/browser/android/usb/web_usb_chooser_service_android.cc
[delete] https://crrev.com/746e6f9c72b6114ca778f44c0801ef4ed160ef0e/chrome/browser/android/usb/web_usb_chooser_service_android.h
[modify] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/chrome/browser/chrome_content_browser_client.h
[modify] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/chrome/browser/resource_coordinator/tab_lifecycle_unit_unittest.cc
[modify] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/chrome/browser/usb/usb_browsertest.cc
[modify] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/chrome/browser/usb/usb_chooser_controller.cc
[modify] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/chrome/browser/usb/usb_chooser_controller.h
[modify] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/chrome/browser/usb/usb_chooser_controller_unittest.cc
[modify] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/chrome/browser/usb/usb_tab_helper.cc
[modify] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/chrome/browser/usb/usb_tab_helper.h
[rename] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/chrome/browser/usb/web_usb_chooser.cc
[add] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/chrome/browser/usb/web_usb_chooser.h
[rename] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/chrome/browser/usb/web_usb_chooser_desktop.cc
[add] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/chrome/browser/usb/web_usb_chooser_desktop.h
[delete] https://crrev.com/746e6f9c72b6114ca778f44c0801ef4ed160ef0e/chrome/browser/usb/web_usb_chooser_service.h
[delete] https://crrev.com/746e6f9c72b6114ca778f44c0801ef4ed160ef0e/chrome/browser/usb/web_usb_chooser_service_desktop.h
[modify] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/chrome/browser/usb/web_usb_service_impl.cc
[modify] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/chrome/browser/usb/web_usb_service_impl.h
[modify] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/chrome/browser/usb/web_usb_service_impl_unittest.cc
[modify] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/content/browser/frame_host/render_frame_host_impl.cc
[modify] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/content/browser/frame_host/render_frame_host_impl.h
[modify] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/content/public/browser/content_browser_client.cc
[modify] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/content/public/browser/content_browser_client.h
[modify] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/device/usb/public/mojom/BUILD.gn
[delete] https://crrev.com/746e6f9c72b6114ca778f44c0801ef4ed160ef0e/device/usb/public/mojom/chooser_service.mojom
[delete] https://crrev.com/746e6f9c72b6114ca778f44c0801ef4ed160ef0e/third_party/WebKit/LayoutTests/external/wpt/resources/chromium/chooser_service.mojom.js
[delete] https://crrev.com/746e6f9c72b6114ca778f44c0801ef4ed160ef0e/third_party/WebKit/LayoutTests/external/wpt/resources/chromium/chooser_service.mojom.js.headers
[modify] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/third_party/WebKit/LayoutTests/external/wpt/resources/chromium/web_usb_service.mojom.js
[modify] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/third_party/WebKit/LayoutTests/external/wpt/resources/chromium/webusb-test.js
[modify] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/third_party/WebKit/LayoutTests/external/wpt/webusb/resources/usb-helpers.js
[modify] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/third_party/WebKit/LayoutTests/usb/protected-interface-classes.html
[modify] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/third_party/WebKit/LayoutTests/usb/usbDevice-iframe.html
[modify] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/third_party/blink/public/mojom/usb/web_usb_service.mojom
[modify] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/third_party/blink/renderer/modules/webusb/usb.cc
[modify] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/third_party/blink/renderer/modules/webusb/usb.h
[modify] https://crrev.com/c98e12a20acd5e4cb2dcf25fef71066f0a5023eb/tools/metrics/histograms/enums.xml

Comment 26 by bugdroid1@chromium.org, Aug 17

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

commit caa44de3f36db7b6cd5c2a4523de1640c69a5645
Author: Donna Wu <donna.wu@intel.com>
Date: Fri Aug 17 06:42:39 2018

Move permission checking from UsbDeviceManager to WebUsbService.

This CL moves permission checking from device/usb/mojo directory to
chrome/browser/usb. This is a preparation step for moving device/usb
to service/device.

BUG=699790

Change-Id: Ic30d6ff94b670950fcb2571d7036dd7c0f39a24b
Reviewed-on: https://chromium-review.googlesource.com/1172154
Commit-Queue: Donna Wu <donna.wu@intel.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583979}
[modify] https://crrev.com/caa44de3f36db7b6cd5c2a4523de1640c69a5645/chrome/browser/usb/usb_blocklist.cc
[modify] https://crrev.com/caa44de3f36db7b6cd5c2a4523de1640c69a5645/chrome/browser/usb/usb_blocklist.h
[modify] https://crrev.com/caa44de3f36db7b6cd5c2a4523de1640c69a5645/chrome/browser/usb/usb_chooser_context.cc
[modify] https://crrev.com/caa44de3f36db7b6cd5c2a4523de1640c69a5645/chrome/browser/usb/usb_chooser_context.h
[modify] https://crrev.com/caa44de3f36db7b6cd5c2a4523de1640c69a5645/chrome/browser/usb/usb_chooser_controller.cc
[modify] https://crrev.com/caa44de3f36db7b6cd5c2a4523de1640c69a5645/chrome/browser/usb/web_usb_permission_provider.cc
[modify] https://crrev.com/caa44de3f36db7b6cd5c2a4523de1640c69a5645/chrome/browser/usb/web_usb_permission_provider.h
[modify] https://crrev.com/caa44de3f36db7b6cd5c2a4523de1640c69a5645/chrome/browser/usb/web_usb_service_impl.cc
[modify] https://crrev.com/caa44de3f36db7b6cd5c2a4523de1640c69a5645/chrome/browser/usb/web_usb_service_impl.h
[modify] https://crrev.com/caa44de3f36db7b6cd5c2a4523de1640c69a5645/device/usb/mojo/device_manager_impl.cc
[modify] https://crrev.com/caa44de3f36db7b6cd5c2a4523de1640c69a5645/device/usb/mojo/device_manager_impl.h
[modify] https://crrev.com/caa44de3f36db7b6cd5c2a4523de1640c69a5645/device/usb/mojo/device_manager_impl_unittest.cc
[modify] https://crrev.com/caa44de3f36db7b6cd5c2a4523de1640c69a5645/device/usb/mojo/mock_permission_provider.cc
[modify] https://crrev.com/caa44de3f36db7b6cd5c2a4523de1640c69a5645/device/usb/mojo/mock_permission_provider.h
[modify] https://crrev.com/caa44de3f36db7b6cd5c2a4523de1640c69a5645/device/usb/mojo/permission_provider.h

Comment 27 by bugdroid1@chromium.org, Aug 30

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

commit 50fe6b2d42a241608d72ea1d8330f5a142fc3716
Author: Donna Wu <donna.wu@intel.com>
Date: Thu Aug 30 06:27:43 2018

Merge WebUsbPermissionProvider into WebUsbServiceImpl.

This CL eliminates PermissionProvider interface and merges permission
checking to WebUsbServiceImpl.

BUG=699790

Change-Id: Ic690ad807b582dde7c14c442b8973fc5da121bd1
Reviewed-on: https://chromium-review.googlesource.com/1181163
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Donna Wu <donna.wu@intel.com>
Cr-Commit-Position: refs/heads/master@{#587458}
[modify] https://crrev.com/50fe6b2d42a241608d72ea1d8330f5a142fc3716/chrome/browser/BUILD.gn
[modify] https://crrev.com/50fe6b2d42a241608d72ea1d8330f5a142fc3716/chrome/browser/usb/usb_browsertest.cc
[modify] https://crrev.com/50fe6b2d42a241608d72ea1d8330f5a142fc3716/chrome/browser/usb/usb_chooser_controller.cc
[modify] https://crrev.com/50fe6b2d42a241608d72ea1d8330f5a142fc3716/chrome/browser/usb/usb_tab_helper.cc
[modify] https://crrev.com/50fe6b2d42a241608d72ea1d8330f5a142fc3716/chrome/browser/usb/usb_tab_helper.h
[modify] https://crrev.com/50fe6b2d42a241608d72ea1d8330f5a142fc3716/chrome/browser/usb/web_usb_detector_unittest.cc
[delete] https://crrev.com/f141070af9bec5def36d4ca51e2f6c45451875fa/chrome/browser/usb/web_usb_permission_provider.cc
[delete] https://crrev.com/f141070af9bec5def36d4ca51e2f6c45451875fa/chrome/browser/usb/web_usb_permission_provider.h
[modify] https://crrev.com/50fe6b2d42a241608d72ea1d8330f5a142fc3716/chrome/browser/usb/web_usb_service_impl.cc
[modify] https://crrev.com/50fe6b2d42a241608d72ea1d8330f5a142fc3716/chrome/browser/usb/web_usb_service_impl.h
[modify] https://crrev.com/50fe6b2d42a241608d72ea1d8330f5a142fc3716/chrome/browser/usb/web_usb_service_impl_unittest.cc
[modify] https://crrev.com/50fe6b2d42a241608d72ea1d8330f5a142fc3716/chrome/test/BUILD.gn
[modify] https://crrev.com/50fe6b2d42a241608d72ea1d8330f5a142fc3716/device/BUILD.gn
[modify] https://crrev.com/50fe6b2d42a241608d72ea1d8330f5a142fc3716/device/usb/mojo/BUILD.gn
[delete] https://crrev.com/f141070af9bec5def36d4ca51e2f6c45451875fa/device/usb/mojo/mock_permission_provider.cc
[delete] https://crrev.com/f141070af9bec5def36d4ca51e2f6c45451875fa/device/usb/mojo/mock_permission_provider.h
[delete] https://crrev.com/f141070af9bec5def36d4ca51e2f6c45451875fa/device/usb/mojo/permission_provider.cc
[delete] https://crrev.com/f141070af9bec5def36d4ca51e2f6c45451875fa/device/usb/mojo/permission_provider.h

Comment 28 by bugdroid1@chromium.org, Sep 10

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

commit 55acc8c7a1c116244cd7bc10428d51c61f63fa39
Author: Donna Wu <donna.wu@intel.com>
Date: Mon Sep 10 06:11:26 2018

Usb UsbDeviceInfo as GrantDevicePermission's parameter.

This CL changes the third parameter of GrantDevicePermission in
UsbChooserContext from |guid| to |device_info|, and stores more info
about the ephemeral devices, so that we can get rid of direct
references to UsbService in subsequent CLs.

Bug: 699790
Change-Id: Ifaa741cec5f4ddb888c3377c2ad0742e677fb521
Reviewed-on: https://chromium-review.googlesource.com/1203877
Commit-Queue: Donna Wu <donna.wu@intel.com>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589830}
[modify] https://crrev.com/55acc8c7a1c116244cd7bc10428d51c61f63fa39/chrome/browser/BUILD.gn
[modify] https://crrev.com/55acc8c7a1c116244cd7bc10428d51c61f63fa39/chrome/browser/ui/page_info/page_info_unittest.cc
[modify] https://crrev.com/55acc8c7a1c116244cd7bc10428d51c61f63fa39/chrome/browser/ui/views/page_info/page_info_bubble_view_unittest.cc
[modify] https://crrev.com/55acc8c7a1c116244cd7bc10428d51c61f63fa39/chrome/browser/usb/usb_chooser_context.cc
[modify] https://crrev.com/55acc8c7a1c116244cd7bc10428d51c61f63fa39/chrome/browser/usb/usb_chooser_context.h
[modify] https://crrev.com/55acc8c7a1c116244cd7bc10428d51c61f63fa39/chrome/browser/usb/usb_chooser_context_unittest.cc
[modify] https://crrev.com/55acc8c7a1c116244cd7bc10428d51c61f63fa39/chrome/browser/usb/usb_chooser_controller.cc
[modify] https://crrev.com/55acc8c7a1c116244cd7bc10428d51c61f63fa39/chrome/browser/usb/usb_chooser_controller.h
[modify] https://crrev.com/55acc8c7a1c116244cd7bc10428d51c61f63fa39/chrome/browser/usb/web_usb_service_impl_unittest.cc
[modify] https://crrev.com/55acc8c7a1c116244cd7bc10428d51c61f63fa39/device/usb/public/cpp/filter_utils.cc
[modify] https://crrev.com/55acc8c7a1c116244cd7bc10428d51c61f63fa39/device/usb/public/cpp/filter_utils.h

Comment 29 by bugdroid1@chromium.org, Sep 12

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

commit a0f301ad19908c1320f0b00d87f0469b6009b5a6
Author: Donna Wu <donna.wu@intel.com>
Date: Wed Sep 12 07:16:20 2018

Listen to UsbDeviceManager instead of UsbService in UsbChooserContext.

For UsbService::Observer, "OnDeviceRemovedCleanup" needs to be handled
after "OnDeviceRemoved". But for mojom interface UsbDeviceManager,
there is no way to provide such dependency among listeners.

As all users will be converted from UsbService to UsbDeviceManager,
to avoid the potential race condition, WebUsbServiceImpl is made
listen to UsbChooserContext in this CL.

Bug: 699790
Change-Id: I1e3b45196552e987b7422b127651e1fb01e1618b
Reviewed-on: https://chromium-review.googlesource.com/1210386
Commit-Queue: Donna Wu <donna.wu@intel.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590609}
[modify] https://crrev.com/a0f301ad19908c1320f0b00d87f0469b6009b5a6/chrome/browser/usb/usb_browsertest.cc
[modify] https://crrev.com/a0f301ad19908c1320f0b00d87f0469b6009b5a6/chrome/browser/usb/usb_chooser_context.cc
[modify] https://crrev.com/a0f301ad19908c1320f0b00d87f0469b6009b5a6/chrome/browser/usb/usb_chooser_context.h
[modify] https://crrev.com/a0f301ad19908c1320f0b00d87f0469b6009b5a6/chrome/browser/usb/usb_chooser_context_unittest.cc
[modify] https://crrev.com/a0f301ad19908c1320f0b00d87f0469b6009b5a6/chrome/browser/usb/usb_chooser_controller.cc
[modify] https://crrev.com/a0f301ad19908c1320f0b00d87f0469b6009b5a6/chrome/browser/usb/web_usb_service_impl.cc
[modify] https://crrev.com/a0f301ad19908c1320f0b00d87f0469b6009b5a6/chrome/browser/usb/web_usb_service_impl.h
[modify] https://crrev.com/a0f301ad19908c1320f0b00d87f0469b6009b5a6/chrome/browser/usb/web_usb_service_impl_unittest.cc
[modify] https://crrev.com/a0f301ad19908c1320f0b00d87f0469b6009b5a6/device/usb/mojo/device_manager_impl.cc
[modify] https://crrev.com/a0f301ad19908c1320f0b00d87f0469b6009b5a6/device/usb/mojo/device_manager_impl.h
[modify] https://crrev.com/a0f301ad19908c1320f0b00d87f0469b6009b5a6/device/usb/mojo/device_manager_impl_unittest.cc

Comment 30 by bugdroid1@chromium.org, Sep 12

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

commit 171eed0b622e3252b8abe703a70b8d283267125d
Author: Adithya Srinivasan <adithyas@chromium.org>
Date: Wed Sep 12 16:51:11 2018

Revert "Listen to UsbDeviceManager instead of UsbService in UsbChooserContext."

This reverts commit a0f301ad19908c1320f0b00d87f0469b6009b5a6.

Reason for revert: Suspect that is causes test failures in Linux ASan, see  https://crbug.com/883262 .

Original change's description:
> Listen to UsbDeviceManager instead of UsbService in UsbChooserContext.
> 
> For UsbService::Observer, "OnDeviceRemovedCleanup" needs to be handled
> after "OnDeviceRemoved". But for mojom interface UsbDeviceManager,
> there is no way to provide such dependency among listeners.
> 
> As all users will be converted from UsbService to UsbDeviceManager,
> to avoid the potential race condition, WebUsbServiceImpl is made
> listen to UsbChooserContext in this CL.
> 
> Bug: 699790
> Change-Id: I1e3b45196552e987b7422b127651e1fb01e1618b
> Reviewed-on: https://chromium-review.googlesource.com/1210386
> Commit-Queue: Donna Wu <donna.wu@intel.com>
> Reviewed-by: Reilly Grant <reillyg@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#590609}

TBR=reillyg@chromium.org,donna.wu@intel.com

Change-Id: I954dd50c4cf8b5b761ede371f8ff904c07a61993
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 699790,  883262 
Reviewed-on: https://chromium-review.googlesource.com/1222107
Reviewed-by: Adithya Srinivasan <adithyas@chromium.org>
Commit-Queue: Adithya Srinivasan <adithyas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590720}
[modify] https://crrev.com/171eed0b622e3252b8abe703a70b8d283267125d/chrome/browser/usb/usb_browsertest.cc
[modify] https://crrev.com/171eed0b622e3252b8abe703a70b8d283267125d/chrome/browser/usb/usb_chooser_context.cc
[modify] https://crrev.com/171eed0b622e3252b8abe703a70b8d283267125d/chrome/browser/usb/usb_chooser_context.h
[modify] https://crrev.com/171eed0b622e3252b8abe703a70b8d283267125d/chrome/browser/usb/usb_chooser_context_unittest.cc
[modify] https://crrev.com/171eed0b622e3252b8abe703a70b8d283267125d/chrome/browser/usb/usb_chooser_controller.cc
[modify] https://crrev.com/171eed0b622e3252b8abe703a70b8d283267125d/chrome/browser/usb/web_usb_service_impl.cc
[modify] https://crrev.com/171eed0b622e3252b8abe703a70b8d283267125d/chrome/browser/usb/web_usb_service_impl.h
[modify] https://crrev.com/171eed0b622e3252b8abe703a70b8d283267125d/chrome/browser/usb/web_usb_service_impl_unittest.cc
[modify] https://crrev.com/171eed0b622e3252b8abe703a70b8d283267125d/device/usb/mojo/device_manager_impl.cc
[modify] https://crrev.com/171eed0b622e3252b8abe703a70b8d283267125d/device/usb/mojo/device_manager_impl.h
[modify] https://crrev.com/171eed0b622e3252b8abe703a70b8d283267125d/device/usb/mojo/device_manager_impl_unittest.cc

Comment 31 by bugdroid1@chromium.org, Sep 20

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

commit b81d51e4989097adf1278d6b0ebaebbda919df6c
Author: Donna Wu <donna.wu@intel.com>
Date: Thu Sep 20 02:41:38 2018

Make client bindings associated for UsbDeviceManager.

With separated pipes, there will be a race condition between
GetDevices() method and OnDeviceAdded/Removed events. In this case,
device list returned from GetDevices() may out of date if a event
happened between the request sending out the client getting the
device list.

This CL made the client bindings associated for UsbDeviceManager
interface and implemented it in device::usb::DeviceManagerImpl to
eliminate the potential race condition.

Bug: 699790
Change-Id: Iad019009fa831f6d2f3ccf9b5c7064f18c416cea
Reviewed-on: https://chromium-review.googlesource.com/1223339
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Donna Wu <donna.wu@intel.com>
Cr-Commit-Position: refs/heads/master@{#592666}
[modify] https://crrev.com/b81d51e4989097adf1278d6b0ebaebbda919df6c/device/usb/mojo/device_manager_impl.cc
[modify] https://crrev.com/b81d51e4989097adf1278d6b0ebaebbda919df6c/device/usb/mojo/device_manager_impl.h
[modify] https://crrev.com/b81d51e4989097adf1278d6b0ebaebbda919df6c/device/usb/mojo/device_manager_impl_unittest.cc
[modify] https://crrev.com/b81d51e4989097adf1278d6b0ebaebbda919df6c/device/usb/public/mojom/device_manager.mojom

Comment 32 by bugdroid1@chromium.org, Sep 20

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

commit 7205a8565740840b4445d1d426a1d4412fc6e73e
Author: Donna Wu <donna.wu@intel.com>
Date: Thu Sep 20 04:21:13 2018

Make clients bindings associated for WebUsbService.

Bug: 699790
Change-Id: I7fd6e119db118da8a00810e1015a4464d1a00cc4
Reviewed-on: https://chromium-review.googlesource.com/1224971
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Donna Wu <donna.wu@intel.com>
Cr-Commit-Position: refs/heads/master@{#592682}
[modify] https://crrev.com/7205a8565740840b4445d1d426a1d4412fc6e73e/chrome/browser/usb/web_usb_service_impl.cc
[modify] https://crrev.com/7205a8565740840b4445d1d426a1d4412fc6e73e/chrome/browser/usb/web_usb_service_impl.h
[modify] https://crrev.com/7205a8565740840b4445d1d426a1d4412fc6e73e/chrome/browser/usb/web_usb_service_impl_unittest.cc
[modify] https://crrev.com/7205a8565740840b4445d1d426a1d4412fc6e73e/third_party/WebKit/LayoutTests/external/wpt/resources/chromium/web_usb_service.mojom.js
[modify] https://crrev.com/7205a8565740840b4445d1d426a1d4412fc6e73e/third_party/WebKit/LayoutTests/external/wpt/resources/chromium/webusb-test.js
[modify] https://crrev.com/7205a8565740840b4445d1d426a1d4412fc6e73e/third_party/blink/public/mojom/usb/web_usb_service.mojom
[modify] https://crrev.com/7205a8565740840b4445d1d426a1d4412fc6e73e/third_party/blink/renderer/modules/webusb/usb.cc
[modify] https://crrev.com/7205a8565740840b4445d1d426a1d4412fc6e73e/third_party/blink/renderer/modules/webusb/usb.h

Comment 33 by bugdroid1@chromium.org, Sep 20

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

commit 35c12ead7ded45e0b4a60731e57f9835aa2d80ef
Author: Donna Wu <donna.wu@intel.com>
Date: Thu Sep 20 06:08:18 2018

Reland: listen to UsbDeviceManagerClient in UsbChooserContext.

The original CL has been reverted because it failed on USB browser
tests for the race condition between UsbDeviceManager::SetClient()
and UsbDeviceManagerClient::OnDeviceRemoved/Added() events.

Before this CL, two client bindings from UsbDeviceManager to Blink
have been made associated and a earlier connection is set up before
all requests to UsbDeviceManager in this CL.

The original CL's description:
> For UsbService::Observer, "OnDeviceRemovedCleanup" needs to be handled
> after "OnDeviceRemoved". But for mojom interface UsbDeviceManager,
> there is no way to provide such dependency among listeners.
>
> As all users will be converted from UsbService to UsbDeviceManager,
> to avoid the potential race condition, WebUsbServiceImpl is made
> listen to UsbChooserContext in this CL.
>
> Bug: 699790
> Change-Id: I1e3b45196552e987b7422b127651e1fb01e1618b
> Reviewed-on: https://chromium-review.googlesource.com/1210386

Bug: 699790
Change-Id: Ied803bf1e3b0fcc8daad14f6acd4a6d3ca98129f
Reviewed-on: https://chromium-review.googlesource.com/1226824
Commit-Queue: Donna Wu <donna.wu@intel.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592693}
[modify] https://crrev.com/35c12ead7ded45e0b4a60731e57f9835aa2d80ef/chrome/browser/usb/usb_browsertest.cc
[modify] https://crrev.com/35c12ead7ded45e0b4a60731e57f9835aa2d80ef/chrome/browser/usb/usb_chooser_context.cc
[modify] https://crrev.com/35c12ead7ded45e0b4a60731e57f9835aa2d80ef/chrome/browser/usb/usb_chooser_context.h
[modify] https://crrev.com/35c12ead7ded45e0b4a60731e57f9835aa2d80ef/chrome/browser/usb/usb_chooser_context_unittest.cc
[modify] https://crrev.com/35c12ead7ded45e0b4a60731e57f9835aa2d80ef/chrome/browser/usb/usb_chooser_controller.cc
[modify] https://crrev.com/35c12ead7ded45e0b4a60731e57f9835aa2d80ef/chrome/browser/usb/web_usb_service_impl.cc
[modify] https://crrev.com/35c12ead7ded45e0b4a60731e57f9835aa2d80ef/chrome/browser/usb/web_usb_service_impl.h
[modify] https://crrev.com/35c12ead7ded45e0b4a60731e57f9835aa2d80ef/chrome/browser/usb/web_usb_service_impl_unittest.cc
[modify] https://crrev.com/35c12ead7ded45e0b4a60731e57f9835aa2d80ef/device/usb/mojo/device_manager_impl.cc
[modify] https://crrev.com/35c12ead7ded45e0b4a60731e57f9835aa2d80ef/device/usb/mojo/device_manager_impl.h
[modify] https://crrev.com/35c12ead7ded45e0b4a60731e57f9835aa2d80ef/device/usb/mojo/device_manager_impl_unittest.cc

Comment 34 by bugdroid1@chromium.org, Sep 20

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

commit 592e81d47bbdbf407ecb42780169f010e96e733b
Author: Donna Wu <donna.wu@intel.com>
Date: Thu Sep 20 06:58:38 2018

Support multiple bindings in device::usb::DeviceManagerImpl.

Support multiple bindings in DeviceManagerImpl so that the Device
Service can own a unique DeviceManagerImpl instance easily and
the unique UsbService instance will be owned by DeviceManagerImpl,
then we can git rid of DeviceClient after all users being converted
to mojom interface.

Bug: 699790
Change-Id: I8a62739796f99a98bf87a1ed71562c09cba9e050
Reviewed-on: https://chromium-review.googlesource.com/1221475
Commit-Queue: Donna Wu <donna.wu@intel.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592706}
[modify] https://crrev.com/592e81d47bbdbf407ecb42780169f010e96e733b/chrome/browser/usb/usb_chooser_context.cc
[modify] https://crrev.com/592e81d47bbdbf407ecb42780169f010e96e733b/device/usb/mojo/device_manager_impl.cc
[modify] https://crrev.com/592e81d47bbdbf407ecb42780169f010e96e733b/device/usb/mojo/device_manager_impl.h
[modify] https://crrev.com/592e81d47bbdbf407ecb42780169f010e96e733b/device/usb/mojo/device_manager_impl_unittest.cc

Comment 35 by bugdroid1@chromium.org, Sep 26

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

commit 3bc1f5e4647da807ee29551234a8044bf9fb0e0a
Author: Donna Wu <donna.wu@intel.com>
Date: Wed Sep 26 15:44:13 2018

Use USB mojom interfaces in UsbChooserController.

This CL converted USB requests in UsbChooserController to mojom
interfaces through UsbChooserContext.

Bug: 699790
Change-Id: Ib55b8ab0d9a2e891227886eb68cdc29992779f45
Reviewed-on: https://chromium-review.googlesource.com/1235613
Commit-Queue: Donna Wu <donna.wu@intel.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594326}
[modify] https://crrev.com/3bc1f5e4647da807ee29551234a8044bf9fb0e0a/chrome/browser/usb/usb_chooser_context.cc
[modify] https://crrev.com/3bc1f5e4647da807ee29551234a8044bf9fb0e0a/chrome/browser/usb/usb_chooser_controller.cc
[modify] https://crrev.com/3bc1f5e4647da807ee29551234a8044bf9fb0e0a/chrome/browser/usb/usb_chooser_controller.h
[modify] https://crrev.com/3bc1f5e4647da807ee29551234a8044bf9fb0e0a/chrome/browser/usb/usb_chooser_controller_unittest.cc

Comment 37 by bugdroid1@chromium.org, Oct 10

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

commit 50436d878b2e92de4231fda47328a8a4e884ecc3
Author: Donna Wu <donna.wu@intel.com>
Date: Wed Oct 10 08:33:30 2018

Introduce FakeMojoUsbDeviceManager and use it in a unit test suite.

As device::usb::DeviceManagerImpl will be moved to the Device Service,
it should only be visible in //service directory. For unit tests out of
//service, this CL introduced FakeMojoUsbDeviceManager and used it in
UsbChooserContext unit test.

Bug: 699790
Change-Id: Ifb8bc80b5c5e44d25a4862630dd8d746572c12d2
Reviewed-on: https://chromium-review.googlesource.com/c/1238355
Commit-Queue: Donna Wu <donna.wu@intel.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#598257}
[modify] https://crrev.com/50436d878b2e92de4231fda47328a8a4e884ecc3/chrome/browser/chromeos/printing/usb_printer_util.cc
[modify] https://crrev.com/50436d878b2e92de4231fda47328a8a4e884ecc3/chrome/browser/usb/usb_chooser_context.cc
[modify] https://crrev.com/50436d878b2e92de4231fda47328a8a4e884ecc3/chrome/browser/usb/usb_chooser_context.h
[modify] https://crrev.com/50436d878b2e92de4231fda47328a8a4e884ecc3/chrome/browser/usb/usb_chooser_context_unittest.cc
[modify] https://crrev.com/50436d878b2e92de4231fda47328a8a4e884ecc3/chrome/browser/usb/usb_chooser_controller.cc
[modify] https://crrev.com/50436d878b2e92de4231fda47328a8a4e884ecc3/chrome/test/BUILD.gn
[modify] https://crrev.com/50436d878b2e92de4231fda47328a8a4e884ecc3/device/BUILD.gn
[modify] https://crrev.com/50436d878b2e92de4231fda47328a8a4e884ecc3/device/usb/mojo/device_impl.cc
[modify] https://crrev.com/50436d878b2e92de4231fda47328a8a4e884ecc3/device/usb/mojo/device_manager_impl.cc
[modify] https://crrev.com/50436d878b2e92de4231fda47328a8a4e884ecc3/device/usb/public/cpp/BUILD.gn
[add] https://crrev.com/50436d878b2e92de4231fda47328a8a4e884ecc3/device/usb/public/cpp/fake_usb_device.cc
[add] https://crrev.com/50436d878b2e92de4231fda47328a8a4e884ecc3/device/usb/public/cpp/fake_usb_device.h
[add] https://crrev.com/50436d878b2e92de4231fda47328a8a4e884ecc3/device/usb/public/cpp/fake_usb_device_info.cc
[add] https://crrev.com/50436d878b2e92de4231fda47328a8a4e884ecc3/device/usb/public/cpp/fake_usb_device_info.h
[add] https://crrev.com/50436d878b2e92de4231fda47328a8a4e884ecc3/device/usb/public/cpp/fake_usb_device_manager.cc
[add] https://crrev.com/50436d878b2e92de4231fda47328a8a4e884ecc3/device/usb/public/cpp/fake_usb_device_manager.h
[rename] https://crrev.com/50436d878b2e92de4231fda47328a8a4e884ecc3/device/usb/public/cpp/usb_utils.cc
[rename] https://crrev.com/50436d878b2e92de4231fda47328a8a4e884ecc3/device/usb/public/cpp/usb_utils.h
[rename] https://crrev.com/50436d878b2e92de4231fda47328a8a4e884ecc3/device/usb/public/cpp/usb_utils_unittest.cc
[modify] https://crrev.com/50436d878b2e92de4231fda47328a8a4e884ecc3/extensions/browser/api/device_permissions_prompt.cc
[modify] https://crrev.com/50436d878b2e92de4231fda47328a8a4e884ecc3/extensions/browser/api/usb/usb_api.cc
[modify] https://crrev.com/50436d878b2e92de4231fda47328a8a4e884ecc3/extensions/common/api/printer_provider/usb_printer_manifest_data.cc

Comment 39 by bugdroid1@chromium.org, Oct 10

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

commit 41cfd242aacbd75602a3c507d7aad9ca5930fd0a
Author: Donna Wu <donna.wu@intel.com>
Date: Wed Oct 10 14:31:58 2018

Convert non-Mojo USB device interfaces in tests.

This CL replaced non-Mojo USB interfaces to FakeUsbDeviceManager in
unit tests and browser tests under //chrome/browser and cleaned up
unnecessary code.

Bug: 699790
Change-Id: I2be61ecd9cebe3d138ab85eeeb2d9df74da33a92
Reviewed-on: https://chromium-review.googlesource.com/c/1253202
Commit-Queue: Donna Wu <donna.wu@intel.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#598315}
[modify] https://crrev.com/41cfd242aacbd75602a3c507d7aad9ca5930fd0a/chrome/browser/resource_coordinator/tab_lifecycle_unit_unittest.cc
[modify] https://crrev.com/41cfd242aacbd75602a3c507d7aad9ca5930fd0a/chrome/browser/ui/page_info/page_info_unittest.cc
[modify] https://crrev.com/41cfd242aacbd75602a3c507d7aad9ca5930fd0a/chrome/browser/ui/views/page_info/page_info_bubble_view_unittest.cc
[modify] https://crrev.com/41cfd242aacbd75602a3c507d7aad9ca5930fd0a/chrome/browser/usb/usb_blocklist.cc
[modify] https://crrev.com/41cfd242aacbd75602a3c507d7aad9ca5930fd0a/chrome/browser/usb/usb_blocklist.h
[modify] https://crrev.com/41cfd242aacbd75602a3c507d7aad9ca5930fd0a/chrome/browser/usb/usb_browsertest.cc
[modify] https://crrev.com/41cfd242aacbd75602a3c507d7aad9ca5930fd0a/chrome/browser/usb/usb_chooser_context.cc
[modify] https://crrev.com/41cfd242aacbd75602a3c507d7aad9ca5930fd0a/chrome/browser/usb/usb_chooser_context.h
[modify] https://crrev.com/41cfd242aacbd75602a3c507d7aad9ca5930fd0a/chrome/browser/usb/usb_chooser_controller_unittest.cc
[modify] https://crrev.com/41cfd242aacbd75602a3c507d7aad9ca5930fd0a/chrome/test/BUILD.gn

Comment 41 by roc...@chromium.org, Oct 17

Cc: -roc...@chromium.org rockot@google.com

Comment 42 by bugdroid1@chromium.org, Nov 2

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

commit c702987b204456bcdee69daa35c0e7bd94007ee8
Author: Donna Wu <donna.wu@intel.com>
Date: Fri Nov 02 09:47:05 2018

Close the connection with Blink when USB device permission revoked.

Record the requested devices in WebUsbServiceImpl and notify the
device implementation to close the connection with Blink when the
permission is revoked from settings UI.

Bug: 699790
Change-Id: I51bc658f3f764f5c20f278213048ebd7d8de70c0
Reviewed-on: https://chromium-review.googlesource.com/c/1270483
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Donna Wu <donna.wu@intel.com>
Cr-Commit-Position: refs/heads/master@{#604873}
[modify] https://crrev.com/c702987b204456bcdee69daa35c0e7bd94007ee8/chrome/browser/usb/usb_blocklist.cc
[modify] https://crrev.com/c702987b204456bcdee69daa35c0e7bd94007ee8/chrome/browser/usb/usb_chooser_context.cc
[modify] https://crrev.com/c702987b204456bcdee69daa35c0e7bd94007ee8/chrome/browser/usb/usb_chooser_context.h
[modify] https://crrev.com/c702987b204456bcdee69daa35c0e7bd94007ee8/chrome/browser/usb/usb_chooser_controller_unittest.cc
[modify] https://crrev.com/c702987b204456bcdee69daa35c0e7bd94007ee8/chrome/browser/usb/web_usb_service_impl.cc
[modify] https://crrev.com/c702987b204456bcdee69daa35c0e7bd94007ee8/chrome/browser/usb/web_usb_service_impl.h
[modify] https://crrev.com/c702987b204456bcdee69daa35c0e7bd94007ee8/chrome/browser/usb/web_usb_service_impl_unittest.cc
[modify] https://crrev.com/c702987b204456bcdee69daa35c0e7bd94007ee8/device/usb/mojo/device_impl.cc
[modify] https://crrev.com/c702987b204456bcdee69daa35c0e7bd94007ee8/device/usb/mojo/device_impl.h
[modify] https://crrev.com/c702987b204456bcdee69daa35c0e7bd94007ee8/device/usb/mojo/device_manager_impl.cc
[modify] https://crrev.com/c702987b204456bcdee69daa35c0e7bd94007ee8/device/usb/mojo/device_manager_impl.h
[modify] https://crrev.com/c702987b204456bcdee69daa35c0e7bd94007ee8/device/usb/public/cpp/fake_usb_device.cc
[modify] https://crrev.com/c702987b204456bcdee69daa35c0e7bd94007ee8/device/usb/public/cpp/fake_usb_device.h
[modify] https://crrev.com/c702987b204456bcdee69daa35c0e7bd94007ee8/device/usb/public/cpp/fake_usb_device_manager.cc
[modify] https://crrev.com/c702987b204456bcdee69daa35c0e7bd94007ee8/device/usb/public/cpp/fake_usb_device_manager.h
[modify] https://crrev.com/c702987b204456bcdee69daa35c0e7bd94007ee8/device/usb/public/mojom/device_manager.mojom

Comment 43 by bugdroid1@chromium.org, Nov 2

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

commit efa139ae29faf31e194ca66161311395937f6a29
Author: Donna Wu <donna.wu@intel.com>
Date: Fri Nov 02 13:41:35 2018

Reduce UsbDeviceInfoPtr storage in //chrome/browser/usb.

As UsbChooserContext stores all device infos available to the device
manager, other storages could be reduced by only keeping guid and
getting the details from UsbChooserContext by GetDeviceInfo() method.

Bug: 699790
Change-Id: I42f19a530fcf030cb896b3b26f218fe019b77e33
Reviewed-on: https://chromium-review.googlesource.com/c/1296313
Commit-Queue: Donna Wu <donna.wu@intel.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604906}
[modify] https://crrev.com/efa139ae29faf31e194ca66161311395937f6a29/chrome/browser/usb/usb_browsertest.cc
[modify] https://crrev.com/efa139ae29faf31e194ca66161311395937f6a29/chrome/browser/usb/usb_chooser_context.cc
[modify] https://crrev.com/efa139ae29faf31e194ca66161311395937f6a29/chrome/browser/usb/usb_chooser_context.h
[modify] https://crrev.com/efa139ae29faf31e194ca66161311395937f6a29/chrome/browser/usb/usb_chooser_context_unittest.cc
[modify] https://crrev.com/efa139ae29faf31e194ca66161311395937f6a29/chrome/browser/usb/usb_chooser_controller.cc
[modify] https://crrev.com/efa139ae29faf31e194ca66161311395937f6a29/chrome/browser/usb/usb_chooser_controller.h
[modify] https://crrev.com/efa139ae29faf31e194ca66161311395937f6a29/chrome/browser/usb/web_usb_service_impl.h
[modify] https://crrev.com/efa139ae29faf31e194ca66161311395937f6a29/chrome/browser/usb/web_usb_service_impl_unittest.cc

Comment 44 by bugdroid1@chromium.org, Nov 2

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

commit 341df42f9e5482651b993ddce7898c8838b490dd
Author: Donna Wu <donna.wu@intel.com>
Date: Fri Nov 02 15:18:57 2018

Use USB mojo interfaces in WebUsbDetector.

This CL converted USB callings in WebUsbDetector to mojo interfaces
by introducing webusb_landing_page in UsbDeviceInfo.

Bug: 699790
Change-Id: I6352c35a7eb9090ef4d5cb3d2436b30216d76ec9
Reviewed-on: https://chromium-review.googlesource.com/c/1297747
Commit-Queue: Donna Wu <donna.wu@intel.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604923}
[modify] https://crrev.com/341df42f9e5482651b993ddce7898c8838b490dd/chrome/browser/usb/usb_chooser_context.cc
[modify] https://crrev.com/341df42f9e5482651b993ddce7898c8838b490dd/chrome/browser/usb/usb_chooser_context.h
[modify] https://crrev.com/341df42f9e5482651b993ddce7898c8838b490dd/chrome/browser/usb/web_usb_detector.cc
[modify] https://crrev.com/341df42f9e5482651b993ddce7898c8838b490dd/chrome/browser/usb/web_usb_detector.h
[modify] https://crrev.com/341df42f9e5482651b993ddce7898c8838b490dd/chrome/browser/usb/web_usb_detector_unittest.cc
[modify] https://crrev.com/341df42f9e5482651b993ddce7898c8838b490dd/device/usb/mojo/type_converters.cc
[modify] https://crrev.com/341df42f9e5482651b993ddce7898c8838b490dd/device/usb/public/cpp/BUILD.gn
[modify] https://crrev.com/341df42f9e5482651b993ddce7898c8838b490dd/device/usb/public/cpp/fake_usb_device_info.cc
[modify] https://crrev.com/341df42f9e5482651b993ddce7898c8838b490dd/device/usb/public/cpp/fake_usb_device_info.h
[modify] https://crrev.com/341df42f9e5482651b993ddce7898c8838b490dd/device/usb/public/mojom/BUILD.gn
[modify] https://crrev.com/341df42f9e5482651b993ddce7898c8838b490dd/device/usb/public/mojom/device.mojom
[modify] https://crrev.com/341df42f9e5482651b993ddce7898c8838b490dd/third_party/WebKit/LayoutTests/external/wpt/resources/chromium/device.mojom.js
[add] https://crrev.com/341df42f9e5482651b993ddce7898c8838b490dd/third_party/WebKit/LayoutTests/external/wpt/resources/chromium/url.mojom.js
[modify] https://crrev.com/341df42f9e5482651b993ddce7898c8838b490dd/third_party/WebKit/LayoutTests/external/wpt/webusb/resources/usb-helpers.js

Comment 45 by bugdroid1@chromium.org, Nov 2

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

commit 1dfcbc57b39e67fdd2e434516f265cd10d912df5
Author: Donna Wu <donna.wu@intel.com>
Date: Fri Nov 02 16:17:34 2018

Use FakeUsbDeviceManager in UsbPolicyAllowedDevices test.

Bug: 699790
Change-Id: I00087c1cb36c9db26d9181889c2e19c951b2fb5e
Reviewed-on: https://chromium-review.googlesource.com/c/1301119
Commit-Queue: Donna Wu <donna.wu@intel.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604946}
[modify] https://crrev.com/1dfcbc57b39e67fdd2e434516f265cd10d912df5/chrome/browser/usb/usb_policy_allowed_devices_unittest.cc

Comment 46 by bugdroid1@chromium.org, Dec 5

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

commit 010c95ef0449db6c9d4b06f83f830657ebb00c2f
Author: Donna Wu <donna.wu@intel.com>
Date: Wed Dec 05 01:42:06 2018

Use USB mojo interfaces in chrome/browser/devtools/usb/.

Convert direct UsbService calling in chrome/browser/devtools/usb to
to using mojo interface and and adjust the tests.

Bug: 699790

Change-Id: Ie4e9cd54db6e6fe88538b59bc92105fd9d155f4d
Reviewed-on: https://chromium-review.googlesource.com/c/1329541
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Donna Wu <donna.wu@intel.com>
Cr-Commit-Position: refs/heads/master@{#613802}
[modify] https://crrev.com/010c95ef0449db6c9d4b06f83f830657ebb00c2f/chrome/browser/devtools/BUILD.gn
[modify] https://crrev.com/010c95ef0449db6c9d4b06f83f830657ebb00c2f/chrome/browser/devtools/device/android_device_manager.cc
[modify] https://crrev.com/010c95ef0449db6c9d4b06f83f830657ebb00c2f/chrome/browser/devtools/device/android_device_manager.h
[modify] https://crrev.com/010c95ef0449db6c9d4b06f83f830657ebb00c2f/chrome/browser/devtools/device/devtools_android_bridge.cc
[modify] https://crrev.com/010c95ef0449db6c9d4b06f83f830657ebb00c2f/chrome/browser/devtools/device/devtools_android_bridge.h
[modify] https://crrev.com/010c95ef0449db6c9d4b06f83f830657ebb00c2f/chrome/browser/devtools/device/usb/android_usb_browsertest.cc
[modify] https://crrev.com/010c95ef0449db6c9d4b06f83f830657ebb00c2f/chrome/browser/devtools/device/usb/android_usb_device.cc
[modify] https://crrev.com/010c95ef0449db6c9d4b06f83f830657ebb00c2f/chrome/browser/devtools/device/usb/android_usb_device.h
[add] https://crrev.com/010c95ef0449db6c9d4b06f83f830657ebb00c2f/chrome/browser/devtools/device/usb/usb_device_manager_helper.cc
[add] https://crrev.com/010c95ef0449db6c9d4b06f83f830657ebb00c2f/chrome/browser/devtools/device/usb/usb_device_manager_helper.h
[modify] https://crrev.com/010c95ef0449db6c9d4b06f83f830657ebb00c2f/chrome/browser/devtools/device/usb/usb_device_provider.cc
[modify] https://crrev.com/010c95ef0449db6c9d4b06f83f830657ebb00c2f/chrome/browser/devtools/device/usb/usb_device_provider.h
[modify] https://crrev.com/010c95ef0449db6c9d4b06f83f830657ebb00c2f/device/usb/public/cpp/fake_usb_device.cc
[modify] https://crrev.com/010c95ef0449db6c9d4b06f83f830657ebb00c2f/device/usb/public/cpp/fake_usb_device.h
[modify] https://crrev.com/010c95ef0449db6c9d4b06f83f830657ebb00c2f/device/usb/public/cpp/fake_usb_device_info.cc
[modify] https://crrev.com/010c95ef0449db6c9d4b06f83f830657ebb00c2f/device/usb/public/cpp/fake_usb_device_info.h
[modify] https://crrev.com/010c95ef0449db6c9d4b06f83f830657ebb00c2f/device/usb/public/cpp/fake_usb_device_manager.cc
[modify] https://crrev.com/010c95ef0449db6c9d4b06f83f830657ebb00c2f/device/usb/public/cpp/fake_usb_device_manager.h

Comment 47 by bugdroid1@chromium.org, Dec 7

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

commit 99cbf6105655ac0c6818ec08bacf7fe27c46439c
Author: Reilly Grant <reillyg@chromium.org>
Date: Fri Dec 07 01:15:35 2018

Remove support for calling UsbDeviceHandle methods from any thread

As of r613802 the last remaining user of this quirk in the
UsbDeviceHandle API has been migrated to the USB Mojo interface and so
the ability to call methods on UsbDeviceHandle from any thread and have
the callback posted back to the caller's thread can be removed.

Bug: 699790
Change-Id: Ieb3adecc2e971909aa69f612036d9bc0f5d69f31
Reviewed-on: https://chromium-review.googlesource.com/c/1364224
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Ovidio Henriquez <odejesush@chromium.org>
Cr-Commit-Position: refs/heads/master@{#614538}
[modify] https://crrev.com/99cbf6105655ac0c6818ec08bacf7fe27c46439c/device/usb/usb_device_handle.h
[modify] https://crrev.com/99cbf6105655ac0c6818ec08bacf7fe27c46439c/device/usb/usb_device_handle_impl.cc
[modify] https://crrev.com/99cbf6105655ac0c6818ec08bacf7fe27c46439c/device/usb/usb_device_handle_impl.h
[modify] https://crrev.com/99cbf6105655ac0c6818ec08bacf7fe27c46439c/device/usb/usb_device_handle_usbfs.cc
[modify] https://crrev.com/99cbf6105655ac0c6818ec08bacf7fe27c46439c/device/usb/usb_device_handle_usbfs.h
[modify] https://crrev.com/99cbf6105655ac0c6818ec08bacf7fe27c46439c/device/usb/usb_device_handle_win.cc
[modify] https://crrev.com/99cbf6105655ac0c6818ec08bacf7fe27c46439c/device/usb/usb_device_handle_win.h

Comment 48 by donna...@intel.com, Dec 10

Owner: donna...@intel.com

Comment 49 by bugdroid1@chromium.org, Dec 21

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

commit e0400419048033a4ce75d4b208208608b712d202
Author: Donna Wu <donna.wu@intel.com>
Date: Fri Dec 21 06:57:02 2018

Use USB Mojo interfaces for chrome:://usb-internals.

This CL converted the directly calling from UsbService to Mojo
interfaces usage in usb_internals and fixed loading errors caused
by unused url.origin.mojom.js.

Bug: 699790
Change-Id: Ib6438913f69cad9111a6dfc85841b94d87a98dfc
Reviewed-on: https://chromium-review.googlesource.com/c/1347780
Commit-Queue: Donna Wu <donna.wu@intel.com>
Reviewed-by: calamity <calamity@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618474}
[modify] https://crrev.com/e0400419048033a4ce75d4b208208608b712d202/chrome/browser/BUILD.gn
[modify] https://crrev.com/e0400419048033a4ce75d4b208208608b712d202/chrome/browser/browser_resources.grd
[modify] https://crrev.com/e0400419048033a4ce75d4b208208608b712d202/chrome/browser/resources/usb_internals/usb_internals.html
[modify] https://crrev.com/e0400419048033a4ce75d4b208208608b712d202/chrome/browser/resources/usb_internals/usb_internals.js
[modify] https://crrev.com/e0400419048033a4ce75d4b208208608b712d202/chrome/browser/ui/webui/usb_internals/BUILD.gn
[modify] https://crrev.com/e0400419048033a4ce75d4b208208608b712d202/chrome/browser/ui/webui/usb_internals/usb_internals.mojom
[modify] https://crrev.com/e0400419048033a4ce75d4b208208608b712d202/chrome/browser/ui/webui/usb_internals/usb_internals_page_handler.cc
[modify] https://crrev.com/e0400419048033a4ce75d4b208208608b712d202/chrome/browser/ui/webui/usb_internals/usb_internals_page_handler.h
[modify] https://crrev.com/e0400419048033a4ce75d4b208208608b712d202/chrome/browser/ui/webui/usb_internals/usb_internals_ui.cc
[modify] https://crrev.com/e0400419048033a4ce75d4b208208608b712d202/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/e0400419048033a4ce75d4b208208608b712d202/device/usb/mojo/BUILD.gn
[add] https://crrev.com/e0400419048033a4ce75d4b208208608b712d202/device/usb/mojo/device_manager_test.cc
[add] https://crrev.com/e0400419048033a4ce75d4b208208608b712d202/device/usb/mojo/device_manager_test.h
[modify] https://crrev.com/e0400419048033a4ce75d4b208208608b712d202/device/usb/public/mojom/BUILD.gn
[add] https://crrev.com/e0400419048033a4ce75d4b208208608b712d202/device/usb/public/mojom/device_manager_test.mojom
[modify] https://crrev.com/e0400419048033a4ce75d4b208208608b712d202/services/device/BUILD.gn
[modify] https://crrev.com/e0400419048033a4ce75d4b208208608b712d202/services/device/device_service.cc
[modify] https://crrev.com/e0400419048033a4ce75d4b208208608b712d202/services/device/device_service.h
[modify] https://crrev.com/e0400419048033a4ce75d4b208208608b712d202/services/device/manifest.json

Comment 50 by donna...@intel.com, Dec 26

Status: Started (was: Available)

Sign in to add a comment