Scott Haseley | 72d89b0 | 2023-02-17 03:29:25 | [diff] [blame] | 1 | // Copyright 2023 The Chromium Authors |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CONTENT_BROWSER_SCHEDULER_BROWSER_TASK_PRIORITY_H_ |
| 6 | #define CONTENT_BROWSER_SCHEDULER_BROWSER_TASK_PRIORITY_H_ |
| 7 | |
| 8 | #include "base/task/sequence_manager/sequence_manager.h" |
| 9 | #include "base/task/sequence_manager/task_queue.h" |
| 10 | #include "content/common/content_export.h" |
| 11 | |
| 12 | namespace content::internal { |
| 13 | |
| 14 | // clang-format off |
| 15 | enum class BrowserTaskPriority |
| 16 | : base::sequence_manager::TaskQueue::QueuePriority { |
| 17 | // Priorities are in descending order. |
| 18 | kControlPriority = 0, |
| 19 | kHighestPriority = 1, |
| 20 | kHighPriority = 2, |
| 21 | kNormalPriority = 3, |
| 22 | kDefaultPriority = kNormalPriority, |
| 23 | kLowPriority = 4, |
| 24 | kBestEffortPriority = 5, |
| 25 | |
| 26 | // Must be the last entry. |
| 27 | kPriorityCount = 6, |
| 28 | }; |
| 29 | // clang-format on |
| 30 | |
| 31 | base::sequence_manager::SequenceManager::PrioritySettings CONTENT_EXPORT |
| 32 | CreateBrowserTaskPrioritySettings(); |
| 33 | |
| 34 | } // namespace content::internal |
| 35 | |
| 36 | #endif // CONTENT_BROWSER_SCHEDULER_BROWSER_TASK_PRIORITY_H_ |