| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/task_scheduler/task_tracker.h" | 5 #include "base/task_scheduler/task_tracker.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/ptr_util.h" | 15 #include "base/memory/ptr_util.h" |
| 16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 17 #include "base/sequence_token.h" | 17 #include "base/sequence_and_task_token.h" |
| 18 #include "base/sequenced_task_runner.h" | 18 #include "base/sequenced_task_runner.h" |
| 19 #include "base/single_thread_task_runner.h" | 19 #include "base/single_thread_task_runner.h" |
| 20 #include "base/synchronization/waitable_event.h" | 20 #include "base/synchronization/waitable_event.h" |
| 21 #include "base/task_scheduler/scheduler_lock.h" | 21 #include "base/task_scheduler/scheduler_lock.h" |
| 22 #include "base/task_scheduler/sequence.h" | 22 #include "base/task_scheduler/sequence.h" |
| 23 #include "base/task_scheduler/task.h" | 23 #include "base/task_scheduler/task.h" |
| 24 #include "base/task_scheduler/task_traits.h" | 24 #include "base/task_scheduler/task_traits.h" |
| 25 #include "base/test/gtest_util.h" | 25 #include "base/test/gtest_util.h" |
| 26 #include "base/test/test_simple_task_runner.h" | 26 #include "base/test/test_simple_task_runner.h" |
| 27 #include "base/threading/platform_thread.h" | 27 #include "base/threading/platform_thread.h" |
| (...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 | 640 |
| 641 // Unblock shutdown by running |block_shutdown_task|. | 641 // Unblock shutdown by running |block_shutdown_task|. |
| 642 tracker_.RunNextTaskInSequence( | 642 tracker_.RunNextTaskInSequence( |
| 643 CreateSequenceWithTask(std::move(block_shutdown_task)).get()); | 643 CreateSequenceWithTask(std::move(block_shutdown_task)).get()); |
| 644 EXPECT_EQ(kLoadTestNumIterations + 1, NumTasksExecuted()); | 644 EXPECT_EQ(kLoadTestNumIterations + 1, NumTasksExecuted()); |
| 645 WAIT_FOR_ASYNC_SHUTDOWN_COMPLETED(); | 645 WAIT_FOR_ASYNC_SHUTDOWN_COMPLETED(); |
| 646 } | 646 } |
| 647 | 647 |
| 648 } // namespace internal | 648 } // namespace internal |
| 649 } // namespace base | 649 } // namespace base |
| OLD | NEW |