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

Unified Diff: chrome/browser/component_updater/test/crx_downloader_unittest.cc

Issue 105853002: Implement a background downloader using BITS in Windows Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed error codes. Created 7 years 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: chrome/browser/component_updater/test/crx_downloader_unittest.cc
diff --git a/chrome/browser/component_updater/test/crx_downloader_unittest.cc b/chrome/browser/component_updater/test/crx_downloader_unittest.cc
index 9de24025c74de28785aa0264af411c01108ff23d..7584f8e4ca2bc0378e09644066e1ae0769029dbd 100644
--- a/chrome/browser/component_updater/test/crx_downloader_unittest.cc
+++ b/chrome/browser/component_updater/test/crx_downloader_unittest.cc
@@ -49,15 +49,14 @@ class CrxDownloaderTest : public testing::Test {
void RunThreads();
void RunThreadsUntilIdle();
- void DownloadComplete(int crx_context,
- int error,
- const base::FilePath& response);
+ void DownloadComplete(int crx_context, const CrxDownloader::Result& result);
protected:
scoped_ptr<CrxDownloader> crx_downloader_;
int crx_context_;
int error_;
+ base::FilePath response_;
int num_calls_;
@@ -93,6 +92,7 @@ CrxDownloaderTest::~CrxDownloaderTest() {
void CrxDownloaderTest::SetUp() {
num_calls_ = 0;
crx_downloader_.reset(CrxDownloader::Create(
+ false, // Do not use the background downloader in these tests.
context_.get(),
blocking_task_runner_,
base::Bind(&CrxDownloaderTest::DownloadComplete,
@@ -107,12 +107,13 @@ void CrxDownloaderTest::Quit() {
quit_closure_.Run();
}
-void CrxDownloaderTest::DownloadComplete(int crx_context,
- int error,
- const base::FilePath& response) {
+void CrxDownloaderTest::DownloadComplete(
+ int crx_context,
+ const CrxDownloader::Result& result) {
++num_calls_;
crx_context_ = crx_context;
- error_ = error;
+ error_ = result.error;
+ response_ = result.response;
Quit();
}

Powered by Google App Engine
This is Rietveld 408576698