| 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> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 15 #include "components/history/core/browser/download_job_info.h" |
| 15 #include "components/history/core/browser/download_types.h" | 16 #include "components/history/core/browser/download_types.h" |
| 16 #include "url/gurl.h" | 17 #include "url/gurl.h" |
| 17 | 18 |
| 18 namespace history { | 19 namespace history { |
| 19 | 20 |
| 20 // Contains the information that is stored in the download system's persistent | 21 // Contains the information that is stored in the download system's persistent |
| 21 // store (or refers to it). DownloadHistory uses this to communicate with the | 22 // store (or refers to it). DownloadHistory uses this to communicate with the |
| 22 // DownloadDatabase through the HistoryService. | 23 // DownloadDatabase through the HistoryService. |
| 23 struct DownloadRow { | 24 struct DownloadRow { |
| 24 DownloadRow(); | 25 DownloadRow(); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 39 int64_t received, | 40 int64_t received, |
| 40 int64_t total, | 41 int64_t total, |
| 41 DownloadState download_state, | 42 DownloadState download_state, |
| 42 DownloadDangerType danger_type, | 43 DownloadDangerType danger_type, |
| 43 DownloadInterruptReason interrupt_reason, | 44 DownloadInterruptReason interrupt_reason, |
| 44 const std::string& hash, | 45 const std::string& hash, |
| 45 DownloadId id, | 46 DownloadId id, |
| 46 const std::string& guid, | 47 const std::string& guid, |
| 47 bool download_opened, | 48 bool download_opened, |
| 48 const std::string& ext_id, | 49 const std::string& ext_id, |
| 49 const std::string& ext_name); | 50 const std::string& ext_name, |
| 51 const std::vector<DownloadJobInfo>& download_job_info); |
| 50 DownloadRow(const DownloadRow& other); | 52 DownloadRow(const DownloadRow& other); |
| 51 ~DownloadRow(); | 53 ~DownloadRow(); |
| 52 | 54 |
| 53 bool operator==(const DownloadRow&) const; | 55 bool operator==(const DownloadRow&) const; |
| 54 | 56 |
| 55 // The current path to the download (potentially different from final if | 57 // The current path to the download (potentially different from final if |
| 56 // download is in progress or interrupted). | 58 // download is in progress or interrupted). |
| 57 base::FilePath current_path; | 59 base::FilePath current_path; |
| 58 | 60 |
| 59 // The target path where the download will go when it's complete. | 61 // The target path where the download will go when it's complete. |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 130 |
| 129 // The GUID of the download in the database. Not changed by UpdateDownload(). | 131 // The GUID of the download in the database. Not changed by UpdateDownload(). |
| 130 std::string guid; | 132 std::string guid; |
| 131 | 133 |
| 132 // Whether this download has ever been opened from the browser. | 134 // Whether this download has ever been opened from the browser. |
| 133 bool opened; | 135 bool opened; |
| 134 | 136 |
| 135 // The id and name of the extension that created this download. | 137 // The id and name of the extension that created this download. |
| 136 std::string by_ext_id; | 138 std::string by_ext_id; |
| 137 std::string by_ext_name; | 139 std::string by_ext_name; |
| 140 |
| 141 std::vector<DownloadJobInfo> download_job_info; |
| 138 }; | 142 }; |
| 139 | 143 |
| 140 } // namespace history | 144 } // namespace history |
| 141 | 145 |
| 142 #endif // COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_ROW_H_ | 146 #endif // COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_ROW_H_ |
| OLD | NEW |