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

Side by Side Diff: net/url_request/url_request_http_job.h

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « net/url_request/url_request_data_job.cc ('k') | net/url_request/url_request_http_job.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "net/base/auth.h" 15 #include "net/base/auth.h"
16 #include "net/base/completion_callback.h" 16 #include "net/base/completion_callback.h"
17 #include "net/base/net_export.h" 17 #include "net/base/net_export.h"
18 #include "net/base/sdch_manager.h"
18 #include "net/cookies/cookie_store.h" 19 #include "net/cookies/cookie_store.h"
19 #include "net/filter/filter.h" 20 #include "net/filter/filter.h"
20 #include "net/http/http_request_info.h" 21 #include "net/http/http_request_info.h"
21 #include "net/url_request/url_request_job.h" 22 #include "net/url_request/url_request_job.h"
22 #include "net/url_request/url_request_throttler_entry_interface.h" 23 #include "net/url_request/url_request_throttler_entry_interface.h"
23 24
24 namespace net { 25 namespace net {
25 26
26 class HttpRequestHeaders; 27 class HttpRequestHeaders;
27 class HttpResponseHeaders; 28 class HttpResponseHeaders;
28 class HttpResponseInfo; 29 class HttpResponseInfo;
29 class HttpTransaction; 30 class HttpTransaction;
30 class HttpUserAgentSettings; 31 class HttpUserAgentSettings;
31 class ProxyInfo; 32 class ProxyInfo;
32 class UploadDataStream; 33 class UploadDataStream;
33 class URLRequestContext; 34 class URLRequestContext;
34 35
35 // A URLRequestJob subclass that is built on top of HttpTransaction. It 36 // A URLRequestJob subclass that is built on top of HttpTransaction. It
36 // provides an implementation for both HTTP and HTTPS. 37 // provides an implementation for both HTTP and HTTPS.
37 class NET_EXPORT_PRIVATE URLRequestHttpJob : public URLRequestJob { 38 class NET_EXPORT_PRIVATE URLRequestHttpJob : public URLRequestJob {
38 public: 39 public:
39 static URLRequestJob* Factory(URLRequest* request, 40 static URLRequestJob* Factory(URLRequest* request,
40 NetworkDelegate* network_delegate, 41 NetworkDelegate* network_delegate,
41 const std::string& scheme); 42 const std::string& scheme);
42 43
43 protected: 44 protected:
44 URLRequestHttpJob(URLRequest* request, 45 URLRequestHttpJob(URLRequest* request,
45 NetworkDelegate* network_delegate, 46 NetworkDelegate* network_delegate,
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 AuthCredentials auth_credentials_; 188 AuthCredentials auth_credentials_;
188 189
189 CompletionCallback start_callback_; 190 CompletionCallback start_callback_;
190 CompletionCallback notify_before_headers_sent_callback_; 191 CompletionCallback notify_before_headers_sent_callback_;
191 192
192 bool read_in_progress_; 193 bool read_in_progress_;
193 194
194 scoped_ptr<HttpTransaction> transaction_; 195 scoped_ptr<HttpTransaction> transaction_;
195 196
196 // This is used to supervise traffic and enforce exponential 197 // This is used to supervise traffic and enforce exponential
197 // back-off. May be NULL. 198 // back-off. May be NULL.
198 scoped_refptr<URLRequestThrottlerEntryInterface> throttling_entry_; 199 scoped_refptr<URLRequestThrottlerEntryInterface> throttling_entry_;
199 200
200 // Indicated if an SDCH dictionary was advertised, and hence an SDCH 201 // A handle to the SDCH dictionaries that were advertised in this request.
201 // compressed response is expected. We use this to help detect (accidental?) 202 // May be null.
202 // proxy corruption of a response, which sometimes marks SDCH content as 203 scoped_ptr<SdchManager::DictionarySet> dictionaries_advertised_;
203 // having no content encoding <oops>.
204 bool sdch_dictionary_advertised_;
205 204
206 // For SDCH latency experiments, when we are able to do SDCH, we may enable 205 // For SDCH latency experiments, when we are able to do SDCH, we may enable
207 // either an SDCH latency test xor a pass through test. The following bools 206 // either an SDCH latency test xor a pass through test. The following bools
208 // indicate what we decided on for this instance. 207 // indicate what we decided on for this instance.
209 bool sdch_test_activated_; // Advertising a dictionary for sdch. 208 bool sdch_test_activated_; // Advertising a dictionary for sdch.
210 bool sdch_test_control_; // Not even accepting-content sdch. 209 bool sdch_test_control_; // Not even accepting-content sdch.
211 210
212 // For recording of stats, we need to remember if this is cached content. 211 // For recording of stats, we need to remember if this is cached content.
213 bool is_cached_content_; 212 bool is_cached_content_;
214 213
215 base::Time request_creation_time_; 214 base::Time request_creation_time_;
216 215
217 // Data used for statistics gathering. This data is only used for histograms 216 // Data used for statistics gathering. This data is only used for histograms
218 // and is not required. It is only gathered if packet_timing_enabled_ == true. 217 // and is not required. It is only gathered if packet_timing_enabled_ == true.
219 // 218 //
220 // TODO(jar): improve the quality of the gathered info by gathering most times 219 // TODO(jar): improve the quality of the gathered info by gathering most times
221 // at a lower point in the network stack, assuring we have actual packet 220 // at a lower point in the network stack, assuring we have actual packet
222 // boundaries, rather than approximations. Also note that input byte count 221 // boundaries, rather than approximations. Also note that input byte count
223 // as gathered here is post-SSL, and post-cache-fetch, and does not reflect 222 // as gathered here is post-SSL, and post-cache-fetch, and does not reflect
224 // true packet arrival times in such cases. 223 // true packet arrival times in such cases.
225 224
226 // Enable recording of packet arrival times for histogramming. 225 // Enable recording of packet arrival times for histogramming.
227 bool packet_timing_enabled_; 226 bool packet_timing_enabled_;
228 bool done_; // True when we are done doing work. 227 bool done_; // True when we are done doing work.
229 228
230 // The number of bytes that have been accounted for in packets (where some of 229 // The number of bytes that have been accounted for in packets (where some of
231 // those packets may possibly have had their time of arrival recorded). 230 // those packets may possibly have had their time of arrival recorded).
232 int64 bytes_observed_in_packets_; 231 int64 bytes_observed_in_packets_;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 const HttpUserAgentSettings* http_user_agent_settings_; 268 const HttpUserAgentSettings* http_user_agent_settings_;
270 269
271 base::WeakPtrFactory<URLRequestHttpJob> weak_factory_; 270 base::WeakPtrFactory<URLRequestHttpJob> weak_factory_;
272 271
273 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); 272 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob);
274 }; 273 };
275 274
276 } // namespace net 275 } // namespace net
277 276
278 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ 277 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_
OLDNEW
« no previous file with comments | « net/url_request/url_request_data_job.cc ('k') | net/url_request/url_request_http_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698