Chromium Code Reviews| Index: content/browser/download/download_persistent_store_info.h |
| diff --git a/content/browser/download/download_persistent_store_info.h b/content/browser/download/download_persistent_store_info.h |
| index 84a2b990f12c306cea1c921463651c798cd1bf31..523620ef55aaa92007e2780316650c89e390f846 100644 |
| --- a/content/browser/download/download_persistent_store_info.h |
| +++ b/content/browser/download/download_persistent_store_info.h |
| @@ -9,10 +9,12 @@ |
| #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_PERSISTENT_STORE_INFO_H_ |
| #pragma once |
| +#include <string> |
| #include <vector> |
| #include "base/file_path.h" |
| #include "base/time.h" |
| +#include "content/browser/download/interrupt_reasons.h" |
| #include "content/common/content_export.h" |
| #include "googleurl/src/gurl.h" |
| @@ -28,9 +30,9 @@ class DownloadItem; |
| // the history, all fields except |referrer_url| are set by the DownloadDatabase |
| // and read by the DownloadItem. |
| struct CONTENT_EXPORT DownloadPersistentStoreInfo { |
| - // TODO(ahendrickson) -- Reduce the number of constructors. |
| DownloadPersistentStoreInfo(); |
| DownloadPersistentStoreInfo(const FilePath& path, |
| + const FilePath& target, |
| const GURL& url, |
| const GURL& referrer, |
| const base::Time& start, |
| @@ -39,12 +41,19 @@ struct CONTENT_EXPORT DownloadPersistentStoreInfo { |
| int64 total, |
| int32 download_state, |
| int64 handle, |
| - bool download_opened); |
| + bool download_opened, |
| + const std::string& hash_state_pickle, |
|
Randy Smith (Not in Mondays)
2011/11/22 17:37:49
nit: I'd like to use consistent vocabulary for thi
ahendrickson
2011/11/22 23:46:44
Done.
|
| + const std::string& last_modified, |
| + const std::string& etag, |
| + InterruptReason reason); |
| ~DownloadPersistentStoreInfo(); // For linux-clang. |
| - // The final path where the download is saved. |
| + // The file name that we are currently using. |
| FilePath path; |
| + // The final path where the download will be saved. |
| + FilePath target_name; |
| + |
| // The URL from which we are downloading. This is the final URL after any |
| // redirection by the server for |url_chain|. Is not changed by UpdateEntry(). |
| GURL url; |
| @@ -73,6 +82,18 @@ struct CONTENT_EXPORT DownloadPersistentStoreInfo { |
| // Whether this download has ever been opened from the browser. |
| bool opened; |
| + |
| + // The state of the Sha256 hash of the content. |
| + std::string hash_state; |
| + |
| + // Server's time stamp for the file. |
| + std::string last_modified_time; |
| + |
| + // Server's ETAG for the file. |
| + std::string etag; |
| + |
| + // The reason that the download was interrupted (if it was). |
| + InterruptReason last_reason; |
| }; |
| #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_PERSISTENT_STORE_INFO_H_ |