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

Unified Diff: components/nacl/browser/pnacl_host.cc

Issue 2855223002: Use constexpr TaskTraits constructor in components. (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: components/nacl/browser/pnacl_host.cc
diff --git a/components/nacl/browser/pnacl_host.cc b/components/nacl/browser/pnacl_host.cc
index cacb030bc4e71832edac06f5c01759da07941d0f..a3dafd73a6207cc60fcf7cfa9d1d3c045fe04cd5 100644
--- a/components/nacl/browser/pnacl_host.cc
+++ b/components/nacl/browser/pnacl_host.cc
@@ -33,11 +33,8 @@ static const int kTranslationCacheInitializationDelayMs = 20;
void CloseBaseFile(base::File file) {
base::PostTaskWithTraits(
FROM_HERE,
- base::TaskTraits()
- .MayBlock()
- .WithPriority(base::TaskPriority::BACKGROUND)
- .WithShutdownBehavior(
- base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN),
+ {base::MayBlock(), base::TaskPriority::BACKGROUND,
+ base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN},
base::Bind([](base::File file) {}, Passed(std::move(file))));
}
@@ -382,9 +379,7 @@ void PnaclHost::CheckCacheQueryReady(
FileProxy* proxy(new FileProxy(std::move(file), this));
base::PostTaskWithTraitsAndReplyWithResult(
- FROM_HERE,
- base::TaskTraits().MayBlock().WithPriority(
- base::TaskPriority::BACKGROUND),
+ FROM_HERE, {base::MayBlock(), base::TaskPriority::BACKGROUND},
base::Bind(&FileProxy::Write, base::Unretained(proxy),
pt->nexe_read_buffer),
base::Bind(&FileProxy::WriteDone, base::Owned(proxy), entry->first));
@@ -457,9 +452,7 @@ void PnaclHost::TranslationFinished(int render_process_id,
entry->second.got_nexe_fd = false;
base::PostTaskWithTraitsAndReplyWithResult(
- FROM_HERE,
- base::TaskTraits().MayBlock().WithPriority(
- base::TaskPriority::BACKGROUND),
+ FROM_HERE, {base::MayBlock(), base::TaskPriority::BACKGROUND},
base::Bind(&PnaclHost::CopyFileToBuffer, Passed(&file)),
base::Bind(&PnaclHost::StoreTranslatedNexe, base::Unretained(this),
id));
« no previous file with comments | « components/nacl/browser/nacl_process_host.cc ('k') | components/translate/core/browser/ranker_model_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698