OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 // |
| 5 // Download struct used for informing and querying the history service. |
| 6 |
| 7 #ifndef CHROME_BROWSER_HISTORY_DOWNLOAD_HISTORY_INFO_H_ |
| 8 #define CHROME_BROWSER_HISTORY_DOWNLOAD_HISTORY_INFO_H_ |
| 9 #pragma once |
| 10 |
| 11 #include <vector> |
| 12 |
| 13 #include "base/file_path.h" |
| 14 #include "base/time.h" |
| 15 #include "googleurl/src/gurl.h" |
| 16 |
| 17 class DownloadItem; |
| 18 |
| 19 // Contains the information that is stored in the download history database |
| 20 // (or refers to it). Managed by the DownloadItem. |
| 21 struct DownloadHistoryInfo { |
| 22 // TODO(ahendrickson) -- Reduce the number of constructors. |
| 23 DownloadHistoryInfo(); |
| 24 DownloadHistoryInfo(const FilePath& path, |
| 25 const GURL& url, |
| 26 const GURL& referrer, |
| 27 const base::Time& start, |
| 28 int64 received, |
| 29 int64 total, |
| 30 int32 download_state, |
| 31 int64 handle); |
| 32 ~DownloadHistoryInfo(); // For linux-clang. |
| 33 |
| 34 // The final path where the download is saved. |
| 35 FilePath path; |
| 36 |
| 37 // The URL from which we are downloading. This is the final URL after any |
| 38 // redirection by the server for |url_chain|. |
| 39 GURL url; |
| 40 |
| 41 // The URL that referred us. |
| 42 GURL referrer_url; |
| 43 |
| 44 // The time when the download started. |
| 45 base::Time start_time; |
| 46 |
| 47 // The number of bytes received (so far). |
| 48 int64 received_bytes; |
| 49 |
| 50 // The total number of bytes in the download. |
| 51 int64 total_bytes; |
| 52 |
| 53 // The current state of the download. |
| 54 int32 state; |
| 55 |
| 56 // The handle of the download in the database. |
| 57 int64 db_handle; |
| 58 }; |
| 59 |
| 60 #endif // CHROME_BROWSER_HISTORY_DOWNLOAD_HISTORY_INFO_H_ |
OLD | NEW |