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

Side by Side Diff: components/history/core/browser/download_row.cc

Issue 2705283003: Added last_access_time to DownloadItem and History DB (Closed)
Patch Set: rebase origin/master 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/history/core/browser/download_row.h" 5 #include "components/history/core/browser/download_row.h"
6 6
7 #include "components/history/core/browser/download_constants.h" 7 #include "components/history/core/browser/download_constants.h"
8 8
9 namespace history { 9 namespace history {
10 10
(...skipping 13 matching lines...) Expand all
24 const base::FilePath& current_path, 24 const base::FilePath& current_path,
25 const base::FilePath& target_path, 25 const base::FilePath& target_path,
26 const std::vector<GURL>& url_chain, 26 const std::vector<GURL>& url_chain,
27 const GURL& referrer_url, 27 const GURL& referrer_url,
28 const GURL& site_url, 28 const GURL& site_url,
29 const GURL& tab_url, 29 const GURL& tab_url,
30 const GURL& tab_referrer_url, 30 const GURL& tab_referrer_url,
31 const std::string& http_method, 31 const std::string& http_method,
32 const std::string& mime_type, 32 const std::string& mime_type,
33 const std::string& original_mime_type, 33 const std::string& original_mime_type,
34 const base::Time& start, 34 base::Time start,
35 const base::Time& end, 35 base::Time end,
36 const std::string& etag, 36 const std::string& etag,
37 const std::string& last_modified, 37 const std::string& last_modified,
38 int64_t received, 38 int64_t received,
39 int64_t total, 39 int64_t total,
40 DownloadState download_state, 40 DownloadState download_state,
41 DownloadDangerType danger_type, 41 DownloadDangerType danger_type,
42 DownloadInterruptReason interrupt_reason, 42 DownloadInterruptReason interrupt_reason,
43 const std::string& hash, 43 const std::string& hash,
44 DownloadId id, 44 DownloadId id,
45 const std::string& guid, 45 const std::string& guid,
46 bool download_opened, 46 bool download_opened,
47 base::Time last_access,
47 const std::string& ext_id, 48 const std::string& ext_id,
48 const std::string& ext_name, 49 const std::string& ext_name,
49 const std::vector<DownloadSliceInfo>& download_slice_info) 50 const std::vector<DownloadSliceInfo>& download_slice_info)
50 : current_path(current_path), 51 : current_path(current_path),
51 target_path(target_path), 52 target_path(target_path),
52 url_chain(url_chain), 53 url_chain(url_chain),
53 referrer_url(referrer_url), 54 referrer_url(referrer_url),
54 site_url(site_url), 55 site_url(site_url),
55 tab_url(tab_url), 56 tab_url(tab_url),
56 tab_referrer_url(tab_referrer_url), 57 tab_referrer_url(tab_referrer_url),
57 http_method(http_method), 58 http_method(http_method),
58 mime_type(mime_type), 59 mime_type(mime_type),
59 original_mime_type(original_mime_type), 60 original_mime_type(original_mime_type),
60 start_time(start), 61 start_time(start),
61 end_time(end), 62 end_time(end),
62 etag(etag), 63 etag(etag),
63 last_modified(last_modified), 64 last_modified(last_modified),
64 received_bytes(received), 65 received_bytes(received),
65 total_bytes(total), 66 total_bytes(total),
66 state(download_state), 67 state(download_state),
67 danger_type(danger_type), 68 danger_type(danger_type),
68 interrupt_reason(interrupt_reason), 69 interrupt_reason(interrupt_reason),
69 hash(hash), 70 hash(hash),
70 id(id), 71 id(id),
71 guid(guid), 72 guid(guid),
72 opened(download_opened), 73 opened(download_opened),
74 last_access_time(last_access),
73 by_ext_id(ext_id), 75 by_ext_id(ext_id),
74 by_ext_name(ext_name), 76 by_ext_name(ext_name),
75 download_slice_info(download_slice_info) {} 77 download_slice_info(download_slice_info) {}
76 78
77 DownloadRow::DownloadRow(const DownloadRow& other) = default; 79 DownloadRow::DownloadRow(const DownloadRow& other) = default;
78 80
79 DownloadRow::~DownloadRow() {} 81 DownloadRow::~DownloadRow() {}
80 82
81 bool DownloadRow::operator==(const DownloadRow& rhs) const { 83 bool DownloadRow::operator==(const DownloadRow& rhs) const {
82 return current_path == rhs.current_path && target_path == rhs.target_path && 84 return current_path == rhs.current_path && target_path == rhs.target_path &&
83 url_chain == rhs.url_chain && referrer_url == rhs.referrer_url && 85 url_chain == rhs.url_chain && referrer_url == rhs.referrer_url &&
84 site_url == rhs.site_url && tab_url == rhs.tab_url && 86 site_url == rhs.site_url && tab_url == rhs.tab_url &&
85 tab_referrer_url == rhs.tab_referrer_url && 87 tab_referrer_url == rhs.tab_referrer_url &&
86 http_method == rhs.http_method && mime_type == rhs.mime_type && 88 http_method == rhs.http_method && mime_type == rhs.mime_type &&
87 original_mime_type == rhs.original_mime_type && 89 original_mime_type == rhs.original_mime_type &&
88 start_time == rhs.start_time && end_time == rhs.end_time && 90 start_time == rhs.start_time && end_time == rhs.end_time &&
89 etag == rhs.etag && last_modified == rhs.last_modified && 91 etag == rhs.etag && last_modified == rhs.last_modified &&
90 received_bytes == rhs.received_bytes && 92 received_bytes == rhs.received_bytes &&
91 total_bytes == rhs.total_bytes && state == rhs.state && 93 total_bytes == rhs.total_bytes && state == rhs.state &&
92 danger_type == rhs.danger_type && 94 danger_type == rhs.danger_type &&
93 interrupt_reason == rhs.interrupt_reason && hash == rhs.hash && 95 interrupt_reason == rhs.interrupt_reason && hash == rhs.hash &&
94 id == rhs.id && guid == rhs.guid && opened == rhs.opened && 96 id == rhs.id && guid == rhs.guid && opened == rhs.opened &&
97 last_access_time == rhs.last_access_time &&
95 by_ext_id == rhs.by_ext_id && by_ext_name == rhs.by_ext_name && 98 by_ext_id == rhs.by_ext_id && by_ext_name == rhs.by_ext_name &&
96 download_slice_info == rhs.download_slice_info; 99 download_slice_info == rhs.download_slice_info;
97 } 100 }
98 101
99 } // namespace history 102 } // namespace history
OLDNEW
« no previous file with comments | « components/history/core/browser/download_row.h ('k') | components/history/core/browser/history_backend_db_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698