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

Unified Diff: ios/crnet/crnet_environment.mm

Issue 2079423002: Remove calls to MessageLoop::current() in ios. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | ios/web/web_thread_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/crnet/crnet_environment.mm
diff --git a/ios/crnet/crnet_environment.mm b/ios/crnet/crnet_environment.mm
index e61bead8dfa4c7155e0f5abcf188c3683b0f8bc9..42a54338c80a7936f4e00c478b6e6823b18b4634 100644
--- a/ios/crnet/crnet_environment.mm
+++ b/ios/crnet/crnet_environment.mm
@@ -23,6 +23,7 @@
#include "base/memory/ptr_util.h"
#include "base/metrics/statistics_recorder.h"
#include "base/path_service.h"
+#include "base/single_thread_task_runner.h"
#include "base/threading/worker_pool.h"
#include "components/prefs/json_pref_store.h"
#include "components/prefs/pref_filter.h"
@@ -176,8 +177,7 @@ void CrNetEnvironment::StartNetLog(base::FilePath::StringType file_name,
void CrNetEnvironment::StartNetLogInternal(
base::FilePath::StringType file_name, bool log_bytes) {
- DCHECK(base::MessageLoop::current() ==
- file_user_blocking_thread_->message_loop());
+ DCHECK(file_user_blocking_thread_->task_runner()->BelongsToCurrentThread());
DCHECK(file_name.length());
DCHECK(net_log_);
@@ -210,8 +210,7 @@ void CrNetEnvironment::StopNetLog() {
}
void CrNetEnvironment::StopNetLogInternal() {
- DCHECK(base::MessageLoop::current() ==
- file_user_blocking_thread_->message_loop());
+ DCHECK(file_user_blocking_thread_->task_runner()->BelongsToCurrentThread());
if (net_log_observer_) {
net_log_observer_->StopObserving(nullptr);
net_log_observer_.reset();
@@ -241,8 +240,7 @@ net::HttpNetworkSession* CrNetEnvironment::GetHttpNetworkSession(
}
void CrNetEnvironment::CloseAllSpdySessionsInternal() {
- DCHECK(base::MessageLoop::current() ==
- network_io_thread_->message_loop());
+ DCHECK(network_io_thread_->task_runner()->BelongsToCurrentThread());
net::HttpNetworkSession* http_network_session =
GetHttpNetworkSession(GetMainContextGetter()->GetURLRequestContext());
@@ -326,7 +324,7 @@ void CrNetEnvironment::SetHTTPProtocolHandlerRegistered(bool registered) {
}
void CrNetEnvironment::ConfigureSdchOnNetworkThread() {
- DCHECK(base::MessageLoop::current() == network_io_thread_->message_loop());
+ DCHECK(network_io_thread_->task_runner()->BelongsToCurrentThread());
net::URLRequestContext* context =
main_context_getter_->GetURLRequestContext();
@@ -351,7 +349,7 @@ void CrNetEnvironment::ConfigureSdchOnNetworkThread() {
}
void CrNetEnvironment::InitializeOnNetworkThread() {
- DCHECK(base::MessageLoop::current() == network_io_thread_->message_loop());
+ DCHECK(network_io_thread_->task_runner()->BelongsToCurrentThread());
ConfigureSdchOnNetworkThread();
« no previous file with comments | « no previous file | ios/web/web_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698