summaryrefslogtreecommitdiffstats
path: root/net/dns
diff options
context:
space:
mode:
authoralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-22 19:52:13 +0000
committeralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-22 19:52:13 +0000
commitb908293642bab4631101157c0aac4fb89fd6c287 (patch)
tree55c8b243d5e8f1247c010c91dce694fc3af4ea78 /net/dns
parente7bf309bed1ed14bb5717f154cb1c3d57fef492e (diff)
downloadchromium_src-b908293642bab4631101157c0aac4fb89fd6c287.zip
chromium_src-b908293642bab4631101157c0aac4fb89fd6c287.tar.gz
chromium_src-b908293642bab4631101157c0aac4fb89fd6c287.tar.bz2
Made MessagePump a non-thread safe class.
This CL makes MessagePump a non-thread safe class to make sure thread-bound resources (such as the UI window used for pumping messages on Windows) are freed on the correct thread. Handling of incoming tasks and synchronization between different threads was moved out to a separate class - IncomingTaskQueue reducing the number of locks to be taken while posting a task to one. Posting tasks via both MessageLoop and MessageLoopProxyImpl is now routed via IncomingTaskQueue. BUG=241939 Review URL: https://chromiumcodereview.appspot.com/17567007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212948 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/dns')
-rw-r--r--net/dns/dns_transaction_unittest.cc2
-rw-r--r--net/dns/serial_worker_unittest.cc4
2 files changed, 3 insertions, 3 deletions
diff --git a/net/dns/dns_transaction_unittest.cc b/net/dns/dns_transaction_unittest.cc
index 80473b5..f9667ee 100644
--- a/net/dns/dns_transaction_unittest.cc
+++ b/net/dns/dns_transaction_unittest.cc
@@ -621,7 +621,7 @@ TEST_F(DnsTransactionTest, Timeout) {
TransactionHelper helper0(kT0HostName, kT0Qtype, ERR_DNS_TIMED_OUT);
EXPECT_TRUE(helper0.RunUntilDone(transaction_factory_.get()));
- base::MessageLoop::current()->AssertIdle();
+ EXPECT_TRUE(base::MessageLoop::current()->IsIdleForTesting());
}
TEST_F(DnsTransactionTest, ServerFallbackAndRotate) {
diff --git a/net/dns/serial_worker_unittest.cc b/net/dns/serial_worker_unittest.cc
index 70259f7..442526f 100644
--- a/net/dns/serial_worker_unittest.cc
+++ b/net/dns/serial_worker_unittest.cc
@@ -141,7 +141,7 @@ TEST_F(SerialWorkerTest, ExecuteAndSerializeReads) {
WaitForWork();
RunUntilBreak("OnWorkFinished");
- message_loop_->AssertIdle();
+ EXPECT_TRUE(message_loop_->IsIdleForTesting());
}
// Schedule two calls. OnWork checks if it is called serially.
@@ -154,7 +154,7 @@ TEST_F(SerialWorkerTest, ExecuteAndSerializeReads) {
RunUntilBreak("OnWorkFinished");
// No more tasks should remain.
- message_loop_->AssertIdle();
+ EXPECT_TRUE(message_loop_->IsIdleForTesting());
}
} // namespace