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

Side by Side Diff: media/cast/test/fake_single_thread_task_runner.h

Issue 655713003: Standardize usage of virtual/override/final in media/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 MEDIA_CAST_TEST_FAKE_TASK_RUNNER_H_ 5 #ifndef MEDIA_CAST_TEST_FAKE_TASK_RUNNER_H_
6 #define MEDIA_CAST_TEST_FAKE_TASK_RUNNER_H_ 6 #define MEDIA_CAST_TEST_FAKE_TASK_RUNNER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 10 matching lines...) Expand all
21 class FakeSingleThreadTaskRunner : public base::SingleThreadTaskRunner { 21 class FakeSingleThreadTaskRunner : public base::SingleThreadTaskRunner {
22 public: 22 public:
23 explicit FakeSingleThreadTaskRunner(base::SimpleTestTickClock* clock); 23 explicit FakeSingleThreadTaskRunner(base::SimpleTestTickClock* clock);
24 24
25 void RunTasks(); 25 void RunTasks();
26 26
27 // Note: Advances |clock_|. 27 // Note: Advances |clock_|.
28 void Sleep(base::TimeDelta t); 28 void Sleep(base::TimeDelta t);
29 29
30 // base::SingleThreadTaskRunner implementation. 30 // base::SingleThreadTaskRunner implementation.
31 virtual bool PostDelayedTask(const tracked_objects::Location& from_here, 31 bool PostDelayedTask(const tracked_objects::Location& from_here,
32 const base::Closure& task, 32 const base::Closure& task,
33 base::TimeDelta delay) override; 33 base::TimeDelta delay) override;
34 34
35 virtual bool RunsTasksOnCurrentThread() const override; 35 bool RunsTasksOnCurrentThread() const override;
36 36
37 // This function is currently not used, and will return false. 37 // This function is currently not used, and will return false.
38 virtual bool PostNonNestableDelayedTask( 38 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
39 const tracked_objects::Location& from_here, 39 const base::Closure& task,
40 const base::Closure& task, 40 base::TimeDelta delay) override;
41 base::TimeDelta delay) override;
42 41
43 protected: 42 protected:
44 virtual ~FakeSingleThreadTaskRunner(); 43 ~FakeSingleThreadTaskRunner() override;
45 44
46 private: 45 private:
47 base::SimpleTestTickClock* const clock_; 46 base::SimpleTestTickClock* const clock_;
48 std::multimap<base::TimeTicks, PostedTask> tasks_; 47 std::multimap<base::TimeTicks, PostedTask> tasks_;
49 bool fail_on_next_task_; 48 bool fail_on_next_task_;
50 49
51 DISALLOW_COPY_AND_ASSIGN(FakeSingleThreadTaskRunner); 50 DISALLOW_COPY_AND_ASSIGN(FakeSingleThreadTaskRunner);
52 }; 51 };
53 52
54 } // namespace test 53 } // namespace test
55 } // namespace cast 54 } // namespace cast
56 } // namespace media 55 } // namespace media
57 56
58 #endif // MEDIA_CAST_TEST_FAKE_TASK_RUNNER_H_ 57 #endif // MEDIA_CAST_TEST_FAKE_TASK_RUNNER_H_
OLDNEW
« no previous file with comments | « media/cast/test/fake_receiver_time_offset_estimator.h ('k') | media/cast/test/fake_video_encode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698