OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
6 #define NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 // Callback functions for Cookie Monster | 165 // Callback functions for Cookie Monster |
166 void DoLoadCookies(); | 166 void DoLoadCookies(); |
167 void CheckCookiePolicyAndLoad(const CookieList& cookie_list); | 167 void CheckCookiePolicyAndLoad(const CookieList& cookie_list); |
168 void OnCookiesLoaded( | 168 void OnCookiesLoaded( |
169 const std::string& cookie_line, | 169 const std::string& cookie_line, |
170 const std::vector<CookieStore::CookieInfo>& cookie_infos); | 170 const std::vector<CookieStore::CookieInfo>& cookie_infos); |
171 void DoStartTransaction(); | 171 void DoStartTransaction(); |
172 void OnCookieSaved(bool cookie_status); | 172 void OnCookieSaved(bool cookie_status); |
173 void CookieHandled(); | 173 void CookieHandled(); |
174 | 174 |
| 175 // Some servers send the body compressed, but specify the content length as |
| 176 // the uncompressed size. If this is the case, we return true in order |
| 177 // to request to work around this non-adherence to the HTTP standard. |
| 178 // |rv| is the standard return value of a read function indicating the number |
| 179 // of bytes read or, if negative, an error code. |
| 180 bool ShouldFixMismatchedContentLength(int rv) const; |
| 181 |
175 // Returns the effective response headers, considering that they may be | 182 // Returns the effective response headers, considering that they may be |
176 // overridden by |override_response_headers_|. | 183 // overridden by |override_response_headers_|. |
177 HttpResponseHeaders* GetResponseHeaders() const; | 184 HttpResponseHeaders* GetResponseHeaders() const; |
178 | 185 |
179 base::Time request_creation_time_; | 186 base::Time request_creation_time_; |
180 | 187 |
181 // Data used for statistics gathering. This data is only used for histograms | 188 // Data used for statistics gathering. This data is only used for histograms |
182 // and is not required. It is only gathered if packet_timing_enabled_ == true. | 189 // and is not required. It is only gathered if packet_timing_enabled_ == true. |
183 // | 190 // |
184 // TODO(jar): improve the quality of the gathered info by gathering most times | 191 // TODO(jar): improve the quality of the gathered info by gathering most times |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 // NetworkDelegate::NotifyURLRequestDestroyed has not been called, yet, | 230 // NetworkDelegate::NotifyURLRequestDestroyed has not been called, yet, |
224 // to inform the NetworkDelegate that it may not call back. | 231 // to inform the NetworkDelegate that it may not call back. |
225 bool awaiting_callback_; | 232 bool awaiting_callback_; |
226 | 233 |
227 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); | 234 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); |
228 }; | 235 }; |
229 | 236 |
230 } // namespace net | 237 } // namespace net |
231 | 238 |
232 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ | 239 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
OLD | NEW |