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

Unified Diff: base/task_scheduler/post_task.h

Issue 2859053006: Use constexpr TaskTraits constructor in base (part 2). (Closed)
Patch Set: self-review Created 3 years, 7 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/process/kill_win.cc ('k') | base/task_scheduler/priority_queue_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/post_task.h
diff --git a/base/task_scheduler/post_task.h b/base/task_scheduler/post_task.h
index 69eda894ff874174061ee06d8d4d2a6fe79b7ef7..1fc10bffeade30848e53052c763932ceaced5d6f 100644
--- a/base/task_scheduler/post_task.h
+++ b/base/task_scheduler/post_task.h
@@ -30,7 +30,7 @@ namespace base {
// To post a high priority one-off task to respond to a user interaction:
// PostTaskWithTraits(
// FROM_HERE,
-// TaskTraits().WithPriority(TaskPriority::USER_BLOCKING),
+// {TaskPriority::USER_BLOCKING},
// Bind(...));
//
// To post tasks that must run in sequence with default traits:
@@ -43,8 +43,7 @@ namespace base {
// shutdown:
// scoped_refptr<SequencedTaskRunner> task_runner =
// CreateSequencedTaskRunnerWithTraits(
-// TaskTraits().MayBlock().WithShutdownBehavior(
-// TaskShutdownBehavior::SKIP_ON_SHUTDOWN));
+// {MayBlock(), TaskShutdownBehavior::SKIP_ON_SHUTDOWN});
// task_runner.PostTask(FROM_HERE, Bind(...));
// task_runner.PostTask(FROM_HERE, Bind(...));
//
« no previous file with comments | « base/process/kill_win.cc ('k') | base/task_scheduler/priority_queue_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698