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

Unified Diff: device/usb/usb_service_impl.cc

Issue 2864473002: Declare TaskTraits for blocking USB tasks in a constexpr (Closed)
Patch Set: Rebased 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.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_impl.cc
diff --git a/device/usb/usb_service_impl.cc b/device/usb/usb_service_impl.cc
index e890f64b2e95a165ad9612251ee11b7871136238..13cb14c95e3aa6ef63abc9a06ecf23dc693d8969 100644
--- a/device/usb/usb_service_impl.cc
+++ b/device/usb/usb_service_impl.cc
@@ -222,9 +222,7 @@ UsbServiceImpl::UsbServiceImpl()
#endif
weak_factory_(this) {
base::PostTaskWithTraits(
- FROM_HERE,
- {base::MayBlock(), base::TaskPriority::USER_VISIBLE,
- base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN},
+ FROM_HERE, kBlockingTaskTraits,
base::Bind(&InitializeUsbContextOnBlockingThread, task_runner(),
base::Bind(&UsbServiceImpl::OnUsbContext,
weak_factory_.GetWeakPtr())));
@@ -324,9 +322,7 @@ void UsbServiceImpl::RefreshDevices() {
pending_path_enumerations_.pop();
}
- base::PostTaskWithTraits(FROM_HERE,
- {base::MayBlock(), base::TaskPriority::USER_VISIBLE,
- base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN},
+ base::PostTaskWithTraits(FROM_HERE, kBlockingTaskTraits,
base::Bind(&GetDeviceListOnBlockingThread,
device_path, context_, task_runner(),
base::Bind(&UsbServiceImpl::OnDeviceList,
« no previous file with comments | « device/usb/usb_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698