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

Unified Diff: device/serial/serial_io_handler_win.cc

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_posix.cc ('k') | device/usb/usb_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/serial/serial_io_handler_win.cc
diff --git a/device/serial/serial_io_handler_win.cc b/device/serial/serial_io_handler_win.cc
index 6be1127d12e84eb41bdf39748c981d9fdd9c16e4..75461fe7843c22e6657f1e92efd17667b69d6726 100644
--- a/device/serial/serial_io_handler_win.cc
+++ b/device/serial/serial_io_handler_win.cc
@@ -12,7 +12,7 @@
#include "base/bind.h"
#include "base/macros.h"
#include "base/scoped_observer.h"
-#include "base/threading/thread_checker.h"
+#include "base/sequence_checker.h"
#include "device/base/device_info_query_win.h"
#include "device/base/device_monitor_win.h"
#include "third_party/re2/src/re2/re2.h"
@@ -196,7 +196,7 @@ class SerialIoHandlerWin::UiThreadHelper final
};
void SerialIoHandlerWin::OnDeviceRemoved(const std::string& device_path) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DeviceInfoQueryWin device_info_query;
if (!device_info_query.device_info_list_valid()) {
@@ -266,7 +266,7 @@ bool SerialIoHandlerWin::PostOpen() {
}
void SerialIoHandlerWin::ReadImpl() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(pending_read_buffer());
DCHECK(file().IsValid());
@@ -285,7 +285,7 @@ void SerialIoHandlerWin::ReadImpl() {
}
void SerialIoHandlerWin::WriteImpl() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(pending_write_buffer());
DCHECK(file().IsValid());
@@ -301,13 +301,13 @@ void SerialIoHandlerWin::WriteImpl() {
}
void SerialIoHandlerWin::CancelReadImpl() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(file().IsValid());
::CancelIo(file().GetPlatformFile());
}
void SerialIoHandlerWin::CancelWriteImpl() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(file().IsValid());
::CancelIo(file().GetPlatformFile());
}
@@ -375,7 +375,7 @@ void SerialIoHandlerWin::OnIOCompleted(
base::MessageLoopForIO::IOContext* context,
DWORD bytes_transferred,
DWORD error) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (context == comm_context_.get()) {
DWORD errors;
COMSTAT status;
« no previous file with comments | « device/serial/serial_io_handler_posix.cc ('k') | device/usb/usb_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698