xref: /aosp_15_r20/external/cronet/base/test/null_task_runner.cc (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright 2012 The Chromium Authors
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/test/null_task_runner.h"
6 #include "base/time/time.h"
7 
8 namespace base {
9 
10 NullTaskRunner::NullTaskRunner() = default;
11 
12 NullTaskRunner::~NullTaskRunner() = default;
13 
PostDelayedTask(const Location & from_here,OnceClosure task,base::TimeDelta delay)14 bool NullTaskRunner::PostDelayedTask(const Location& from_here,
15                                      OnceClosure task,
16                                      base::TimeDelta delay) {
17   return false;
18 }
19 
PostNonNestableDelayedTask(const Location & from_here,OnceClosure task,base::TimeDelta delay)20 bool NullTaskRunner::PostNonNestableDelayedTask(const Location& from_here,
21                                                 OnceClosure task,
22                                                 base::TimeDelta delay) {
23   return false;
24 }
25 
RunsTasksInCurrentSequence() const26 bool NullTaskRunner::RunsTasksInCurrentSequence() const {
27   return true;
28 }
29 
30 }  // namespace base
31