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

Unified Diff: base/threading/sequenced_worker_pool.cc

Issue 2882523002: Remove SequencedWorkerPool::PostDelayedWorkerTask(). (Closed)
Patch Set: CR-gab-12 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 | « base/threading/sequenced_worker_pool.h ('k') | base/threading/sequenced_worker_pool_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/sequenced_worker_pool.cc
diff --git a/base/threading/sequenced_worker_pool.cc b/base/threading/sequenced_worker_pool.cc
index a7645927c2354137cbf9e1625def8a5aa400bbae..1215b2a327fffa47c4bfd80b3046ca914afc35e9 100644
--- a/base/threading/sequenced_worker_pool.cc
+++ b/base/threading/sequenced_worker_pool.cc
@@ -173,7 +173,7 @@ bool SequencedWorkerPoolTaskRunner::PostDelayedTask(
return pool_->PostWorkerTaskWithShutdownBehavior(from_here, std::move(task),
shutdown_behavior_);
}
- return pool_->PostDelayedWorkerTask(from_here, std::move(task), delay);
+ return pool_->PostDelayedTask(from_here, std::move(task), delay);
}
bool SequencedWorkerPoolTaskRunner::RunsTasksInCurrentSequence() const {
@@ -1552,16 +1552,6 @@ bool SequencedWorkerPool::PostWorkerTask(
std::move(task), TimeDelta());
}
-bool SequencedWorkerPool::PostDelayedWorkerTask(
- const tracked_objects::Location& from_here,
- OnceClosure task,
- TimeDelta delay) {
- WorkerShutdown shutdown_behavior =
- delay.is_zero() ? BLOCK_SHUTDOWN : SKIP_ON_SHUTDOWN;
- return inner_->PostTask(NULL, SequenceToken(), shutdown_behavior, from_here,
- std::move(task), delay);
-}
-
bool SequencedWorkerPool::PostWorkerTaskWithShutdownBehavior(
const tracked_objects::Location& from_here,
OnceClosure task,
@@ -1611,7 +1601,10 @@ bool SequencedWorkerPool::PostDelayedTask(
const tracked_objects::Location& from_here,
OnceClosure task,
TimeDelta delay) {
- return PostDelayedWorkerTask(from_here, std::move(task), delay);
+ WorkerShutdown shutdown_behavior =
+ delay.is_zero() ? BLOCK_SHUTDOWN : SKIP_ON_SHUTDOWN;
+ return inner_->PostTask(nullptr, SequenceToken(), shutdown_behavior,
+ from_here, std::move(task), delay);
}
bool SequencedWorkerPool::RunsTasksInCurrentSequence() const {
« no previous file with comments | « base/threading/sequenced_worker_pool.h ('k') | base/threading/sequenced_worker_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698