summaryrefslogtreecommitdiffstats
path: root/base/task.h
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-04 02:17:42 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-04 02:17:42 +0000
commit9a05d5deea7f543c478ba0f6b0f385a6e54bf24d (patch)
tree1a4b6a286071bfd8ffcdec71c359b75a1376d84d /base/task.h
parent45a9cd809927c645150718d3ea061e64abe9606a (diff)
downloadchromium_src-9a05d5deea7f543c478ba0f6b0f385a6e54bf24d.zip
chromium_src-9a05d5deea7f543c478ba0f6b0f385a6e54bf24d.tar.gz
chromium_src-9a05d5deea7f543c478ba0f6b0f385a6e54bf24d.tar.bz2
base::Bind: Remove CancelableTask and ScopedTaskRunner.
BUG=none TEST=none R=groby Review URL: http://codereview.chromium.org/9071023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116269 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/task.h')
-rw-r--r--base/task.h27
1 files changed, 2 insertions, 25 deletions
diff --git a/base/task.h b/base/task.h
index f22300a..571f274 100644
--- a/base/task.h
+++ b/base/task.h
@@ -56,15 +56,6 @@ class BASE_EXPORT Task {
virtual void Run() = 0;
};
-class BASE_EXPORT CancelableTask : public Task {
- public:
- CancelableTask();
- virtual ~CancelableTask();
-
- // Not all tasks support cancellation.
- virtual void Cancel() = 0;
-};
-
template<typename T>
void DeletePointer(T* obj) {
delete obj;
@@ -77,22 +68,8 @@ void ReleasePointer(T* obj) {
namespace base {
-// ScopedTaskRunner is akin to scoped_ptr for Tasks. It ensures that the Task
-// is executed and deleted no matter how the current scope exits.
-class BASE_EXPORT ScopedTaskRunner {
- public:
- // Takes ownership of the task.
- explicit ScopedTaskRunner(Task* task);
- ~ScopedTaskRunner();
-
- Task* Release();
-
- private:
- Task* task_;
-
- DISALLOW_IMPLICIT_CONSTRUCTORS(ScopedTaskRunner);
-};
-
+// ScopedClosureRunner is akin to scoped_ptr for Closures. It ensures that the
+// Closure is executed and deleted no matter how the current scope exits.
class BASE_EXPORT ScopedClosureRunner {
public:
explicit ScopedClosureRunner(const Closure& closure);