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

Unified Diff: third_party/WebKit/Source/platform/threading/BackgroundTaskRunner.cpp

Issue 2685673005: Use TaskScheduler instead of WorkerPool in BackgroundTaskRunner.cpp (Closed)
Patch Set: Created 3 years, 10 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
Index: third_party/WebKit/Source/platform/threading/BackgroundTaskRunner.cpp
diff --git a/third_party/WebKit/Source/platform/threading/BackgroundTaskRunner.cpp b/third_party/WebKit/Source/platform/threading/BackgroundTaskRunner.cpp
index 04cebcb20c8c13d21aa48560993a401227a77800..4874ac699042a36a08d25974806963013671c362 100644
--- a/third_party/WebKit/Source/platform/threading/BackgroundTaskRunner.cpp
+++ b/third_party/WebKit/Source/platform/threading/BackgroundTaskRunner.cpp
@@ -5,18 +5,18 @@
#include "platform/threading/BackgroundTaskRunner.h"
#include "base/location.h"
-#include "base/threading/worker_pool.h"
+#include "base/task_scheduler/post_task.h"
#include "public/platform/WebTraceLocation.h"
namespace blink {
void BackgroundTaskRunner::postOnBackgroundThread(
const WebTraceLocation& location,
- std::unique_ptr<CrossThreadClosure> closure,
- TaskSize taskSize) {
- base::WorkerPool::PostTask(location,
- convertToBaseCallback(std::move(closure)),
- taskSize == TaskSizeLongRunningTask);
+ std::unique_ptr<CrossThreadClosure> closure) {
+ base::PostTaskWithTraits(
+ location, base::TaskTraits().WithShutdownBehavior(
+ base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN),
+ convertToBaseCallback(std::move(closure)));
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698