| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/task_runner.h" | 5 #include "base/task_runner.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/threading/post_task_and_reply_impl.h" | 9 #include "base/threading/post_task_and_reply_impl.h" |
| 10 | 10 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 } | 46 } |
| 47 | 47 |
| 48 bool TaskRunner::PostTaskAndReply( | 48 bool TaskRunner::PostTaskAndReply( |
| 49 const tracked_objects::Location& from_here, | 49 const tracked_objects::Location& from_here, |
| 50 const Closure& task, | 50 const Closure& task, |
| 51 const Closure& reply) { | 51 const Closure& reply) { |
| 52 return PostTaskAndReplyTaskRunner(this).PostTaskAndReply( | 52 return PostTaskAndReplyTaskRunner(this).PostTaskAndReply( |
| 53 from_here, task, reply); | 53 from_here, task, reply); |
| 54 } | 54 } |
| 55 | 55 |
| 56 bool TaskRunner::PostDelayedTaskAndReply( |
| 57 const tracked_objects::Location& from_here, |
| 58 const Closure& task, |
| 59 const Closure& reply, |
| 60 TimeDelta delay) { |
| 61 return PostTaskAndReplyTaskRunner(this).PostDelayedTaskAndReply( |
| 62 from_here, task, reply, delay); |
| 63 } |
| 64 |
| 56 TaskRunner::TaskRunner() {} | 65 TaskRunner::TaskRunner() {} |
| 57 | 66 |
| 58 TaskRunner::~TaskRunner() {} | 67 TaskRunner::~TaskRunner() {} |
| 59 | 68 |
| 60 void TaskRunner::OnDestruct() const { | 69 void TaskRunner::OnDestruct() const { |
| 61 delete this; | 70 delete this; |
| 62 } | 71 } |
| 63 | 72 |
| 64 void TaskRunnerTraits::Destruct(const TaskRunner* task_runner) { | 73 void TaskRunnerTraits::Destruct(const TaskRunner* task_runner) { |
| 65 task_runner->OnDestruct(); | 74 task_runner->OnDestruct(); |
| 66 } | 75 } |
| 67 | 76 |
| 68 } // namespace base | 77 } // namespace base |
| OLD | NEW |