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

Unified Diff: device/usb/usb_service_linux.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_impl.cc ('k') | device/usb/usb_service_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/usb_service_linux.cc
diff --git a/device/usb/usb_service_linux.cc b/device/usb/usb_service_linux.cc
index 9bd90153014fb191518037c527e577b352694936..e882c4d3bf7ed62fe073ccd32cbb38f8f5d64707 100644
--- a/device/usb/usb_service_linux.cc
+++ b/device/usb/usb_service_linux.cc
@@ -193,7 +193,7 @@ UsbServiceLinux::~UsbServiceLinux() {
}
void UsbServiceLinux::GetDevices(const GetDevicesCallback& callback) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (enumeration_ready())
UsbService::GetDevices(callback);
else
@@ -206,7 +206,7 @@ void UsbServiceLinux::OnDeviceAdded(const std::string& device_path,
const std::string& product,
const std::string& serial_number,
uint8_t active_configuration) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (ContainsKey(devices_by_path_, device_path)) {
USB_LOG(ERROR) << "Got duplicate add event for path: " << device_path;
@@ -234,7 +234,7 @@ void UsbServiceLinux::OnDeviceAdded(const std::string& device_path,
void UsbServiceLinux::DeviceReady(scoped_refptr<UsbDeviceLinux> device,
bool success) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
bool enumeration_became_ready = false;
if (!enumeration_ready()) {
@@ -277,7 +277,7 @@ void UsbServiceLinux::DeviceReady(scoped_refptr<UsbDeviceLinux> device,
}
void UsbServiceLinux::OnDeviceRemoved(const std::string& path) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
auto by_path_it = devices_by_path_.find(path);
if (by_path_it == devices_by_path_.end())
return;
@@ -297,7 +297,7 @@ void UsbServiceLinux::OnDeviceRemoved(const std::string& path) {
}
void UsbServiceLinux::HelperStarted() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
helper_started_ = true;
if (enumeration_ready()) {
std::vector<scoped_refptr<UsbDevice>> result;
« no previous file with comments | « device/usb/usb_service_impl.cc ('k') | device/usb/usb_service_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698