diff options
author | skyostil <skyostil@chromium.org> | 2015-06-02 12:03:48 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-02 19:05:11 +0000 |
commit | b0daa011ba68aa9079f31925faa9a7ca88894770 (patch) | |
tree | 8fb2c57a520058df58dba9ba34906af098f715f3 /components/update_client | |
parent | 3f2a3abd4acdd336e4c76ce963663507bd05e7bd (diff) | |
download | chromium_src-b0daa011ba68aa9079f31925faa9a7ca88894770.zip chromium_src-b0daa011ba68aa9079f31925faa9a7ca88894770.tar.gz chromium_src-b0daa011ba68aa9079f31925faa9a7ca88894770.tar.bz2 |
components: Remove use of MessageLoopProxy and deprecated MessageLoop APIs
This patch was mostly autogenerated with
https://codereview.chromium.org/1010073002/.
BUG=465354
Review URL: https://codereview.chromium.org/1144153004
Cr-Commit-Position: refs/heads/master@{#332440}
Diffstat (limited to 'components/update_client')
6 files changed, 23 insertions, 22 deletions
diff --git a/components/update_client/background_downloader_win.cc b/components/update_client/background_downloader_win.cc index 536fafd..7ea2d43 100644 --- a/components/update_client/background_downloader_win.cc +++ b/components/update_client/background_downloader_win.cc @@ -16,9 +16,9 @@ #include "base/bind.h" #include "base/bind_helpers.h" #include "base/files/file_util.h" -#include "base/message_loop/message_loop_proxy.h" #include "base/single_thread_task_runner.h" #include "base/strings/sys_string_conversions.h" +#include "base/thread_task_runner_handle.h" #include "base/win/scoped_co_mem.h" #include "components/update_client/utils.h" #include "ui/base/win/atl_module.h" @@ -393,7 +393,7 @@ BackgroundDownloader::BackgroundDownloader( net::URLRequestContextGetter* context_getter, scoped_refptr<base::SingleThreadTaskRunner> task_runner) : CrxDownloader(successor.Pass()), - main_task_runner_(base::MessageLoopProxy::current()), + main_task_runner_(base::ThreadTaskRunnerHandle::Get()), context_getter_(context_getter), task_runner_(task_runner), is_completed_(false) { diff --git a/components/update_client/background_downloader_win.h b/components/update_client/background_downloader_win.h index 8d7d40c..59113f4 100644 --- a/components/update_client/background_downloader_win.h +++ b/components/update_client/background_downloader_win.h @@ -19,7 +19,6 @@ namespace base { class FilePath; -class MessageLoopProxy; class SingleThreadTaskRunner; } diff --git a/components/update_client/crx_downloader_unittest.cc b/components/update_client/crx_downloader_unittest.cc index 4b80f13..b7551ed 100644 --- a/components/update_client/crx_downloader_unittest.cc +++ b/components/update_client/crx_downloader_unittest.cc @@ -8,9 +8,9 @@ #include "base/files/file_util.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" -#include "base/message_loop/message_loop.h" #include "base/path_service.h" #include "base/run_loop.h" +#include "base/thread_task_runner_handle.h" #include "components/update_client/crx_downloader.h" #include "net/base/net_errors.h" #include "net/url_request/test_url_request_interceptor.h" @@ -96,7 +96,7 @@ CrxDownloaderTest::CrxDownloaderTest() num_download_complete_calls_(0), num_progress_calls_(0), context_(new net::TestURLRequestContextGetter( - base::MessageLoopProxy::current())) { + base::ThreadTaskRunnerHandle::Get())) { } CrxDownloaderTest::~CrxDownloaderTest() { @@ -114,13 +114,15 @@ void CrxDownloaderTest::SetUp() { download_progress_result_ = CrxDownloader::Result(); // Do not use the background downloader in these tests. - crx_downloader_.reset(CrxDownloader::Create(false, context_.get(), - base::MessageLoopProxy::current(), - NULL).release()); + crx_downloader_.reset( + CrxDownloader::Create(false, context_.get(), + base::ThreadTaskRunnerHandle::Get(), + NULL).release()); crx_downloader_->set_progress_callback(progress_callback_); - get_interceptor_.reset(new GetInterceptor(base::MessageLoopProxy::current(), - base::MessageLoopProxy::current())); + get_interceptor_.reset( + new GetInterceptor(base::ThreadTaskRunnerHandle::Get(), + base::ThreadTaskRunnerHandle::Get())); } void CrxDownloaderTest::TearDown() { diff --git a/components/update_client/ping_manager_unittest.cc b/components/update_client/ping_manager_unittest.cc index cfd37e1..64a0f52 100644 --- a/components/update_client/ping_manager_unittest.cc +++ b/components/update_client/ping_manager_unittest.cc @@ -4,8 +4,8 @@ #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" -#include "base/message_loop/message_loop.h" #include "base/run_loop.h" +#include "base/thread_task_runner_handle.h" #include "base/version.h" #include "components/update_client/crx_update_item.h" #include "components/update_client/ping_manager.h" @@ -41,8 +41,8 @@ ComponentUpdaterPingManagerTest::ComponentUpdaterPingManagerTest() { } void ComponentUpdaterPingManagerTest::SetUp() { - config_ = new TestConfigurator(base::MessageLoopProxy::current(), - base::MessageLoopProxy::current()); + config_ = new TestConfigurator(base::ThreadTaskRunnerHandle::Get(), + base::ThreadTaskRunnerHandle::Get()); ping_manager_.reset(new PingManager(*config_)); } @@ -58,7 +58,7 @@ void ComponentUpdaterPingManagerTest::RunThreadsUntilIdle() { // Test is flaky: http://crbug.com/349547 TEST_F(ComponentUpdaterPingManagerTest, DISABLED_PingManagerTest) { scoped_ptr<InterceptorFactory> interceptor_factory( - new InterceptorFactory(base::MessageLoopProxy::current())); + new InterceptorFactory(base::ThreadTaskRunnerHandle::Get())); URLRequestPostInterceptor* interceptor = interceptor_factory->CreateInterceptor(); EXPECT_TRUE(interceptor); diff --git a/components/update_client/request_sender_unittest.cc b/components/update_client/request_sender_unittest.cc index 4c8e1db..459aea5 100644 --- a/components/update_client/request_sender_unittest.cc +++ b/components/update_client/request_sender_unittest.cc @@ -6,8 +6,8 @@ #include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" -#include "base/message_loop/message_loop.h" #include "base/run_loop.h" +#include "base/thread_task_runner_handle.h" #include "components/update_client/request_sender.h" #include "components/update_client/test_configurator.h" #include "components/update_client/url_request_post_interceptor.h" @@ -67,10 +67,10 @@ RequestSenderTest::~RequestSenderTest() { } void RequestSenderTest::SetUp() { - config_ = new TestConfigurator(base::MessageLoopProxy::current(), - base::MessageLoopProxy::current()); + config_ = new TestConfigurator(base::ThreadTaskRunnerHandle::Get(), + base::ThreadTaskRunnerHandle::Get()); interceptor_factory_.reset( - new InterceptorFactory(base::MessageLoopProxy::current())); + new InterceptorFactory(base::ThreadTaskRunnerHandle::Get())); post_interceptor_1 = interceptor_factory_->CreateInterceptorForPath(kUrlPath1); post_interceptor_2 = diff --git a/components/update_client/update_checker_unittest.cc b/components/update_client/update_checker_unittest.cc index 01fd5ef..117aca29 100644 --- a/components/update_client/update_checker_unittest.cc +++ b/components/update_client/update_checker_unittest.cc @@ -9,9 +9,9 @@ #include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" -#include "base/message_loop/message_loop.h" #include "base/path_service.h" #include "base/run_loop.h" +#include "base/thread_task_runner_handle.h" #include "base/version.h" #include "components/update_client/crx_update_item.h" #include "components/update_client/test_configurator.h" @@ -86,10 +86,10 @@ UpdateCheckerTest::~UpdateCheckerTest() { } void UpdateCheckerTest::SetUp() { - config_ = new TestConfigurator(base::MessageLoopProxy::current(), - base::MessageLoopProxy::current()); + config_ = new TestConfigurator(base::ThreadTaskRunnerHandle::Get(), + base::ThreadTaskRunnerHandle::Get()); interceptor_factory_.reset( - new InterceptorFactory(base::MessageLoopProxy::current())); + new InterceptorFactory(base::ThreadTaskRunnerHandle::Get())); post_interceptor_ = interceptor_factory_->CreateInterceptor(); EXPECT_TRUE(post_interceptor_); |