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

Unified Diff: content/public/browser/browser_thread.h

Issue 2857983003: Use constexpr TaskTraits constructor in content. (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: content/public/browser/browser_thread.h
diff --git a/content/public/browser/browser_thread.h b/content/public/browser/browser_thread.h
index 8422091d3024087800f8365e034083b05cc3a6f0..78d471ea14cc6612dc12f2d2e277cf210e2205a5 100644
--- a/content/public/browser/browser_thread.h
+++ b/content/public/browser/browser_thread.h
@@ -74,8 +74,7 @@ class CONTENT_EXPORT BrowserThread {
// DEPRECATED: prefer base/task_scheduler/post_task.h for new classes
// requiring a background file I/O task runner, i.e.:
// base::CreateSequencedTaskRunnerWithTraits(
- // base::TaskTraits().MayBlock()
- // .WithPriority(base::TaskPriority::BACKGROUND))
+ // {base::MayBlock(), base::TaskPriority::BACKGROUND})
// Note: You can use base::TaskPriority::USER_VISIBLE instead of
// base::TaskPriority::BACKGROUND if the latency of this operation
// is visible but non-blocking to the user.
@@ -86,8 +85,7 @@ class CONTENT_EXPORT BrowserThread {
// DEPRECATED: prefer base/task_scheduler/post_task.h for new classes
// requiring a user-blocking file I/O task runner, i.e.:
// base::CreateSequencedTaskRunnerWithTraits(
- // base::TaskTraits().MayBlock()
- // .WithPriority(base::TaskPriority::USER_BLOCKING))
+ // {base::MayBlock(), base::TaskPriority::USER_BLOCKING})
FILE_USER_BLOCKING,
// Used to launch and terminate Chrome processes.
@@ -188,7 +186,7 @@ class CONTENT_EXPORT BrowserThread {
// DEPRECATED: use base/task_scheduler/post_task.h instead.
// * BrowserThread::PostBlockingPoolTask(AndReply)(...) =>
// base::PostTaskWithTraits(AndReply)(
- // FROM_HERE, base::TaskTraits().MayBlock()...)
+ // FROM_HERE, {base::MayBlock()})
// * BrowserThread::PostBlockingPoolSequencedTask =>
// Share a single SequencedTaskRunner created via
// base::CreateSequencedTaskRunnerWithTraits() instead of sharing a
@@ -245,7 +243,7 @@ class CONTENT_EXPORT BrowserThread {
// base::SequencedWorkerPool::GetSequenceToken())
// =>
// base::CreateSequencedTaskRunnerWithTraits(
- // base::TaskTraits().MayBlock()...).
+ // {base::MayBlock()}).
static base::SequencedWorkerPool* GetBlockingPool() WARN_UNUSED_RESULT;
// Callable on any thread. Returns whether the given well-known thread is

Powered by Google App Engine
This is Rietveld 408576698