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

Side by Side Diff: base/threading/sequenced_worker_pool.cc

Issue 2912073002: Revert of Remove SequencedWorkerPool::PostWorkerTask(). (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/threading/sequenced_worker_pool.h" 5 #include "base/threading/sequenced_worker_pool.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after
1538 return new PoolSequencedTaskRunner( 1538 return new PoolSequencedTaskRunner(
1539 this, token, shutdown_behavior); 1539 this, token, shutdown_behavior);
1540 } 1540 }
1541 1541
1542 scoped_refptr<TaskRunner> 1542 scoped_refptr<TaskRunner>
1543 SequencedWorkerPool::GetTaskRunnerWithShutdownBehavior( 1543 SequencedWorkerPool::GetTaskRunnerWithShutdownBehavior(
1544 WorkerShutdown shutdown_behavior) { 1544 WorkerShutdown shutdown_behavior) {
1545 return new SequencedWorkerPoolTaskRunner(this, shutdown_behavior); 1545 return new SequencedWorkerPoolTaskRunner(this, shutdown_behavior);
1546 } 1546 }
1547 1547
1548 bool SequencedWorkerPool::PostWorkerTask(
1549 const tracked_objects::Location& from_here,
1550 OnceClosure task) {
1551 return inner_->PostTask(NULL, SequenceToken(), BLOCK_SHUTDOWN, from_here,
1552 std::move(task), TimeDelta());
1553 }
1554
1548 bool SequencedWorkerPool::PostWorkerTaskWithShutdownBehavior( 1555 bool SequencedWorkerPool::PostWorkerTaskWithShutdownBehavior(
1549 const tracked_objects::Location& from_here, 1556 const tracked_objects::Location& from_here,
1550 OnceClosure task, 1557 OnceClosure task,
1551 WorkerShutdown shutdown_behavior) { 1558 WorkerShutdown shutdown_behavior) {
1552 return inner_->PostTask(NULL, SequenceToken(), shutdown_behavior, from_here, 1559 return inner_->PostTask(NULL, SequenceToken(), shutdown_behavior, from_here,
1553 std::move(task), TimeDelta()); 1560 std::move(task), TimeDelta());
1554 } 1561 }
1555 1562
1556 bool SequencedWorkerPool::PostSequencedWorkerTask( 1563 bool SequencedWorkerPool::PostSequencedWorkerTask(
1557 SequenceToken sequence_token, 1564 SequenceToken sequence_token,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
1627 bool SequencedWorkerPool::IsShutdownInProgress() { 1634 bool SequencedWorkerPool::IsShutdownInProgress() {
1628 return inner_->IsShutdownInProgress(); 1635 return inner_->IsShutdownInProgress();
1629 } 1636 }
1630 1637
1631 bool SequencedWorkerPool::IsRunningSequenceOnCurrentThread( 1638 bool SequencedWorkerPool::IsRunningSequenceOnCurrentThread(
1632 SequenceToken sequence_token) const { 1639 SequenceToken sequence_token) const {
1633 return inner_->IsRunningSequenceOnCurrentThread(sequence_token); 1640 return inner_->IsRunningSequenceOnCurrentThread(sequence_token);
1634 } 1641 }
1635 1642
1636 } // namespace base 1643 } // namespace base
OLDNEW
« 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