| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 // we were expecting for that host. The delegate should either do the | 180 // we were expecting for that host. The delegate should either do the |
| 181 // safe thing and Cancel() the request or decide to proceed by calling | 181 // safe thing and Cancel() the request or decide to proceed by calling |
| 182 // ContinueDespiteLastError(). cert_error is a net::ERR_* error code | 182 // ContinueDespiteLastError(). cert_error is a net::ERR_* error code |
| 183 // indicating what's wrong with the certificate. | 183 // indicating what's wrong with the certificate. |
| 184 virtual void OnSSLCertificateError(URLRequest* request, | 184 virtual void OnSSLCertificateError(URLRequest* request, |
| 185 int cert_error, | 185 int cert_error, |
| 186 net::X509Certificate* cert) { | 186 net::X509Certificate* cert) { |
| 187 request->Cancel(); | 187 request->Cancel(); |
| 188 } | 188 } |
| 189 | 189 |
| 190 // Called when unable to get cookies due to policy. | 190 // Called when reading cookies. |blocked_by_policy| is true if access to |
| 191 virtual void OnGetCookiesBlocked(URLRequest* request) { | 191 // cookies was denied due to content settings. This method will never be |
| 192 // invoked when LOAD_DO_NOT_SEND_COOKIES is specified. |
| 193 virtual void OnGetCookies(URLRequest* request, bool blocked_by_policy) { |
| 192 } | 194 } |
| 193 | 195 |
| 194 // Called when unable to set a cookie due to policy. | 196 // Called when a cookie is set. |blocked_by_policy| is true if the cookie |
| 195 virtual void OnSetCookieBlocked(URLRequest* request) { | 197 // was rejected due to content settings. This method will never be invoked |
| 198 // when LOAD_DO_NOT_SAVE_COOKIES is specified. |
| 199 virtual void OnSetCookie(URLRequest* request, |
| 200 const std::string& cookie_line, |
| 201 bool blocked_by_policy) { |
| 196 } | 202 } |
| 197 | 203 |
| 198 // After calling Start(), the delegate will receive an OnResponseStarted | 204 // After calling Start(), the delegate will receive an OnResponseStarted |
| 199 // callback when the request has completed. If an error occurred, the | 205 // callback when the request has completed. If an error occurred, the |
| 200 // request->status() will be set. On success, all redirects have been | 206 // request->status() will be set. On success, all redirects have been |
| 201 // followed and the final response is beginning to arrive. At this point, | 207 // followed and the final response is beginning to arrive. At this point, |
| 202 // meta data about the response is available, including for example HTTP | 208 // meta data about the response is available, including for example HTTP |
| 203 // response headers if this is a request for a HTTP resource. | 209 // response headers if this is a request for a HTTP resource. |
| 204 virtual void OnResponseStarted(URLRequest* request) = 0; | 210 virtual void OnResponseStarted(URLRequest* request) = 0; |
| 205 | 211 |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 // The priority level for this request. Objects like ClientSocketPool use | 645 // The priority level for this request. Objects like ClientSocketPool use |
| 640 // this to determine which URLRequest to allocate sockets to first. | 646 // this to determine which URLRequest to allocate sockets to first. |
| 641 net::RequestPriority priority_; | 647 net::RequestPriority priority_; |
| 642 | 648 |
| 643 base::LeakTracker<URLRequest> leak_tracker_; | 649 base::LeakTracker<URLRequest> leak_tracker_; |
| 644 | 650 |
| 645 DISALLOW_COPY_AND_ASSIGN(URLRequest); | 651 DISALLOW_COPY_AND_ASSIGN(URLRequest); |
| 646 }; | 652 }; |
| 647 | 653 |
| 648 #endif // NET_URL_REQUEST_URL_REQUEST_H_ | 654 #endif // NET_URL_REQUEST_URL_REQUEST_H_ |
| OLD | NEW |