From b62cd601a915809ad1a0540c91181dd2db726468 Mon Sep 17 00:00:00 2001 From: "xhwang@chromium.org" Date: Mon, 29 Apr 2013 22:09:29 +0000 Subject: rlz: Use base::MessageLoop. BUG=236029 R=rogerta@chromium.org Review URL: https://chromiumcodereview.appspot.com/14520024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197157 0039d316-1c4b-4281-b951-d872f2087c98 --- rlz/lib/financial_ping.cc | 13 +++++++------ rlz/lib/rlz_lib_test.cc | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'rlz/lib') diff --git a/rlz/lib/financial_ping.cc b/rlz/lib/financial_ping.cc index 48c446e..5a70641 100644 --- a/rlz/lib/financial_ping.cc +++ b/rlz/lib/financial_ping.cc @@ -266,10 +266,10 @@ bool FinancialPing::PingServer(const char* request, std::string* response) { return true; #else // Run a blocking event loop to match the win inet implementation. - scoped_ptr message_loop; + scoped_ptr message_loop; // Ensure that we have a MessageLoop. - if (!MessageLoop::current()) - message_loop.reset(new MessageLoop); + if (!base::MessageLoop::current()) + message_loop.reset(new base::MessageLoop); base::RunLoop loop; FinancialPingUrlFetcherDelegate delegate(loop.QuitClosure()); @@ -292,11 +292,12 @@ bool FinancialPing::PingServer(const char* request, std::string* response) { fetcher->SetRequestContext(g_context); const base::TimeDelta kTimeout = base::TimeDelta::FromMinutes(5); - MessageLoop::ScopedNestableTaskAllower allow_nested(MessageLoop::current()); - MessageLoop::current()->PostTask( + base::MessageLoop::ScopedNestableTaskAllower allow_nested( + base::MessageLoop::current()); + base::MessageLoop::current()->PostTask( FROM_HERE, base::Bind(&net::URLFetcher::Start, base::Unretained(fetcher.get()))); - MessageLoop::current()->PostDelayedTask( + base::MessageLoop::current()->PostDelayedTask( FROM_HERE, loop.QuitClosure(), kTimeout); loop.Run(); diff --git a/rlz/lib/rlz_lib_test.cc b/rlz/lib/rlz_lib_test.cc index b5ef72e..f21c540 100644 --- a/rlz/lib/rlz_lib_test.cc +++ b/rlz/lib/rlz_lib_test.cc @@ -427,7 +427,7 @@ TEST_F(RlzLibTest, SendFinancialPing) { #endif base::Thread::Options options; - options.message_loop_type = MessageLoop::TYPE_IO; + options.message_loop_type = base::MessageLoop::TYPE_IO; base::Thread io_thread("rlz_unittest_io_thread"); ASSERT_TRUE(io_thread.StartWithOptions(options)); -- cgit v1.1