| 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 10 matching lines...) Expand all Loading... |
| 21 // 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 |
| 22 // store (or refers to it). Managed by the DownloadItem. When used to create a | 22 // store (or refers to it). Managed by the DownloadItem. When used to create a |
| 23 // history entry, all fields except for |db_handle| are set by DownloadItem and | 23 // history entry, all fields except for |db_handle| are set by DownloadItem and |
| 24 // read by DownloadDatabase. When used to update a history entry, DownloadItem | 24 // read by DownloadDatabase. When used to update a history entry, DownloadItem |
| 25 // sets all fields, but DownloadDatabase only reads |end_time|, | 25 // sets all fields, but DownloadDatabase only reads |end_time|, |
| 26 // |received_bytes|, |state|, and |opened|, and uses |db_handle| to select the | 26 // |received_bytes|, |state|, and |opened|, and uses |db_handle| to select the |
| 27 // row in the database table to update. When used to load DownloadItems from | 27 // row in the database table to update. When used to load DownloadItems from |
| 28 // the history, all fields except |referrer_url| are set by the DownloadDatabase | 28 // the history, all fields except |referrer_url| are set by the DownloadDatabase |
| 29 // and read by the DownloadItem. | 29 // and read by the DownloadItem. |
| 30 struct CONTENT_EXPORT DownloadPersistentStoreInfo { | 30 struct CONTENT_EXPORT DownloadPersistentStoreInfo { |
| 31 // TODO(ahendrickson) -- Reduce the number of constructors. | |
| 32 DownloadPersistentStoreInfo(); | 31 DownloadPersistentStoreInfo(); |
| 33 DownloadPersistentStoreInfo(const FilePath& path, | 32 DownloadPersistentStoreInfo(const FilePath& path, |
| 34 const GURL& url, | 33 const GURL& url, |
| 35 const GURL& referrer, | 34 const GURL& referrer, |
| 36 const base::Time& start, | 35 const base::Time& start, |
| 37 const base::Time& end, | 36 const base::Time& end, |
| 38 int64 received, | 37 int64 received, |
| 39 int64 total, | 38 int64 total, |
| 40 int32 download_state, | 39 int32 download_state, |
| 41 int64 handle, | 40 int64 handle, |
| (...skipping 27 matching lines...) Expand all Loading... |
| 69 | 68 |
| 70 // The handle of the download in the database. Is not changed by | 69 // The handle of the download in the database. Is not changed by |
| 71 // UpdateEntry(). | 70 // UpdateEntry(). |
| 72 int64 db_handle; | 71 int64 db_handle; |
| 73 | 72 |
| 74 // Whether this download has ever been opened from the browser. | 73 // Whether this download has ever been opened from the browser. |
| 75 bool opened; | 74 bool opened; |
| 76 }; | 75 }; |
| 77 | 76 |
| 78 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_PERSISTENT_STORE_INFO_H_ | 77 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_PERSISTENT_STORE_INFO_H_ |
| OLD | NEW |