| 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 15 matching lines...) Expand all Loading... |
| 26 DownloadRow(const base::FilePath& current_path, | 26 DownloadRow(const base::FilePath& current_path, |
| 27 const base::FilePath& target_path, | 27 const base::FilePath& target_path, |
| 28 const std::vector<GURL>& url_chain, | 28 const std::vector<GURL>& url_chain, |
| 29 const GURL& referrer_url, | 29 const GURL& referrer_url, |
| 30 const GURL& site_url, | 30 const GURL& site_url, |
| 31 const GURL& tab_url, | 31 const GURL& tab_url, |
| 32 const GURL& tab_referrer_url, | 32 const GURL& tab_referrer_url, |
| 33 const std::string& http_method, | 33 const std::string& http_method, |
| 34 const std::string& mime_type, | 34 const std::string& mime_type, |
| 35 const std::string& original_mime_type, | 35 const std::string& original_mime_type, |
| 36 const base::Time& start, | 36 base::Time start, |
| 37 const base::Time& end, | 37 base::Time end, |
| 38 const std::string& etag, | 38 const std::string& etag, |
| 39 const std::string& last_modified, | 39 const std::string& last_modified, |
| 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 const std::string& ext_id, | 50 const std::string& ext_id, |
| 50 const std::string& ext_name, | 51 const std::string& ext_name, |
| 51 const std::vector<DownloadSliceInfo>& download_slice_info); | 52 const std::vector<DownloadSliceInfo>& download_slice_info); |
| 52 DownloadRow(const DownloadRow& other); | 53 DownloadRow(const DownloadRow& other); |
| 53 ~DownloadRow(); | 54 ~DownloadRow(); |
| 54 | 55 |
| 55 bool operator==(const DownloadRow&) const; | 56 bool operator==(const DownloadRow&) const; |
| 56 | 57 |
| 57 // The current path to the download (potentially different from final if | 58 // The current path to the download (potentially different from final if |
| 58 // download is in progress or interrupted). | 59 // download is in progress or interrupted). |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 // Note: This field should be considered deprecated in favor of |guid| below. | 128 // Note: This field should be considered deprecated in favor of |guid| below. |
| 128 // See http://crbug.com/593020. | 129 // See http://crbug.com/593020. |
| 129 DownloadId id; | 130 DownloadId id; |
| 130 | 131 |
| 131 // The GUID of the download in the database. Not changed by UpdateDownload(). | 132 // The GUID of the download in the database. Not changed by UpdateDownload(). |
| 132 std::string guid; | 133 std::string guid; |
| 133 | 134 |
| 134 // Whether this download has ever been opened from the browser. | 135 // Whether this download has ever been opened from the browser. |
| 135 bool opened; | 136 bool opened; |
| 136 | 137 |
| 138 // The time when the download was last accessed. |
| 139 base::Time last_access_time; |
| 140 |
| 137 // The id and name of the extension that created this download. | 141 // The id and name of the extension that created this download. |
| 138 std::string by_ext_id; | 142 std::string by_ext_id; |
| 139 std::string by_ext_name; | 143 std::string by_ext_name; |
| 140 | 144 |
| 141 // Data slices that have been downloaded so far. The slices must be ordered | 145 // Data slices that have been downloaded so far. The slices must be ordered |
| 142 // by their offset. | 146 // by their offset. |
| 143 std::vector<DownloadSliceInfo> download_slice_info; | 147 std::vector<DownloadSliceInfo> download_slice_info; |
| 144 }; | 148 }; |
| 145 | 149 |
| 146 } // namespace history | 150 } // namespace history |
| 147 | 151 |
| 148 #endif // COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_ROW_H_ | 152 #endif // COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_ROW_H_ |
| OLD | NEW |