| 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 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_ | 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_ |
| 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_ | 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/file_path.h" | 13 #include "base/file_path.h" |
| 14 #include "base/time.h" | 14 #include "base/time.h" |
| 15 #include "chrome/browser/download/download_file.h" | 15 #include "chrome/browser/download/download_file.h" |
| 16 #include "chrome/browser/download/download_process_handle.h" | 16 #include "chrome/browser/download/download_request_handle.h" |
| 17 #include "googleurl/src/gurl.h" | 17 #include "googleurl/src/gurl.h" |
| 18 | 18 |
| 19 // Used for informing the download manager of a new download, since we don't | 19 // Used for informing the download manager of a new download, since we don't |
| 20 // want to pass |DownloadItem|s between threads. | 20 // want to pass |DownloadItem|s between threads. |
| 21 struct DownloadCreateInfo { | 21 struct DownloadCreateInfo { |
| 22 DownloadCreateInfo(const FilePath& path, | 22 DownloadCreateInfo(const FilePath& path, |
| 23 const GURL& url, | 23 const GURL& url, |
| 24 const base::Time& start_time, | 24 const base::Time& start_time, |
| 25 int64 received_bytes, | 25 int64 received_bytes, |
| 26 int64 total_bytes, | 26 int64 total_bytes, |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 64 |
| 65 // The current state of the download. | 65 // The current state of the download. |
| 66 int32 state; | 66 int32 state; |
| 67 | 67 |
| 68 // The (per-session) ID of the download. | 68 // The (per-session) ID of the download. |
| 69 int32 download_id; | 69 int32 download_id; |
| 70 | 70 |
| 71 // True if the download was initiated by user action. | 71 // True if the download was initiated by user action. |
| 72 bool has_user_gesture; | 72 bool has_user_gesture; |
| 73 | 73 |
| 74 // The handle to the process information. Used for operations outside the | 74 // The handle to the download request information. Used for operations |
| 75 // download system. | 75 // outside the download system. |
| 76 DownloadProcessHandle process_handle; | 76 DownloadRequestHandle request_handle; |
| 77 | 77 |
| 78 // The handle of the download in the history database. | 78 // The handle of the download in the history database. |
| 79 int64 db_handle; | 79 int64 db_handle; |
| 80 | 80 |
| 81 // The content-disposition string from the response header. | 81 // The content-disposition string from the response header. |
| 82 std::string content_disposition; | 82 std::string content_disposition; |
| 83 | 83 |
| 84 // The mime type string from the response header (may be overridden). | 84 // The mime type string from the response header (may be overridden). |
| 85 std::string mime_type; | 85 std::string mime_type; |
| 86 | 86 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 103 | 103 |
| 104 // The charset of the referring page where the download request comes from. | 104 // The charset of the referring page where the download request comes from. |
| 105 // It's used to construct a suggested filename. | 105 // It's used to construct a suggested filename. |
| 106 std::string referrer_charset; | 106 std::string referrer_charset; |
| 107 | 107 |
| 108 // The download file save info. | 108 // The download file save info. |
| 109 DownloadSaveInfo save_info; | 109 DownloadSaveInfo save_info; |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_ | 112 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_ |
| OLD | NEW |