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

Unified Diff: base/threading/platform_thread_win.cc

Issue 1830693004: content: Depict priority in raster worker thread's name. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: base/threading/platform_thread_win.cc
diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc
index d5bd9bed08e7978714d989c2a3afcf4a135bed69..1e498fed7867e42696de115d5e5a8fc4005f2cad 100644
--- a/base/threading/platform_thread_win.cc
+++ b/base/threading/platform_thread_win.cc
@@ -132,6 +132,23 @@ bool CreateThreadInternal(size_t stack_size,
} // namespace
+// TODO(prashant.n): Move to common file across platforms.
+std::string GetThreadPriorityAbbr(ThreadPriority priority) {
+ switch (priority) {
+ case ThreadPriority::BACKGROUND:
+ return "bg";
+ case ThreadPriority::NORMAL:
+ return "nl";
+ case ThreadPriority::DISPLAY:
+ return "ds";
+ case ThreadPriority::REALTIME_AUDIO:
+ return "rt";
+ default:
+ NOTREACHED();
+ return "";
+ }
+}
+
// static
PlatformThreadId PlatformThread::CurrentId() {
return ::GetCurrentThreadId();

Powered by Google App Engine
This is Rietveld 408576698