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_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_H_ |
6 #define NET_URL_REQUEST_URL_REQUEST_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 13 matching lines...) Expand all Loading... | |
24 #include "net/base/load_timing_info.h" | 24 #include "net/base/load_timing_info.h" |
25 #include "net/base/net_export.h" | 25 #include "net/base/net_export.h" |
26 #include "net/base/network_delegate.h" | 26 #include "net/base/network_delegate.h" |
27 #include "net/base/request_priority.h" | 27 #include "net/base/request_priority.h" |
28 #include "net/base/upload_progress.h" | 28 #include "net/base/upload_progress.h" |
29 #include "net/cookies/canonical_cookie.h" | 29 #include "net/cookies/canonical_cookie.h" |
30 #include "net/http/http_request_headers.h" | 30 #include "net/http/http_request_headers.h" |
31 #include "net/http/http_response_info.h" | 31 #include "net/http/http_response_info.h" |
32 #include "net/log/net_log.h" | 32 #include "net/log/net_log.h" |
33 #include "net/socket/connection_attempts.h" | 33 #include "net/socket/connection_attempts.h" |
34 #include "net/ssl/ssl_private_key.h" | |
davidben
2015/09/25 20:10:12
This can be a forward decl.
svaldez
2015/09/28 16:54:53
Done.
| |
34 #include "net/url_request/url_request_status.h" | 35 #include "net/url_request/url_request_status.h" |
35 #include "url/gurl.h" | 36 #include "url/gurl.h" |
36 | 37 |
37 namespace base { | 38 namespace base { |
38 class Value; | 39 class Value; |
39 | 40 |
40 namespace debug { | 41 namespace debug { |
41 class StackTrace; | 42 class StackTrace; |
42 } // namespace debug | 43 } // namespace debug |
43 } // namespace base | 44 } // namespace base |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
165 // call request->SetAuth() with the user's credentials once it obtains them, | 166 // call request->SetAuth() with the user's credentials once it obtains them, |
166 // or request->CancelAuth() to cancel the login and display the error page. | 167 // or request->CancelAuth() to cancel the login and display the error page. |
167 // When it does so, the request will be reissued, restarting the sequence | 168 // When it does so, the request will be reissued, restarting the sequence |
168 // of On* callbacks. | 169 // of On* callbacks. |
169 virtual void OnAuthRequired(URLRequest* request, | 170 virtual void OnAuthRequired(URLRequest* request, |
170 AuthChallengeInfo* auth_info); | 171 AuthChallengeInfo* auth_info); |
171 | 172 |
172 // Called when we receive an SSL CertificateRequest message for client | 173 // Called when we receive an SSL CertificateRequest message for client |
173 // authentication. The delegate should call | 174 // authentication. The delegate should call |
174 // request->ContinueWithCertificate() with the client certificate the user | 175 // request->ContinueWithCertificate() with the client certificate the user |
175 // selected, or request->ContinueWithCertificate(NULL) to continue the SSL | 176 // selected and its private key, or request->ContinueWithCertificate(NULL, |
176 // handshake without a client certificate. | 177 // NULL) |
178 // to continue the SSL handshake without a client certificate. | |
177 virtual void OnCertificateRequested( | 179 virtual void OnCertificateRequested( |
178 URLRequest* request, | 180 URLRequest* request, |
179 SSLCertRequestInfo* cert_request_info); | 181 SSLCertRequestInfo* cert_request_info); |
180 | 182 |
181 // Called when using SSL and the server responds with a certificate with | 183 // Called when using SSL and the server responds with a certificate with |
182 // an error, for example, whose common name does not match the common name | 184 // an error, for example, whose common name does not match the common name |
183 // we were expecting for that host. The delegate should either do the | 185 // we were expecting for that host. The delegate should either do the |
184 // safe thing and Cancel() the request or decide to proceed by calling | 186 // safe thing and Cancel() the request or decide to proceed by calling |
185 // ContinueDespiteLastError(). cert_error is a ERR_* error code | 187 // ContinueDespiteLastError(). cert_error is a ERR_* error code |
186 // indicating what's wrong with the certificate. | 188 // indicating what's wrong with the certificate. |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
563 // One of the following two methods should be called in response to an | 565 // One of the following two methods should be called in response to an |
564 // OnAuthRequired() callback (and only then). | 566 // OnAuthRequired() callback (and only then). |
565 // SetAuth will reissue the request with the given credentials. | 567 // SetAuth will reissue the request with the given credentials. |
566 // CancelAuth will give up and display the error page. | 568 // CancelAuth will give up and display the error page. |
567 void SetAuth(const AuthCredentials& credentials); | 569 void SetAuth(const AuthCredentials& credentials); |
568 void CancelAuth(); | 570 void CancelAuth(); |
569 | 571 |
570 // This method can be called after the user selects a client certificate to | 572 // This method can be called after the user selects a client certificate to |
571 // instruct this URLRequest to continue with the request with the | 573 // instruct this URLRequest to continue with the request with the |
572 // certificate. Pass NULL if the user doesn't have a client certificate. | 574 // certificate. Pass NULL if the user doesn't have a client certificate. |
573 void ContinueWithCertificate(X509Certificate* client_cert); | 575 void ContinueWithCertificate(X509Certificate* client_cert, |
576 SSLPrivateKey* client_pkey); | |
574 | 577 |
575 // This method can be called after some error notifications to instruct this | 578 // This method can be called after some error notifications to instruct this |
576 // URLRequest to ignore the current error and continue with the request. To | 579 // URLRequest to ignore the current error and continue with the request. To |
577 // cancel the request instead, call Cancel(). | 580 // cancel the request instead, call Cancel(). |
578 void ContinueDespiteLastError(); | 581 void ContinueDespiteLastError(); |
579 | 582 |
580 // Used to specify the context (cookie store, cache) for this request. | 583 // Used to specify the context (cookie store, cache) for this request. |
581 const URLRequestContext* context() const; | 584 const URLRequestContext* context() const; |
582 | 585 |
583 const BoundNetLog& net_log() const { return net_log_; } | 586 const BoundNetLog& net_log() const { return net_log_; } |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
837 HostPortPair proxy_server_; | 840 HostPortPair proxy_server_; |
838 | 841 |
839 scoped_ptr<const base::debug::StackTrace> stack_trace_; | 842 scoped_ptr<const base::debug::StackTrace> stack_trace_; |
840 | 843 |
841 DISALLOW_COPY_AND_ASSIGN(URLRequest); | 844 DISALLOW_COPY_AND_ASSIGN(URLRequest); |
842 }; | 845 }; |
843 | 846 |
844 } // namespace net | 847 } // namespace net |
845 | 848 |
846 #endif // NET_URL_REQUEST_URL_REQUEST_H_ | 849 #endif // NET_URL_REQUEST_URL_REQUEST_H_ |
OLD | NEW |