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

Unified Diff: device/usb/usb_device_handle_usbfs.h

Issue 2797433005: Remove MessageLoop destruction observer from //device/usb (Closed)
Patch Set: Add test for shutdown Created 3 years, 8 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 | « no previous file | device/usb/usb_device_handle_usbfs.cc » ('j') | device/usb/usb_device_handle_usbfs.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/usb_device_handle_usbfs.h
diff --git a/device/usb/usb_device_handle_usbfs.h b/device/usb/usb_device_handle_usbfs.h
index 837bc69ece92c25ae2b493418d141775af22893a..2b9044558cf42e7043432e2618c906024875a4f5 100644
--- a/device/usb/usb_device_handle_usbfs.h
+++ b/device/usb/usb_device_handle_usbfs.h
@@ -104,21 +104,11 @@ class UsbDeviceHandleUsbfs : public UsbDeviceHandle {
};
virtual void CloseBlocking();
- void SetConfigurationBlocking(int configuration_value,
- const ResultCallback& callback);
void SetConfigurationComplete(int configuration_value,
bool success,
const ResultCallback& callback);
- void ReleaseInterfaceBlocking(int interface_number,
- const ResultCallback& callback);
void ReleaseInterfaceComplete(int interface_number,
const ResultCallback& callback);
- void SetInterfaceBlocking(int interface_number,
- int alternate_setting,
- const ResultCallback& callback);
- void ResetDeviceBlocking(const ResultCallback& callback);
- void ClearHaltBlocking(uint8_t endpoint_address,
- const ResultCallback& callback);
void IsochronousTransferInternal(uint8_t endpoint_address,
scoped_refptr<net::IOBuffer> buffer,
size_t total_length,
@@ -160,10 +150,8 @@ class UsbDeviceHandleUsbfs : public UsbDeviceHandle {
// included in the map.
std::map<uint8_t, EndpointInfo> endpoints_;
- // Helper object owned by the blocking task thread. It will be freed if that
- // thread's message loop is destroyed but can also be freed by this class on
- // destruction.
- FileThreadHelper* helper_;
+ // Helper object exists on the blocking task thread and must be freed there.
+ std::unique_ptr<FileThreadHelper> helper_;
std::list<std::unique_ptr<Transfer>> transfers_;
};
« no previous file with comments | « no previous file | device/usb/usb_device_handle_usbfs.cc » ('j') | device/usb/usb_device_handle_usbfs.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698