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

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

Issue 985003004: base: Fix/add header #ifndef guards. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: headers: . Created 5 years, 9 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/sequenced_task_runner.h ('k') | base/test/sequenced_task_runner_test_template.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef BASE_TEST_NULL_TASK_RUNNER_H_
6 #define BASE_TEST_NULL_TASK_RUNNER_H_
7
5 #include "base/basictypes.h" 8 #include "base/basictypes.h"
6 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
7 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
8 11
9 namespace base { 12 namespace base {
10 13
11 // Helper class for tests that need to provide an implementation of a 14 // Helper class for tests that need to provide an implementation of a
12 // *TaskRunner class but don't actually care about tasks being run. 15 // *TaskRunner class but don't actually care about tasks being run.
13 16
14 class NullTaskRunner : public base::SingleThreadTaskRunner { 17 class NullTaskRunner : public base::SingleThreadTaskRunner {
15 public: 18 public:
16 NullTaskRunner(); 19 NullTaskRunner();
17 20
18 bool PostDelayedTask(const tracked_objects::Location& from_here, 21 bool PostDelayedTask(const tracked_objects::Location& from_here,
19 const base::Closure& task, 22 const base::Closure& task,
20 base::TimeDelta delay) override; 23 base::TimeDelta delay) override;
21 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, 24 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
22 const base::Closure& task, 25 const base::Closure& task,
23 base::TimeDelta delay) override; 26 base::TimeDelta delay) override;
24 // Always returns true to avoid triggering DCHECKs. 27 // Always returns true to avoid triggering DCHECKs.
25 bool RunsTasksOnCurrentThread() const override; 28 bool RunsTasksOnCurrentThread() const override;
26 29
27 protected: 30 protected:
28 ~NullTaskRunner() override; 31 ~NullTaskRunner() override;
29 32
30 DISALLOW_COPY_AND_ASSIGN(NullTaskRunner); 33 DISALLOW_COPY_AND_ASSIGN(NullTaskRunner);
31 }; 34 };
32 35
33 } // namespace base 36 } // namespace base
37
38 #endif // BASE_TEST_NULL_TASK_RUNNER_H_
OLDNEW
« no previous file with comments | « base/sequenced_task_runner.h ('k') | base/test/sequenced_task_runner_test_template.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698