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

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

Issue 2853403002: Remove BrowserThread::PostBlockingPoolTask(AndReply). (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
« no previous file with comments | « content/browser/browser_thread_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..104e374eb319e3c58ca9cff688ea8a7b8f6b9c12 100644
--- a/content/public/browser/browser_thread.h
+++ b/content/public/browser/browser_thread.h
@@ -182,26 +182,15 @@ class CONTENT_EXPORT BrowserThread {
return GetTaskRunnerForThread(identifier)->ReleaseSoon(from_here, object);
}
- // Simplified wrappers for posting to the blocking thread pool. Use this
- // for doing things like blocking I/O.
- //
// DEPRECATED: use base/task_scheduler/post_task.h instead.
- // * BrowserThread::PostBlockingPoolTask(AndReply)(...) =>
- // base::PostTaskWithTraits(AndReply)(
- // FROM_HERE, base::TaskTraits().MayBlock()...)
// * BrowserThread::PostBlockingPoolSequencedTask =>
// Share a single SequencedTaskRunner created via
// base::CreateSequencedTaskRunnerWithTraits() instead of sharing a
// SequenceToken (ping base/task_scheduler/OWNERS if you find a use
// case where that's not possible).
//
- // The first variant will run the task in the pool with no sequencing
- // semantics, so may get run in parallel with other posted tasks. The second
- // variant will all post a task with no sequencing semantics, and will post a
- // reply task to the origin TaskRunner upon completion. The third variant
- // provides sequencing between tasks with the same sequence token name.
- //
- // These tasks are guaranteed to run before shutdown.
+ // Posts a task to the blocking pool. The task is guaranteed to run before
+ // shutdown. Tasks posted with the same sequence token name are sequenced.
//
// If you need to provide different shutdown semantics (like you have
// something slow and noncritical that doesn't need to block shutdown),
@@ -209,16 +198,6 @@ class CONTENT_EXPORT BrowserThread {
// lookup and is guaranteed unique without you having to come up with a
// unique string), you can access the sequenced worker pool directly via
// GetBlockingPool().
- //
- // If you need to PostTaskAndReplyWithResult, use
- // base::PostTaskAndReplyWithResult() with GetBlockingPool() as the task
- // runner.
- static bool PostBlockingPoolTask(const tracked_objects::Location& from_here,
- base::OnceClosure task);
- static bool PostBlockingPoolTaskAndReply(
- const tracked_objects::Location& from_here,
- base::OnceClosure task,
- base::OnceClosure reply);
static bool PostBlockingPoolSequencedTask(
const std::string& sequence_token_name,
const tracked_objects::Location& from_here,
« no previous file with comments | « content/browser/browser_thread_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698