Chromium Code Reviews| Index: cc/test/ordered_simple_task_runner.h |
| diff --git a/cc/test/ordered_simple_task_runner.h b/cc/test/ordered_simple_task_runner.h |
| index 9620a96058df422e00c841a5512bca675422d9f0..ecb6b79362ae7716c55a4d4dee7ca4c0c3a82945 100644 |
| --- a/cc/test/ordered_simple_task_runner.h |
| +++ b/cc/test/ordered_simple_task_runner.h |
| @@ -32,6 +32,7 @@ class TestOrderablePendingTask : public base::TestPendingTask { |
| base::TimeTicks post_time, |
| base::TimeDelta delay, |
| TestNestability nestability); |
| + TestOrderablePendingTask(TestOrderablePendingTask&&); |
|
danakj
2016/10/20 20:07:46
add operator= too
tzik
2016/10/27 08:20:49
Done.
|
| ~TestOrderablePendingTask(); |
| // operators needed by std::set and comparison |
| @@ -42,9 +43,13 @@ class TestOrderablePendingTask : public base::TestPendingTask { |
| std::unique_ptr<base::trace_event::ConvertableToTraceFormat> AsValue() const; |
| void AsValueInto(base::trace_event::TracedValue* state) const; |
| + size_t task_id() const { return task_id_; } |
| + |
| private: |
| static size_t task_id_counter; |
| const size_t task_id_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(TestOrderablePendingTask); |
| }; |
| // This runs pending tasks based on task's post_time + delay. |
| @@ -132,8 +137,7 @@ class OrderedSimpleTaskRunner : public base::SingleThreadTaskRunner { |
| protected: |
| static bool TaskRunCountBelowCallback(size_t max_tasks, size_t* task_run); |
| - bool TaskExistedInitiallyCallback( |
| - const std::set<TestOrderablePendingTask>& existing_tasks); |
| + bool TaskExistedInitiallyCallback(const std::set<size_t>& existing_tasks); |
| bool NowBeforeCallback(base::TimeTicks stop_at); |
| bool AdvanceNowCallback(); |