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 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "net/log/net_log.h" | 21 #include "net/log/net_log.h" |
22 #include "ui/base/page_transition_types.h" | 22 #include "ui/base/page_transition_types.h" |
23 #include "url/gurl.h" | 23 #include "url/gurl.h" |
24 | 24 |
25 namespace content { | 25 namespace content { |
26 | 26 |
27 // 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 |
28 // want to pass |DownloadItem|s between threads. | 28 // want to pass |DownloadItem|s between threads. |
29 struct CONTENT_EXPORT DownloadCreateInfo { | 29 struct CONTENT_EXPORT DownloadCreateInfo { |
30 DownloadCreateInfo(const base::Time& start_time, | 30 DownloadCreateInfo(const base::Time& start_time, |
31 const net::BoundNetLog& bound_net_log, | 31 const net::NetLogWithSource& net_log, |
32 std::unique_ptr<DownloadSaveInfo> save_info); | 32 std::unique_ptr<DownloadSaveInfo> save_info); |
33 DownloadCreateInfo(); | 33 DownloadCreateInfo(); |
34 ~DownloadCreateInfo(); | 34 ~DownloadCreateInfo(); |
35 | 35 |
36 // The URL from which we are downloading. This is the final URL after any | 36 // The URL from which we are downloading. This is the final URL after any |
37 // redirection by the server for |url_chain|. | 37 // redirection by the server for |url_chain|. |
38 const GURL& url() const; | 38 const GURL& url() const; |
39 | 39 |
40 // The ID of the download. | 40 // The ID of the download. |
41 uint32_t download_id; | 41 uint32_t download_id; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 // response was in error), then |result| would be something other than | 74 // response was in error), then |result| would be something other than |
75 // INTERRUPT_REASON_NONE. | 75 // INTERRUPT_REASON_NONE. |
76 DownloadInterruptReason result; | 76 DownloadInterruptReason result; |
77 | 77 |
78 // The download file save info. | 78 // The download file save info. |
79 std::unique_ptr<DownloadSaveInfo> save_info; | 79 std::unique_ptr<DownloadSaveInfo> save_info; |
80 | 80 |
81 // The handle to the URLRequest sourcing this download. | 81 // The handle to the URLRequest sourcing this download. |
82 std::unique_ptr<DownloadRequestHandleInterface> request_handle; | 82 std::unique_ptr<DownloadRequestHandleInterface> request_handle; |
83 | 83 |
84 // The request's |BoundNetLog|, for "source_dependency" linking with the | 84 // The request's |NetLogWithSource|, for "source_dependency" linking with the |
85 // download item's. | 85 // download item's. |
86 const net::BoundNetLog request_bound_net_log; | 86 const net::NetLogWithSource request_net_log; |
87 | 87 |
88 // --------------------------------------------------------------------------- | 88 // --------------------------------------------------------------------------- |
89 // The remaining fields are Entity-body properties. These are only set if | 89 // The remaining fields are Entity-body properties. These are only set if |
90 // |result| is DOWNLOAD_INTERRUPT_REASON_NONE. | 90 // |result| is DOWNLOAD_INTERRUPT_REASON_NONE. |
91 // --------------------------------------------------------------------------- | 91 // --------------------------------------------------------------------------- |
92 | 92 |
93 // The content-disposition string from the response header. | 93 // The content-disposition string from the response header. |
94 std::string content_disposition; | 94 std::string content_disposition; |
95 | 95 |
96 // The mime type string from the response header (may be overridden). | 96 // The mime type string from the response header (may be overridden). |
(...skipping 12 matching lines...) Expand all Loading... |
109 // For continuing a download, the ETag of the file. | 109 // For continuing a download, the ETag of the file. |
110 std::string etag; | 110 std::string etag; |
111 | 111 |
112 private: | 112 private: |
113 DISALLOW_COPY_AND_ASSIGN(DownloadCreateInfo); | 113 DISALLOW_COPY_AND_ASSIGN(DownloadCreateInfo); |
114 }; | 114 }; |
115 | 115 |
116 } // namespace content | 116 } // namespace content |
117 | 117 |
118 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_ | 118 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_ |
OLD | NEW |