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

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

Issue 2122543002: Replace Closure in TaskRunner::PostTask with OneShotCallback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@07_oneshot
Patch Set: fix Created 4 years, 3 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/child/worker_thread_registry.cc ('k') | content/public/browser/content_browser_client.h » ('j') | 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 bd257965a34d12c2144f1c942764f66ab1f969b6..60cd7e24bcdb1bddad994fc2b1ac0b8c6973d03e 100644
--- a/content/public/browser/browser_thread.h
+++ b/content/public/browser/browser_thread.h
@@ -104,25 +104,24 @@ class CONTENT_EXPORT BrowserThread {
// the target thread may already have a Quit message in its queue.
static bool PostTask(ID identifier,
const tracked_objects::Location& from_here,
- const base::Closure& task);
+ base::OnceClosure task);
static bool PostDelayedTask(ID identifier,
const tracked_objects::Location& from_here,
- const base::Closure& task,
+ base::OnceClosure task,
base::TimeDelta delay);
static bool PostNonNestableTask(ID identifier,
const tracked_objects::Location& from_here,
- const base::Closure& task);
+ base::OnceClosure task);
static bool PostNonNestableDelayedTask(
ID identifier,
const tracked_objects::Location& from_here,
- const base::Closure& task,
+ base::OnceClosure task,
base::TimeDelta delay);
- static bool PostTaskAndReply(
- ID identifier,
- const tracked_objects::Location& from_here,
- const base::Closure& task,
- const base::Closure& reply);
+ static bool PostTaskAndReply(ID identifier,
+ const tracked_objects::Location& from_here,
+ base::OnceClosure task,
+ base::OnceClosure reply);
template <typename ReturnType, typename ReplyArgType>
static bool PostTaskAndReplyWithResult(
@@ -172,15 +171,15 @@ class CONTENT_EXPORT BrowserThread {
// base::PostTaskAndReplyWithResult() with GetBlockingPool() as the task
// runner.
static bool PostBlockingPoolTask(const tracked_objects::Location& from_here,
- const base::Closure& task);
+ base::OnceClosure task);
static bool PostBlockingPoolTaskAndReply(
const tracked_objects::Location& from_here,
- const base::Closure& task,
- const base::Closure& reply);
+ base::OnceClosure task,
+ base::OnceClosure reply);
static bool PostBlockingPoolSequencedTask(
const std::string& sequence_token_name,
const tracked_objects::Location& from_here,
- const base::Closure& task);
+ base::OnceClosure task);
// For use with scheduling non-critical tasks for execution after startup.
// The order or execution of tasks posted here is unspecified even when
@@ -192,7 +191,7 @@ class CONTENT_EXPORT BrowserThread {
static void PostAfterStartupTask(
const tracked_objects::Location& from_here,
const scoped_refptr<base::TaskRunner>& task_runner,
- const base::Closure& task);
+ base::OnceClosure task);
// Returns the thread pool used for blocking file I/O. Use this object to
// perform random blocking operations such as file writes or querying the
« no previous file with comments | « content/child/worker_thread_registry.cc ('k') | content/public/browser/content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698