| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Download struct used for informing and querying the download system's | 5 // Download struct used for informing and querying the download system's |
| 6 // persitent store. | 6 // persitent store. |
| 7 | 7 |
| 8 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_PERSISTENT_STORE_INFO_H_ | 8 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_PERSISTENT_STORE_INFO_H_ |
| 9 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_PERSISTENT_STORE_INFO_H_ | 9 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_PERSISTENT_STORE_INFO_H_ |
| 10 #pragma once | 10 #pragma once |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // Contains the information that is stored in the download system's persistent | 23 // Contains the information that is stored in the download system's persistent |
| 24 // store (or refers to it). Managed by the DownloadItem. When used to create a | 24 // store (or refers to it). Managed by the DownloadItem. When used to create a |
| 25 // history entry, all fields except for |db_handle| are set by DownloadItem and | 25 // history entry, all fields except for |db_handle| are set by DownloadItem and |
| 26 // read by DownloadDatabase. When used to update a history entry, DownloadItem | 26 // read by DownloadDatabase. When used to update a history entry, DownloadItem |
| 27 // sets all fields, but DownloadDatabase only reads |end_time|, | 27 // sets all fields, but DownloadDatabase only reads |end_time|, |
| 28 // |received_bytes|, |state|, and |opened|, and uses |db_handle| to select the | 28 // |received_bytes|, |state|, and |opened|, and uses |db_handle| to select the |
| 29 // row in the database table to update. When used to load DownloadItems from | 29 // row in the database table to update. When used to load DownloadItems from |
| 30 // the history, all fields except |referrer_url| are set by the DownloadDatabase | 30 // the history, all fields except |referrer_url| are set by the DownloadDatabase |
| 31 // and read by the DownloadItem. | 31 // and read by the DownloadItem. |
| 32 struct CONTENT_EXPORT DownloadPersistentStoreInfo { | 32 struct CONTENT_EXPORT DownloadPersistentStoreInfo { |
| 33 // TODO(ahendrickson) -- Reduce the number of constructors. | |
| 34 DownloadPersistentStoreInfo(); | 33 DownloadPersistentStoreInfo(); |
| 35 DownloadPersistentStoreInfo(const FilePath& path, | 34 DownloadPersistentStoreInfo(const FilePath& path, |
| 36 const GURL& url, | 35 const GURL& url, |
| 37 const GURL& referrer, | 36 const GURL& referrer, |
| 38 const base::Time& start, | 37 const base::Time& start, |
| 39 const base::Time& end, | 38 const base::Time& end, |
| 40 int64 received, | 39 int64 received, |
| 41 int64 total, | 40 int64 total, |
| 42 int32 download_state, | 41 int32 download_state, |
| 43 int64 handle, | 42 int64 handle, |
| (...skipping 27 matching lines...) Expand all Loading... |
| 71 | 70 |
| 72 // The handle of the download in the database. Is not changed by | 71 // The handle of the download in the database. Is not changed by |
| 73 // UpdateEntry(). | 72 // UpdateEntry(). |
| 74 int64 db_handle; | 73 int64 db_handle; |
| 75 | 74 |
| 76 // Whether this download has ever been opened from the browser. | 75 // Whether this download has ever been opened from the browser. |
| 77 bool opened; | 76 bool opened; |
| 78 }; | 77 }; |
| 79 | 78 |
| 80 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_PERSISTENT_STORE_INFO_H_ | 79 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_PERSISTENT_STORE_INFO_H_ |
| OLD | NEW |