OLD | NEW |
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 #include "base/test/test_pending_task.h" | 5 #include "base/test/test_pending_task.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 namespace base { | 10 namespace base { |
11 | 11 |
12 TestPendingTask::TestPendingTask() : nestability(NESTABLE) {} | 12 TestPendingTask::TestPendingTask() : nestability(NESTABLE) {} |
13 | 13 |
14 TestPendingTask::TestPendingTask(const tracked_objects::Location& location, | 14 TestPendingTask::TestPendingTask(const tracked_objects::Location& location, |
15 Closure task, | 15 OnceClosure task, |
16 TimeTicks post_time, | 16 TimeTicks post_time, |
17 TimeDelta delay, | 17 TimeDelta delay, |
18 TestNestability nestability) | 18 TestNestability nestability) |
19 : location(location), | 19 : location(location), |
20 task(std::move(task)), | 20 task(std::move(task)), |
21 post_time(post_time), | 21 post_time(post_time), |
22 delay(delay), | 22 delay(delay), |
23 nestability(nestability) {} | 23 nestability(nestability) {} |
24 | 24 |
25 TestPendingTask::TestPendingTask(TestPendingTask&& other) = default; | 25 TestPendingTask::TestPendingTask(TestPendingTask&& other) = default; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 std::ostream& operator<<(std::ostream& os, const TestPendingTask& task) { | 72 std::ostream& operator<<(std::ostream& os, const TestPendingTask& task) { |
73 PrintTo(task, &os); | 73 PrintTo(task, &os); |
74 return os; | 74 return os; |
75 } | 75 } |
76 | 76 |
77 void PrintTo(const TestPendingTask& task, std::ostream* os) { | 77 void PrintTo(const TestPendingTask& task, std::ostream* os) { |
78 *os << task.ToString(); | 78 *os << task.ToString(); |
79 } | 79 } |
80 | 80 |
81 } // namespace base | 81 } // namespace base |
OLD | NEW |