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

Unified Diff: device/usb/usb_device_linux.h

Issue 2849953003: Use the task scheduler for blocking tasks in the USB service on Linux (Closed)
Patch Set: Remove more passing of the SequencedTaskRunner 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 | « device/usb/usb_device_handle_unittest.cc ('k') | device/usb/usb_device_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/usb_device_linux.h
diff --git a/device/usb/usb_device_linux.h b/device/usb/usb_device_linux.h
index 92a19c37fafa4b1c04a0c688d4995551e46fb738..ccbd36ed2da5f92c3ce947fbf31b32ca76d0309a 100644
--- a/device/usb/usb_device_linux.h
+++ b/device/usb/usb_device_linux.h
@@ -12,7 +12,7 @@
#include "base/files/scoped_file.h"
#include "base/macros.h"
-#include "base/threading/thread_checker.h"
+#include "base/sequence_checker.h"
#include "build/build_config.h"
#include "device/usb/usb_device.h"
#include "device/usb/webusb_descriptors.h"
@@ -52,8 +52,7 @@ class UsbDeviceLinux : public UsbDevice {
const std::string& manufacturer_string,
const std::string& product_string,
const std::string& serial_number,
- uint8_t active_configuration,
- scoped_refptr<base::SequencedTaskRunner> blocking_task_runner);
+ uint8_t active_configuration);
~UsbDeviceLinux() override;
@@ -64,17 +63,19 @@ class UsbDeviceLinux : public UsbDevice {
const std::string& error_name,
const std::string& error_message);
#else
- void OpenOnBlockingThread(const OpenCallback& callback);
+ void OpenOnBlockingThread(
+ const OpenCallback& callback,
+ scoped_refptr<base::SequencedTaskRunner> task_runner,
+ scoped_refptr<base::SequencedTaskRunner> blocking_task_runner);
#endif // defined(OS_CHROMEOS)
- void Opened(base::ScopedFD fd, const OpenCallback& callback);
+ void Opened(base::ScopedFD fd,
+ const OpenCallback& callback,
+ scoped_refptr<base::SequencedTaskRunner> blocking_task_runner);
- base::ThreadChecker thread_checker_;
+ base::SequenceChecker sequence_checker_;
const std::string device_path_;
- scoped_refptr<base::SequencedTaskRunner> task_runner_;
- scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
-
DISALLOW_COPY_AND_ASSIGN(UsbDeviceLinux);
};
« no previous file with comments | « device/usb/usb_device_handle_unittest.cc ('k') | device/usb/usb_device_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698