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..80b3086a1260dc5cea15d31f1a43a530dafa31aa 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,7 +30,6 @@ 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 GURL& url, |
| @@ -39,7 +40,12 @@ struct CONTENT_EXPORT DownloadPersistentStoreInfo { |
| int64 total, |
| int32 download_state, |
| int64 handle, |
| - bool download_opened); |
| + bool download_opened, |
| + int32 local_id, |
| + const std::string& hash, |
| + const std::string& last_modified, |
| + const std::string& etag, |
| + InterruptReason reason); |
| ~DownloadPersistentStoreInfo(); // For linux-clang. |
| // The final path where the download is saved. |
| @@ -73,6 +79,24 @@ struct CONTENT_EXPORT DownloadPersistentStoreInfo { |
| // Whether this download has ever been opened from the browser. |
| bool opened; |
| + |
| + // The local ID of the download (unique per profile, and therefore per |
| + // history database). |
| + int32 local_id; |
|
Randy Smith (Not in Mondays)
2011/11/16 18:29:27
Why do we want to persist this? It's namespace is
ahendrickson
2011/11/19 20:18:03
Removed.
|
| + |
| + // Sha256 hash of the content. This might be empty either because |
| + // the download hasn't started yet or because the hash isn't needed |
| + // (ChromeDownloadManagerDelegate::GenerateFileHash() returned false). |
| + std::string hash; |
| + |
| + // Server's time stamp for the file. |
| + std::string last_modified_time; |
| + |
| + // Server's ETAG for the file. |
| + std::string etag; |
| + |
| + // Last reason. |
|
Randy Smith (Not in Mondays)
2011/11/16 18:29:27
A bit more of a comment here? Duplicating the var
ahendrickson
2011/11/19 20:18:03
Done.
|
| + InterruptReason last_reason; |
| }; |
| #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_PERSISTENT_STORE_INFO_H_ |