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

Unified Diff: content/common/net/url_fetcher_impl_unittest.cc

Issue 8872030: Removing MessageLoop::QuitTask() from content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix escaping Created 9 years 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/common/net/url_fetcher_impl_unittest.cc
diff --git a/content/common/net/url_fetcher_impl_unittest.cc b/content/common/net/url_fetcher_impl_unittest.cc
index 709b54bb2de48d2b110031da178cf0f54ea752f3..aae975e6aac15d7dd77780140e589deae374e303 100644
--- a/content/common/net/url_fetcher_impl_unittest.cc
+++ b/content/common/net/url_fetcher_impl_unittest.cc
@@ -124,7 +124,7 @@ void URLFetcherTest::OnURLFetchComplete(const content::URLFetcher* source) {
// because the destructor won't necessarily run on the
// same thread that CreateFetcher() did.
- io_message_loop_proxy()->PostTask(FROM_HERE, new MessageLoop::QuitTask());
+ io_message_loop_proxy()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
// If the current message loop is not the IO loop, it will be shut down when
// the main loop returns and this thread subsequently goes out of scope.
}
@@ -206,7 +206,7 @@ class CancelTestURLRequestContext : public TestURLRequestContext {
virtual ~CancelTestURLRequestContext() {
// The d'tor should execute in the IO thread. Post the quit task to the
// current thread.
- MessageLoop::current()->PostTask(FROM_HERE, new MessageLoop::QuitTask());
+ MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
}
};
@@ -397,7 +397,7 @@ void URLFetcherProtectTest::OnURLFetchComplete(
EXPECT_TRUE(source->GetResponseAsString(&data));
EXPECT_FALSE(data.empty());
delete fetcher_;
- io_message_loop_proxy()->PostTask(FROM_HERE, new MessageLoop::QuitTask());
+ io_message_loop_proxy()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
} else {
// Now running Overload test.
static int count = 0;
@@ -444,7 +444,7 @@ void URLFetcherProtectTestPassedThrough::OnURLFetchComplete(
}
delete fetcher_;
- io_message_loop_proxy()->PostTask(FROM_HERE, new MessageLoop::QuitTask());
+ io_message_loop_proxy()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
}
@@ -474,7 +474,7 @@ void URLFetcherBadHTTPSTest::OnURLFetchComplete(
// The rest is the same as URLFetcherTest::OnURLFetchComplete.
delete fetcher_;
- io_message_loop_proxy()->PostTask(FROM_HERE, new MessageLoop::QuitTask());
+ io_message_loop_proxy()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
}
void URLFetcherCancelTest::CreateFetcher(const GURL& url) {
@@ -495,7 +495,7 @@ void URLFetcherCancelTest::OnURLFetchComplete(
// We should have cancelled the request before completion.
ADD_FAILURE();
delete fetcher_;
- io_message_loop_proxy()->PostTask(FROM_HERE, new MessageLoop::QuitTask());
+ io_message_loop_proxy()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
}
void URLFetcherCancelTest::CancelRequest() {
@@ -522,7 +522,7 @@ void URLFetcherMultipleAttemptTest::OnURLFetchComplete(
// because the destructor won't necessarily run on the
// same thread that CreateFetcher() did.
- io_message_loop_proxy()->PostTask(FROM_HERE, new MessageLoop::QuitTask());
+ io_message_loop_proxy()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
// If the current message loop is not the IO loop, it will be shut down when
// the main loop returns and this thread subsequently goes out of scope.
}
@@ -540,7 +540,7 @@ void URLFetcherTempFileTest::OnURLFetchComplete(
delete fetcher_;
- io_message_loop_proxy()->PostTask(FROM_HERE, new MessageLoop::QuitTask());
+ io_message_loop_proxy()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
}
TEST_F(URLFetcherTest, SameThreadsTest) {
« no previous file with comments | « content/browser/tab_contents/navigation_controller_unittest.cc ('k') | content/renderer/media/webrtc_audio_device_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698