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

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

Issue 2720613002: Downloads: Added transient flag to download item and download database (Closed)
Patch Set: fix tests Created 3 years, 9 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: content/browser/download/download_manager_impl.cc
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc
index ab6cf47d7c52378d79a1564ee584f4d734639fdb..83c279fc8e517e69c10ffb0f5fb15c8afca7f168 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -142,6 +142,7 @@ class DownloadItemFactoryImpl : public DownloadItemFactory {
DownloadInterruptReason interrupt_reason,
bool opened,
base::Time last_access_time,
+ bool transient,
const std::vector<DownloadItem::ReceivedSlice>& received_slices,
const net::NetLogWithSource& net_log) override {
return new DownloadItemImpl(
@@ -149,7 +150,7 @@ class DownloadItemFactoryImpl : public DownloadItemFactory {
referrer_url, site_url, tab_url, tab_refererr_url, mime_type,
original_mime_type, start_time, end_time, etag, last_modified,
received_bytes, total_bytes, hash, state, danger_type, interrupt_reason,
- opened, last_access_time, received_slices, net_log);
+ opened, last_access_time, transient, received_slices, net_log);
}
DownloadItemImpl* CreateActiveItem(
@@ -653,6 +654,7 @@ DownloadItem* DownloadManagerImpl::CreateDownloadItem(
DownloadInterruptReason interrupt_reason,
bool opened,
base::Time last_access_time,
+ bool transient,
const std::vector<DownloadItem::ReceivedSlice>& received_slices) {
if (base::ContainsKey(downloads_, id)) {
NOTREACHED();
@@ -664,7 +666,7 @@ DownloadItem* DownloadManagerImpl::CreateDownloadItem(
site_url, tab_url, tab_refererr_url, mime_type, original_mime_type,
start_time, end_time, etag, last_modified, received_bytes, total_bytes,
hash, state, danger_type, interrupt_reason, opened, last_access_time,
- received_slices,
+ transient, received_slices,
net::NetLogWithSource::Make(net_log_, net::NetLogSourceType::DOWNLOAD));
downloads_[id] = base::WrapUnique(item);
downloads_by_guid_[guid] = item;
« no previous file with comments | « content/browser/download/download_manager_impl.h ('k') | content/browser/download/download_manager_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698