Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Side by Side Diff: base/test/null_task_runner.h

Issue 1647803004: Move base to DEPS (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/test/multiprocess_test_android.cc ('k') | base/test/null_task_runner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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 #ifndef BASE_TEST_NULL_TASK_RUNNER_H_
6 #define BASE_TEST_NULL_TASK_RUNNER_H_
7
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/single_thread_task_runner.h"
11
12 namespace base {
13
14 // Helper class for tests that need to provide an implementation of a
15 // *TaskRunner class but don't actually care about tasks being run.
16
17 class NullTaskRunner : public base::SingleThreadTaskRunner {
18 public:
19 NullTaskRunner();
20
21 bool PostDelayedTask(const tracked_objects::Location& from_here,
22 const base::Closure& task,
23 base::TimeDelta delay) override;
24 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
25 const base::Closure& task,
26 base::TimeDelta delay) override;
27 // Always returns true to avoid triggering DCHECKs.
28 bool RunsTasksOnCurrentThread() const override;
29
30 protected:
31 ~NullTaskRunner() override;
32
33 DISALLOW_COPY_AND_ASSIGN(NullTaskRunner);
34 };
35
36 } // namespace base
37
38 #endif // BASE_TEST_NULL_TASK_RUNNER_H_
OLDNEW
« no previous file with comments | « base/test/multiprocess_test_android.cc ('k') | base/test/null_task_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698