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

Unified Diff: device/usb/usb_service_win.cc

Issue 2702623002: Add support for reading USB descriptors to the new Windows backend. (Closed)
Patch Set: 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
« device/usb/usb_device_handle_win.cc ('K') | « device/usb/usb_service_win.h ('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..9ee40468c8e7b1f81c03ffd53a336b84f6dc11d0 100644
--- a/device/usb/usb_service_win.cc
+++ b/device/usb/usb_service_win.cc
@@ -334,12 +334,16 @@ 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;
+ device->ReadDescriptors(base::Bind(&UsbServiceWin::OnReadDescriptors,
+ weak_factory_.GetWeakPtr(), device));
+}
- // TODO(reillyg): Read device descriptors.
- DeviceReady(device, true);
+void UsbServiceWin::OnReadDescriptors(scoped_refptr<UsbDeviceWin> device,
+ bool success) {
+ DeviceReady(device, success);
}
void UsbServiceWin::DeviceReady(scoped_refptr<UsbDeviceWin> device,
« device/usb/usb_device_handle_win.cc ('K') | « device/usb/usb_service_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698