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

Unified Diff: content/child/child_process.cc

Issue 2123653003: Remove calls to MessageLoop::current() in content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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/child/child_process.cc
diff --git a/content/child/child_process.cc b/content/child/child_process.cc
index 8411653ad8c2b699a8e1b5900b81d87d6c8d7b3d..9805c062f55c1872eb540abc0a029d8e32a72775 100644
--- a/content/child/child_process.cc
+++ b/content/child/child_process.cc
@@ -10,6 +10,7 @@
#include "base/message_loop/message_loop.h"
#include "base/metrics/statistics_recorder.h"
#include "base/process/process_handle.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread.h"
@@ -87,13 +88,13 @@ void ChildProcess::set_main_thread(ChildThreadImpl* thread) {
void ChildProcess::AddRefProcess() {
DCHECK(!main_thread_.get() || // null in unittests.
- base::MessageLoop::current() == main_thread_->message_loop());
+ main_thread_->message_loop()->task_runner()->BelongsToCurrentThread());
ref_count_++;
}
void ChildProcess::ReleaseProcess() {
DCHECK(!main_thread_.get() || // null in unittests.
- base::MessageLoop::current() == main_thread_->message_loop());
+ main_thread_->message_loop()->task_runner()->BelongsToCurrentThread());
DCHECK(ref_count_);
if (--ref_count_)
return;
« no previous file with comments | « content/browser/geolocation/geolocation_provider_impl_unittest.cc ('k') | content/child/child_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698