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 |
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/cookies/cookie_store.h" | 18 #include "net/cookies/cookie_store.h" |
19 #include "net/filter/filter.h" | 19 #include "net/filter/filter.h" |
20 #include "net/http/http_request_info.h" | 20 #include "net/http/http_request_info.h" |
21 #include "net/url_request/url_request_job.h" | 21 #include "net/url_request/url_request_job.h" |
22 #include "net/url_request/url_request_throttler_entry_interface.h" | 22 #include "net/url_request/url_request_throttler_entry_interface.h" |
23 | 23 |
24 namespace net { | 24 namespace net { |
25 | 25 |
26 class HttpResponseHeaders; | 26 class HttpResponseHeaders; |
27 class HttpResponseInfo; | 27 class HttpResponseInfo; |
28 class HttpTransaction; | 28 class HttpTransaction; |
29 class HttpUserAgentSettings; | 29 class HttpUserAgentSettings; |
| 30 class ProxyInfo; |
30 class UploadDataStream; | 31 class UploadDataStream; |
31 class URLRequestContext; | 32 class URLRequestContext; |
32 | 33 |
33 // A URLRequestJob subclass that is built on top of HttpTransaction. It | 34 // A URLRequestJob subclass that is built on top of HttpTransaction. It |
34 // provides an implementation for both HTTP and HTTPS. | 35 // provides an implementation for both HTTP and HTTPS. |
35 class NET_EXPORT_PRIVATE URLRequestHttpJob : public URLRequestJob { | 36 class NET_EXPORT_PRIVATE URLRequestHttpJob : public URLRequestJob { |
36 public: | 37 public: |
37 static URLRequestJob* Factory(URLRequest* request, | 38 static URLRequestJob* Factory(URLRequest* request, |
38 NetworkDelegate* network_delegate, | 39 NetworkDelegate* network_delegate, |
39 const std::string& scheme); | 40 const std::string& scheme); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 void ProcessStrictTransportSecurityHeader(); | 84 void ProcessStrictTransportSecurityHeader(); |
84 | 85 |
85 // Processes the Public-Key-Pins header, if one exists. | 86 // Processes the Public-Key-Pins header, if one exists. |
86 void ProcessPublicKeyPinsHeader(); | 87 void ProcessPublicKeyPinsHeader(); |
87 | 88 |
88 // |result| should be net::OK, or the request is canceled. | 89 // |result| should be net::OK, or the request is canceled. |
89 void OnHeadersReceivedCallback(int result); | 90 void OnHeadersReceivedCallback(int result); |
90 void OnStartCompleted(int result); | 91 void OnStartCompleted(int result); |
91 void OnReadCompleted(int result); | 92 void OnReadCompleted(int result); |
92 void NotifyBeforeSendHeadersCallback(int result); | 93 void NotifyBeforeSendHeadersCallback(int result); |
| 94 void NotifyBeforeSendProxyHeadersCallback(const ProxyInfo& proxy_info); |
93 | 95 |
94 void RestartTransactionWithAuth(const AuthCredentials& credentials); | 96 void RestartTransactionWithAuth(const AuthCredentials& credentials); |
95 | 97 |
96 // Overridden from URLRequestJob: | 98 // Overridden from URLRequestJob: |
97 virtual void SetUpload(UploadDataStream* upload) OVERRIDE; | 99 virtual void SetUpload(UploadDataStream* upload) OVERRIDE; |
98 virtual void SetExtraRequestHeaders( | 100 virtual void SetExtraRequestHeaders( |
99 const HttpRequestHeaders& headers) OVERRIDE; | 101 const HttpRequestHeaders& headers) OVERRIDE; |
100 virtual LoadState GetLoadState() const OVERRIDE; | 102 virtual LoadState GetLoadState() const OVERRIDE; |
101 virtual UploadProgress GetUploadProgress() const OVERRIDE; | 103 virtual UploadProgress GetUploadProgress() const OVERRIDE; |
102 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE; | 104 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE; |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 const HttpUserAgentSettings* http_user_agent_settings_; | 270 const HttpUserAgentSettings* http_user_agent_settings_; |
269 | 271 |
270 base::WeakPtrFactory<URLRequestHttpJob> weak_factory_; | 272 base::WeakPtrFactory<URLRequestHttpJob> weak_factory_; |
271 | 273 |
272 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); | 274 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); |
273 }; | 275 }; |
274 | 276 |
275 } // namespace net | 277 } // namespace net |
276 | 278 |
277 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ | 279 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
OLD | NEW |