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

Unified Diff: base/task_scheduler/task_traits.cc

Issue 2541353003: TaskScheduler: Initialize TaskTraits with the priority of the current thread. (Closed)
Patch Set: improve comment Created 4 years 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') | base/task_scheduler/task_traits_unittest.cc » ('j') | 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 437189c05d44fa824ba471a8f42b0fabde647b23..9ebe821c827954be33cca6645924469db7495857 100644
--- a/base/task_scheduler/task_traits.cc
+++ b/base/task_scheduler/task_traits.cc
@@ -9,6 +9,7 @@
#include <ostream>
#include "base/logging.h"
+#include "base/task_scheduler/scoped_set_task_priority_for_current_thread.h"
namespace base {
@@ -18,7 +19,7 @@ namespace base {
TaskTraits::TaskTraits()
: with_file_io_(false),
with_wait_(false),
- priority_(TaskPriority::BACKGROUND),
+ priority_(internal::GetTaskPriorityForCurrentThread()),
shutdown_behavior_(TaskShutdownBehavior::SKIP_ON_SHUTDOWN) {}
TaskTraits::~TaskTraits() = default;
« no previous file with comments | « base/task_scheduler/task_traits.h ('k') | base/task_scheduler/task_traits_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698