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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 // exist at destruction time of the URLRequestJob, unless they have been | 226 // exist at destruction time of the URLRequestJob, unless they have been |
227 // canceled by an explicit NetworkDelegate::NotifyURLRequestDestroyed() call. | 227 // canceled by an explicit NetworkDelegate::NotifyURLRequestDestroyed() call. |
228 virtual void NotifyURLRequestDestroyed(); | 228 virtual void NotifyURLRequestDestroyed(); |
229 | 229 |
230 // Populates |out| with the connection attempts made at the socket layer in | 230 // Populates |out| with the connection attempts made at the socket layer in |
231 // the course of executing the URLRequestJob. Should be called after the job | 231 // the course of executing the URLRequestJob. Should be called after the job |
232 // has failed or the response headers have been received. | 232 // has failed or the response headers have been received. |
233 virtual void GetConnectionAttempts(ConnectionAttempts* out) const; | 233 virtual void GetConnectionAttempts(ConnectionAttempts* out) const; |
234 | 234 |
235 // Given |policy|, |referrer|, and |redirect_destination|, returns the | 235 // Given |policy|, |referrer|, and |redirect_destination|, returns the |
236 // referrer URL mandated by |request|'s referrer policy. | 236 // referrer string mandated by |request|'s referrer policy. |
237 static GURL ComputeReferrerForRedirect(URLRequest::ReferrerPolicy policy, | 237 static std::string ComputeReferrerForRedirect(URLRequest::ReferrerPolicy polic
y, |
238 const std::string& referrer, | 238 const std::string& referrer, |
239 const GURL& redirect_destination); | 239 const GURL& redirect_destination
); |
240 | 240 |
241 protected: | 241 protected: |
242 friend class base::RefCounted<URLRequestJob>; | 242 friend class base::RefCounted<URLRequestJob>; |
243 ~URLRequestJob() override; | 243 ~URLRequestJob() override; |
244 | 244 |
245 // Notifies the job that a certificate is requested. | 245 // Notifies the job that a certificate is requested. |
246 void NotifyCertificateRequested(SSLCertRequestInfo* cert_request_info); | 246 void NotifyCertificateRequested(SSLCertRequestInfo* cert_request_info); |
247 | 247 |
248 // Notifies the job about an SSL certificate error. | 248 // Notifies the job about an SSL certificate error. |
249 void NotifySSLCertificateError(const SSLInfo& ssl_info, bool fatal); | 249 void NotifySSLCertificateError(const SSLInfo& ssl_info, bool fatal); |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 NetworkDelegate* network_delegate_; | 435 NetworkDelegate* network_delegate_; |
436 | 436 |
437 base::WeakPtrFactory<URLRequestJob> weak_factory_; | 437 base::WeakPtrFactory<URLRequestJob> weak_factory_; |
438 | 438 |
439 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); | 439 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); |
440 }; | 440 }; |
441 | 441 |
442 } // namespace net | 442 } // namespace net |
443 | 443 |
444 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ | 444 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ |
OLD | NEW |