OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_ |
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_ | 6 #define CONTENT_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 "content/browser/download/download_file.h" | 15 #include "content/browser/download/download_file.h" |
16 #include "content/common/content_export.h" | 16 #include "content/common/content_export.h" |
17 #include "content/public/browser/download_id.h" | 17 #include "content/public/browser/download_id.h" |
18 #include "content/public/browser/download_save_info.h" | 18 #include "content/public/browser/download_save_info.h" |
19 #include "content/public/common/page_transition_types.h" | 19 #include "content/public/common/page_transition_types.h" |
20 #include "googleurl/src/gurl.h" | 20 #include "googleurl/src/gurl.h" |
21 #include "net/base/net_log.h" | 21 #include "net/base/net_log.h" |
22 | 22 |
| 23 namespace content { |
| 24 class ByteStream; |
| 25 } |
| 26 |
23 // Used for informing the download manager of a new download, since we don't | 27 // Used for informing the download manager of a new download, since we don't |
24 // want to pass |DownloadItem|s between threads. | 28 // want to pass |DownloadItem|s between threads. |
25 struct CONTENT_EXPORT DownloadCreateInfo { | 29 struct CONTENT_EXPORT DownloadCreateInfo { |
26 DownloadCreateInfo(const base::Time& start_time, | 30 DownloadCreateInfo(const base::Time& start_time, |
27 int64 received_bytes, | 31 int64 received_bytes, |
28 int64 total_bytes, | 32 int64 total_bytes, |
29 int32 state, | 33 int32 state, |
30 const net::BoundNetLog& bound_net_log, | 34 const net::BoundNetLog& bound_net_log, |
31 bool has_user_gesture, | 35 bool has_user_gesture, |
32 content::PageTransition transition_type); | 36 content::PageTransition transition_type); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 // It's used to construct a suggested filename. | 101 // It's used to construct a suggested filename. |
98 std::string referrer_charset; | 102 std::string referrer_charset; |
99 | 103 |
100 // The download file save info. | 104 // The download file save info. |
101 content::DownloadSaveInfo save_info; | 105 content::DownloadSaveInfo save_info; |
102 | 106 |
103 // The remote IP address where the download was fetched from. Copied from | 107 // The remote IP address where the download was fetched from. Copied from |
104 // UrlRequest::GetSocketAddress(). | 108 // UrlRequest::GetSocketAddress(). |
105 std::string remote_address; | 109 std::string remote_address; |
106 | 110 |
| 111 // Pipe through which we will send data downstream. |
| 112 scoped_refptr<content::ByteStream> pipe; |
| 113 |
107 // The request's |BoundNetLog|, for "source_dependency" linking with the | 114 // The request's |BoundNetLog|, for "source_dependency" linking with the |
108 // download item's. | 115 // download item's. |
109 const net::BoundNetLog request_bound_net_log; | 116 const net::BoundNetLog request_bound_net_log; |
110 }; | 117 }; |
111 | 118 |
112 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_ | 119 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_ |
OLD | NEW |