Use constexpr TaskTraits constructor in base.
Use a constexpr constructor that accepts traits in any order instead of
the builder pattern to construct TaskTraits in base.
BUG=713683
R=gab@chromium.org
Review-Url: https://codereview.chromium.org/2861833002
Cr-Commit-Position: refs/heads/master@{#469167}
CrOS-Libchrome-Original-Commit: 2524b542c3053e57d0c70593d26c86ef4785f881
diff --git a/base/test/scoped_task_scheduler.h b/base/test/scoped_task_scheduler.h
index 7854439..010b39e 100644
--- a/base/test/scoped_task_scheduler.h
+++ b/base/test/scoped_task_scheduler.h
@@ -41,8 +41,7 @@
// base::PostTask(FROM_HERE, base::Bind(&RunLoop::Quit, &run_loop));
// base::PostTask(FROM_HERE, base::Bind(&C));
// base::PostTaskWithTraits(
-// base::TaskTraits().WithShutdownBehavior(
-// base::TaskShutdownBehavior::BLOCK_SHUTDOWN),
+// {base::TaskShutdownBehavior::BLOCK_SHUTDOWN},
// base::Bind(&D));
// run_loop.Run(); // Returns after running B and RunLoop::Quit.
//
diff --git a/base/trace_event/trace_log.cc b/base/trace_event/trace_log.cc
index d1e0fc3..b6570fd 100644
--- a/base/trace_event/trace_log.cc
+++ b/base/trace_event/trace_log.cc
@@ -971,11 +971,8 @@
if (use_worker_thread_) {
base::PostTaskWithTraits(
FROM_HERE,
- base::TaskTraits()
- .MayBlock()
- .WithPriority(base::TaskPriority::BACKGROUND)
- .WithShutdownBehavior(
- base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN),
+ {MayBlock(), TaskPriority::BACKGROUND,
+ TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN},
BindOnce(&TraceLog::ConvertTraceEventsToTraceFormat,
Passed(&previous_logged_events), flush_output_callback,
argument_filter_predicate));