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

Unified Diff: content/browser/download/download_manager_impl_unittest.cc

Issue 11363222: Persist download interrupt reason, both target and current paths, and url_chain. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed ordering of target_path and current_path everywhere to match that of DownloadItemImpl. Created 8 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: content/browser/download/download_manager_impl_unittest.cc
diff --git a/content/browser/download/download_manager_impl_unittest.cc b/content/browser/download/download_manager_impl_unittest.cc
index bc1d9e3239f6adfcc997127e4d4e20c0dfc57bc9..8f37a8b704f8e33844f18c5b27cc3a8544eb28c3 100644
--- a/content/browser/download/download_manager_impl_unittest.cc
+++ b/content/browser/download/download_manager_impl_unittest.cc
@@ -69,13 +69,15 @@ class MockDownloadItemImpl : public DownloadItemImpl {
delegate,
content::DownloadId(),
FilePath(),
- GURL(),
+ FilePath(),
+ std::vector<GURL>(),
GURL(),
base::Time(),
base::Time(),
0,
0,
DownloadItem::IN_PROGRESS,
+ DOWNLOAD_INTERRUPT_REASON_NONE,
false,
net::BoundNetLog()) {}
virtual ~MockDownloadItemImpl() {}
@@ -224,14 +226,16 @@ class MockDownloadItemFactory
virtual DownloadItemImpl* CreatePersistedItem(
DownloadItemImplDelegate* delegate,
DownloadId download_id,
- const FilePath& path,
- const GURL& url,
+ const FilePath& current_path,
+ const FilePath& target_path,
+ const std::vector<GURL>& url_chain,
const GURL& referrer_url,
const base::Time& start_time,
const base::Time& end_time,
int64 received_bytes,
int64 total_bytes,
DownloadItem::DownloadState state,
+ DownloadInterruptReason interrupt_reason,
bool opened,
const net::BoundNetLog& bound_net_log) OVERRIDE;
virtual DownloadItemImpl* CreateActiveItem(
@@ -283,14 +287,16 @@ void MockDownloadItemFactory::RemoveItem(int id) {
DownloadItemImpl* MockDownloadItemFactory::CreatePersistedItem(
DownloadItemImplDelegate* delegate,
DownloadId download_id,
- const FilePath& path,
- const GURL& url,
+ const FilePath& current_path,
+ const FilePath& target_path,
+ const std::vector<GURL>& url_chain,
const GURL& referrer_url,
const base::Time& start_time,
const base::Time& end_time,
int64 received_bytes,
int64 total_bytes,
DownloadItem::DownloadState state,
+ DownloadInterruptReason interrupt_reason,
bool opened,
const net::BoundNetLog& bound_net_log) {
int local_id = download_id.local();
@@ -496,7 +502,7 @@ class DownloadManagerTest : public testing::Test {
++next_download_id_;
info.download_id = DownloadId(kDownloadIdDomain, id);
info.request_handle = DownloadRequestHandle();
- download_manager_->CreateDownloadItem(&info, net::BoundNetLog());
+ download_manager_->CreateDownloadItemInternal(&info, net::BoundNetLog());
DCHECK(mock_download_item_factory_->GetItem(id));
MockDownloadItemImpl& item(*mock_download_item_factory_->GetItem(id));

Powered by Google App Engine
This is Rietveld 408576698