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

Unified Diff: base/task_scheduler/task_traits.h

Issue 2392903002: Add a task_scheduler tracing category which will record an extra event per task. (Closed)
Patch Set: review:danakj#19 Created 4 years, 2 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_tracker.cc ('k') | base/task_scheduler/task_traits.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/task_traits.h
diff --git a/base/task_scheduler/task_traits.h b/base/task_scheduler/task_traits.h
index 0c0d304dcf53edf41f679904e3b45dc296a1b911..9fee22427bef130103475466166db6d976955c52 100644
--- a/base/task_scheduler/task_traits.h
+++ b/base/task_scheduler/task_traits.h
@@ -126,14 +126,22 @@ enum class ExecutionMode {
SINGLE_THREADED,
};
-// Stream operators so TaskPriority and TaskShutdownBehavior can be used in
-// DCHECK statements.
+// Returns string literals for the enums defined in this file. These methods
+// should only be used for tracing and debugging.
+BASE_EXPORT const char* TaskPriorityToString(TaskPriority task_priority);
+BASE_EXPORT const char* TaskShutdownBehaviorToString(
+ TaskShutdownBehavior task_priority);
+BASE_EXPORT const char* ExecutionModeToString(ExecutionMode task_priority);
+
+// Stream operators so that the enums defined in this file can be used in
+// DCHECK and EXPECT statements.
BASE_EXPORT std::ostream& operator<<(std::ostream& os,
const TaskPriority& shutdown_behavior);
-
BASE_EXPORT std::ostream& operator<<(
std::ostream& os,
const TaskShutdownBehavior& shutdown_behavior);
+BASE_EXPORT std::ostream& operator<<(std::ostream& os,
+ const ExecutionMode& execution_mode);
} // namespace base
« no previous file with comments | « base/task_scheduler/task_tracker.cc ('k') | base/task_scheduler/task_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698