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

Unified Diff: chrome/browser/extensions/api/messaging/native_message_process_host.cc

Issue 2858073002: Use constexpr TaskTraits constructor in chrome. (Closed)
Patch Set: Created 3 years, 8 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: chrome/browser/extensions/api/messaging/native_message_process_host.cc
diff --git a/chrome/browser/extensions/api/messaging/native_message_process_host.cc b/chrome/browser/extensions/api/messaging/native_message_process_host.cc
index 93b5faefd81d0d8e711ce9aac71d6e1b1224d306..905b18cc38ee8db6a02398cb540cd93a8037beed 100644
--- a/chrome/browser/extensions/api/messaging/native_message_process_host.cc
+++ b/chrome/browser/extensions/api/messaging/native_message_process_host.cc
@@ -71,9 +71,7 @@ NativeMessageProcessHost::~NativeMessageProcessHost() {
// task on the blocking pool.
#if defined(OS_MACOSX)
base::PostTaskWithTraits(
- FROM_HERE,
- base::TaskTraits().MayBlock().WithPriority(
- base::TaskPriority::BACKGROUND),
+ FROM_HERE, {base::MayBlock(), base::TaskPriority::BACKGROUND},
base::BindOnce(&base::EnsureProcessTerminated, Passed(&process_)));
#else
base::EnsureProcessTerminated(std::move(process_));
@@ -147,10 +145,8 @@ void NativeMessageProcessHost::OnHostProcessLaunched(
#endif
scoped_refptr<base::TaskRunner> task_runner(base::CreateTaskRunnerWithTraits(
- base::TaskTraits()
- .MayBlock()
- .WithPriority(base::TaskPriority::USER_VISIBLE)
- .WithShutdownBehavior(base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN)));
+ {base::MayBlock(), base::TaskPriority::USER_VISIBLE,
+ base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN}));
read_stream_.reset(new net::FileStream(std::move(read_file), task_runner));
write_stream_.reset(new net::FileStream(std::move(write_file), task_runner));

Powered by Google App Engine
This is Rietveld 408576698