Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1696)

Unified Diff: base/task_scheduler/task_traits.cc

Issue 1705253002: TaskScheduler [3/9] Task and Sequence (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@s_1_scheduler_lock
Patch Set: CR from Dana and Gab #40-41 Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/task_scheduler/task_traits.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « base/task_scheduler/task_traits.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698