diff options
author | xhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-23 20:51:34 +0000 |
---|---|---|
committer | xhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-23 20:51:34 +0000 |
commit | 2da659e6279cf515940eb8a091e09e27281a97d6 (patch) | |
tree | a34e2eeea8194a16603e24149ae634cb54ddab62 /net/spdy | |
parent | 954f56f3aceed29573f841648168b91c1fd43074 (diff) | |
download | chromium_src-2da659e6279cf515940eb8a091e09e27281a97d6.zip chromium_src-2da659e6279cf515940eb8a091e09e27281a97d6.tar.gz chromium_src-2da659e6279cf515940eb8a091e09e27281a97d6.tar.bz2 |
net: Use base::MessageLoop.
BUG=236029
R=agl@chromium.org
Review URL: https://chromiumcodereview.appspot.com/14021017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201882 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy')
-rw-r--r-- | net/spdy/spdy_http_stream.cc | 2 | ||||
-rw-r--r-- | net/spdy/spdy_http_stream_spdy2_unittest.cc | 4 | ||||
-rw-r--r-- | net/spdy/spdy_http_stream_spdy3_unittest.cc | 4 | ||||
-rw-r--r-- | net/spdy/spdy_network_transaction_spdy2_unittest.cc | 48 | ||||
-rw-r--r-- | net/spdy/spdy_network_transaction_spdy3_unittest.cc | 56 | ||||
-rw-r--r-- | net/spdy/spdy_proxy_client_socket_unittest.cc | 2 | ||||
-rw-r--r-- | net/spdy/spdy_session.cc | 10 | ||||
-rw-r--r-- | net/spdy/spdy_session_spdy2_unittest.cc | 20 | ||||
-rw-r--r-- | net/spdy/spdy_session_spdy3_unittest.cc | 26 | ||||
-rw-r--r-- | net/spdy/spdy_session_test_util.cc | 4 | ||||
-rw-r--r-- | net/spdy/spdy_session_test_util.h | 2 | ||||
-rw-r--r-- | net/spdy/spdy_stream.cc | 2 | ||||
-rw-r--r-- | net/spdy/spdy_stream_spdy2_unittest.cc | 2 | ||||
-rw-r--r-- | net/spdy/spdy_stream_spdy3_unittest.cc | 2 | ||||
-rw-r--r-- | net/spdy/spdy_websocket_stream_spdy2_unittest.cc | 2 | ||||
-rw-r--r-- | net/spdy/spdy_websocket_stream_spdy3_unittest.cc | 2 |
16 files changed, 94 insertions, 94 deletions
diff --git a/net/spdy/spdy_http_stream.cc b/net/spdy/spdy_http_stream.cc index 0545773..aa4ea9a 100644 --- a/net/spdy/spdy_http_stream.cc +++ b/net/spdy/spdy_http_stream.cc @@ -477,7 +477,7 @@ void SpdyHttpStream::ScheduleBufferedReadCallback() { more_read_data_pending_ = false; buffered_read_callback_pending_ = true; const base::TimeDelta kBufferTime = base::TimeDelta::FromMilliseconds(1); - MessageLoop::current()->PostDelayedTask( + base::MessageLoop::current()->PostDelayedTask( FROM_HERE, base::Bind(base::IgnoreResult(&SpdyHttpStream::DoBufferedReadCallback), weak_factory_.GetWeakPtr()), diff --git a/net/spdy/spdy_http_stream_spdy2_unittest.cc b/net/spdy/spdy_http_stream_spdy2_unittest.cc index 07836f1..74aedae 100644 --- a/net/spdy/spdy_http_stream_spdy2_unittest.cc +++ b/net/spdy/spdy_http_stream_spdy2_unittest.cc @@ -74,7 +74,7 @@ class SpdyHttpStreamSpdy2Test : public testing::Test { protected: virtual void TearDown() OVERRIDE { crypto::ECSignatureCreator::SetFactoryForTesting(NULL); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); } // Initializes the session using DeterministicSocketData. It's advisable @@ -357,7 +357,7 @@ TEST_F(SpdyHttpStreamSpdy2Test, SendChunkedPost) { // This triggers reading the body and the EOF, causing the session to shut // down. data()->CompleteRead(); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // Because we abandoned the stream, we don't expect to find a session in the // pool anymore. diff --git a/net/spdy/spdy_http_stream_spdy3_unittest.cc b/net/spdy/spdy_http_stream_spdy3_unittest.cc index c08e133..026c575 100644 --- a/net/spdy/spdy_http_stream_spdy3_unittest.cc +++ b/net/spdy/spdy_http_stream_spdy3_unittest.cc @@ -80,7 +80,7 @@ class SpdyHttpStreamSpdy3Test : public testing::Test { protected: virtual void TearDown() OVERRIDE { - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); } // Initializes the session using DeterministicSocketData. It's advisable @@ -392,7 +392,7 @@ void SpdyHttpStreamSpdy3Test::RunSendChunkedPostTest( // This triggers reading the body and the EOF, causing the session to shut // down. data()->CompleteRead(); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // Because we abandoned the stream, we don't expect to find a session in the // pool anymore. diff --git a/net/spdy/spdy_network_transaction_spdy2_unittest.cc b/net/spdy/spdy_network_transaction_spdy2_unittest.cc index f11c207..54e7a39 100644 --- a/net/spdy/spdy_network_transaction_spdy2_unittest.cc +++ b/net/spdy/spdy_network_transaction_spdy2_unittest.cc @@ -73,7 +73,7 @@ class SpdyNetworkTransactionSpdy2Test virtual void TearDown() { // Empty the current queue. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); } struct TransactionHelperResult { @@ -496,7 +496,7 @@ class SpdyNetworkTransactionSpdy2Test // reads until we complete our callback. while (!callback.have_result()) { data->CompleteRead(); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); } rv = callback.WaitForResult(); } else if (rv <= 0) { @@ -551,7 +551,7 @@ class SpdyNetworkTransactionSpdy2Test rv = trans2->Start( &CreateGetPushRequest(), callback.callback(), BoundNetLog()); EXPECT_EQ(ERR_IO_PENDING, rv); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // The data for the pushed path may be coming in more than 1 frame. Compile // the results into a single string. @@ -1832,10 +1832,10 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, DelayedChunkedPost) { helper.AddData(&data); ASSERT_TRUE(helper.StartDefaultTest()); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); helper.request().upload_data_stream->AppendChunk( kUploadData, kUploadDataSize, false); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); helper.request().upload_data_stream->AppendChunk( kUploadData, kUploadDataSize, true); @@ -2189,7 +2189,7 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, CancelledTransaction) { // Flush the MessageLoop while the SpdySessionDependencies (in particular, the // MockClientSocketFactory) are still alive. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); helper.VerifyDataNotConsumed(); } @@ -2343,7 +2343,7 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, DeleteSessionOnReadCallback) { data.CompleteRead(); // Finish running rest of tasks. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); helper.VerifyDataConsumed(); } @@ -2431,12 +2431,12 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, RedirectGetRequest) { d.set_quit_on_redirect(true); r.Start(); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); EXPECT_EQ(1, d.received_redirect_count()); r.FollowDeferredRedirect(); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); EXPECT_EQ(1, d.response_started_count()); EXPECT_FALSE(d.received_data_before_response()); EXPECT_EQ(net::URLRequestStatus::SUCCESS, r.status().status()); @@ -2676,7 +2676,7 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, RedirectServerPush) { AddSocketDataProvider(&data); r.Start(); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); EXPECT_EQ(0, d.received_redirect_count()); std::string contents("hello!"); @@ -2689,11 +2689,11 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, RedirectServerPush) { d2.set_quit_on_redirect(true); r2.Start(); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); EXPECT_EQ(1, d2.received_redirect_count()); r2.FollowDeferredRedirect(); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); EXPECT_EQ(1, d2.response_started_count()); EXPECT_FALSE(d2.received_data_before_response()); EXPECT_EQ(net::URLRequestStatus::SUCCESS, r2.status().status()); @@ -3876,7 +3876,7 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, BufferFull) { // Flush the MessageLoop while the SpdySessionDependencies (in particular, the // MockClientSocketFactory) are still alive. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // Verify that we consumed all test data. helper.VerifyDataConsumed(); @@ -3973,7 +3973,7 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, Buffering) { // Flush the MessageLoop while the SpdySessionDependencies (in particular, the // MockClientSocketFactory) are still alive. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // Verify that we consumed all test data. helper.VerifyDataConsumed(); @@ -4066,7 +4066,7 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, BufferedAll) { // Flush the MessageLoop while the SpdySessionDependencies (in particular, the // MockClientSocketFactory) are still alive. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // Verify that we consumed all test data. helper.VerifyDataConsumed(); @@ -4161,7 +4161,7 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, BufferedClosed) { // Flush the MessageLoop while the SpdySessionDependencies (in particular, the // MockClientSocketFactory) are still alive. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // Verify that we consumed all test data. helper.VerifyDataConsumed(); @@ -4232,7 +4232,7 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, BufferedCancelled) { // Flush the MessageLoop; this will cause the buffered IO task // to run for the final time. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // Verify that we consumed all test data. helper.VerifyDataConsumed(); @@ -4855,7 +4855,7 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, VerifyRetryOnConnectionReset) { if (variant == VARIANT_RST_DURING_READ_COMPLETION) { // Writes to the socket complete asynchronously on SPDY by running // through the message loop. Complete the write here. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); } // Now schedule the ERR_CONNECTION_RESET. @@ -5191,7 +5191,7 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, ServerPushClaimBeforeHeaders) { &CreateGetPushRequest(), callback.callback(), BoundNetLog()); EXPECT_EQ(ERR_IO_PENDING, rv); data.RunFor(3); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // Read the server push body. std::string result2; @@ -5341,7 +5341,7 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, ServerPushWithTwoHeaderFrames) { &CreateGetPushRequest(), callback.callback(), BoundNetLog()); EXPECT_EQ(ERR_IO_PENDING, rv); data.RunFor(3); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // Read the server push body. std::string result2; @@ -5478,7 +5478,7 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, ServerPushWithNoStatusHeaderFrames) { &CreateGetPushRequest(), callback.callback(), BoundNetLog()); EXPECT_EQ(ERR_IO_PENDING, rv); data.RunFor(2); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // Read the server push body. std::string result2; @@ -5903,7 +5903,7 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, OutOfOrderSynStream) { // Run the message loop, but do not allow the write to complete. // This leaves the SpdySession with a write pending, which prevents // SpdySession from attempting subsequent writes until this write completes. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // Now, start both new transactions HttpRequestInfo info2 = CreateGetRequest(); @@ -5912,7 +5912,7 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, OutOfOrderSynStream) { new HttpNetworkTransaction(MEDIUM, helper.session())); rv = trans2->Start(&info2, callback2.callback(), BoundNetLog()); EXPECT_EQ(ERR_IO_PENDING, rv); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); HttpRequestInfo info3 = CreateGetRequest(); TestCompletionCallback callback3; @@ -5920,7 +5920,7 @@ TEST_P(SpdyNetworkTransactionSpdy2Test, OutOfOrderSynStream) { new HttpNetworkTransaction(HIGHEST, helper.session())); rv = trans3->Start(&info3, callback3.callback(), BoundNetLog()); EXPECT_EQ(ERR_IO_PENDING, rv); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // We now have two SYN_STREAM frames queued up which will be // dequeued only once the first write completes, which we diff --git a/net/spdy/spdy_network_transaction_spdy3_unittest.cc b/net/spdy/spdy_network_transaction_spdy3_unittest.cc index 2be9b33..12fe22f 100644 --- a/net/spdy/spdy_network_transaction_spdy3_unittest.cc +++ b/net/spdy/spdy_network_transaction_spdy3_unittest.cc @@ -73,7 +73,7 @@ class SpdyNetworkTransactionSpdy3Test virtual void TearDown() { // Empty the current queue. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); } struct TransactionHelperResult { @@ -498,7 +498,7 @@ class SpdyNetworkTransactionSpdy3Test // reads until we complete our callback. while (!callback.have_result()) { data->CompleteRead(); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); } rv = callback.WaitForResult(); } else if (rv <= 0) { @@ -553,7 +553,7 @@ class SpdyNetworkTransactionSpdy3Test rv = trans2->Start( &CreateGetPushRequest(), callback.callback(), BoundNetLog()); EXPECT_EQ(ERR_IO_PENDING, rv); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // The data for the pushed path may be coming in more than 1 packet. Compile // the results into a single string. @@ -1838,10 +1838,10 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, DelayedChunkedPost) { helper.AddData(&data); ASSERT_TRUE(helper.StartDefaultTest()); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); helper.request().upload_data_stream->AppendChunk( kUploadData, kUploadDataSize, false); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); helper.request().upload_data_stream->AppendChunk( kUploadData, kUploadDataSize, true); @@ -2270,7 +2270,7 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, WindowUpdateSent) { // Force write of WINDOW_UPDATE which was scheduled during the above // read. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // Read EOF. data.CompleteRead(); @@ -2436,7 +2436,7 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, FlowControlStallResume) { int rv = trans->Start(&helper.request(), callback.callback(), BoundNetLog()); EXPECT_EQ(ERR_IO_PENDING, rv); - MessageLoop::current()->RunUntilIdle(); // Write as much as we can. + base::MessageLoop::current()->RunUntilIdle(); // Write as much as we can. SpdyHttpStream* stream = static_cast<SpdyHttpStream*>(trans->stream_.get()); ASSERT_TRUE(stream != NULL); @@ -2537,7 +2537,7 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, FlowControlStallResumeAfterSettings) { int rv = trans->Start(&helper.request(), callback.callback(), BoundNetLog()); EXPECT_EQ(ERR_IO_PENDING, rv); - MessageLoop::current()->RunUntilIdle(); // Write as much as we can. + base::MessageLoop::current()->RunUntilIdle(); // Write as much as we can. SpdyHttpStream* stream = static_cast<SpdyHttpStream*>(trans->stream_.get()); ASSERT_TRUE(stream != NULL); @@ -2647,7 +2647,7 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, FlowControlNegativeSendWindowSize) { int rv = trans->Start(&helper.request(), callback.callback(), BoundNetLog()); EXPECT_EQ(ERR_IO_PENDING, rv); - MessageLoop::current()->RunUntilIdle(); // Write as much as we can. + base::MessageLoop::current()->RunUntilIdle(); // Write as much as we can. SpdyHttpStream* stream = static_cast<SpdyHttpStream*>(trans->stream_.get()); ASSERT_TRUE(stream != NULL); @@ -2775,7 +2775,7 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, CancelledTransaction) { // Flush the MessageLoop while the SpdySessionDependencies (in particular, the // MockClientSocketFactory) are still alive. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); helper.VerifyDataNotConsumed(); } @@ -2929,7 +2929,7 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, DeleteSessionOnReadCallback) { data.CompleteRead(); // Finish running rest of tasks. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); helper.VerifyDataConsumed(); } @@ -3017,11 +3017,11 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, RedirectGetRequest) { d.set_quit_on_redirect(true); r.Start(); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); EXPECT_EQ(1, d.received_redirect_count()); r.FollowDeferredRedirect(); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); EXPECT_EQ(1, d.response_started_count()); EXPECT_FALSE(d.received_data_before_response()); EXPECT_EQ(net::URLRequestStatus::SUCCESS, r.status().status()); @@ -3264,7 +3264,7 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, RedirectServerPush) { AddSocketDataProvider(&data); r.Start(); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); EXPECT_EQ(0, d.received_redirect_count()); std::string contents("hello!"); @@ -3277,11 +3277,11 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, RedirectServerPush) { d2.set_quit_on_redirect(true); r2.Start(); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); EXPECT_EQ(1, d2.received_redirect_count()); r2.FollowDeferredRedirect(); - MessageLoop::current()->Run(); + base::MessageLoop::current()->Run(); EXPECT_EQ(1, d2.response_started_count()); EXPECT_FALSE(d2.received_data_before_response()); EXPECT_EQ(net::URLRequestStatus::SUCCESS, r2.status().status()); @@ -4466,7 +4466,7 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, BufferFull) { // Flush the MessageLoop while the SpdySessionDependencies (in particular, the // MockClientSocketFactory) are still alive. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // Verify that we consumed all test data. helper.VerifyDataConsumed(); @@ -4563,7 +4563,7 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, Buffering) { // Flush the MessageLoop while the SpdySessionDependencies (in particular, the // MockClientSocketFactory) are still alive. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // Verify that we consumed all test data. helper.VerifyDataConsumed(); @@ -4656,7 +4656,7 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, BufferedAll) { // Flush the MessageLoop while the SpdySessionDependencies (in particular, the // MockClientSocketFactory) are still alive. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // Verify that we consumed all test data. helper.VerifyDataConsumed(); @@ -4751,7 +4751,7 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, BufferedClosed) { // Flush the MessageLoop while the SpdySessionDependencies (in particular, the // MockClientSocketFactory) are still alive. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // Verify that we consumed all test data. helper.VerifyDataConsumed(); @@ -4822,7 +4822,7 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, BufferedCancelled) { // Flush the MessageLoop; this will cause the buffered IO task // to run for the final time. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // Verify that we consumed all test data. helper.VerifyDataConsumed(); @@ -5447,7 +5447,7 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, VerifyRetryOnConnectionReset) { if (variant == VARIANT_RST_DURING_READ_COMPLETION) { // Writes to the socket complete asynchronously on SPDY by running // through the message loop. Complete the write here. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); } // Now schedule the ERR_CONNECTION_RESET. @@ -5785,7 +5785,7 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, ServerPushClaimBeforeHeaders) { &CreateGetPushRequest(), callback.callback(), BoundNetLog()); EXPECT_EQ(ERR_IO_PENDING, rv); data.RunFor(3); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // Read the server push body. std::string result2; @@ -5936,7 +5936,7 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, ServerPushWithTwoHeaderFrames) { &CreateGetPushRequest(), callback.callback(), BoundNetLog()); EXPECT_EQ(ERR_IO_PENDING, rv); data.RunFor(3); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // Read the server push body. std::string result2; @@ -6077,7 +6077,7 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, ServerPushWithNoStatusHeaderFrames) { &CreateGetPushRequest(), callback.callback(), BoundNetLog()); EXPECT_EQ(ERR_IO_PENDING, rv); data.RunFor(2); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // Read the server push body. std::string result2; @@ -6502,7 +6502,7 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, OutOfOrderSynStream) { // Run the message loop, but do not allow the write to complete. // This leaves the SpdySession with a write pending, which prevents // SpdySession from attempting subsequent writes until this write completes. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // Now, start both new transactions HttpRequestInfo info2 = CreateGetRequest(); @@ -6511,7 +6511,7 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, OutOfOrderSynStream) { new HttpNetworkTransaction(MEDIUM, helper.session())); rv = trans2->Start(&info2, callback2.callback(), BoundNetLog()); EXPECT_EQ(ERR_IO_PENDING, rv); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); HttpRequestInfo info3 = CreateGetRequest(); TestCompletionCallback callback3; @@ -6519,7 +6519,7 @@ TEST_P(SpdyNetworkTransactionSpdy3Test, OutOfOrderSynStream) { new HttpNetworkTransaction(HIGHEST, helper.session())); rv = trans3->Start(&info3, callback3.callback(), BoundNetLog()); EXPECT_EQ(ERR_IO_PENDING, rv); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // We now have two SYN_STREAM frames queued up which will be // dequeued only once the first write completes, which we diff --git a/net/spdy/spdy_proxy_client_socket_unittest.cc b/net/spdy/spdy_proxy_client_socket_unittest.cc index 70426c3..7ef3f25 100644 --- a/net/spdy/spdy_proxy_client_socket_unittest.cc +++ b/net/spdy/spdy_proxy_client_socket_unittest.cc @@ -169,7 +169,7 @@ void SpdyProxyClientSocketTest::TearDown() { session_->spdy_session_pool()->CloseAllSessions(); // Empty the current queue. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); PlatformTest::TearDown(); } diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc index 537c2b7..e7e9eab 100644 --- a/net/spdy/spdy_session.cc +++ b/net/spdy/spdy_session.cc @@ -642,7 +642,7 @@ void SpdySession::ProcessPendingStreamRequests() { DCHECK(!ContainsKey(pending_stream_request_completions_, pending_request)); pending_stream_request_completions_.insert(pending_request); - MessageLoop::current()->PostTask( + base::MessageLoop::current()->PostTask( FROM_HERE, base::Bind(&SpdySession::CompleteStreamRequest, weak_factory_.GetWeakPtr(), pending_request)); @@ -1032,7 +1032,7 @@ int SpdySession::DoLoop(int result) { int SpdySession::DoRead() { if (bytes_read_ > kMaxReadBytes) { state_ = STATE_DO_READ; - MessageLoop::current()->PostTask( + base::MessageLoop::current()->PostTask( FROM_HERE, base::Bind(&SpdySession::StartRead, weak_factory_.GetWeakPtr())); @@ -1150,7 +1150,7 @@ void SpdySession::WriteSocketLater() { return; delayed_write_pending_ = true; - MessageLoop::current()->PostTask( + base::MessageLoop::current()->PostTask( FROM_HERE, base::Bind(&SpdySession::WriteSocket, weak_factory_.GetWeakPtr())); } @@ -2147,7 +2147,7 @@ void SpdySession::PlanToCheckPingStatus() { return; check_ping_status_pending_ = true; - MessageLoop::current()->PostDelayedTask( + base::MessageLoop::current()->PostDelayedTask( FROM_HERE, base::Bind(&SpdySession::CheckPingStatus, weak_factory_.GetWeakPtr(), base::TimeTicks::Now()), hung_interval_); @@ -2175,7 +2175,7 @@ void SpdySession::CheckPingStatus(base::TimeTicks last_check_time) { } // Check the status of connection after a delay. - MessageLoop::current()->PostDelayedTask( + base::MessageLoop::current()->PostDelayedTask( FROM_HERE, base::Bind(&SpdySession::CheckPingStatus, weak_factory_.GetWeakPtr(), now), diff --git a/net/spdy/spdy_session_spdy2_unittest.cc b/net/spdy/spdy_session_spdy2_unittest.cc index c179ac3..4e2437a 100644 --- a/net/spdy/spdy_session_spdy2_unittest.cc +++ b/net/spdy/spdy_session_spdy2_unittest.cc @@ -305,7 +305,7 @@ TEST_F(SpdySessionSpdy2Test, ServerPing) { spdy_stream1->SetDelegate(&delegate); // Flush the SpdySession::OnReadComplete() task. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); EXPECT_FALSE(spdy_session_pool_->HasSession(key_)); @@ -727,7 +727,7 @@ TEST_F(SpdySessionSpdy2Test, CancelPendingCreateStream) { callback.reset(); // Should not crash when running the pending callback. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); } TEST_F(SpdySessionSpdy2Test, SendInitialSettingsOnNewSession) { @@ -763,7 +763,7 @@ TEST_F(SpdySessionSpdy2Test, SendInitialSettingsOnNewSession) { scoped_refptr<SpdySession> session = CreateInitializedSession(); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); EXPECT_TRUE(data.at_write_eof()); } @@ -808,7 +808,7 @@ TEST_F(SpdySessionSpdy2Test, SendSettingsOnNewSession) { scoped_refptr<SpdySession> session = CreateInitializedSession(); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); EXPECT_TRUE(data.at_write_eof()); } @@ -925,7 +925,7 @@ void IPPoolingTest(SpdyPoolCloseSessionsType close_sessions_type) { pool_peer.AddAlias(test_hosts[0].addresses.front(), test_hosts[0].key); // Flush the SpdySession::OnReadComplete() task. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // The third host has no overlap with the first, so it can't pool IPs. EXPECT_FALSE(spdy_session_pool->HasSession(test_hosts[2].key)); @@ -1097,7 +1097,7 @@ TEST_F(SpdySessionSpdy2Test, CloseSessionOnError) { InitializeSession(http_session_.get(), session.get(), test_host_port_pair_); // Flush the SpdySession::OnReadComplete() task. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); EXPECT_FALSE(spdy_session_pool_->HasSession(key_)); @@ -1189,7 +1189,7 @@ TEST_F(SpdySessionSpdy2Test, OutOfOrderSynStreams) { spdy_stream1->SendRequest(false); spdy_stream2->SendRequest(false); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); EXPECT_EQ(NULL, spdy_stream1.get()); EXPECT_EQ(NULL, spdy_stream2.get()); @@ -1600,7 +1600,7 @@ TEST_F(SpdySessionSpdy2Test, CloseTwoStalledCreateStream) { EXPECT_EQ(0u, delegate1.stream_id()); data.RunFor(3); // Pump loop for SpdySession::ProcessPendingStreamRequests(). - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); EXPECT_EQ(NULL, spdy_stream1.get()); EXPECT_EQ(1u, delegate1.stream_id()); EXPECT_EQ(2u, session->num_active_streams() + session->num_created_streams()); @@ -1768,7 +1768,7 @@ TEST_F(SpdySessionSpdy2Test, NeedsCredentials) { EXPECT_FALSE(session->NeedsCredentials()); // Flush the SpdySession::OnReadComplete() task. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); spdy_session_pool_->Remove(session); } @@ -2351,7 +2351,7 @@ TEST_F(SpdySessionSpdy2Test, CloseOneIdleConnectionFailsWhenSessionInUse) { EXPECT_TRUE(spdy_stream1->HasUrl()); spdy_stream1->SendRequest(false); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // Release the session, so holding onto a pointer here does not affect // anything. diff --git a/net/spdy/spdy_session_spdy3_unittest.cc b/net/spdy/spdy_session_spdy3_unittest.cc index 17c525f..8cf7e93 100644 --- a/net/spdy/spdy_session_spdy3_unittest.cc +++ b/net/spdy/spdy_session_spdy3_unittest.cc @@ -388,7 +388,7 @@ TEST_F(SpdySessionSpdy3Test, ServerPing) { spdy_stream1->SetDelegate(&delegate); // Flush the SpdySession::OnReadComplete() task. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); EXPECT_FALSE(spdy_session_pool_->HasSession(key_)); @@ -814,7 +814,7 @@ TEST_F(SpdySessionSpdy3Test, CancelPendingCreateStream) { callback.reset(); // Should not crash when running the pending callback. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); } TEST_F(SpdySessionSpdy3Test, SendInitialSettingsOnNewSession) { @@ -855,7 +855,7 @@ TEST_F(SpdySessionSpdy3Test, SendInitialSettingsOnNewSession) { scoped_refptr<SpdySession> session = CreateInitializedSession(); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); EXPECT_TRUE(data.at_write_eof()); } @@ -900,7 +900,7 @@ TEST_F(SpdySessionSpdy3Test, SendSettingsOnNewSession) { scoped_refptr<SpdySession> session = CreateInitializedSession(); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); EXPECT_TRUE(data.at_write_eof()); } @@ -1017,7 +1017,7 @@ void IPPoolingTest(SpdyPoolCloseSessionsType close_sessions_type) { pool_peer.AddAlias(test_hosts[0].addresses.front(), test_hosts[0].key); // Flush the SpdySession::OnReadComplete() task. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // The third host has no overlap with the first, so it can't pool IPs. EXPECT_FALSE(spdy_session_pool->HasSession(test_hosts[2].key)); @@ -1192,7 +1192,7 @@ TEST_F(SpdySessionSpdy3Test, Initialize) { http_session_.get(), session.get(), test_host_port_pair_)); // Flush the SpdySession::OnReadComplete() task. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); net::CapturingNetLog::CapturedEntryList entries; log.GetEntries(&entries); @@ -1242,7 +1242,7 @@ TEST_F(SpdySessionSpdy3Test, CloseSessionOnError) { http_session_.get(), session.get(), test_host_port_pair_)); // Flush the SpdySession::OnReadComplete() task. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); EXPECT_FALSE(spdy_session_pool_->HasSession(key_)); @@ -1327,7 +1327,7 @@ TEST_F(SpdySessionSpdy3Test, OutOfOrderSynStreams) { spdy_stream1->SendRequest(false); spdy_stream2->SendRequest(false); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); EXPECT_EQ(NULL, spdy_stream1.get()); EXPECT_EQ(NULL, spdy_stream2.get()); @@ -1716,7 +1716,7 @@ TEST_F(SpdySessionSpdy3Test, CloseTwoStalledCreateStream) { EXPECT_EQ(0u, delegate1.stream_id()); data.RunFor(3); // Pump loop for SpdySession::ProcessPendingStreamRequests(). - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); EXPECT_EQ(NULL, spdy_stream1.get()); EXPECT_EQ(1u, delegate1.stream_id()); EXPECT_EQ(2u, session->num_active_streams() + session->num_created_streams()); @@ -1882,7 +1882,7 @@ TEST_F(SpdySessionSpdy3Test, NeedsCredentials) { EXPECT_TRUE(session->NeedsCredentials()); // Flush the SpdySession::OnReadComplete() task. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); spdy_session_pool_->Remove(session); } @@ -1947,7 +1947,7 @@ TEST_F(SpdySessionSpdy3Test, SendCredentials) { EXPECT_TRUE(session->NeedsCredentials()); // Flush the SpdySession::OnReadComplete() task. - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); spdy_session_pool_->Remove(session); EXPECT_FALSE(spdy_session_pool_->HasSession(key)); @@ -1991,7 +1991,7 @@ TEST_F(SpdySessionSpdy3Test, UpdateStreamsSendWindowSize) { EXPECT_NE(spdy_stream1->send_window_size(), window_size); data->RunFor(1); // Process the SETTINGS frame, but not the EOF - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); EXPECT_EQ(session->stream_initial_send_window_size(), window_size); EXPECT_EQ(spdy_stream1->send_window_size(), window_size); @@ -3666,7 +3666,7 @@ TEST_F(SpdySessionSpdy3Test, CloseOneIdleConnectionFailsWhenSessionInUse) { EXPECT_TRUE(spdy_stream1->HasUrl()); spdy_stream1->SendRequest(false); - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); // Release the session, so holding onto a pointer here does not affect // anything. diff --git a/net/spdy/spdy_session_test_util.cc b/net/spdy/spdy_session_test_util.cc index 6619cdb..ee0caa0 100644 --- a/net/spdy/spdy_session_test_util.cc +++ b/net/spdy/spdy_session_test_util.cc @@ -15,11 +15,11 @@ SpdySessionTestTaskObserver::SpdySessionTestTaskObserver( : executed_count_(0), file_name_(file_name), function_name_(function_name) { - MessageLoop::current()->AddTaskObserver(this); + base::MessageLoop::current()->AddTaskObserver(this); } SpdySessionTestTaskObserver::~SpdySessionTestTaskObserver() { - MessageLoop::current()->RemoveTaskObserver(this); + base::MessageLoop::current()->RemoveTaskObserver(this); } void SpdySessionTestTaskObserver::WillProcessTask( diff --git a/net/spdy/spdy_session_test_util.h b/net/spdy/spdy_session_test_util.h index 8f75e2a..0b10551 100644 --- a/net/spdy/spdy_session_test_util.h +++ b/net/spdy/spdy_session_test_util.h @@ -16,7 +16,7 @@ namespace net { // SpdySessionTestTaskObserver is a MessageLoop::TaskObserver that monitors the // completion of all tasks executed by the current MessageLoop, recording the // number of tasks that refer to a specific function and filename. -class SpdySessionTestTaskObserver : public MessageLoop::TaskObserver { +class SpdySessionTestTaskObserver : public base::MessageLoop::TaskObserver { public: // Creates a SpdySessionTaskObserver that will record all tasks that are // executed that were posted by the function named by |function_name|, located diff --git a/net/spdy/spdy_stream.cc b/net/spdy/spdy_stream.cc index fd63726..e7ebd48 100644 --- a/net/spdy/spdy_stream.cc +++ b/net/spdy/spdy_stream.cc @@ -154,7 +154,7 @@ void SpdyStream::SetDelegate(Delegate* delegate) { if (pushed_) { CHECK(response_received()); - MessageLoop::current()->PostTask( + base::MessageLoop::current()->PostTask( FROM_HERE, base::Bind(&SpdyStream::PushedStreamReplayData, GetWeakPtr())); } else { diff --git a/net/spdy/spdy_stream_spdy2_unittest.cc b/net/spdy/spdy_stream_spdy2_unittest.cc index 43dc11b..022efec 100644 --- a/net/spdy/spdy_stream_spdy2_unittest.cc +++ b/net/spdy/spdy_stream_spdy2_unittest.cc @@ -69,7 +69,7 @@ class SpdyStreamSpdy2Test : public testing::Test { } virtual void TearDown() { - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); } SpdyTestUtil spdy_util_; diff --git a/net/spdy/spdy_stream_spdy3_unittest.cc b/net/spdy/spdy_stream_spdy3_unittest.cc index db8f612..6bb67fb 100644 --- a/net/spdy/spdy_stream_spdy3_unittest.cc +++ b/net/spdy/spdy_stream_spdy3_unittest.cc @@ -73,7 +73,7 @@ class SpdyStreamSpdy3Test : public testing::Test { } virtual void TearDown() { - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); } void RunResumeAfterUnstallRequestResponseTest( diff --git a/net/spdy/spdy_websocket_stream_spdy2_unittest.cc b/net/spdy/spdy_websocket_stream_spdy2_unittest.cc index b8e5e2c..cfdff57 100644 --- a/net/spdy/spdy_websocket_stream_spdy2_unittest.cc +++ b/net/spdy/spdy_websocket_stream_spdy2_unittest.cc @@ -210,7 +210,7 @@ class SpdyWebSocketStreamSpdy2Test : public testing::Test { } virtual void TearDown() { - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); } void Prepare(SpdyStreamId stream_id) { diff --git a/net/spdy/spdy_websocket_stream_spdy3_unittest.cc b/net/spdy/spdy_websocket_stream_spdy3_unittest.cc index 76eef3e..dee8cbf 100644 --- a/net/spdy/spdy_websocket_stream_spdy3_unittest.cc +++ b/net/spdy/spdy_websocket_stream_spdy3_unittest.cc @@ -211,7 +211,7 @@ class SpdyWebSocketStreamSpdy3Test : public testing::Test { } virtual void TearDown() { - MessageLoop::current()->RunUntilIdle(); + base::MessageLoop::current()->RunUntilIdle(); } void Prepare(SpdyStreamId stream_id) { |