blob: e4da5474a0098d852963c1ca5c1b350ffa306d37 [file] [log] [blame]
wez@chromium.org6d4ad682011-05-28 04:35:11 +09001// Copyright (c) 2011 The Chromium Authors. All rights reserved.
erg@chromium.org493f5f62010-07-16 06:03:54 +09002// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "base/task.h"
6
7Task::Task() {
8}
9
10Task::~Task() {
11}
12
13CancelableTask::CancelableTask() {
14}
15
16CancelableTask::~CancelableTask() {
17}
wez@chromium.org6d4ad682011-05-28 04:35:11 +090018
19namespace base {
20
21ScopedTaskRunner::ScopedTaskRunner(Task* task) : task_(task) {
22}
23
24ScopedTaskRunner::~ScopedTaskRunner() {
25 if (task_) {
26 task_->Run();
27 delete task_;
28 }
29}
30
31Task* ScopedTaskRunner::Release() {
32 Task* tmp = task_;
33 task_ = NULL;
34 return tmp;
35}
36
37} // namespace base