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 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 class HttpResponseHeaders; | 24 class HttpResponseHeaders; |
25 class HttpResponseInfo; | 25 class HttpResponseInfo; |
26 class HttpTransaction; | 26 class HttpTransaction; |
27 class URLRequestContext; | 27 class URLRequestContext; |
28 | 28 |
29 // A URLRequestJob subclass that is built on top of HttpTransaction. It | 29 // A URLRequestJob subclass that is built on top of HttpTransaction. It |
30 // provides an implementation for both HTTP and HTTPS. | 30 // provides an implementation for both HTTP and HTTPS. |
31 class URLRequestHttpJob : public URLRequestJob { | 31 class URLRequestHttpJob : public URLRequestJob { |
32 public: | 32 public: |
33 static URLRequestJob* Factory(URLRequest* request, | 33 static URLRequestJob* Factory(URLRequest* request, |
| 34 NetworkDelegate* network_delegate, |
34 const std::string& scheme); | 35 const std::string& scheme); |
35 | 36 |
36 protected: | 37 protected: |
37 explicit URLRequestHttpJob(URLRequest* request); | 38 URLRequestHttpJob(URLRequest* request, NetworkDelegate* network_delegate); |
38 | 39 |
39 // Shadows URLRequestJob's version of this method so we can grab cookies. | 40 // Shadows URLRequestJob's version of this method so we can grab cookies. |
40 void NotifyHeadersComplete(); | 41 void NotifyHeadersComplete(); |
41 | 42 |
42 // Shadows URLRequestJob's method so we can record histograms. | 43 // Shadows URLRequestJob's method so we can record histograms. |
43 void NotifyDone(const URLRequestStatus& status); | 44 void NotifyDone(const URLRequestStatus& status); |
44 | 45 |
45 void DestroyTransaction(); | 46 void DestroyTransaction(); |
46 | 47 |
47 void AddExtraHeaders(); | 48 void AddExtraHeaders(); |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 bool awaiting_callback_; | 240 bool awaiting_callback_; |
240 | 241 |
241 scoped_ptr<HttpTransactionDelegateImpl> http_transaction_delegate_; | 242 scoped_ptr<HttpTransactionDelegateImpl> http_transaction_delegate_; |
242 | 243 |
243 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); | 244 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); |
244 }; | 245 }; |
245 | 246 |
246 } // namespace net | 247 } // namespace net |
247 | 248 |
248 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ | 249 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
OLD | NEW |