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

Unified Diff: ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc

Issue 2611473002: Use TaskScheduler instead of WorkerPool in xkb_keyboard_layout_engine.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/layout/xkb/xkb_keyboard_layout_engine.cc
diff --git a/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc b/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc
index 3ceea8f4cacb4896cefc35e031707e75dcfdcd4e..e22468a10f886eccc8c92530c65371d3ced0e970 100644
--- a/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc
+++ b/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc
@@ -16,8 +16,8 @@
#include "base/memory/free_deleter.h"
#include "base/single_thread_task_runner.h"
#include "base/task_runner.h"
+#include "base/task_scheduler/post_task.h"
#include "base/threading/thread_task_runner_handle.h"
-#include "base/threading/worker_pool.h"
#include "build/build_config.h"
#include "ui/events/event_constants.h"
#include "ui/events/keycodes/dom/dom_code.h"
@@ -685,11 +685,13 @@ bool XkbKeyboardLayoutEngine::SetCurrentLayoutByName(
}
LoadKeymapCallback reply_callback = base::Bind(
&XkbKeyboardLayoutEngine::OnKeymapLoaded, weak_ptr_factory_.GetWeakPtr());
- base::WorkerPool::PostTask(
- FROM_HERE,
+ base::PostTaskWithTraits(
+ FROM_HERE, base::TaskTraits()
+ .WithShutdownBehavior(
+ base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN)
+ .MayBlock(),
base::Bind(&LoadKeymap, layout_name, base::ThreadTaskRunnerHandle::Get(),
- reply_callback),
- true);
+ reply_callback));
return true;
#else
// Required by ozone-wayland (at least) for non ChromeOS builds. See
« 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