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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 // ContinueDespiteLastError(). cert_error is a ERR_* error code | 253 // ContinueDespiteLastError(). cert_error is a ERR_* error code |
254 // indicating what's wrong with the certificate. | 254 // indicating what's wrong with the certificate. |
255 // If |fatal| is true then the host in question demands a higher level | 255 // If |fatal| is true then the host in question demands a higher level |
256 // of security (due e.g. to HTTP Strict Transport Security, user | 256 // of security (due e.g. to HTTP Strict Transport Security, user |
257 // preference, or built-in policy). In this case, errors must not be | 257 // preference, or built-in policy). In this case, errors must not be |
258 // bypassable by the user. | 258 // bypassable by the user. |
259 virtual void OnSSLCertificateError(URLRequest* request, | 259 virtual void OnSSLCertificateError(URLRequest* request, |
260 const SSLInfo& ssl_info, | 260 const SSLInfo& ssl_info, |
261 bool fatal); | 261 bool fatal); |
262 | 262 |
263 // Called when reading cookies to allow the delegate to block access to the | |
264 // cookie. This method will never be invoked when LOAD_DO_NOT_SEND_COOKIES | |
265 // is specified. | |
266 virtual bool CanGetCookies(const URLRequest* request, | |
267 const CookieList& cookie_list) const; | |
268 | |
269 // Called when a cookie is set to allow the delegate to block access to the | |
270 // cookie. This method will never be invoked when LOAD_DO_NOT_SAVE_COOKIES | |
271 // is specified. | |
272 virtual bool CanSetCookie(const URLRequest* request, | |
273 const std::string& cookie_line, | |
274 CookieOptions* options) const; | |
275 | |
276 // After calling Start(), the delegate will receive an OnResponseStarted | 263 // After calling Start(), the delegate will receive an OnResponseStarted |
277 // callback when the request has completed. If an error occurred, the | 264 // callback when the request has completed. If an error occurred, the |
278 // request->status() will be set. On success, all redirects have been | 265 // request->status() will be set. On success, all redirects have been |
279 // followed and the final response is beginning to arrive. At this point, | 266 // followed and the final response is beginning to arrive. At this point, |
280 // meta data about the response is available, including for example HTTP | 267 // meta data about the response is available, including for example HTTP |
281 // response headers if this is a request for a HTTP resource. | 268 // response headers if this is a request for a HTTP resource. |
282 virtual void OnResponseStarted(URLRequest* request) = 0; | 269 virtual void OnResponseStarted(URLRequest* request) = 0; |
283 | 270 |
284 // Called when the a Read of the response body is completed after an | 271 // Called when the a Read of the response body is completed after an |
285 // IO_PENDING status from a Read() call. | 272 // IO_PENDING status from a Read() call. |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
770 scoped_refptr<AuthChallengeInfo> auth_info_; | 757 scoped_refptr<AuthChallengeInfo> auth_info_; |
771 | 758 |
772 base::TimeTicks creation_time_; | 759 base::TimeTicks creation_time_; |
773 | 760 |
774 DISALLOW_COPY_AND_ASSIGN(URLRequest); | 761 DISALLOW_COPY_AND_ASSIGN(URLRequest); |
775 }; | 762 }; |
776 | 763 |
777 } // namespace net | 764 } // namespace net |
778 | 765 |
779 #endif // NET_URL_REQUEST_URL_REQUEST_H_ | 766 #endif // NET_URL_REQUEST_URL_REQUEST_H_ |
OLD | NEW |