Index: components/history/core/browser/download_row.cc |
diff --git a/components/history/core/browser/download_row.cc b/components/history/core/browser/download_row.cc |
index 1c97d60277777c62311276a1aebbcd3792331e7c..80055f65b147c1fdad29e6d24d85618fb6024519 100644 |
--- a/components/history/core/browser/download_row.cc |
+++ b/components/history/core/browser/download_row.cc |
@@ -13,6 +13,7 @@ DownloadRow::DownloadRow() |
total_bytes(0), |
state(DownloadState::IN_PROGRESS), |
danger_type(DownloadDangerType::NOT_DANGEROUS), |
+ interrupt_reason(0), |
id(kInvalidDownloadId), |
opened(false) { |
// |interrupt_reason| is left undefined by this constructor as the value |
@@ -23,6 +24,7 @@ DownloadRow::DownloadRow(const base::FilePath& current_path, |
const base::FilePath& target_path, |
const std::vector<GURL>& url_chain, |
const GURL& referrer, |
+ const std::string& http_method, |
const std::string& mime_type, |
const std::string& original_mime_type, |
const base::Time& start, |
@@ -34,7 +36,9 @@ DownloadRow::DownloadRow(const base::FilePath& current_path, |
DownloadState download_state, |
DownloadDangerType danger_type, |
DownloadInterruptReason interrupt_reason, |
+ const std::string& hash, |
DownloadId id, |
+ const std::string& guid, |
bool download_opened, |
const std::string& ext_id, |
const std::string& ext_name) |
@@ -42,6 +46,7 @@ DownloadRow::DownloadRow(const base::FilePath& current_path, |
target_path(target_path), |
url_chain(url_chain), |
referrer_url(referrer), |
+ http_method(http_method), |
mime_type(mime_type), |
original_mime_type(original_mime_type), |
start_time(start), |
@@ -53,14 +58,40 @@ DownloadRow::DownloadRow(const base::FilePath& current_path, |
state(download_state), |
danger_type(danger_type), |
interrupt_reason(interrupt_reason), |
+ hash(hash), |
id(id), |
+ guid(guid), |
opened(download_opened), |
by_ext_id(ext_id), |
by_ext_name(ext_name) {} |
DownloadRow::DownloadRow(const DownloadRow& other) = default; |
-DownloadRow::~DownloadRow() { |
+DownloadRow::~DownloadRow() {} |
+ |
+bool DownloadRow::operator==(const DownloadRow& rhs) const { |
+ return current_path == rhs.current_path && |
+ target_path == rhs.target_path && |
+ url_chain == rhs.url_chain && |
+ referrer_url == rhs.referrer_url && |
+ http_method == rhs.http_method && |
+ mime_type == rhs.mime_type && |
+ original_mime_type == rhs.original_mime_type && |
+ start_time == rhs.start_time && |
+ end_time == rhs.end_time && |
+ etag == rhs.etag && |
+ last_modified == rhs.last_modified && |
+ received_bytes == rhs.received_bytes && |
+ total_bytes == rhs.total_bytes && |
+ state == rhs.state && |
+ danger_type == rhs.danger_type && |
+ interrupt_reason == rhs.interrupt_reason && |
+ hash == rhs.hash && |
+ id == rhs.id && |
+ guid == rhs.guid && |
+ opened == rhs.opened && |
+ by_ext_id == rhs.by_ext_id && |
+ by_ext_name == rhs.by_ext_name; |
} |
} // namespace history |