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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 // TODO(xingliu): Refactor to remove |offset| and |length|. | 69 // TODO(xingliu): Refactor to remove |offset| and |length|. |
70 int64_t offset; | 70 int64_t offset; |
71 | 71 |
72 // The length of the initial request. | 72 // The length of the initial request. |
73 // This value matches the length in DownloadSaveInfo. | 73 // This value matches the length in DownloadSaveInfo. |
74 int64_t length; | 74 int64_t length; |
75 | 75 |
76 // True if the download was initiated by user action. | 76 // True if the download was initiated by user action. |
77 bool has_user_gesture; | 77 bool has_user_gesture; |
78 | 78 |
| 79 // Whether the download should be transient. A transient download is |
| 80 // short-lived and is not shown in the UI. |
| 81 bool transient; |
| 82 |
79 base::Optional<ui::PageTransition> transition_type; | 83 base::Optional<ui::PageTransition> transition_type; |
80 | 84 |
81 // The remote IP address where the download was fetched from. Copied from | 85 // The remote IP address where the download was fetched from. Copied from |
82 // UrlRequest::GetSocketAddress(). | 86 // UrlRequest::GetSocketAddress(). |
83 std::string remote_address; | 87 std::string remote_address; |
84 | 88 |
85 // If the download is initially created in an interrupted state (because the | 89 // If the download is initially created in an interrupted state (because the |
86 // response was in error), then |result| would be something other than | 90 // response was in error), then |result| would be something other than |
87 // INTERRUPT_REASON_NONE. | 91 // INTERRUPT_REASON_NONE. |
88 DownloadInterruptReason result; | 92 DownloadInterruptReason result; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 // The HTTP connection type. | 131 // The HTTP connection type. |
128 net::HttpResponseInfo::ConnectionInfo connection_info; | 132 net::HttpResponseInfo::ConnectionInfo connection_info; |
129 | 133 |
130 private: | 134 private: |
131 DISALLOW_COPY_AND_ASSIGN(DownloadCreateInfo); | 135 DISALLOW_COPY_AND_ASSIGN(DownloadCreateInfo); |
132 }; | 136 }; |
133 | 137 |
134 } // namespace content | 138 } // namespace content |
135 | 139 |
136 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_ | 140 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_ |
OLD | NEW |