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

Unified Diff: device/usb/usb_service_win.h

Issue 2885143002: Use the task scheduler in the new Windows USB backend (Closed)
Patch Set: Created 3 years, 7 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
Index: device/usb/usb_service_win.h
diff --git a/device/usb/usb_service_win.h b/device/usb/usb_service_win.h
index 58f4bb2bc8961d8271a4412cfaf0e9e9e66c47e5..8a9d7ecabeae8aa6705e0fd550b7e4ed8990ee51 100644
--- a/device/usb/usb_service_win.h
+++ b/device/usb/usb_service_win.h
@@ -13,22 +13,18 @@
#include "device/base/device_monitor_win.h"
#include "device/usb/usb_device_win.h"
-namespace base {
-class SequencedTaskRunner;
-}
-
namespace device {
class UsbServiceWin : public DeviceMonitorWin::Observer, public UsbService {
public:
- explicit UsbServiceWin(
- scoped_refptr<base::SequencedTaskRunner> blocking_task_runner);
+ UsbServiceWin();
~UsbServiceWin() override;
private:
- class BlockingThreadHelper;
+ class BlockingTaskHelper;
// device::UsbService implementation
+ void Shutdown() override;
void GetDevices(const GetDevicesCallback& callback) override;
// device::DeviceMonitorWin::Observer implementation
@@ -55,7 +51,7 @@ class UsbServiceWin : public DeviceMonitorWin::Observer, public UsbService {
uint32_t first_enumeration_countdown_ = 0;
std::list<GetDevicesCallback> enumeration_callbacks_;
- BlockingThreadHelper* helper_;
+ std::unique_ptr<BlockingTaskHelper> helper_;
std::unordered_map<std::string, scoped_refptr<UsbDeviceWin>> devices_by_path_;
ScopedObserver<DeviceMonitorWin, DeviceMonitorWin::Observer> device_observer_;

Powered by Google App Engine
This is Rietveld 408576698