Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 255 virtual void OnCertificateRequested( | 255 virtual void OnCertificateRequested( |
| 256 URLRequest* request, | 256 URLRequest* request, |
| 257 SSLCertRequestInfo* cert_request_info); | 257 SSLCertRequestInfo* cert_request_info); |
| 258 | 258 |
| 259 // Called when using SSL and the server responds with a certificate with | 259 // Called when using SSL and the server responds with a certificate with |
| 260 // an error, for example, whose common name does not match the common name | 260 // an error, for example, whose common name does not match the common name |
| 261 // we were expecting for that host. The delegate should either do the | 261 // we were expecting for that host. The delegate should either do the |
| 262 // safe thing and Cancel() the request or decide to proceed by calling | 262 // safe thing and Cancel() the request or decide to proceed by calling |
| 263 // ContinueDespiteLastError(). cert_error is a ERR_* error code | 263 // ContinueDespiteLastError(). cert_error is a ERR_* error code |
| 264 // indicating what's wrong with the certificate. | 264 // indicating what's wrong with the certificate. |
| 265 // If |is_hsts_host| is true then the host in question is an HSTS host | 265 // If |overridable| is true then the host in question is a host which |
| 266 // which demands a higher level of security. In this case, errors must not | 266 // demands a higher level of security (due e.g. to HTTP Strict Transport |
| 267 // be bypassable by the user. | 267 // Security, user preference, or built-in policy). In this case, errors |
| 268 // must not be bypassable by the user. | |
|
michaeln
2012/01/12 20:39:33
Is the polarity of the new argument reversed?
if
wtc
2012/01/13 01:39:57
Yes, 'fatal' is more appropriate than 'overridable
| |
| 268 virtual void OnSSLCertificateError(URLRequest* request, | 269 virtual void OnSSLCertificateError(URLRequest* request, |
| 269 const SSLInfo& ssl_info, | 270 const SSLInfo& ssl_info, |
| 270 bool is_hsts_host); | 271 bool overridable); |
| 271 | 272 |
| 272 // Called when reading cookies to allow the delegate to block access to the | 273 // Called when reading cookies to allow the delegate to block access to the |
| 273 // cookie. This method will never be invoked when LOAD_DO_NOT_SEND_COOKIES | 274 // cookie. This method will never be invoked when LOAD_DO_NOT_SEND_COOKIES |
| 274 // is specified. | 275 // is specified. |
| 275 virtual bool CanGetCookies(const URLRequest* request, | 276 virtual bool CanGetCookies(const URLRequest* request, |
| 276 const CookieList& cookie_list) const; | 277 const CookieList& cookie_list) const; |
| 277 | 278 |
| 278 // Called when a cookie is set to allow the delegate to block access to the | 279 // Called when a cookie is set to allow the delegate to block access to the |
| 279 // cookie. This method will never be invoked when LOAD_DO_NOT_SAVE_COOKIES | 280 // cookie. This method will never be invoked when LOAD_DO_NOT_SAVE_COOKIES |
| 280 // is specified. | 281 // is specified. |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 698 | 699 |
| 699 bool has_delegate() const { return delegate_ != NULL; } | 700 bool has_delegate() const { return delegate_ != NULL; } |
| 700 | 701 |
| 701 // These functions delegate to |delegate_| and may only be used if | 702 // These functions delegate to |delegate_| and may only be used if |
| 702 // |delegate_| is not NULL. See URLRequest::Delegate for the meaning | 703 // |delegate_| is not NULL. See URLRequest::Delegate for the meaning |
| 703 // of these functions. | 704 // of these functions. |
| 704 void NotifyAuthRequired(AuthChallengeInfo* auth_info); | 705 void NotifyAuthRequired(AuthChallengeInfo* auth_info); |
| 705 void NotifyAuthRequiredComplete(NetworkDelegate::AuthRequiredResponse result); | 706 void NotifyAuthRequiredComplete(NetworkDelegate::AuthRequiredResponse result); |
| 706 void NotifyCertificateRequested(SSLCertRequestInfo* cert_request_info); | 707 void NotifyCertificateRequested(SSLCertRequestInfo* cert_request_info); |
| 707 void NotifySSLCertificateError(const SSLInfo& ssl_info, | 708 void NotifySSLCertificateError(const SSLInfo& ssl_info, |
| 708 bool is_hsts_host); | 709 bool overridable); |
| 709 bool CanGetCookies(const CookieList& cookie_list) const; | 710 bool CanGetCookies(const CookieList& cookie_list) const; |
| 710 bool CanSetCookie(const std::string& cookie_line, | 711 bool CanSetCookie(const std::string& cookie_line, |
| 711 CookieOptions* options) const; | 712 CookieOptions* options) const; |
| 712 void NotifyReadCompleted(int bytes_read); | 713 void NotifyReadCompleted(int bytes_read); |
| 713 | 714 |
| 714 // Called when the delegate blocks or unblocks this request when intercepting | 715 // Called when the delegate blocks or unblocks this request when intercepting |
| 715 // certain requests. | 716 // certain requests. |
| 716 void SetBlockedOnDelegate(); | 717 void SetBlockedOnDelegate(); |
| 717 void SetUnblockedOnDelegate(); | 718 void SetUnblockedOnDelegate(); |
| 718 | 719 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 803 scoped_refptr<AuthChallengeInfo> auth_info_; | 804 scoped_refptr<AuthChallengeInfo> auth_info_; |
| 804 | 805 |
| 805 base::TimeTicks creation_time_; | 806 base::TimeTicks creation_time_; |
| 806 | 807 |
| 807 DISALLOW_COPY_AND_ASSIGN(URLRequest); | 808 DISALLOW_COPY_AND_ASSIGN(URLRequest); |
| 808 }; | 809 }; |
| 809 | 810 |
| 810 } // namespace net | 811 } // namespace net |
| 811 | 812 |
| 812 #endif // NET_URL_REQUEST_URL_REQUEST_H_ | 813 #endif // NET_URL_REQUEST_URL_REQUEST_H_ |
| OLD | NEW |