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

Unified Diff: base/threading/post_task_and_reply_impl.cc

Issue 1113953002: Revert of base: Remove use of MessageLoopProxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « base/threading/post_task_and_reply_impl.h ('k') | base/threading/sequenced_worker_pool.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/post_task_and_reply_impl.cc
diff --git a/base/threading/post_task_and_reply_impl.cc b/base/threading/post_task_and_reply_impl.cc
index f3e88abf60852998ed7ad1b65f8d64c13505d6ab..a82a4fd804386bddaaafafab8c53543c6772e09e 100644
--- a/base/threading/post_task_and_reply_impl.cc
+++ b/base/threading/post_task_and_reply_impl.cc
@@ -25,30 +25,30 @@
class PostTaskAndReplyRelay {
public:
PostTaskAndReplyRelay(const tracked_objects::Location& from_here,
- const Closure& task,
- const Closure& reply)
+ const Closure& task, const Closure& reply)
: from_here_(from_here),
- origin_task_runner_(ThreadTaskRunnerHandle::Get()) {
+ origin_loop_(ThreadTaskRunnerHandle::Get()) {
task_ = task;
reply_ = reply;
}
~PostTaskAndReplyRelay() {
- DCHECK(origin_task_runner_->BelongsToCurrentThread());
+ DCHECK(origin_loop_->BelongsToCurrentThread());
task_.Reset();
reply_.Reset();
}
void Run() {
task_.Run();
- origin_task_runner_->PostTask(
- from_here_, Bind(&PostTaskAndReplyRelay::RunReplyAndSelfDestruct,
- base::Unretained(this)));
+ origin_loop_->PostTask(
+ from_here_,
+ Bind(&PostTaskAndReplyRelay::RunReplyAndSelfDestruct,
+ base::Unretained(this)));
}
private:
void RunReplyAndSelfDestruct() {
- DCHECK(origin_task_runner_->BelongsToCurrentThread());
+ DCHECK(origin_loop_->BelongsToCurrentThread());
// Force |task_| to be released before |reply_| is to ensure that no one
// accidentally depends on |task_| keeping one of its arguments alive while
@@ -62,7 +62,7 @@
}
tracked_objects::Location from_here_;
- scoped_refptr<SingleThreadTaskRunner> origin_task_runner_;
+ scoped_refptr<SingleThreadTaskRunner> origin_loop_;
Closure reply_;
Closure task_;
};
« no previous file with comments | « base/threading/post_task_and_reply_impl.h ('k') | base/threading/sequenced_worker_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698