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

Unified Diff: components/update_client/crx_downloader_unittest.cc

Issue 1144153004: components: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 7 months 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: components/update_client/crx_downloader_unittest.cc
diff --git a/components/update_client/crx_downloader_unittest.cc b/components/update_client/crx_downloader_unittest.cc
index 4b80f13e86ccf0dea0dd0ea027fb0be609f19c5f..b7551ed5cfc2569f0ad5bde24d76186d1304581f 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() {
« no previous file with comments | « components/update_client/background_downloader_win.cc ('k') | components/update_client/ping_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698