diff --git a/chrome_frame/delete_chrome_history.cc b/chrome_frame/delete_chrome_history.cc index e2476af5cd7af1..c83944ce834cf5 100644 --- a/chrome_frame/delete_chrome_history.cc +++ b/chrome_frame/delete_chrome_history.cc @@ -91,7 +91,7 @@ STDMETHODIMP DeleteChromeHistory::DeleteBrowsingHistory(DWORD flags) { remove_mask_ |= BrowsingDataRemover::REMOVE_HISTORY; loop_.PostDelayedTask(FROM_HERE, - new MessageLoop::QuitTask, 1000 * 600); + MessageLoop::QuitClosure(), 1000 * 600); loop_.MessageLoop::Run(); return S_OK; diff --git a/chrome_frame/test/chrome_frame_automation_mock.cc b/chrome_frame/test/chrome_frame_automation_mock.cc index 4da64bc4be12b5..966a176d723560 100644 --- a/chrome_frame/test/chrome_frame_automation_mock.cc +++ b/chrome_frame/test/chrome_frame_automation_mock.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -16,7 +16,7 @@ TEST(ChromeFrame, FLAKY_Launch) { MessageLoopForUI loop; AutomationMockLaunch mock_launch(&loop, kLongWaitTimeout); - loop.PostDelayedTask(FROM_HERE, new MessageLoop::QuitTask, kLongWaitTimeout); + loop.PostDelayedTask(FROM_HERE, MessageLoop::QuitClosure(), kLongWaitTimeout); mock_launch.Navigate("about:blank"); loop.RunWithDispatcher(NULL); @@ -27,7 +27,7 @@ TEST(ChromeFrame, Navigate) { MessageLoopForUI loop; AutomationMockNavigate mock_navigate(&loop, kLongWaitTimeout); - loop.PostDelayedTask(FROM_HERE, new MessageLoop::QuitTask, kLongWaitTimeout); + loop.PostDelayedTask(FROM_HERE, MessageLoop::QuitClosure(), kLongWaitTimeout); mock_navigate.NavigateRelativeFile(L"postmessage_basic_frame.html"); loop.RunWithDispatcher(NULL); @@ -38,7 +38,7 @@ TEST(ChromeFrame, PostMessage) { MessageLoopForUI loop; AutomationMockPostMessage mock_postmessage(&loop, kLongWaitTimeout); - loop.PostDelayedTask(FROM_HERE, new MessageLoop::QuitTask, kLongWaitTimeout); + loop.PostDelayedTask(FROM_HERE, MessageLoop::QuitClosure(), kLongWaitTimeout); mock_postmessage.NavigateRelativeFile(L"postmessage_basic_frame.html"); loop.RunWithDispatcher(NULL); @@ -52,7 +52,7 @@ TEST(ChromeFrame, FLAKY_RequestStart) { AutomationMockHostNetworkRequestStart mock_request_start(&loop, kLongWaitTimeout); - loop.PostDelayedTask(FROM_HERE, new MessageLoop::QuitTask, kLongWaitTimeout); + loop.PostDelayedTask(FROM_HERE, MessageLoop::QuitClosure(), kLongWaitTimeout); mock_request_start.NavigateRelative(L"postmessage_basic_frame.html"); loop.RunWithDispatcher(NULL); diff --git a/chrome_frame/test/chrome_frame_automation_mock.h b/chrome_frame/test/chrome_frame_automation_mock.h index 739f9043d36f13..ce3c35158a18d1 100644 --- a/chrome_frame/test/chrome_frame_automation_mock.h +++ b/chrome_frame/test/chrome_frame_automation_mock.h @@ -137,7 +137,7 @@ class AutomationMockDelegate void QuitMessageLoop() { // Quit on the caller message loop has to be called on the caller // thread. - caller_message_loop_->PostTask(FROM_HERE, new MessageLoop::QuitTask); + caller_message_loop_->PostTask(FROM_HERE, MessageLoop::QuitClosure()); } private: diff --git a/chrome_frame/test/net/fake_external_tab.cc b/chrome_frame/test/net/fake_external_tab.cc index 5a7d3714eb49fb..931e2a900aa06a 100644 --- a/chrome_frame/test/net/fake_external_tab.cc +++ b/chrome_frame/test/net/fake_external_tab.cc @@ -451,7 +451,7 @@ void CFUrlRequestUnittestRunner::TakeDownBrowser( me->ShutDownHostBrowser(); me->fake_chrome_.ui_loop()->PostDelayedTask(FROM_HERE, - new MessageLoop::QuitTask, + MessageLoop::QuitClosure(), TestTimeouts::tiny_timeout_ms()); } diff --git a/chrome_frame/test/test_server_test.cc b/chrome_frame/test/test_server_test.cc index 4175d22eda0111..504a3dffee42ba 100644 --- a/chrome_frame/test/test_server_test.cc +++ b/chrome_frame/test/test_server_test.cc @@ -124,7 +124,7 @@ struct QuitMessageHit { void QuitMessageLoop(QuitMessageHit* msg) { msg->hit_ = true; - msg->loop_->PostTask(FROM_HERE, new MessageLoop::QuitTask); + msg->loop_->PostTask(FROM_HERE, MessageLoop::QuitClosure()); } } // end namespace diff --git a/chrome_frame/test/test_with_web_server.cc b/chrome_frame/test/test_with_web_server.cc index a044b71522d002..75dada872995a1 100644 --- a/chrome_frame/test/test_with_web_server.cc +++ b/chrome_frame/test/test_with_web_server.cc @@ -299,7 +299,7 @@ void MockWebServer::HandlePostedResponse( posted_result_ = request.content(); if (posted_result_ == expected_result_) { MessageLoop::current()->PostDelayedTask(FROM_HERE, - new MessageLoop::QuitTask, + MessageLoop::QuitClosure(), 100); } connection->Send("HTTP/1.1 200 OK\r\n", "");