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

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: Addressed comments 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
« 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 35028547ae41f2d6dfbff2f13209ce7d3bc8b414..3340cc334aa9c0630bcd7a03bf3c9845b74354d2 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,21 @@ 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.
+ DCHECK_EQ(delay_ms, 0);
+ return PostWorkerTask(from_here, task);
+}
+
+bool SequencedWorkerPool::RunsTasksOnCurrentThread() const {
+ // TODO(akalin): Add support for this.
brettw 2012/02/24 05:25:51 Can you clarify what this comment is trying to say
willchan no longer on Chromium 2012/02/28 22:29:54 I think we don't want people to call this function
akalin 2012/02/29 00:17:42 Clarified comment. I think I agree with willchan
+ NOTREACHED();
+ return true;
+}
+
void SequencedWorkerPool::FlushForTesting() {
{
AutoLock lock(lock_);
« 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