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

Unified Diff: ui/events/ozone/evdev/libgestures_glue/gesture_feedback.cc

Issue 2611463002: Use TaskScheduler instead of WorkerPool in gesture_feedback.cc. (Closed)
Patch Set: Created 3 years, 12 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/ozone/evdev/libgestures_glue/gesture_feedback.cc
diff --git a/ui/events/ozone/evdev/libgestures_glue/gesture_feedback.cc b/ui/events/ozone/evdev/libgestures_glue/gesture_feedback.cc
index c92cdd9b28053780928ccc15f9efafe7b64ff238..801415d931d33d47313e9522952f0de728b08c7e 100644
--- a/ui/events/ozone/evdev/libgestures_glue/gesture_feedback.cc
+++ b/ui/events/ozone/evdev/libgestures_glue/gesture_feedback.cc
@@ -15,7 +15,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
-#include "base/threading/worker_pool.h"
+#include "base/task_scheduler/post_task.h"
#include "ui/events/ozone/evdev/libgestures_glue/gesture_property_provider.h"
namespace ui {
@@ -232,11 +232,15 @@ void DumpTouchEventLog(
}
}
- // Compress touchpad/mouse logs on another thread and return.
- base::WorkerPool::PostTaskAndReply(
- FROM_HERE,
+ // Compress touchpad/mouse logs asynchronously
+ base::PostTaskWithTraitsAndReply(
+ FROM_HERE, base::TaskTraits()
+ .WithShutdownBehavior(
+ base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN)
+ .WithPriority(base::TaskPriority::BACKGROUND)
+ .MayBlock(),
base::Bind(&CompressDumpedLog, base::Passed(&log_paths_to_be_compressed)),
- base::Bind(reply, base::Passed(&log_paths)), true /* task_is_slow */);
+ base::Bind(reply, base::Passed(&log_paths)));
}
} // namespace ui
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698