| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 net::URLRequest* request() const { return request_; } | 115 net::URLRequest* request() const { return request_; } |
| 116 | 116 |
| 117 private: | 117 private: |
| 118 static DownloadInterruptReason HandleRequestStatus( | 118 static DownloadInterruptReason HandleRequestStatus( |
| 119 const net::URLRequestStatus& status); | 119 const net::URLRequestStatus& status); |
| 120 | 120 |
| 121 static DownloadInterruptReason HandleSuccessfulServerResponse( | 121 static DownloadInterruptReason HandleSuccessfulServerResponse( |
| 122 const net::HttpResponseHeaders& http_headers, | 122 const net::HttpResponseHeaders& http_headers, |
| 123 DownloadSaveInfo* save_info); | 123 DownloadSaveInfo* save_info); |
| 124 | 124 |
| 125 static void AddPartialRequestHeaders(net::URLRequest* request, |
| 126 DownloadUrlParameters* params); |
| 127 |
| 125 std::unique_ptr<DownloadCreateInfo> CreateDownloadCreateInfo( | 128 std::unique_ptr<DownloadCreateInfo> CreateDownloadCreateInfo( |
| 126 DownloadInterruptReason result); | 129 DownloadInterruptReason result); |
| 127 | 130 |
| 128 Delegate* delegate_; | 131 Delegate* delegate_; |
| 129 net::URLRequest* request_; | 132 net::URLRequest* request_; |
| 130 | 133 |
| 131 // "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 |
| 132 // populate the DownloadCreateInfo when the time comes. | 135 // populate the DownloadCreateInfo when the time comes. |
| 133 std::unique_ptr<DownloadSaveInfo> save_info_; | 136 std::unique_ptr<DownloadSaveInfo> save_info_; |
| 134 uint32_t download_id_; | 137 uint32_t download_id_; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 164 | 167 |
| 165 // Each successful OnWillRead will yield a buffer of this size. | 168 // Each successful OnWillRead will yield a buffer of this size. |
| 166 static const int kReadBufSize = 32768; // bytes | 169 static const int kReadBufSize = 32768; // bytes |
| 167 | 170 |
| 168 DISALLOW_COPY_AND_ASSIGN(DownloadRequestCore); | 171 DISALLOW_COPY_AND_ASSIGN(DownloadRequestCore); |
| 169 }; | 172 }; |
| 170 | 173 |
| 171 } // namespace content | 174 } // namespace content |
| 172 | 175 |
| 173 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_CORE_H_ | 176 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_CORE_H_ |
| OLD | NEW |