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

Unified Diff: device/usb/usb_service_impl.h

Issue 2557073004: Call libusb_init on the FILE thread. (Closed)
Patch Set: Created 4 years 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_context.h ('k') | device/usb/usb_service_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/usb_service_impl.h
diff --git a/device/usb/usb_service_impl.h b/device/usb/usb_service_impl.h
index ddca3b5bffc1bf344ab26a91c8da422799ab1922..e5467fb0b0c4ea99fcc2fd7b575484dba08da4fa 100644
--- a/device/usb/usb_service_impl.h
+++ b/device/usb/usb_service_impl.h
@@ -56,6 +56,8 @@ class UsbServiceImpl :
const std::string& device_path) override;
#endif // OS_WIN
+ void OnUsbContext(scoped_refptr<UsbContext> context);
+
// Enumerate USB devices from OS and update devices_ map.
void RefreshDevices();
void OnDeviceList(libusb_device** platform_devices, size_t device_count);
@@ -84,6 +86,7 @@ class UsbServiceImpl :
const base::Closure& refresh_complete);
scoped_refptr<UsbContext> context_;
+ bool usb_unavailable_ = false;
juncai 2016/12/08 20:00:39 nit: maybe change the variable name to be: bool us
Reilly Grant (use Gerrit) 2016/12/08 22:44:39 The reason I named this usb_unavailable_ is becaus
juncai 2016/12/08 23:02:10 I see. Thanks for the explanation.
// When available the device list will be updated when new devices are
// connected instead of only when a full enumeration is requested.
« no previous file with comments | « device/usb/usb_context.h ('k') | device/usb/usb_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698