diff options
35 files changed, 64 insertions, 64 deletions
diff --git a/ash/test/ash_test_base.cc b/ash/test/ash_test_base.cc index ffb6330..31afda9 100644 --- a/ash/test/ash_test_base.cc +++ b/ash/test/ash_test_base.cc @@ -151,7 +151,7 @@ void AshTestBase::SetUp() { options.message_loop_type = base::MessageLoop::TYPE_IO; ipc_thread_->StartWithOptions(options); metro_viewer_host_.reset( - new TestMetroViewerProcessHost(ipc_thread_->message_loop_proxy())); + new TestMetroViewerProcessHost(ipc_thread_->task_runner())); CHECK(metro_viewer_host_->LaunchViewerAndWaitForConnection( win8::test::kDefaultTestAppUserModelId)); aura::RemoteWindowTreeHostWin* window_tree_host = diff --git a/chrome/browser/offline_pages/offline_page_metadata_store_impl_unittest.cc b/chrome/browser/offline_pages/offline_page_metadata_store_impl_unittest.cc index 49974f2..71dd8ed 100644 --- a/chrome/browser/offline_pages/offline_page_metadata_store_impl_unittest.cc +++ b/chrome/browser/offline_pages/offline_page_metadata_store_impl_unittest.cc @@ -73,7 +73,7 @@ scoped_ptr<OfflinePageMetadataStoreImpl> OfflinePageMetadataStoreImplTest::BuildStore() { scoped_ptr<ProtoDatabaseImpl<offline_pages::OfflinePageEntry>> db( new ProtoDatabaseImpl<offline_pages::OfflinePageEntry>( - message_loop_.message_loop_proxy())); + message_loop_.task_runner())); return scoped_ptr<OfflinePageMetadataStoreImpl>( new OfflinePageMetadataStoreImpl(db.Pass(), temp_directory_.path())); } diff --git a/cloud_print/gcp20/prototype/printer.cc b/cloud_print/gcp20/prototype/printer.cc index 4309002..8a09a9c 100644 --- a/cloud_print/gcp20/prototype/printer.cc +++ b/cloud_print/gcp20/prototype/printer.cc @@ -140,7 +140,7 @@ std::string GetDescription() { } scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() { - return base::MessageLoop::current()->message_loop_proxy(); + return base::MessageLoop::current()->task_runner(); } } // namespace diff --git a/components/history/core/browser/history_service.cc b/components/history/core/browser/history_service.cc index 25a19d2..608a1cf 100644 --- a/components/history/core/browser/history_service.cc +++ b/components/history/core/browser/history_service.cc @@ -360,7 +360,7 @@ void HistoryService::TopHosts(int num_hosts, DCHECK(thread_) << "History service being called after cleanup"; DCHECK(thread_checker_.CalledOnValidThread()); PostTaskAndReplyWithResult( - thread_->message_loop_proxy().get(), FROM_HERE, + thread_->task_runner().get(), FROM_HERE, base::Bind(&HistoryBackend::TopHosts, history_backend_.get(), num_hosts), callback); } diff --git a/components/html_viewer/setup.cc b/components/html_viewer/setup.cc index 3da3601..928f617 100644 --- a/components/html_viewer/setup.cc +++ b/components/html_viewer/setup.cc @@ -149,7 +149,7 @@ void Setup::InitIfNecessary(const gfx::Size& screen_size_in_pixels, compositor_thread_.Start(); media_factory_.reset( - new MediaFactory(compositor_thread_.message_loop_proxy(), app_->shell())); + new MediaFactory(compositor_thread_.task_runner(), app_->shell())); if (command_line->HasSwitch(kJavaScriptFlags)) { std::string flags(command_line->GetSwitchValueASCII(kJavaScriptFlags)); diff --git a/dbus/bus.cc b/dbus/bus.cc index 2f1300a..388911a 100644 --- a/dbus/bus.cc +++ b/dbus/bus.cc @@ -201,7 +201,7 @@ Bus::Bus(const Options& options) // The origin message loop is unnecessary if the client uses synchronous // functions only. if (base::MessageLoop::current()) - origin_task_runner_ = base::MessageLoop::current()->message_loop_proxy(); + origin_task_runner_ = base::MessageLoop::current()->task_runner(); } Bus::~Bus() { diff --git a/dbus/bus_unittest.cc b/dbus/bus_unittest.cc index 22ccddc..1e84fa5 100644 --- a/dbus/bus_unittest.cc +++ b/dbus/bus_unittest.cc @@ -137,7 +137,7 @@ TEST(BusTest, RemoveObjectProxy) { // Create the bus. Bus::Options options; - options.dbus_task_runner = dbus_thread.message_loop_proxy(); + options.dbus_task_runner = dbus_thread.task_runner(); scoped_refptr<Bus> bus = new Bus(options); ASSERT_FALSE(bus->shutdown_completed()); @@ -217,7 +217,7 @@ TEST(BusTest, UnregisterExportedObject) { // Create the bus. Bus::Options options; - options.dbus_task_runner = dbus_thread.message_loop_proxy(); + options.dbus_task_runner = dbus_thread.task_runner(); scoped_refptr<Bus> bus = new Bus(options); ASSERT_FALSE(bus->shutdown_completed()); @@ -267,7 +267,7 @@ TEST(BusTest, ShutdownAndBlockWithDBusThread) { // Create the bus. Bus::Options options; - options.dbus_task_runner = dbus_thread.message_loop_proxy(); + options.dbus_task_runner = dbus_thread.task_runner(); scoped_refptr<Bus> bus = new Bus(options); ASSERT_FALSE(bus->shutdown_completed()); diff --git a/dbus/end_to_end_async_unittest.cc b/dbus/end_to_end_async_unittest.cc index 10516b9..3854721 100644 --- a/dbus/end_to_end_async_unittest.cc +++ b/dbus/end_to_end_async_unittest.cc @@ -47,7 +47,7 @@ class EndToEndAsyncTest : public testing::Test { // Start the test service, using the D-Bus thread. TestService::Options options; - options.dbus_task_runner = dbus_thread_->message_loop_proxy(); + options.dbus_task_runner = dbus_thread_->task_runner(); test_service_.reset(new TestService(options)); ASSERT_TRUE(test_service_->StartService()); ASSERT_TRUE(test_service_->WaitUntilServiceIsStarted()); @@ -57,7 +57,7 @@ class EndToEndAsyncTest : public testing::Test { Bus::Options bus_options; bus_options.bus_type = Bus::SESSION; bus_options.connection_type = Bus::PRIVATE; - bus_options.dbus_task_runner = dbus_thread_->message_loop_proxy(); + bus_options.dbus_task_runner = dbus_thread_->task_runner(); bus_ = new Bus(bus_options); object_proxy_ = bus_->GetObjectProxy( "org.chromium.TestService", @@ -138,7 +138,7 @@ class EndToEndAsyncTest : public testing::Test { bus_options.bus_type = Bus::CUSTOM_ADDRESS; bus_options.address = kInvalidAddress; bus_options.connection_type = Bus::PRIVATE; - bus_options.dbus_task_runner = dbus_thread_->message_loop_proxy(); + bus_options.dbus_task_runner = dbus_thread_->task_runner(); bus_ = new Bus(bus_options); ASSERT_TRUE(bus_->HasDBusThread()); diff --git a/dbus/object_manager_unittest.cc b/dbus/object_manager_unittest.cc index 76ddb85..34f7ac4 100644 --- a/dbus/object_manager_unittest.cc +++ b/dbus/object_manager_unittest.cc @@ -70,7 +70,7 @@ class ObjectManagerTest // Start the test service, using the D-Bus thread. TestService::Options options; - options.dbus_task_runner = dbus_thread_->message_loop_proxy(); + options.dbus_task_runner = dbus_thread_->task_runner(); test_service_.reset(new TestService(options)); ASSERT_TRUE(test_service_->StartService()); ASSERT_TRUE(test_service_->WaitUntilServiceIsStarted()); @@ -80,7 +80,7 @@ class ObjectManagerTest Bus::Options bus_options; bus_options.bus_type = Bus::SESSION; bus_options.connection_type = Bus::PRIVATE; - bus_options.dbus_task_runner = dbus_thread_->message_loop_proxy(); + bus_options.dbus_task_runner = dbus_thread_->task_runner(); bus_ = new Bus(bus_options); ASSERT_TRUE(bus_->HasDBusThread()); diff --git a/dbus/property_unittest.cc b/dbus/property_unittest.cc index 5208f84..59faa22 100644 --- a/dbus/property_unittest.cc +++ b/dbus/property_unittest.cc @@ -61,7 +61,7 @@ class PropertyTest : public testing::Test { // Start the test service, using the D-Bus thread. TestService::Options options; - options.dbus_task_runner = dbus_thread_->message_loop_proxy(); + options.dbus_task_runner = dbus_thread_->task_runner(); test_service_.reset(new TestService(options)); ASSERT_TRUE(test_service_->StartService()); ASSERT_TRUE(test_service_->WaitUntilServiceIsStarted()); @@ -71,7 +71,7 @@ class PropertyTest : public testing::Test { Bus::Options bus_options; bus_options.bus_type = Bus::SESSION; bus_options.connection_type = Bus::PRIVATE; - bus_options.dbus_task_runner = dbus_thread_->message_loop_proxy(); + bus_options.dbus_task_runner = dbus_thread_->task_runner(); bus_ = new Bus(bus_options); object_proxy_ = bus_->GetObjectProxy( "org.chromium.TestService", diff --git a/dbus/signal_sender_verification_unittest.cc b/dbus/signal_sender_verification_unittest.cc index 0f718a4..0cedda7 100644 --- a/dbus/signal_sender_verification_unittest.cc +++ b/dbus/signal_sender_verification_unittest.cc @@ -44,7 +44,7 @@ class SignalSenderVerificationTest : public testing::Test { Bus::Options bus_options; bus_options.bus_type = Bus::SESSION; bus_options.connection_type = Bus::PRIVATE; - bus_options.dbus_task_runner = dbus_thread_->message_loop_proxy(); + bus_options.dbus_task_runner = dbus_thread_->task_runner(); bus_ = new Bus(bus_options); object_proxy_ = bus_->GetObjectProxy( "org.chromium.TestService", @@ -71,7 +71,7 @@ class SignalSenderVerificationTest : public testing::Test { // Start the test service, using the D-Bus thread. TestService::Options options; - options.dbus_task_runner = dbus_thread_->message_loop_proxy(); + options.dbus_task_runner = dbus_thread_->task_runner(); test_service_.reset(new TestService(options)); ASSERT_TRUE(test_service_->StartService()); ASSERT_TRUE(test_service_->WaitUntilServiceIsStarted()); @@ -278,7 +278,7 @@ TEST_F(SignalSenderVerificationTest, TestOwnerStealing) { // Start a test service that allows theft, using the D-Bus thread. TestService::Options options; - options.dbus_task_runner = dbus_thread_->message_loop_proxy(); + options.dbus_task_runner = dbus_thread_->task_runner(); options.request_ownership_options = Bus::REQUIRE_PRIMARY_ALLOW_REPLACEMENT; TestService stealable_test_service(options); ASSERT_TRUE(stealable_test_service.StartService()); diff --git a/dbus/test_server.cc b/dbus/test_server.cc index 7e4722d..1b63064 100644 --- a/dbus/test_server.cc +++ b/dbus/test_server.cc @@ -19,7 +19,7 @@ int main(int argc, char** argv) { CHECK(dbus_thread->StartWithOptions(thread_options)); dbus::TestService::Options options; - options.dbus_task_runner = dbus_thread->message_loop_proxy(); + options.dbus_task_runner = dbus_thread->task_runner(); dbus::TestService* test_service = new dbus::TestService(options); CHECK(test_service->StartService()); CHECK(test_service->WaitUntilServiceIsStarted()); diff --git a/device/bluetooth/bluetooth_socket_thread.cc b/device/bluetooth/bluetooth_socket_thread.cc index 6aa1013..5e0c153 100644 --- a/device/bluetooth/bluetooth_socket_thread.cc +++ b/device/bluetooth/bluetooth_socket_thread.cc @@ -63,7 +63,7 @@ void BluetoothSocketThread::EnsureStarted() { thread_options.message_loop_type = base::MessageLoop::TYPE_IO; thread_.reset(new base::Thread("BluetoothSocketThread")); thread_->StartWithOptions(thread_options); - task_runner_ = thread_->message_loop_proxy(); + task_runner_ = thread_->task_runner(); } scoped_refptr<base::SequencedTaskRunner> BluetoothSocketThread::task_runner() diff --git a/jingle/notifier/base/xmpp_connection_unittest.cc b/jingle/notifier/base/xmpp_connection_unittest.cc index 147edac..2e3eb59 100644 --- a/jingle/notifier/base/xmpp_connection_unittest.cc +++ b/jingle/notifier/base/xmpp_connection_unittest.cc @@ -80,7 +80,7 @@ class XmppConnectionTest : public testing::Test { message_loop_.reset(new base::MessageLoop(pump.Pass())); url_request_context_getter_ = new net::TestURLRequestContextGetter( - message_loop_->message_loop_proxy()); + message_loop_->task_runner()); } ~XmppConnectionTest() override {} diff --git a/jingle/notifier/listener/push_client_unittest.cc b/jingle/notifier/listener/push_client_unittest.cc index 5296663..1bf4e653 100644 --- a/jingle/notifier/listener/push_client_unittest.cc +++ b/jingle/notifier/listener/push_client_unittest.cc @@ -23,7 +23,7 @@ class PushClientTest : public testing::Test { PushClientTest() { notifier_options_.request_context_getter = new net::TestURLRequestContextGetter( - message_loop_.message_loop_proxy()); + message_loop_.task_runner()); } ~PushClientTest() override {} diff --git a/jingle/notifier/listener/xmpp_push_client_unittest.cc b/jingle/notifier/listener/xmpp_push_client_unittest.cc index abe6775..f282ca8 100644 --- a/jingle/notifier/listener/xmpp_push_client_unittest.cc +++ b/jingle/notifier/listener/xmpp_push_client_unittest.cc @@ -35,7 +35,7 @@ class XmppPushClientTest : public testing::Test { XmppPushClientTest() { notifier_options_.request_context_getter = new net::TestURLRequestContextGetter( - message_loop_.message_loop_proxy()); + message_loop_.task_runner()); } ~XmppPushClientTest() override {} diff --git a/mojo/runner/child_process.cc b/mojo/runner/child_process.cc index 4fcd16f..8c2f260 100644 --- a/mojo/runner/child_process.cc +++ b/mojo/runner/child_process.cc @@ -99,7 +99,7 @@ class AppContext : public embedder::ProcessDelegate { // Create and start our I/O thread. base::Thread::Options io_thread_options(base::MessageLoop::TYPE_IO, 0); CHECK(io_thread_.StartWithOptions(io_thread_options)); - io_runner_ = io_thread_.message_loop_proxy().get(); + io_runner_ = io_thread_.task_runner().get(); CHECK(io_runner_.get()); // Create and start our controller thread. @@ -109,7 +109,7 @@ class AppContext : public embedder::ProcessDelegate { controller_thread_options.message_pump_factory = base::Bind(&common::MessagePumpMojo::Create); CHECK(controller_thread_.StartWithOptions(controller_thread_options)); - controller_runner_ = controller_thread_.message_loop_proxy().get(); + controller_runner_ = controller_thread_.task_runner().get(); CHECK(controller_runner_.get()); // TODO(vtl): This should be SLAVE, not NONE. diff --git a/mojo/runner/context.cc b/mojo/runner/context.cc index 47a9561..6eed031 100644 --- a/mojo/runner/context.cc +++ b/mojo/runner/context.cc @@ -276,7 +276,7 @@ bool Context::Init() { EnsureEmbedderIsInitialized(); task_runners_.reset( - new TaskRunners(base::MessageLoop::current()->message_loop_proxy())); + new TaskRunners(base::MessageLoop::current()->task_runner())); // TODO(vtl): Probably these failures should be checked before |Init()|, and // this function simply shouldn't fail. diff --git a/mojo/runner/task_runners.h b/mojo/runner/task_runners.h index 68b9bcc..bd645ac 100644 --- a/mojo/runner/task_runners.h +++ b/mojo/runner/task_runners.h @@ -31,7 +31,7 @@ class TaskRunners { } base::SingleThreadTaskRunner* io_runner() const { - return io_thread_->message_loop_proxy().get(); + return io_thread_->task_runner().get(); } base::SequencedWorkerPool* blocking_pool() const { diff --git a/rlz/lib/rlz_lib_test.cc b/rlz/lib/rlz_lib_test.cc index fd6f419..5e1be3c 100644 --- a/rlz/lib/rlz_lib_test.cc +++ b/rlz/lib/rlz_lib_test.cc @@ -445,7 +445,7 @@ TEST_F(RlzLibTest, SendFinancialPing) { scoped_refptr<net::TestURLRequestContextGetter> context = new net::TestURLRequestContextGetter( - io_thread.message_loop()->message_loop_proxy()); + io_thread.message_loop()->task_runner()); rlz_lib::SetURLRequestContext(context.get()); URLRequestRAII set_context(context.get()); @@ -498,7 +498,7 @@ TEST_F(RlzLibTest, SendFinancialPingDuringShutdown) { scoped_refptr<net::TestURLRequestContextGetter> context = new net::TestURLRequestContextGetter( - io_thread.message_loop()->message_loop_proxy()); + io_thread.message_loop()->task_runner()); rlz_lib::SetURLRequestContext(context.get()); URLRequestRAII set_context(context.get()); diff --git a/sync/internal_api/attachments/attachment_downloader_impl_unittest.cc b/sync/internal_api/attachments/attachment_downloader_impl_unittest.cc index 0cae099..9cf16b4 100644 --- a/sync/internal_api/attachments/attachment_downloader_impl_unittest.cc +++ b/sync/internal_api/attachments/attachment_downloader_impl_unittest.cc @@ -205,7 +205,7 @@ class AttachmentDownloaderImplTest : public testing::Test { void AttachmentDownloaderImplTest::SetUp() { url_request_context_getter_ = - new net::TestURLRequestContextGetter(message_loop_.message_loop_proxy()); + new net::TestURLRequestContextGetter(message_loop_.task_runner()); url_fetcher_factory_.set_remove_fetcher_on_delete(true); token_service_.reset(new MockOAuth2TokenService()); token_service_->AddAccount(kAccountId); diff --git a/sync/internal_api/attachments/attachment_service_proxy_unittest.cc b/sync/internal_api/attachments/attachment_service_proxy_unittest.cc index fe52f46..059a252 100644 --- a/sync/internal_api/attachments/attachment_service_proxy_unittest.cc +++ b/sync/internal_api/attachments/attachment_service_proxy_unittest.cc @@ -85,7 +85,7 @@ class AttachmentServiceProxyTest : public testing::Test, stub_thread.reset(new base::Thread("attachment service stub thread")); stub_thread->Start(); stub.reset(new StubAttachmentService); - proxy.reset(new AttachmentServiceProxy(stub_thread->message_loop_proxy(), + proxy.reset(new AttachmentServiceProxy(stub_thread->task_runner(), stub->AsWeakPtr())); callback_get_or_download = diff --git a/sync/internal_api/attachments/attachment_uploader_impl_unittest.cc b/sync/internal_api/attachments/attachment_uploader_impl_unittest.cc index 527b00e..882b575 100644 --- a/sync/internal_api/attachments/attachment_uploader_impl_unittest.cc +++ b/sync/internal_api/attachments/attachment_uploader_impl_unittest.cc @@ -277,10 +277,10 @@ void AttachmentUploaderImplTest::OnRequestReceived(const HttpRequest& request) { void AttachmentUploaderImplTest::SetUp() { DCHECK(CalledOnValidThread()); - request_handler_.reset(new RequestHandler(message_loop_.message_loop_proxy(), + request_handler_.reset(new RequestHandler(message_loop_.task_runner(), weak_ptr_factory_.GetWeakPtr())); url_request_context_getter_ = - new net::TestURLRequestContextGetter(message_loop_.message_loop_proxy()); + new net::TestURLRequestContextGetter(message_loop_.task_runner()); ASSERT_TRUE(server_.InitializeAndWaitUntilReady()); server_.RegisterRequestHandler( diff --git a/sync/internal_api/http_bridge_unittest.cc b/sync/internal_api/http_bridge_unittest.cc index 4ab93fd..3c6db88 100644 --- a/sync/internal_api/http_bridge_unittest.cc +++ b/sync/internal_api/http_bridge_unittest.cc @@ -53,7 +53,7 @@ class SyncHttpBridgeTest : public testing::Test { HttpBridge* BuildBridge() { if (!fake_default_request_context_getter_) { fake_default_request_context_getter_ = - new net::TestURLRequestContextGetter(io_thread_.message_loop_proxy()); + new net::TestURLRequestContextGetter(io_thread_.task_runner()); fake_default_request_context_getter_->AddRef(); } HttpBridge* bridge = @@ -159,7 +159,7 @@ void SyncHttpBridgeTest::RunSyncThreadBridgeUseTest( base::WaitableEvent* signal_when_created, base::WaitableEvent* signal_when_released) { scoped_refptr<net::URLRequestContextGetter> ctx_getter( - new net::TestURLRequestContextGetter(io_thread_.message_loop_proxy())); + new net::TestURLRequestContextGetter(io_thread_.task_runner())); { scoped_refptr<ShuntedHttpBridge> bridge( new ShuntedHttpBridge(ctx_getter.get(), this, true)); @@ -190,7 +190,7 @@ TEST_F(SyncHttpBridgeTest, TestUsesSameHttpNetworkSession) { // Test the HttpBridge without actually making any network requests. TEST_F(SyncHttpBridgeTest, TestMakeSynchronousPostShunted) { scoped_refptr<net::URLRequestContextGetter> ctx_getter( - new net::TestURLRequestContextGetter(io_thread()->message_loop_proxy())); + new net::TestURLRequestContextGetter(io_thread()->task_runner())); scoped_refptr<HttpBridge> http_bridge( new ShuntedHttpBridge(ctx_getter.get(), this, false)); http_bridge->SetURL("http://www.google.com", 9999); @@ -314,7 +314,7 @@ TEST_F(SyncHttpBridgeTest, TestResponseHeader) { TEST_F(SyncHttpBridgeTest, Abort) { scoped_refptr<net::URLRequestContextGetter> ctx_getter( - new net::TestURLRequestContextGetter(io_thread()->message_loop_proxy())); + new net::TestURLRequestContextGetter(io_thread()->task_runner())); scoped_refptr<ShuntedHttpBridge> http_bridge( new ShuntedHttpBridge(ctx_getter.get(), this, true)); http_bridge->SetURL("http://www.google.com", 9999); @@ -323,7 +323,7 @@ TEST_F(SyncHttpBridgeTest, Abort) { int os_error = 0; int response_code = 0; - io_thread()->message_loop_proxy()->PostTask( + io_thread()->task_runner()->PostTask( FROM_HERE, base::Bind(&SyncHttpBridgeTest::Abort, http_bridge)); bool success = http_bridge->MakeSynchronousPost(&os_error, &response_code); @@ -333,7 +333,7 @@ TEST_F(SyncHttpBridgeTest, Abort) { TEST_F(SyncHttpBridgeTest, AbortLate) { scoped_refptr<net::URLRequestContextGetter> ctx_getter( - new net::TestURLRequestContextGetter(io_thread()->message_loop_proxy())); + new net::TestURLRequestContextGetter(io_thread()->task_runner())); scoped_refptr<ShuntedHttpBridge> http_bridge( new ShuntedHttpBridge(ctx_getter.get(), this, false)); http_bridge->SetURL("http://www.google.com", 9999); @@ -367,7 +367,7 @@ TEST_F(SyncHttpBridgeTest, AbortAndReleaseBeforeFetchComplete) { // Stop IO so we can control order of operations. base::WaitableEvent io_waiter(false, false); - ASSERT_TRUE(io_thread()->message_loop_proxy()->PostTask( + ASSERT_TRUE(io_thread()->task_runner()->PostTask( FROM_HERE, base::Bind(&base::WaitableEvent::Wait, base::Unretained(&io_waiter)))); @@ -384,7 +384,7 @@ TEST_F(SyncHttpBridgeTest, AbortAndReleaseBeforeFetchComplete) { fetcher.set_response_code(200); fetcher.set_cookies(cookies); fetcher.SetResponseString(response_content); - ASSERT_TRUE(io_thread()->message_loop_proxy()->PostTask( + ASSERT_TRUE(io_thread()->task_runner()->PostTask( FROM_HERE, base::Bind(&net::URLFetcherDelegate::OnURLFetchComplete, base::Unretained(delegate), &fetcher))); @@ -446,7 +446,7 @@ TEST_F(SyncHttpBridgeTest, RequestContextGetterReleaseOrder) { syncer::HttpPostProviderInterface* bridge = NULL; scoped_refptr<net::URLRequestContextGetter> baseline_context_getter( - new net::TestURLRequestContextGetter(io_thread()->message_loop_proxy())); + new net::TestURLRequestContextGetter(io_thread()->task_runner())); base::WaitableEvent signal_when_created(false, false); base::WaitableEvent wait_for_shutdown(false, false); @@ -496,7 +496,7 @@ TEST_F(SyncHttpBridgeTest, EarlyAbortFactory) { // simplicity, this test uses only one thread. scoped_refptr<net::URLRequestContextGetter> baseline_context_getter( - new net::TestURLRequestContextGetter(io_thread()->message_loop_proxy())); + new net::TestURLRequestContextGetter(io_thread()->task_runner())); CancelationSignal release_request_context_signal; // UI Thread: Initialize the HttpBridgeFactory. The next step would be to diff --git a/sync/test/fake_server/fake_server_network_resources.cc b/sync/test/fake_server/fake_server_network_resources.cc index 4750230..8d7c647 100644 --- a/sync/test/fake_server/fake_server_network_resources.cc +++ b/sync/test/fake_server/fake_server_network_resources.cc @@ -31,7 +31,7 @@ FakeServerNetworkResources::GetHttpPostProviderFactory( return make_scoped_ptr<syncer::HttpPostProviderFactory>( new FakeServerHttpPostProviderFactory( fake_server_, - base::MessageLoop::current()->message_loop_proxy())); + base::MessageLoop::current()->task_runner())); } } // namespace fake_server diff --git a/sync/tools/sync_client.cc b/sync/tools/sync_client.cc index a433fa9..f46d39b 100644 --- a/sync/tools/sync_client.cc +++ b/sync/tools/sync_client.cc @@ -330,7 +330,7 @@ int SyncClientMain(int argc, char* argv[]) { // Set up sync notifier factory. const scoped_refptr<MyTestURLRequestContextGetter> context_getter = - new MyTestURLRequestContextGetter(io_thread.message_loop_proxy()); + new MyTestURLRequestContextGetter(io_thread.task_runner()); const notifier::NotifierOptions& notifier_options = ParseNotifierOptions(command_line, context_getter); syncer::NetworkChannelCreator network_channel_creator = diff --git a/sync/tools/sync_listen_notifications.cc b/sync/tools/sync_listen_notifications.cc index c6cc11f..6f6f534 100644 --- a/sync/tools/sync_listen_notifications.cc +++ b/sync/tools/sync_listen_notifications.cc @@ -179,7 +179,7 @@ int SyncListenNotificationsMain(int argc, char* argv[]) { const notifier::NotifierOptions& notifier_options = ParseNotifierOptions( command_line, - new MyTestURLRequestContextGetter(io_thread.message_loop_proxy())); + new MyTestURLRequestContextGetter(io_thread.task_runner())); syncer::NetworkChannelCreator network_channel_creator = syncer::NonBlockingInvalidator::MakePushClientChannelCreator( notifier_options); diff --git a/sync/util/get_session_name_unittest.cc b/sync/util/get_session_name_unittest.cc index 724cd8b..2a77d4a 100644 --- a/sync/util/get_session_name_unittest.cc +++ b/sync/util/get_session_name_unittest.cc @@ -64,7 +64,7 @@ TEST_F(GetSessionNameTest, GetSessionNameSynchronouslyChromebox) { // with a session name. Makes sure the returned session name is equal // to the return value of GetSessionNameSynchronouslyForTesting(). TEST_F(GetSessionNameTest, GetSessionName) { - GetSessionName(message_loop_.message_loop_proxy(), + GetSessionName(message_loop_.task_runner(), base::Bind(&GetSessionNameTest::SetSessionNameAndQuit, base::Unretained(this))); message_loop_.Run(); diff --git a/tools/android/forwarder2/device_forwarder_main.cc b/tools/android/forwarder2/device_forwarder_main.cc index 8b5df26c..fdf5fe5 100644 --- a/tools/android/forwarder2/device_forwarder_main.cc +++ b/tools/android/forwarder2/device_forwarder_main.cc @@ -55,7 +55,7 @@ class ServerDelegate : public Daemon::ServerDelegate { // thread. Make sure that it gets deleted on that same thread. Note that // DeleteSoon() is not used here since it would imply reading |controller_| // from the main thread while it's set on the internal thread. - controller_thread_->message_loop_proxy()->PostTask( + controller_thread_->task_runner()->PostTask( FROM_HERE, base::Bind(&ServerDelegate::DeleteControllerOnInternalThread, base::Unretained(this))); @@ -63,7 +63,7 @@ class ServerDelegate : public Daemon::ServerDelegate { void DeleteControllerOnInternalThread() { DCHECK( - controller_thread_->message_loop_proxy()->RunsTasksOnCurrentThread()); + controller_thread_->task_runner()->RunsTasksOnCurrentThread()); controller_.reset(); } diff --git a/tools/android/forwarder2/device_listener.cc b/tools/android/forwarder2/device_listener.cc index e04d61e..d6f1d8d 100644 --- a/tools/android/forwarder2/device_listener.cc +++ b/tools/android/forwarder2/device_listener.cc @@ -51,7 +51,7 @@ void DeviceListener::Start() { } void DeviceListener::SetAdbDataSocket(scoped_ptr<Socket> adb_data_socket) { - thread_.message_loop_proxy()->PostTask( + thread_.task_runner()->PostTask( FROM_HERE, base::Bind(&DeviceListener::OnAdbDataSocketReceivedOnInternalThread, base::Unretained(this), base::Passed(&adb_data_socket))); @@ -74,7 +74,7 @@ DeviceListener::DeviceListener(scoped_ptr<Socket> listener_socket, } void DeviceListener::AcceptNextClientSoon() { - thread_.message_loop_proxy()->PostTask( + thread_.task_runner()->PostTask( FROM_HERE, base::Bind(&DeviceListener::AcceptClientOnInternalThread, base::Unretained(this))); diff --git a/tools/android/forwarder2/forwarders_manager.cc b/tools/android/forwarder2/forwarders_manager.cc index 0c0c904..3460968 100644 --- a/tools/android/forwarder2/forwarders_manager.cc +++ b/tools/android/forwarder2/forwarders_manager.cc @@ -35,7 +35,7 @@ void ForwardersManager::CreateAndStartNewForwarder(scoped_ptr<Socket> socket1, scoped_ptr<Socket> socket2) { // Note that the internal Forwarder vector is populated on the internal thread // which is the only thread from which it's accessed. - thread_.message_loop_proxy()->PostTask( + thread_.task_runner()->PostTask( FROM_HERE, base::Bind(&ForwardersManager::CreateNewForwarderOnInternalThread, base::Unretained(this), base::Passed(&socket1), @@ -49,19 +49,19 @@ void ForwardersManager::CreateAndStartNewForwarder(scoped_ptr<Socket> socket1, void ForwardersManager::CreateNewForwarderOnInternalThread( scoped_ptr<Socket> socket1, scoped_ptr<Socket> socket2) { - DCHECK(thread_.message_loop_proxy()->RunsTasksOnCurrentThread()); + DCHECK(thread_.task_runner()->RunsTasksOnCurrentThread()); forwarders_.push_back(new Forwarder(socket1.Pass(), socket2.Pass())); } void ForwardersManager::WaitForEventsOnInternalThreadSoon() { - thread_.message_loop_proxy()->PostTask( + thread_.task_runner()->PostTask( FROM_HERE, base::Bind(&ForwardersManager::WaitForEventsOnInternalThread, base::Unretained(this))); } void ForwardersManager::WaitForEventsOnInternalThread() { - DCHECK(thread_.message_loop_proxy()->RunsTasksOnCurrentThread()); + DCHECK(thread_.task_runner()->RunsTasksOnCurrentThread()); fd_set read_fds; fd_set write_fds; diff --git a/tools/android/forwarder2/host_controller.cc b/tools/android/forwarder2/host_controller.cc index 3364ad2..e6f02f8 100644 --- a/tools/android/forwarder2/host_controller.cc +++ b/tools/android/forwarder2/host_controller.cc @@ -85,7 +85,7 @@ HostController::HostController( } void HostController::ReadNextCommandSoon() { - thread_.message_loop_proxy()->PostTask( + thread_.task_runner()->PostTask( FROM_HERE, base::Bind(&HostController::ReadCommandOnInternalThread, base::Unretained(this))); diff --git a/tools/android/forwarder2/host_forwarder_main.cc b/tools/android/forwarder2/host_forwarder_main.cc index 16a7b51..ddb56c09 100644 --- a/tools/android/forwarder2/host_forwarder_main.cc +++ b/tools/android/forwarder2/host_forwarder_main.cc @@ -93,7 +93,7 @@ class HostControllersManager { if (!thread_.get()) return; // Delete the controllers on the thread they were created on. - thread_->message_loop_proxy()->DeleteSoon( + thread_->task_runner()->DeleteSoon( FROM_HERE, controllers_.release()); } @@ -104,7 +104,7 @@ class HostControllersManager { scoped_ptr<Socket> client_socket) { // Lazy initialize so that the CLI process doesn't get this thread created. InitOnce(); - thread_->message_loop_proxy()->PostTask( + thread_->task_runner()->PostTask( FROM_HERE, base::Bind(&HostControllersManager::HandleRequestOnInternalThread, base::Unretained(this), adb_path, device_serial, device_port, @@ -143,7 +143,7 @@ class HostControllersManager { // then all the controllers (including |controller|) were also deleted. return; } - DCHECK(manager->thread_->message_loop_proxy()->RunsTasksOnCurrentThread()); + DCHECK(manager->thread_->task_runner()->RunsTasksOnCurrentThread()); // Note that this will delete |controller| which is owned by the map. DeleteRefCountedValueInMap( MakeHostControllerMapKey( diff --git a/tools/ipc_fuzzer/message_replay/replay_process.cc b/tools/ipc_fuzzer/message_replay/replay_process.cc index 8e30b90..993594c 100644 --- a/tools/ipc_fuzzer/message_replay/replay_process.cc +++ b/tools/ipc_fuzzer/message_replay/replay_process.cc @@ -94,12 +94,12 @@ void ReplayProcess::OpenChannel() { if (should_use_mojo) { channel_ = IPC::ChannelProxy::Create( IPC::ChannelMojo::CreateClientFactory( - nullptr, io_thread_.message_loop_proxy(), channel_name), this, - io_thread_.message_loop_proxy()); + nullptr, io_thread_.task_runner(), channel_name), this, + io_thread_.task_runner()); } else { channel_ = IPC::ChannelProxy::Create(channel_name, IPC::Channel::MODE_CLIENT, this, - io_thread_.message_loop_proxy()); + io_thread_.task_runner()); } } diff --git a/win8/metro_driver/chrome_app_view_ash.cc b/win8/metro_driver/chrome_app_view_ash.cc index 8fac81c..65e07ba 100644 --- a/win8/metro_driver/chrome_app_view_ash.cc +++ b/win8/metro_driver/chrome_app_view_ash.cc @@ -1421,7 +1421,7 @@ void ChromeAppViewAsh::StartChromeOSMode() { IPC::ChannelProxy::Create(win8::kMetroViewerIPCChannelName, IPC::Channel::MODE_NAMED_CLIENT, channel_listener_, - io_thread_->message_loop_proxy()); + io_thread_->task_runner()); DVLOG(1) << "Created channel proxy"; // Upon receipt of the MetroViewerHostMsg_SetTargetSurface message the |