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

Unified Diff: device/usb/usb_service.h

Issue 2905153002: Move off of deprecated base::NonThreadSafe in device/ (Closed)
Patch Set: ThreadChecker => SequenceChecker 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
« no previous file with comments | « device/serial/serial_io_handler_win.cc ('k') | device/usb/usb_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/usb_service.h
diff --git a/device/usb/usb_service.h b/device/usb/usb_service.h
index 79a1eff101f978b113389628a667afef37d65b7a..c4728cc768a187ccee24e2a62e9958f900dbff3b 100644
--- a/device/usb/usb_service.h
+++ b/device/usb/usb_service.h
@@ -16,10 +16,10 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/observer_list.h"
+#include "base/sequence_checker.h"
#include "base/sequenced_task_runner.h"
#include "base/single_thread_task_runner.h"
#include "base/task_scheduler/task_traits.h"
-#include "base/threading/non_thread_safe.h"
namespace device {
@@ -29,7 +29,7 @@ class UsbDevice;
// used to manage and dispatch USB events. It is also responsible for device
// discovery on the system, which allows it to re-use device handles to prevent
// competition for the same USB device.
-class UsbService : public base::NonThreadSafe {
+class UsbService {
public:
using GetDevicesCallback =
base::Callback<void(const std::vector<scoped_refptr<UsbDevice>>&)>;
@@ -96,6 +96,8 @@ class UsbService : public base::NonThreadSafe {
return devices_;
}
+ SEQUENCE_CHECKER(sequence_checker_);
+
private:
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
« no previous file with comments | « device/serial/serial_io_handler_win.cc ('k') | device/usb/usb_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698