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

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

Issue 2880933002: Download driver for components/download. (Closed)
Patch Set: Polish comment. Created 3 years, 7 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 std::string guid_;
138 bool transient_; 139 bool transient_;
139 DownloadUrlParameters::OnStartedCallback on_started_callback_; 140 DownloadUrlParameters::OnStartedCallback on_started_callback_;
140 141
141 // Data flow 142 // Data flow
142 scoped_refptr<net::IOBuffer> read_buffer_; // From URLRequest. 143 scoped_refptr<net::IOBuffer> read_buffer_; // From URLRequest.
143 std::unique_ptr<ByteStreamWriter> stream_writer_; // To rest of system. 144 std::unique_ptr<ByteStreamWriter> stream_writer_; // To rest of system.
144 145
145 // Used to keep the system from sleeping while a download is ongoing. If the 146 // Used to keep the system from sleeping while a download is ongoing. If the
146 // system enters power saving mode while a URLRequest is alive, it can cause 147 // system enters power saving mode while a URLRequest is alive, it can cause
147 // URLRequest to fail and the associated download will be interrupted. 148 // URLRequest to fail and the associated download will be interrupted.
(...skipping 20 matching lines...) Expand all
168 169
169 // Each successful OnWillRead will yield a buffer of this size. 170 // Each successful OnWillRead will yield a buffer of this size.
170 static const int kReadBufSize = 32768; // bytes 171 static const int kReadBufSize = 32768; // bytes
171 172
172 DISALLOW_COPY_AND_ASSIGN(DownloadRequestCore); 173 DISALLOW_COPY_AND_ASSIGN(DownloadRequestCore);
173 }; 174 };
174 175
175 } // namespace content 176 } // namespace content
176 177
177 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_CORE_H_ 178 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_CORE_H_
OLDNEW
« no previous file with comments | « content/browser/download/download_manager_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