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

Unified Diff: device/usb/usb_service_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/usb/usb_service_linux.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/usb_service_win.cc
diff --git a/device/usb/usb_service_win.cc b/device/usb/usb_service_win.cc
index e85b32d34b280c837679f99b31f05e44e9130aa2..c0b2a75e367e78d521b28ce325264abe68e79ddb 100644
--- a/device/usb/usb_service_win.cc
+++ b/device/usb/usb_service_win.cc
@@ -296,7 +296,7 @@ UsbServiceWin::~UsbServiceWin() {
}
void UsbServiceWin::GetDevices(const GetDevicesCallback& callback) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (enumeration_ready())
UsbService::GetDevices(callback);
else
@@ -312,7 +312,7 @@ void UsbServiceWin::OnDeviceAdded(const GUID& class_guid,
void UsbServiceWin::OnDeviceRemoved(const GUID& class_guid,
const std::string& device_path) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
auto by_path_it = devices_by_path_.find(device_path);
if (by_path_it == devices_by_path_.end())
return;
@@ -332,7 +332,7 @@ void UsbServiceWin::OnDeviceRemoved(const GUID& class_guid,
}
void UsbServiceWin::HelperStarted() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
helper_started_ = true;
if (enumeration_ready()) {
std::vector<scoped_refptr<UsbDevice>> result;
@@ -364,7 +364,7 @@ void UsbServiceWin::CreateDeviceObject(const std::string& device_path,
void UsbServiceWin::DeviceReady(scoped_refptr<UsbDeviceWin> device,
bool success) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
bool enumeration_became_ready = false;
if (!enumeration_ready()) {
« no previous file with comments | « device/usb/usb_service_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698