Index: base/task_scheduler/task_traits.cc |
diff --git a/base/task_scheduler/task_traits.cc b/base/task_scheduler/task_traits.cc |
index be77ba9d278a78b2eb1780f7f380f8c05078e7d6..9e5be327383c20b760b7034e9240c3656dae64e3 100644 |
--- a/base/task_scheduler/task_traits.cc |
+++ b/base/task_scheduler/task_traits.cc |
@@ -4,6 +4,8 @@ |
#include "base/task_scheduler/task_traits.h" |
+#include <ostream> |
+ |
namespace base { |
// Do not rely on defaults hard-coded below beyond the guarantees described in |
@@ -32,4 +34,18 @@ TaskTraits& TaskTraits::WithShutdownBehavior( |
return *this; |
} |
+void PrintTo(const TaskPriority& task_priority, std::ostream* os) { |
+ switch (task_priority) { |
+ case TaskPriority::BACKGROUND: |
+ *os << "BACKGROUND"; |
+ break; |
+ case TaskPriority::USER_VISIBLE: |
+ *os << "USER_VISIBLE"; |
+ break; |
+ case TaskPriority::USER_BLOCKING: |
+ *os << "USER_BLOCKING"; |
+ break; |
+ } |
+} |
+ |
} // namespace base |