OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_ROW_H_ | 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_ROW_H_ |
6 #define COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_ROW_H_ | 6 #define COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_ROW_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 29 matching lines...) Expand all Loading... | |
40 int64_t received, | 40 int64_t received, |
41 int64_t total, | 41 int64_t total, |
42 DownloadState download_state, | 42 DownloadState download_state, |
43 DownloadDangerType danger_type, | 43 DownloadDangerType danger_type, |
44 DownloadInterruptReason interrupt_reason, | 44 DownloadInterruptReason interrupt_reason, |
45 const std::string& hash, | 45 const std::string& hash, |
46 DownloadId id, | 46 DownloadId id, |
47 const std::string& guid, | 47 const std::string& guid, |
48 bool download_opened, | 48 bool download_opened, |
49 base::Time last_access, | 49 base::Time last_access, |
50 bool transient, | |
brettw
2017/03/29 22:54:13
This constructor has gotten absurd. I took too lon
shaktisahu
2017/03/29 23:46:47
I agree, it is really big constructor! But, in my
brettw
2017/03/30 16:44:43
I agree there is some benefit as you decribe, but
| |
50 const std::string& ext_id, | 51 const std::string& ext_id, |
51 const std::string& ext_name, | 52 const std::string& ext_name, |
52 const std::vector<DownloadSliceInfo>& download_slice_info); | 53 const std::vector<DownloadSliceInfo>& download_slice_info); |
53 DownloadRow(const DownloadRow& other); | 54 DownloadRow(const DownloadRow& other); |
54 ~DownloadRow(); | 55 ~DownloadRow(); |
55 | 56 |
56 bool operator==(const DownloadRow&) const; | 57 bool operator==(const DownloadRow&) const; |
57 | 58 |
58 // The current path to the download (potentially different from final if | 59 // The current path to the download (potentially different from final if |
59 // download is in progress or interrupted). | 60 // download is in progress or interrupted). |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
131 | 132 |
132 // The GUID of the download in the database. Not changed by UpdateDownload(). | 133 // The GUID of the download in the database. Not changed by UpdateDownload(). |
133 std::string guid; | 134 std::string guid; |
134 | 135 |
135 // Whether this download has ever been opened from the browser. | 136 // Whether this download has ever been opened from the browser. |
136 bool opened; | 137 bool opened; |
137 | 138 |
138 // The time when the download was last accessed. | 139 // The time when the download was last accessed. |
139 base::Time last_access_time; | 140 base::Time last_access_time; |
140 | 141 |
142 // Whether this download is transient. | |
brettw
2017/03/29 22:54:13
Can this comment define what transient means? I'm
shaktisahu
2017/03/29 23:46:47
Done.
| |
143 bool transient; | |
144 | |
141 // The id and name of the extension that created this download. | 145 // The id and name of the extension that created this download. |
142 std::string by_ext_id; | 146 std::string by_ext_id; |
143 std::string by_ext_name; | 147 std::string by_ext_name; |
144 | 148 |
145 // Data slices that have been downloaded so far. The slices must be ordered | 149 // Data slices that have been downloaded so far. The slices must be ordered |
146 // by their offset. | 150 // by their offset. |
147 std::vector<DownloadSliceInfo> download_slice_info; | 151 std::vector<DownloadSliceInfo> download_slice_info; |
148 }; | 152 }; |
149 | 153 |
150 } // namespace history | 154 } // namespace history |
151 | 155 |
152 #endif // COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_ROW_H_ | 156 #endif // COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_ROW_H_ |
OLD | NEW |