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 HttpRequestHeaders; |
26 class HttpResponseHeaders; | 27 class HttpResponseHeaders; |
27 class HttpResponseInfo; | 28 class HttpResponseInfo; |
28 class HttpTransaction; | 29 class HttpTransaction; |
29 class HttpUserAgentSettings; | 30 class HttpUserAgentSettings; |
30 class ProxyInfo; | 31 class ProxyInfo; |
31 class UploadDataStream; | 32 class UploadDataStream; |
32 class URLRequestContext; | 33 class URLRequestContext; |
33 | 34 |
34 // A URLRequestJob subclass that is built on top of HttpTransaction. It | 35 // A URLRequestJob subclass that is built on top of HttpTransaction. It |
35 // provides an implementation for both HTTP and HTTPS. | 36 // provides an implementation for both HTTP and HTTPS. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 void ProcessStrictTransportSecurityHeader(); | 85 void ProcessStrictTransportSecurityHeader(); |
85 | 86 |
86 // Processes the Public-Key-Pins header, if one exists. | 87 // Processes the Public-Key-Pins header, if one exists. |
87 void ProcessPublicKeyPinsHeader(); | 88 void ProcessPublicKeyPinsHeader(); |
88 | 89 |
89 // |result| should be net::OK, or the request is canceled. | 90 // |result| should be net::OK, or the request is canceled. |
90 void OnHeadersReceivedCallback(int result); | 91 void OnHeadersReceivedCallback(int result); |
91 void OnStartCompleted(int result); | 92 void OnStartCompleted(int result); |
92 void OnReadCompleted(int result); | 93 void OnReadCompleted(int result); |
93 void NotifyBeforeSendHeadersCallback(int result); | 94 void NotifyBeforeSendHeadersCallback(int result); |
94 void NotifyBeforeSendProxyHeadersCallback(const ProxyInfo& proxy_info); | 95 void NotifyBeforeSendProxyHeadersCallback( |
| 96 const ProxyInfo& proxy_info, |
| 97 HttpRequestHeaders* request_headers); |
95 | 98 |
96 void RestartTransactionWithAuth(const AuthCredentials& credentials); | 99 void RestartTransactionWithAuth(const AuthCredentials& credentials); |
97 | 100 |
98 // Overridden from URLRequestJob: | 101 // Overridden from URLRequestJob: |
99 virtual void SetUpload(UploadDataStream* upload) OVERRIDE; | 102 virtual void SetUpload(UploadDataStream* upload) OVERRIDE; |
100 virtual void SetExtraRequestHeaders( | 103 virtual void SetExtraRequestHeaders( |
101 const HttpRequestHeaders& headers) OVERRIDE; | 104 const HttpRequestHeaders& headers) OVERRIDE; |
102 virtual LoadState GetLoadState() const OVERRIDE; | 105 virtual LoadState GetLoadState() const OVERRIDE; |
103 virtual UploadProgress GetUploadProgress() const OVERRIDE; | 106 virtual UploadProgress GetUploadProgress() const OVERRIDE; |
104 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE; | 107 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE; |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 const HttpUserAgentSettings* http_user_agent_settings_; | 273 const HttpUserAgentSettings* http_user_agent_settings_; |
271 | 274 |
272 base::WeakPtrFactory<URLRequestHttpJob> weak_factory_; | 275 base::WeakPtrFactory<URLRequestHttpJob> weak_factory_; |
273 | 276 |
274 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); | 277 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); |
275 }; | 278 }; |
276 | 279 |
277 } // namespace net | 280 } // namespace net |
278 | 281 |
279 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ | 282 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
OLD | NEW |