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

Unified Diff: device/usb/usb_service_win.cc

Issue 2702623002: Add support for reading USB descriptors to the new Windows backend. (Closed)
Patch Set: Addressed rockot@'s feedback and rebased. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/usb/usb_device_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/usb_service_win.cc
diff --git a/device/usb/usb_service_win.cc b/device/usb/usb_service_win.cc
index 131fdb3317c854a41f2b10d3020992611c8a2e25..65de4b0c6275c38ac257bf8cc033652077295a35 100644
--- a/device/usb/usb_service_win.cc
+++ b/device/usb/usb_service_win.cc
@@ -334,12 +334,11 @@ void UsbServiceWin::CreateDeviceObject(const std::string& device_path,
if (!enumeration_ready())
++first_enumeration_countdown_;
- scoped_refptr<UsbDeviceWin> device(new UsbDeviceWin(
- device_path, hub_path, port_number, blocking_task_runner()));
+ scoped_refptr<UsbDeviceWin> device(
+ new UsbDeviceWin(device_path, hub_path, port_number, task_runner()));
devices_by_path_[device->device_path()] = device;
-
- // TODO(reillyg): Read device descriptors.
- DeviceReady(device, true);
+ device->ReadDescriptors(base::Bind(&UsbServiceWin::DeviceReady,
+ weak_factory_.GetWeakPtr(), device));
}
void UsbServiceWin::DeviceReady(scoped_refptr<UsbDeviceWin> device,
« no previous file with comments | « device/usb/usb_device_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698