| 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_JOB_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_JOB_H_ |
| 6 #define NET_URL_REQUEST_URL_REQUEST_JOB_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_JOB_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 // will be destroyed. This is used to track that no pending callbacks | 221 // will be destroyed. This is used to track that no pending callbacks |
| 222 // exist at destruction time of the URLRequestJob, unless they have been | 222 // exist at destruction time of the URLRequestJob, unless they have been |
| 223 // canceled by an explicit NetworkDelegate::NotifyURLRequestDestroyed() call. | 223 // canceled by an explicit NetworkDelegate::NotifyURLRequestDestroyed() call. |
| 224 virtual void NotifyURLRequestDestroyed(); | 224 virtual void NotifyURLRequestDestroyed(); |
| 225 | 225 |
| 226 // Populates |out| with the connection attempts made at the socket layer in | 226 // Populates |out| with the connection attempts made at the socket layer in |
| 227 // the course of executing the URLRequestJob. Should be called after the job | 227 // the course of executing the URLRequestJob. Should be called after the job |
| 228 // has failed or the response headers have been received. | 228 // has failed or the response headers have been received. |
| 229 virtual void GetConnectionAttempts(ConnectionAttempts* out) const; | 229 virtual void GetConnectionAttempts(ConnectionAttempts* out) const; |
| 230 | 230 |
| 231 // Given |policy|, |referrer|, and |redirect_destination|, returns the | 231 // Given |policy|, |referrer|, and |destination|, returns the |
| 232 // referrer URL mandated by |request|'s referrer policy. | 232 // referrer URL mandated by |request|'s referrer policy. |
| 233 static GURL ComputeReferrerForRedirect(URLRequest::ReferrerPolicy policy, | 233 static GURL ComputeReferrerForPolicy(URLRequest::ReferrerPolicy policy, |
| 234 const GURL& original_referrer, | 234 const GURL& original_referrer, |
| 235 const GURL& redirect_destination); | 235 const GURL& destination); |
| 236 | 236 |
| 237 protected: | 237 protected: |
| 238 // Notifies the job that a certificate is requested. | 238 // Notifies the job that a certificate is requested. |
| 239 void NotifyCertificateRequested(SSLCertRequestInfo* cert_request_info); | 239 void NotifyCertificateRequested(SSLCertRequestInfo* cert_request_info); |
| 240 | 240 |
| 241 // Notifies the job about an SSL certificate error. | 241 // Notifies the job about an SSL certificate error. |
| 242 void NotifySSLCertificateError(const SSLInfo& ssl_info, bool fatal); | 242 void NotifySSLCertificateError(const SSLInfo& ssl_info, bool fatal); |
| 243 | 243 |
| 244 // Delegates to URLRequest::Delegate. | 244 // Delegates to URLRequest::Delegate. |
| 245 bool CanGetCookies(const CookieList& cookie_list) const; | 245 bool CanGetCookies(const CookieList& cookie_list) const; |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 CompletionCallback read_raw_callback_; | 443 CompletionCallback read_raw_callback_; |
| 444 | 444 |
| 445 base::WeakPtrFactory<URLRequestJob> weak_factory_; | 445 base::WeakPtrFactory<URLRequestJob> weak_factory_; |
| 446 | 446 |
| 447 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); | 447 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); |
| 448 }; | 448 }; |
| 449 | 449 |
| 450 } // namespace net | 450 } // namespace net |
| 451 | 451 |
| 452 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ | 452 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ |
| OLD | NEW |