| 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> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/optional.h" | 15 #include "base/optional.h" |
| 16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
| 17 #include "content/browser/download/download_file.h" | 17 #include "content/browser/download/download_file.h" |
| 18 #include "content/browser/download/download_request_handle.h" | 18 #include "content/browser/download/download_request_handle.h" |
| 19 #include "content/common/content_export.h" | 19 #include "content/common/content_export.h" |
| 20 #include "content/public/browser/download_interrupt_reasons.h" | 20 #include "content/public/browser/download_interrupt_reasons.h" |
| 21 #include "content/public/browser/download_save_info.h" | 21 #include "content/public/browser/download_save_info.h" |
| 22 #include "net/http/http_response_info.h" |
| 22 #include "net/log/net_log_with_source.h" | 23 #include "net/log/net_log_with_source.h" |
| 23 #include "ui/base/page_transition_types.h" | 24 #include "ui/base/page_transition_types.h" |
| 24 #include "url/gurl.h" | 25 #include "url/gurl.h" |
| 25 | 26 |
| 26 namespace content { | 27 namespace content { |
| 27 | 28 |
| 28 // Used for informing the download manager of a new download, since we don't | 29 // Used for informing the download manager of a new download, since we don't |
| 29 // want to pass |DownloadItem|s between threads. | 30 // want to pass |DownloadItem|s between threads. |
| 30 struct CONTENT_EXPORT DownloadCreateInfo { | 31 struct CONTENT_EXPORT DownloadCreateInfo { |
| 31 DownloadCreateInfo(const base::Time& start_time, | 32 DownloadCreateInfo(const base::Time& start_time, |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 // Storing as a string for exact match to server format on | 114 // Storing as a string for exact match to server format on |
| 114 // "If-Unmodified-Since" comparison. | 115 // "If-Unmodified-Since" comparison. |
| 115 std::string last_modified; | 116 std::string last_modified; |
| 116 | 117 |
| 117 // For continuing a download, the ETag of the file. | 118 // For continuing a download, the ETag of the file. |
| 118 std::string etag; | 119 std::string etag; |
| 119 | 120 |
| 120 // If "Accept-Ranges:bytes" header presents in the response header. | 121 // If "Accept-Ranges:bytes" header presents in the response header. |
| 121 bool accept_range; | 122 bool accept_range; |
| 122 | 123 |
| 124 // The HTTP connection type. |
| 125 net::HttpResponseInfo::ConnectionInfo connection_info; |
| 126 |
| 123 private: | 127 private: |
| 124 DISALLOW_COPY_AND_ASSIGN(DownloadCreateInfo); | 128 DISALLOW_COPY_AND_ASSIGN(DownloadCreateInfo); |
| 125 }; | 129 }; |
| 126 | 130 |
| 127 } // namespace content | 131 } // namespace content |
| 128 | 132 |
| 129 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_ | 133 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_ |
| OLD | NEW |