Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Side by Side Diff: content/browser/download/download_request_core.h

Issue 2791453003: DownloadManager : Create transient downloads (Closed)
Patch Set: nits Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « content/browser/download/download_item_impl.cc ('k') | content/browser/download/download_request_core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698