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

Unified Diff: base/threading/sequenced_worker_pool_task_runner.h

Issue 9401032: Make SequencedWorkerPool a TaskRunner (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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_task_runner.h
diff --git a/base/threading/sequenced_worker_pool_task_runner.h b/base/threading/sequenced_worker_pool_task_runner.h
new file mode 100644
index 0000000000000000000000000000000000000000..d1a4aa6d6654b4e0eee46bd1a3e4fcc8c400975f
--- /dev/null
+++ b/base/threading/sequenced_worker_pool_task_runner.h
@@ -0,0 +1,42 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_THREADING_SEQUENCED_WORKER_POOL_TASK_RUNNER_H_
+#define BASE_THREADING_SEQUENCED_WORKER_POOL_TASK_RUNNER_H_
+#pragma once
+
+#include "base/base_export.h"
+#include "base/compiler_specific.h"
+#include "base/task_runner.h"
+#include "base/threading/sequenced_worker_pool_inner.h"
+
+namespace base {
+namespace internal {
+
+class SequencedWorkerPoolInner;
+
+// This class is part of the SequencedWorkerPool implementation.
+// DO NOT USE THIS CLASS DIRECTLY YOURSELF.
+class BASE_EXPORT SequencedWorkerPoolTaskRunner : public TaskRunner {
+ public:
+ SequencedWorkerPoolTaskRunner(
+ const scoped_refptr<SequencedWorkerPoolInner>& inner);
+ virtual ~SequencedWorkerPoolTaskRunner();
+
+ // TaskRunner implementation.
+ virtual bool PostDelayedTask(const tracked_objects::Location& from_here,
+ const Closure& task,
+ int64 delay_ms) OVERRIDE;
+ virtual bool RunsTasksOnCurrentThread() const OVERRIDE;
+
+ private:
+ const scoped_refptr<SequencedWorkerPoolInner> inner_;
+
+ DISALLOW_COPY_AND_ASSIGN(SequencedWorkerPoolTaskRunner);
+};
+
+} // namespace internal
+} // namespace base
+
+#endif // BASE_THREADING_SEQUENCED_WORKER_POOL_INNER_H_

Powered by Google App Engine
This is Rietveld 408576698