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

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

Issue 2880933002: Download driver for components/download. (Closed)
Patch Set: 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 std::unique_ptr<DownloadCreateInfo> CreateDownloadCreateInfo( 131 std::unique_ptr<DownloadCreateInfo> CreateDownloadCreateInfo(
132 DownloadInterruptReason result); 132 DownloadInterruptReason result);
133 133
134 Delegate* delegate_; 134 Delegate* delegate_;
135 net::URLRequest* request_; 135 net::URLRequest* request_;
136 136
137 // "Passthrough" fields. These are only kept here so that they can be used to 137 // "Passthrough" fields. These are only kept here so that they can be used to
138 // populate the DownloadCreateInfo when the time comes. 138 // populate the DownloadCreateInfo when the time comes.
139 std::unique_ptr<DownloadSaveInfo> save_info_; 139 std::unique_ptr<DownloadSaveInfo> save_info_;
140 uint32_t download_id_; 140 uint32_t download_id_;
141 std::string guid_;
141 bool transient_; 142 bool transient_;
142 DownloadUrlParameters::OnStartedCallback on_started_callback_; 143 DownloadUrlParameters::OnStartedCallback on_started_callback_;
143 144
144 // Data flow 145 // Data flow
145 scoped_refptr<net::IOBuffer> read_buffer_; // From URLRequest. 146 scoped_refptr<net::IOBuffer> read_buffer_; // From URLRequest.
146 std::unique_ptr<ByteStreamWriter> stream_writer_; // To rest of system. 147 std::unique_ptr<ByteStreamWriter> stream_writer_; // To rest of system.
147 148
148 // Keeps the system from sleeping while this is alive. If the 149 // Keeps the system from sleeping while this is alive. If the
149 // system enters power saving mode while a request is alive, it can cause the 150 // system enters power saving mode while a request is alive, it can cause the
150 // request to fail and the associated download will be interrupted. 151 // request to fail and the associated download will be interrupted.
(...skipping 20 matching lines...) Expand all
171 172
172 // Each successful OnWillRead will yield a buffer of this size. 173 // Each successful OnWillRead will yield a buffer of this size.
173 static const int kReadBufSize = 32768; // bytes 174 static const int kReadBufSize = 32768; // bytes
174 175
175 DISALLOW_COPY_AND_ASSIGN(DownloadRequestCore); 176 DISALLOW_COPY_AND_ASSIGN(DownloadRequestCore);
176 }; 177 };
177 178
178 } // namespace content 179 } // namespace content
179 180
180 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_CORE_H_ 181 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_CORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698