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

Unified Diff: chrome/browser/download/download_history.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: chrome/browser/download/download_history.cc
diff --git a/chrome/browser/download/download_history.cc b/chrome/browser/download/download_history.cc
index e55b5d23891a8f43149a82395ee06cb8e6b383f6..4adf4d64ec25f29c9986b8b7104a33ae5c11b2a7 100644
--- a/chrome/browser/download/download_history.cc
+++ b/chrome/browser/download/download_history.cc
@@ -141,8 +141,8 @@ history::DownloadRow GetDownloadRow(
history::ToHistoryDownloadInterruptReason(item->GetLastReason()),
std::string(), // Hash value (not available yet)
history::ToHistoryDownloadId(item->GetId()), item->GetGuid(),
- item->GetOpened(), item->GetLastAccessTime(), by_ext_id, by_ext_name,
- history::GetHistoryDownloadSliceInfos(*item));
+ item->GetOpened(), item->GetLastAccessTime(), item->IsTransient(),
+ by_ext_id, by_ext_name, history::GetHistoryDownloadSliceInfos(*item));
}
enum class ShouldUpdateHistoryResult {
@@ -179,6 +179,7 @@ ShouldUpdateHistoryResult ShouldUpdateHistory(
(previous->hash != current.hash) ||
(previous->opened != current.opened) ||
(previous->last_access_time != current.last_access_time) ||
+ (previous->transient != current.transient) ||
(previous->by_ext_id != current.by_ext_id) ||
(previous->by_ext_name != current.by_ext_name) ||
(previous->download_slice_info != current.download_slice_info)) {
@@ -299,7 +300,7 @@ void DownloadHistory::QueryCallback(std::unique_ptr<InfoVector> infos) {
history::ToContentDownloadState(it->state),
history::ToContentDownloadDangerType(it->danger_type),
history::ToContentDownloadInterruptReason(it->interrupt_reason),
- it->opened, it->last_access_time,
+ it->opened, it->last_access_time, it->transient,
history::ToContentReceivedSlices(it->download_slice_info));
#if BUILDFLAG(ENABLE_EXTENSIONS)
if (!it->by_ext_id.empty() && !it->by_ext_name.empty()) {
« no previous file with comments | « chrome/browser/browsing_data/downloads_counter_browsertest.cc ('k') | chrome/browser/download/download_history_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698