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

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

Issue 2665243003: add a download slices table into history download db (Closed)
Patch Set: use Select changes() instead of select count(*) Created 3 years, 10 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 26 matching lines...) Expand all
37 int64_t received, 37 int64_t received,
38 int64_t total, 38 int64_t total,
39 DownloadState download_state, 39 DownloadState download_state,
40 DownloadDangerType danger_type, 40 DownloadDangerType danger_type,
41 DownloadInterruptReason interrupt_reason, 41 DownloadInterruptReason interrupt_reason,
42 const std::string& hash, 42 const std::string& hash,
43 DownloadId id, 43 DownloadId id,
44 const std::string& guid, 44 const std::string& guid,
45 bool download_opened, 45 bool download_opened,
46 const std::string& ext_id, 46 const std::string& ext_id,
47 const std::string& ext_name) 47 const std::string& ext_name,
48 const std::vector<DownloadJobInfo>& download_job_info)
48 : current_path(current_path), 49 : current_path(current_path),
49 target_path(target_path), 50 target_path(target_path),
50 url_chain(url_chain), 51 url_chain(url_chain),
51 referrer_url(referrer_url), 52 referrer_url(referrer_url),
52 site_url(site_url), 53 site_url(site_url),
53 tab_url(tab_url), 54 tab_url(tab_url),
54 tab_referrer_url(tab_referrer_url), 55 tab_referrer_url(tab_referrer_url),
55 http_method(http_method), 56 http_method(http_method),
56 mime_type(mime_type), 57 mime_type(mime_type),
57 original_mime_type(original_mime_type), 58 original_mime_type(original_mime_type),
58 start_time(start), 59 start_time(start),
59 end_time(end), 60 end_time(end),
60 etag(etag), 61 etag(etag),
61 last_modified(last_modified), 62 last_modified(last_modified),
62 received_bytes(received), 63 received_bytes(received),
63 total_bytes(total), 64 total_bytes(total),
64 state(download_state), 65 state(download_state),
65 danger_type(danger_type), 66 danger_type(danger_type),
66 interrupt_reason(interrupt_reason), 67 interrupt_reason(interrupt_reason),
67 hash(hash), 68 hash(hash),
68 id(id), 69 id(id),
69 guid(guid), 70 guid(guid),
70 opened(download_opened), 71 opened(download_opened),
71 by_ext_id(ext_id), 72 by_ext_id(ext_id),
72 by_ext_name(ext_name) {} 73 by_ext_name(ext_name),
74 download_job_info(download_job_info) {}
73 75
74 DownloadRow::DownloadRow(const DownloadRow& other) = default; 76 DownloadRow::DownloadRow(const DownloadRow& other) = default;
75 77
76 DownloadRow::~DownloadRow() {} 78 DownloadRow::~DownloadRow() {}
77 79
78 bool DownloadRow::operator==(const DownloadRow& rhs) const { 80 bool DownloadRow::operator==(const DownloadRow& rhs) const {
79 return current_path == rhs.current_path && target_path == rhs.target_path && 81 return current_path == rhs.current_path && target_path == rhs.target_path &&
80 url_chain == rhs.url_chain && referrer_url == rhs.referrer_url && 82 url_chain == rhs.url_chain && referrer_url == rhs.referrer_url &&
81 site_url == rhs.site_url && tab_url == rhs.tab_url && 83 site_url == rhs.site_url && tab_url == rhs.tab_url &&
82 tab_referrer_url == rhs.tab_referrer_url && 84 tab_referrer_url == rhs.tab_referrer_url &&
83 http_method == rhs.http_method && mime_type == rhs.mime_type && 85 http_method == rhs.http_method && mime_type == rhs.mime_type &&
84 original_mime_type == rhs.original_mime_type && 86 original_mime_type == rhs.original_mime_type &&
85 start_time == rhs.start_time && end_time == rhs.end_time && 87 start_time == rhs.start_time && end_time == rhs.end_time &&
86 etag == rhs.etag && last_modified == rhs.last_modified && 88 etag == rhs.etag && last_modified == rhs.last_modified &&
87 received_bytes == rhs.received_bytes && 89 received_bytes == rhs.received_bytes &&
88 total_bytes == rhs.total_bytes && state == rhs.state && 90 total_bytes == rhs.total_bytes && state == rhs.state &&
89 danger_type == rhs.danger_type && 91 danger_type == rhs.danger_type &&
90 interrupt_reason == rhs.interrupt_reason && hash == rhs.hash && 92 interrupt_reason == rhs.interrupt_reason && hash == rhs.hash &&
91 id == rhs.id && guid == rhs.guid && opened == rhs.opened && 93 id == rhs.id && guid == rhs.guid && opened == rhs.opened &&
92 by_ext_id == rhs.by_ext_id && by_ext_name == rhs.by_ext_name; 94 by_ext_id == rhs.by_ext_id && by_ext_name == rhs.by_ext_name &&
95 download_job_info == rhs.download_job_info;
93 } 96 }
94 97
95 } // namespace history 98 } // namespace history
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698