• 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 Location & from_here,OnceClosure task)13 bool SequencedTaskRunner::PostNonNestableTask(const Location& from_here,
14                                               OnceClosure task) {
15   return PostNonNestableDelayedTask(from_here, std::move(task),
16                                     base::TimeDelta());
17 }
18 
DeleteOrReleaseSoonInternal(const Location & from_here,void (* deleter)(const void *),const void * object)19 bool SequencedTaskRunner::DeleteOrReleaseSoonInternal(
20     const Location& from_here,
21     void (*deleter)(const void*),
22     const void* object) {
23   return PostNonNestableTask(from_here, BindOnce(deleter, object));
24 }
25 
OnTaskRunnerDeleter(scoped_refptr<SequencedTaskRunner> task_runner)26 OnTaskRunnerDeleter::OnTaskRunnerDeleter(
27     scoped_refptr<SequencedTaskRunner> task_runner)
28     : task_runner_(std::move(task_runner)) {
29 }
30 
31 OnTaskRunnerDeleter::~OnTaskRunnerDeleter() = default;
32 
33 OnTaskRunnerDeleter::OnTaskRunnerDeleter(OnTaskRunnerDeleter&&) = default;
34 
35 OnTaskRunnerDeleter& OnTaskRunnerDeleter::operator=(
36     OnTaskRunnerDeleter&&) = default;
37 
38 }  // namespace base
39