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_REQUEST_CORE_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_CORE_H_ |
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_CORE_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_CORE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 std::unique_ptr<DownloadCreateInfo> CreateDownloadCreateInfo( | 128 std::unique_ptr<DownloadCreateInfo> CreateDownloadCreateInfo( |
129 DownloadInterruptReason result); | 129 DownloadInterruptReason result); |
130 | 130 |
131 Delegate* delegate_; | 131 Delegate* delegate_; |
132 net::URLRequest* request_; | 132 net::URLRequest* request_; |
133 | 133 |
134 // "Passthrough" fields. These are only kept here so that they can be used to | 134 // "Passthrough" fields. These are only kept here so that they can be used to |
135 // populate the DownloadCreateInfo when the time comes. | 135 // populate the DownloadCreateInfo when the time comes. |
136 std::unique_ptr<DownloadSaveInfo> save_info_; | 136 std::unique_ptr<DownloadSaveInfo> save_info_; |
137 uint32_t download_id_; | 137 uint32_t download_id_; |
| 138 bool transient_; |
138 DownloadUrlParameters::OnStartedCallback on_started_callback_; | 139 DownloadUrlParameters::OnStartedCallback on_started_callback_; |
139 | 140 |
140 // Data flow | 141 // Data flow |
141 scoped_refptr<net::IOBuffer> read_buffer_; // From URLRequest. | 142 scoped_refptr<net::IOBuffer> read_buffer_; // From URLRequest. |
142 std::unique_ptr<ByteStreamWriter> stream_writer_; // To rest of system. | 143 std::unique_ptr<ByteStreamWriter> stream_writer_; // To rest of system. |
143 | 144 |
144 // Keeps the system from sleeping while this is alive. If the | 145 // Keeps the system from sleeping while this is alive. If the |
145 // system enters power saving mode while a request is alive, it can cause the | 146 // system enters power saving mode while a request is alive, it can cause the |
146 // request to fail and the associated download will be interrupted. | 147 // request to fail and the associated download will be interrupted. |
147 std::unique_ptr<device::PowerSaveBlocker> power_save_blocker_; | 148 std::unique_ptr<device::PowerSaveBlocker> power_save_blocker_; |
(...skipping 19 matching lines...) Expand all Loading... |
167 | 168 |
168 // Each successful OnWillRead will yield a buffer of this size. | 169 // Each successful OnWillRead will yield a buffer of this size. |
169 static const int kReadBufSize = 32768; // bytes | 170 static const int kReadBufSize = 32768; // bytes |
170 | 171 |
171 DISALLOW_COPY_AND_ASSIGN(DownloadRequestCore); | 172 DISALLOW_COPY_AND_ASSIGN(DownloadRequestCore); |
172 }; | 173 }; |
173 | 174 |
174 } // namespace content | 175 } // namespace content |
175 | 176 |
176 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_CORE_H_ | 177 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_CORE_H_ |
OLD | NEW |