diff options
author | ki.stfu <ki.stfu@gmail.com> | 2015-10-09 13:23:17 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-09 20:24:30 +0000 |
commit | 375812eee1507aa8b8aac6ad9e4bf61365ab74d8 (patch) | |
tree | d711d92944ea7fe4f60ff9b53dba38b967a4d16e | |
parent | a74683a021ed70a70b621154915a7220a48bbbe0 (diff) | |
download | chromium_src-375812eee1507aa8b8aac6ad9e4bf61365ab74d8.zip chromium_src-375812eee1507aa8b8aac6ad9e4bf61365ab74d8.tar.gz chromium_src-375812eee1507aa8b8aac6ad9e4bf61365ab74d8.tar.bz2 |
Don't use base::MessageLoop::{Quit,QuitClosure} in net/
This patch renames base::MessageLoop::{Quit,QuitClosure} to
base::MessageLoop::{QuitWhenIdle,QuitWhenIdleClosure}.
BUG=131220
TEST=
R=eroman@chromium.org
Review URL: https://codereview.chromium.org/1398973003
Cr-Commit-Position: refs/heads/master@{#353372}
27 files changed, 50 insertions, 49 deletions
diff --git a/net/android/network_change_notifier_android_unittest.cc b/net/android/network_change_notifier_android_unittest.cc index 68b6d43..fdb94ef 100644 --- a/net/android/network_change_notifier_android_unittest.cc +++ b/net/android/network_change_notifier_android_unittest.cc @@ -95,7 +95,7 @@ class DNSChangeObserver : public NetworkChangeNotifier::DNSObserver { void OnInitialDNSConfigRead() override { initial_notifications_count_++; - base::MessageLoop::current()->Quit(); + base::MessageLoop::current()->QuitWhenIdle(); } int change_notifications_count() const { return change_notifications_count_; } diff --git a/net/base/file_stream_unittest.cc b/net/base/file_stream_unittest.cc index d1985a8..b83cc18 100644 --- a/net/base/file_stream_unittest.cc +++ b/net/base/file_stream_unittest.cc @@ -557,7 +557,7 @@ class TestWriteReadCompletionCallback { result_ = *total_bytes_written_; have_result_ = true; if (waiting_for_result_) - base::MessageLoop::current()->Quit(); + base::MessageLoop::current()->QuitWhenIdle(); } int result_; @@ -665,7 +665,7 @@ class TestWriteCloseCompletionCallback { result_ = *total_bytes_written_; have_result_ = true; if (waiting_for_result_) - base::MessageLoop::current()->Quit(); + base::MessageLoop::current()->QuitWhenIdle(); } int result_; diff --git a/net/base/network_change_notifier_win_unittest.cc b/net/base/network_change_notifier_win_unittest.cc index 04b19e6..14bf01a 100644 --- a/net/base/network_change_notifier_win_unittest.cc +++ b/net/base/network_change_notifier_win_unittest.cc @@ -60,7 +60,7 @@ class TestIPAddressObserver : public NetworkChangeNotifier::IPAddressObserver { }; bool ExitMessageLoopAndReturnFalse() { - base::MessageLoop::current()->Quit(); + base::MessageLoop::current()->QuitWhenIdle(); return false; } @@ -164,9 +164,10 @@ class NetworkChangeNotifierWinTest : public testing::Test { EXPECT_FALSE(network_change_notifier_.is_watching()); EXPECT_LT(0, network_change_notifier_.sequential_failures()); - EXPECT_CALL(test_ip_address_observer_, OnIPAddressChanged()).Times(1) - .WillOnce( - Invoke(base::MessageLoop::current(), &base::MessageLoop::Quit)); + EXPECT_CALL(test_ip_address_observer_, OnIPAddressChanged()) + .Times(1) + .WillOnce(Invoke(base::MessageLoop::current(), + &base::MessageLoop::QuitWhenIdle)); EXPECT_CALL(network_change_notifier_, WatchForAddressChangeInternal()) .Times(1).WillOnce(Return(true)); diff --git a/net/cookies/cookie_monster_unittest.cc b/net/cookies/cookie_monster_unittest.cc index c4df765..203dd10 100644 --- a/net/cookies/cookie_monster_unittest.cc +++ b/net/cookies/cookie_monster_unittest.cc @@ -637,7 +637,7 @@ struct CookiesInputInfo { ACTION(QuitCurrentMessageLoop) { base::ThreadTaskRunnerHandle::Get()->PostTask( - FROM_HERE, base::MessageLoop::QuitClosure()); + FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); } // TODO(erikwright): When the synchronous helpers 'GetCookies' etc. are removed, diff --git a/net/cookies/cookie_store_test_callbacks.cc b/net/cookies/cookie_store_test_callbacks.cc index afb05d1..491fe0e 100644 --- a/net/cookies/cookie_store_test_callbacks.cc +++ b/net/cookies/cookie_store_test_callbacks.cc @@ -38,8 +38,8 @@ void CookieCallback::CallbackEpilogue() { did_run_ = true; EXPECT_EQ(expected_loop, base::MessageLoop::current()); - loop_to_quit_->task_runner()->PostTask(FROM_HERE, - base::MessageLoop::QuitClosure()); + loop_to_quit_->task_runner()->PostTask( + FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); } StringResultCookieCallback::StringResultCookieCallback() {} diff --git a/net/cookies/cookie_store_unittest.h b/net/cookies/cookie_store_unittest.h index ee13524..9892fae 100644 --- a/net/cookies/cookie_store_unittest.h +++ b/net/cookies/cookie_store_unittest.h @@ -216,8 +216,8 @@ class CookieStoreTest : public testing::Test { void RunFor(int ms) { // Runs the test thread message loop for up to |ms| milliseconds. base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( - FROM_HERE, - base::Bind(&base::MessageLoop::Quit, weak_factory_->GetWeakPtr()), + FROM_HERE, base::Bind(&base::MessageLoop::QuitWhenIdle, + weak_factory_->GetWeakPtr()), base::TimeDelta::FromMilliseconds(ms)); base::MessageLoop::current()->Run(); weak_factory_->InvalidateWeakPtrs(); diff --git a/net/disk_cache/disk_cache_test_util.cc b/net/disk_cache/disk_cache_test_util.cc index 69738d3..1ef57a5 100644 --- a/net/disk_cache/disk_cache_test_util.cc +++ b/net/disk_cache/disk_cache_test_util.cc @@ -105,7 +105,7 @@ void MessageLoopHelper::TimerExpired() { CHECK_LE(callbacks_called_, num_callbacks_); if (callbacks_called_ == num_callbacks_) { completed_ = true; - base::MessageLoop::current()->Quit(); + base::MessageLoop::current()->QuitWhenIdle(); } else { // Not finished yet. See if we have to abort. if (last_ == callbacks_called_) @@ -113,7 +113,7 @@ void MessageLoopHelper::TimerExpired() { else last_ = callbacks_called_; if (40 == num_iterations_) - base::MessageLoop::current()->Quit(); + base::MessageLoop::current()->QuitWhenIdle(); } } diff --git a/net/dns/dns_config_service_posix_unittest.cc b/net/dns/dns_config_service_posix_unittest.cc index 4a99370..4d2acdd 100644 --- a/net/dns/dns_config_service_posix_unittest.cc +++ b/net/dns/dns_config_service_posix_unittest.cc @@ -181,7 +181,7 @@ class DnsConfigServicePosixTest : public testing::Test { void OnConfigChanged(const DnsConfig& config) { EXPECT_TRUE(config.IsValid()); seen_config_ = true; - base::MessageLoop::current()->Quit(); + base::MessageLoop::current()->QuitWhenIdle(); } void WriteMockHostsFile(const char* hosts_string) { diff --git a/net/dns/dns_config_service_unittest.cc b/net/dns/dns_config_service_unittest.cc index ed6d86d..028024d 100644 --- a/net/dns/dns_config_service_unittest.cc +++ b/net/dns/dns_config_service_unittest.cc @@ -115,7 +115,7 @@ class DnsConfigServiceTest : public testing::Test { void OnConfigChanged(const DnsConfig& config) { last_config_ = config; if (quit_on_config_) - base::MessageLoop::current()->Quit(); + base::MessageLoop::current()->QuitWhenIdle(); } protected: @@ -147,7 +147,7 @@ class DnsConfigServiceTest : public testing::Test { }; void WaitForConfig(base::TimeDelta timeout) { - base::CancelableClosure closure(base::MessageLoop::QuitClosure()); + base::CancelableClosure closure(base::MessageLoop::QuitWhenIdleClosure()); base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( FROM_HERE, closure.callback(), timeout); quit_on_config_ = true; diff --git a/net/dns/dns_transaction_unittest.cc b/net/dns/dns_transaction_unittest.cc index f5a8973..dc0644a 100644 --- a/net/dns/dns_transaction_unittest.cc +++ b/net/dns/dns_transaction_unittest.cc @@ -236,7 +236,7 @@ class TransactionHelper { cancel_in_callback_ = true; } - // Mark to call MessageLoop::Quit() upon callback. + // Mark to call MessageLoop::QuitWhenIdle() upon callback. void set_quit_in_callback() { quit_in_callback_ = true; } @@ -274,7 +274,7 @@ class TransactionHelper { // Tell MessageLoop to quit now, in case any ASSERT_* fails. if (quit_in_callback_) - base::MessageLoop::current()->Quit(); + base::MessageLoop::current()->QuitWhenIdle(); if (expected_answer_count_ >= 0) { ASSERT_EQ(OK, rv); diff --git a/net/dns/host_resolver_impl_unittest.cc b/net/dns/host_resolver_impl_unittest.cc index 2ab20b7..ac71749 100644 --- a/net/dns/host_resolver_impl_unittest.cc +++ b/net/dns/host_resolver_impl_unittest.cc @@ -270,7 +270,7 @@ class Request { int WaitForResult() { if (completed()) return result_; - base::CancelableClosure closure(base::MessageLoop::QuitClosure()); + base::CancelableClosure closure(base::MessageLoop::QuitWhenIdleClosure()); base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( FROM_HERE, closure.callback(), TestTimeouts::action_max_timeout()); quit_on_complete_ = true; @@ -298,7 +298,7 @@ class Request { if (handler_) handler_->Handle(this); if (quit_on_complete_) { - base::MessageLoop::current()->Quit(); + base::MessageLoop::current()->QuitWhenIdle(); quit_on_complete_ = false; } } @@ -847,7 +847,7 @@ TEST_F(HostResolverImplTest, DeleteWithinCallback) { // Quit after returning from OnCompleted (to give it a chance at // incorrectly running the cancelled tasks). base::ThreadTaskRunnerHandle::Get()->PostTask( - FROM_HERE, base::MessageLoop::QuitClosure()); + FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); } }; set_handler(new MyHandler()); @@ -873,7 +873,7 @@ TEST_F(HostResolverImplTest, DeleteWithinAbortedCallback) { // Quit after returning from OnCompleted (to give it a chance at // incorrectly running the cancelled tasks). base::ThreadTaskRunnerHandle::Get()->PostTask( - FROM_HERE, base::MessageLoop::QuitClosure()); + FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); } }; set_handler(new MyHandler()); @@ -951,7 +951,7 @@ TEST_F(HostResolverImplTest, BypassCache) { CreateRequest(info, DEFAULT_PRIORITY)->Resolve()); } else if (71 == req->info().port()) { // Test is done. - base::MessageLoop::current()->Quit(); + base::MessageLoop::current()->QuitWhenIdle(); } else { FAIL() << "Unexpected request"; } diff --git a/net/dns/mdns_client_unittest.cc b/net/dns/mdns_client_unittest.cc index bd84aca..6e735e5 100644 --- a/net/dns/mdns_client_unittest.cc +++ b/net/dns/mdns_client_unittest.cc @@ -535,7 +535,7 @@ void MDnsTest::RunFor(base::TimeDelta time_period) { } void MDnsTest::Stop() { - base::MessageLoop::current()->Quit(); + base::MessageLoop::current()->QuitWhenIdle(); } TEST_F(MDnsTest, PassiveListeners) { diff --git a/net/http/http_response_body_drainer_unittest.cc b/net/http/http_response_body_drainer_unittest.cc index e44e6ee..2062d4d 100644 --- a/net/http/http_response_body_drainer_unittest.cc +++ b/net/http/http_response_body_drainer_unittest.cc @@ -56,7 +56,7 @@ class CloseResultWaiter { result_ = result; have_result_ = true; if (waiting_for_result_) - base::MessageLoop::current()->Quit(); + base::MessageLoop::current()->QuitWhenIdle(); } private: diff --git a/net/http/http_server_properties_manager_unittest.cc b/net/http/http_server_properties_manager_unittest.cc index 40b6211..cf32d38 100644 --- a/net/http/http_server_properties_manager_unittest.cc +++ b/net/http/http_server_properties_manager_unittest.cc @@ -823,7 +823,7 @@ TEST_F(HttpServerPropertiesManagerTest, Clear) { ExpectPrefsUpdate(); // Clear http server data, time out if we do not get a completion callback. - http_server_props_manager_->Clear(base::MessageLoop::QuitClosure()); + http_server_props_manager_->Clear(base::MessageLoop::QuitWhenIdleClosure()); base::RunLoop().Run(); EXPECT_FALSE( diff --git a/net/http/http_stream_factory_impl_unittest.cc b/net/http/http_stream_factory_impl_unittest.cc index ed61ebf..8c404e7 100644 --- a/net/http/http_stream_factory_impl_unittest.cc +++ b/net/http/http_stream_factory_impl_unittest.cc @@ -130,7 +130,7 @@ class MockHttpStreamFactoryImplForPreconnect : public HttpStreamFactoryImpl { void OnPreconnectsCompleteInternal() override { preconnect_done_ = true; if (waiting_for_preconnect_) - base::MessageLoop::current()->Quit(); + base::MessageLoop::current()->QuitWhenIdle(); } bool preconnect_done_; @@ -150,7 +150,7 @@ class StreamRequestWaiter : public HttpStreamRequest::Delegate { HttpStream* stream) override { stream_done_ = true; if (waiting_for_stream_) - base::MessageLoop::current()->Quit(); + base::MessageLoop::current()->QuitWhenIdle(); stream_.reset(stream); used_ssl_config_ = used_ssl_config; used_proxy_info_ = used_proxy_info; @@ -162,7 +162,7 @@ class StreamRequestWaiter : public HttpStreamRequest::Delegate { WebSocketHandshakeStreamBase* stream) override { stream_done_ = true; if (waiting_for_stream_) - base::MessageLoop::current()->Quit(); + base::MessageLoop::current()->QuitWhenIdle(); websocket_stream_.reset(stream); used_ssl_config_ = used_ssl_config; used_proxy_info_ = used_proxy_info; diff --git a/net/http/http_transaction_test_util.cc b/net/http/http_transaction_test_util.cc index 628c8fa..d44e1a1 100644 --- a/net/http/http_transaction_test_util.cc +++ b/net/http/http_transaction_test_util.cc @@ -207,7 +207,7 @@ void TestTransactionConsumer::DidFinish(int result) { state_ = DONE; error_ = result; if (--quit_counter_ == 0) - base::MessageLoop::current()->Quit(); + base::MessageLoop::current()->QuitWhenIdle(); } void TestTransactionConsumer::Read() { diff --git a/net/proxy/mock_proxy_script_fetcher.cc b/net/proxy/mock_proxy_script_fetcher.cc index 7604b5b..e7cf7a3 100644 --- a/net/proxy/mock_proxy_script_fetcher.cc +++ b/net/proxy/mock_proxy_script_fetcher.cc @@ -30,7 +30,7 @@ int MockProxyScriptFetcher::Fetch(const GURL& url, base::string16* text, pending_request_text_ = text; if (waiting_for_fetch_) - base::MessageLoop::current()->Quit(); + base::MessageLoop::current()->QuitWhenIdle(); return ERR_IO_PENDING; } diff --git a/net/proxy/proxy_resolver_v8_tracing_unittest.cc b/net/proxy/proxy_resolver_v8_tracing_unittest.cc index 3bec370..fbca99f 100644 --- a/net/proxy/proxy_resolver_v8_tracing_unittest.cc +++ b/net/proxy/proxy_resolver_v8_tracing_unittest.cc @@ -688,7 +688,7 @@ class BlockableHostResolver : public HostResolver { // Indicate to the caller that a request was received. EXPECT_TRUE(waiting_for_resolve_); - base::MessageLoop::current()->Quit(); + base::MessageLoop::current()->QuitWhenIdle(); // This line is intentionally after action_.Run(), since one of the // tests does a cancellation inside of Resolve(), and it is more diff --git a/net/proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc b/net/proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc index c83f655..fdb823e 100644 --- a/net/proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc +++ b/net/proxy/proxy_resolver_v8_tracing_wrapper_unittest.cc @@ -774,7 +774,7 @@ class BlockableHostResolver : public HostResolver { // Indicate to the caller that a request was received. EXPECT_TRUE(waiting_for_resolve_); - base::MessageLoop::current()->Quit(); + base::MessageLoop::current()->QuitWhenIdle(); // This line is intentionally after action_.Run(), since one of the // tests does a cancellation inside of Resolve(), and it is more diff --git a/net/socket/client_socket_pool_base_unittest.cc b/net/socket/client_socket_pool_base_unittest.cc index 2ac1881..7c42ee1 100644 --- a/net/socket/client_socket_pool_base_unittest.cc +++ b/net/socket/client_socket_pool_base_unittest.cc @@ -634,7 +634,7 @@ class TestConnectJobDelegate : public ConnectJob::Delegate { EXPECT_EQ(socket == NULL, result != OK); have_result_ = true; if (waiting_for_result_) - base::MessageLoop::current()->Quit(); + base::MessageLoop::current()->QuitWhenIdle(); } int WaitForResult() { @@ -3651,7 +3651,7 @@ TEST_F(ClientSocketPoolBaseTest, PreconnectWithoutBackupJob) { // *would* complete if it were created. connect_job_factory_->set_job_type(TestConnectJob::kMockPendingJob); base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( - FROM_HERE, base::MessageLoop::QuitClosure(), + FROM_HERE, base::MessageLoop::QuitWhenIdleClosure(), base::TimeDelta::FromSeconds(1)); base::MessageLoop::current()->Run(); EXPECT_FALSE(pool_->HasGroup("a")); diff --git a/net/socket/ssl_server_socket_unittest.cc b/net/socket/ssl_server_socket_unittest.cc index dd66c31..6bc52b1 100644 --- a/net/socket/ssl_server_socket_unittest.cc +++ b/net/socket/ssl_server_socket_unittest.cc @@ -532,7 +532,7 @@ TEST_F(SSLServerSocketTest, ClientWriteAfterServerClose) { EXPECT_GT(client_ret, 0); base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( - FROM_HERE, base::MessageLoop::QuitClosure(), + FROM_HERE, base::MessageLoop::QuitWhenIdleClosure(), base::TimeDelta::FromMilliseconds(10)); base::MessageLoop::current()->Run(); } diff --git a/net/test/embedded_test_server/embedded_test_server_unittest.cc b/net/test/embedded_test_server/embedded_test_server_unittest.cc index 5c6d50c..91cb16f 100644 --- a/net/test/embedded_test_server/embedded_test_server_unittest.cc +++ b/net/test/embedded_test_server/embedded_test_server_unittest.cc @@ -131,7 +131,7 @@ class EmbeddedTestServerTest: public testing::Test, void OnURLFetchComplete(const URLFetcher* source) override { ++num_responses_received_; if (num_responses_received_ == num_responses_expected_) - base::MessageLoop::current()->Quit(); + base::MessageLoop::current()->QuitWhenIdle(); } // Waits until the specified number of responses are received. @@ -384,7 +384,7 @@ class EmbeddedTestServerThreadingTestDelegate // URLFetcherDelegate override. void OnURLFetchComplete(const URLFetcher* source) override { - base::MessageLoop::current()->Quit(); + base::MessageLoop::current()->QuitWhenIdle(); } private: diff --git a/net/tools/gdig/gdig.cc b/net/tools/gdig/gdig.cc index cc490cd..42a746cf 100644 --- a/net/tools/gdig/gdig.cc +++ b/net/tools/gdig/gdig.cc @@ -401,7 +401,7 @@ void GDig::Finish(Result result) { DCHECK_NE(RESULT_PENDING, result); result_ = result; if (base::MessageLoop::current()) - base::MessageLoop::current()->Quit(); + base::MessageLoop::current()->QuitWhenIdle(); } void GDig::OnDnsConfig(const DnsConfig& dns_config_const) { diff --git a/net/tools/get_server_time/get_server_time.cc b/net/tools/get_server_time/get_server_time.cc index 4bfc12f..60c2519 100644 --- a/net/tools/get_server_time/get_server_time.cc +++ b/net/tools/get_server_time/get_server_time.cc @@ -76,7 +76,7 @@ class QuitDelegate : public net::URLFetcherDelegate { // net::URLFetcherDelegate implementation. void OnURLFetchComplete(const net::URLFetcher* source) override { - base::MessageLoop::current()->Quit(); + base::MessageLoop::current()->QuitWhenIdle(); } void OnURLFetchDownloadProgress(const net::URLFetcher* source, diff --git a/net/tools/quic/synchronous_host_resolver.cc b/net/tools/quic/synchronous_host_resolver.cc index 4c0cb3f..d0fc1c7 100644 --- a/net/tools/quic/synchronous_host_resolver.cc +++ b/net/tools/quic/synchronous_host_resolver.cc @@ -89,7 +89,7 @@ int ResolverThread::Resolve(const std::string& host, AddressList* addresses) { void ResolverThread::OnResolutionComplete(int rv) { rv_ = rv; base::ThreadTaskRunnerHandle::Get()->PostTask( - FROM_HERE, base::MessageLoop::QuitClosure()); + FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); } } // namespace diff --git a/net/url_request/url_request_test_util.cc b/net/url_request/url_request_test_util.cc index efcc759..278566b 100644 --- a/net/url_request/url_request_test_util.cc +++ b/net/url_request/url_request_test_util.cc @@ -200,7 +200,7 @@ void TestDelegate::OnReceivedRedirect(URLRequest* request, if (quit_on_redirect_) { *defer_redirect = true; base::ThreadTaskRunnerHandle::Get()->PostTask( - FROM_HERE, base::MessageLoop::QuitClosure()); + FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); } else if (cancel_in_rr_) { request->Cancel(); } @@ -211,7 +211,7 @@ void TestDelegate::OnBeforeNetworkStart(URLRequest* request, bool* defer) { if (quit_on_before_network_start_) { *defer = true; base::ThreadTaskRunnerHandle::Get()->PostTask( - FROM_HERE, base::MessageLoop::QuitClosure()); + FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); } } @@ -220,7 +220,7 @@ void TestDelegate::OnAuthRequired(URLRequest* request, auth_required_ = true; if (quit_on_auth_required_) { base::ThreadTaskRunnerHandle::Get()->PostTask( - FROM_HERE, base::MessageLoop::QuitClosure()); + FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); return; } if (!credentials_.Empty()) { @@ -310,7 +310,7 @@ void TestDelegate::OnReadCompleted(URLRequest* request, int bytes_read) { void TestDelegate::OnResponseCompleted(URLRequest* request) { if (quit_on_complete_) base::ThreadTaskRunnerHandle::Get()->PostTask( - FROM_HERE, base::MessageLoop::QuitClosure()); + FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); } TestNetworkDelegate::TestNetworkDelegate() diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc index 87ad8eb..919cd8c 100644 --- a/net/url_request/url_request_unittest.cc +++ b/net/url_request/url_request_unittest.cc @@ -582,7 +582,7 @@ NetworkDelegate::AuthRequiredResponse BlockingNetworkDelegate::OnAuthRequired( auth_callback_ = callback; stage_blocked_for_callback_ = ON_AUTH_REQUIRED; base::ThreadTaskRunnerHandle::Get()->PostTask( - FROM_HERE, base::MessageLoop::QuitClosure()); + FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); return AUTH_REQUIRED_RESPONSE_IO_PENDING; } NOTREACHED(); @@ -621,7 +621,7 @@ int BlockingNetworkDelegate::MaybeBlockStage( callback_ = callback; stage_blocked_for_callback_ = stage; base::ThreadTaskRunnerHandle::Get()->PostTask( - FROM_HERE, base::MessageLoop::QuitClosure()); + FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); return ERR_IO_PENDING; } NOTREACHED(); @@ -7967,7 +7967,7 @@ class SSLClientAuthTestDelegate : public TestDelegate { void OnCertificateRequested(URLRequest* request, SSLCertRequestInfo* cert_request_info) override { on_certificate_requested_count_++; - base::MessageLoop::current()->Quit(); + base::MessageLoop::current()->QuitWhenIdle(); } int on_certificate_requested_count() { return on_certificate_requested_count_; |