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