• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3 // found in the LICENSE file.
4 
5 #include "base/sequenced_task_runner.h"
6 
7 #include <utility>
8 
9 #include "base/bind.h"
10 
11 namespace base {
12 
PostNonNestableTask(const tracked_objects::Location & from_here,OnceClosure task)13 bool SequencedTaskRunner::PostNonNestableTask(
14     const tracked_objects::Location& from_here,
15     OnceClosure task) {
16   return PostNonNestableDelayedTask(from_here, std::move(task),
17                                     base::TimeDelta());
18 }
19 
DeleteOrReleaseSoonInternal(const tracked_objects::Location & from_here,void (* deleter)(const void *),const void * object)20 bool SequencedTaskRunner::DeleteOrReleaseSoonInternal(
21     const tracked_objects::Location& from_here,
22     void (*deleter)(const void*),
23     const void* object) {
24   return PostNonNestableTask(from_here, Bind(deleter, object));
25 }
26 
OnTaskRunnerDeleter(scoped_refptr<SequencedTaskRunner> task_runner)27 OnTaskRunnerDeleter::OnTaskRunnerDeleter(
28     scoped_refptr<SequencedTaskRunner> task_runner)
29     : task_runner_(std::move(task_runner)) {
30 }
31 
~OnTaskRunnerDeleter()32 OnTaskRunnerDeleter::~OnTaskRunnerDeleter() {
33 }
34 
35 OnTaskRunnerDeleter::OnTaskRunnerDeleter(OnTaskRunnerDeleter&&) = default;
36 
37 OnTaskRunnerDeleter& OnTaskRunnerDeleter::operator=(
38     OnTaskRunnerDeleter&&) = default;
39 
40 }  // namespace base
41