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

Unified Diff: components/feedback/feedback_data.cc

Issue 2867713005: Use constexpr TaskTraits constructor in feedback_data.cc. (Closed)
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/feedback/feedback_data.cc
diff --git a/components/feedback/feedback_data.cc b/components/feedback/feedback_data.cc
index f73b1d484960a6a5d5f12b72a1758d9d70a40f78..d46b8b182b182879dbd1538e26e8451b37fb1304 100644
--- a/components/feedback/feedback_data.cc
+++ b/components/feedback/feedback_data.cc
@@ -65,9 +65,7 @@ void FeedbackData::SetAndCompressSystemInfo(
++pending_op_count_;
AddLogs(std::move(sys_info));
base::PostTaskWithTraitsAndReply(
- FROM_HERE,
- base::TaskTraits().MayBlock().WithPriority(
- base::TaskPriority::BACKGROUND),
+ FROM_HERE, {base::MayBlock(), base::TaskPriority::BACKGROUND},
base::Bind(&FeedbackData::CompressLogs, this),
base::Bind(&FeedbackData::OnCompressComplete, this));
}
@@ -81,9 +79,7 @@ void FeedbackData::SetAndCompressHistograms(
return;
++pending_op_count_;
base::PostTaskWithTraitsAndReply(
- FROM_HERE,
- base::TaskTraits().MayBlock().WithPriority(
- base::TaskPriority::BACKGROUND),
+ FROM_HERE, {base::MayBlock(), base::TaskPriority::BACKGROUND},
base::Bind(&FeedbackData::CompressFile, this,
base::FilePath(kHistogramsFilename), kHistogramsAttachmentName,
base::Passed(&histograms)),
@@ -100,9 +96,7 @@ void FeedbackData::AttachAndCompressFileData(
base::FilePath attached_file =
base::FilePath::FromUTF8Unsafe(attached_filename_);
base::PostTaskWithTraitsAndReply(
- FROM_HERE,
- base::TaskTraits().MayBlock().WithPriority(
- base::TaskPriority::BACKGROUND),
+ FROM_HERE, {base::MayBlock(), base::TaskPriority::BACKGROUND},
base::Bind(&FeedbackData::CompressFile, this, attached_file,
std::string(), base::Passed(&attached_filedata)),
base::Bind(&FeedbackData::OnCompressComplete, this));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698