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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 109 |
110 // Size of the buffer used between the DownloadRequestCore and the | 110 // Size of the buffer used between the DownloadRequestCore and the |
111 // downstream receiver of its output. | 111 // downstream receiver of its output. |
112 static const int kDownloadByteStreamSize; | 112 static const int kDownloadByteStreamSize; |
113 | 113 |
114 protected: | 114 protected: |
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, bool has_strong_validators); |
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, | 125 static void AddPartialRequestHeaders(net::URLRequest* request, |
126 DownloadUrlParameters* params); | 126 DownloadUrlParameters* params); |
127 | 127 |
128 std::unique_ptr<DownloadCreateInfo> CreateDownloadCreateInfo( | 128 std::unique_ptr<DownloadCreateInfo> CreateDownloadCreateInfo( |
129 DownloadInterruptReason result); | 129 DownloadInterruptReason result); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 | 168 |
169 // Each successful OnWillRead will yield a buffer of this size. | 169 // Each successful OnWillRead will yield a buffer of this size. |
170 static const int kReadBufSize = 32768; // bytes | 170 static const int kReadBufSize = 32768; // bytes |
171 | 171 |
172 DISALLOW_COPY_AND_ASSIGN(DownloadRequestCore); | 172 DISALLOW_COPY_AND_ASSIGN(DownloadRequestCore); |
173 }; | 173 }; |
174 | 174 |
175 } // namespace content | 175 } // namespace content |
176 | 176 |
177 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_CORE_H_ | 177 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_CORE_H_ |
OLD | NEW |