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

Unified Diff: base/threading/sequenced_worker_pool.cc

Issue 9401032: Make SequencedWorkerPool a TaskRunner (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated with changes from 9347056 Created 8 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: base/threading/sequenced_worker_pool.cc
diff --git a/base/threading/sequenced_worker_pool.cc b/base/threading/sequenced_worker_pool.cc
index 35028547ae41f2d6dfbff2f13209ce7d3bc8b414..a5a5c4301077cd67473a2bc1c9cd65955045a607 100644
--- a/base/threading/sequenced_worker_pool.cc
+++ b/base/threading/sequenced_worker_pool.cc
@@ -4,7 +4,6 @@
#include "base/threading/sequenced_worker_pool.h"
-#include "base/compiler_specific.h"
#include "base/logging.h"
#include "base/metrics/histogram.h"
#include "base/stringprintf.h"
@@ -145,6 +144,20 @@ bool SequencedWorkerPool::PostSequencedWorkerTaskWithShutdownBehavior(
from_here, task);
}
+bool SequencedWorkerPool::PostDelayedTask(
+ const tracked_objects::Location& from_here,
+ const Closure& task,
+ int64 delay_ms) {
+ // TODO(akalin): Add support for non-zero delays.
+ DLOG_IF(WARNING, delay_ms > 0) << "Ignoring delay of " << delay_ms << " ms";
willchan no longer on Chromium 2012/02/23 19:39:57 I suggest NOTREACHED() instead. If this starts hap
akalin 2012/02/23 22:52:21 Done. Used DCHECK_EQ instead of NOTREACHED(). Ad
+ return PostWorkerTask(from_here, task);
+}
+
+bool SequencedWorkerPool::RunsTasksOnCurrentThread() const {
+ // TODO(akalin): Add support for this.
willchan no longer on Chromium 2012/02/23 19:39:57 When is this coming? Do not land without it, or us
akalin 2012/02/23 22:52:21 Use NOTREACHED(). I'll see if I can implement thi
+ return true;
+}
+
void SequencedWorkerPool::FlushForTesting() {
{
AutoLock lock(lock_);

Powered by Google App Engine
This is Rietveld 408576698