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

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

Issue 2720613002: Downloads: Added transient flag to download item and download database (Closed)
Patch Set: fix tests Created 3 years, 8 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) 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
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,
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
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. Transient items are cleaned up after
143 // completion and not shown in the UI.
144 bool transient;
145
141 // The id and name of the extension that created this download. 146 // The id and name of the extension that created this download.
142 std::string by_ext_id; 147 std::string by_ext_id;
143 std::string by_ext_name; 148 std::string by_ext_name;
144 149
145 // Data slices that have been downloaded so far. The slices must be ordered 150 // Data slices that have been downloaded so far. The slices must be ordered
146 // by their offset. 151 // by their offset.
147 std::vector<DownloadSliceInfo> download_slice_info; 152 std::vector<DownloadSliceInfo> download_slice_info;
148 }; 153 };
149 154
150 } // namespace history 155 } // namespace history
151 156
152 #endif // COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_ROW_H_ 157 #endif // COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_ROW_H_
OLDNEW
« no previous file with comments | « components/history/core/browser/download_database.cc ('k') | components/history/core/browser/download_row.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698