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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
220 // base::PowerObserver methods: | 220 // base::PowerObserver methods: |
221 // We invoke URLRequestJob::Kill on suspend (crbug.com/4606). | 221 // We invoke URLRequestJob::Kill on suspend (crbug.com/4606). |
222 void OnSuspend() override; | 222 void OnSuspend() override; |
223 | 223 |
224 // Called after a NetworkDelegate has been informed that the URLRequest | 224 // Called after a NetworkDelegate has been informed that the URLRequest |
225 // will be destroyed. This is used to track that no pending callbacks | 225 // will be destroyed. This is used to track that no pending callbacks |
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 // Given |request| and a |url| to which that request is being redirected, | |
231 // returns the referrer URL mandated by |request|'s referrer policy. | |
232 static GURL ComputeReferrerForRedirect(const URLRequest& request, | |
mmenke
2014/11/20 16:23:45
Suggest making this take the policy and the origin
Mike West
2014/11/21 09:29:29
Done.
| |
233 const GURL& redirect_destination); | |
234 | |
230 protected: | 235 protected: |
231 friend class base::RefCounted<URLRequestJob>; | 236 friend class base::RefCounted<URLRequestJob>; |
232 ~URLRequestJob() override; | 237 ~URLRequestJob() override; |
233 | 238 |
234 // Notifies the job that a certificate is requested. | 239 // Notifies the job that a certificate is requested. |
235 void NotifyCertificateRequested(SSLCertRequestInfo* cert_request_info); | 240 void NotifyCertificateRequested(SSLCertRequestInfo* cert_request_info); |
236 | 241 |
237 // Notifies the job about an SSL certificate error. | 242 // Notifies the job about an SSL certificate error. |
238 void NotifySSLCertificateError(const SSLInfo& ssl_info, bool fatal); | 243 void NotifySSLCertificateError(const SSLInfo& ssl_info, bool fatal); |
239 | 244 |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
430 NetworkDelegate* network_delegate_; | 435 NetworkDelegate* network_delegate_; |
431 | 436 |
432 base::WeakPtrFactory<URLRequestJob> weak_factory_; | 437 base::WeakPtrFactory<URLRequestJob> weak_factory_; |
433 | 438 |
434 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); | 439 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); |
435 }; | 440 }; |
436 | 441 |
437 } // namespace net | 442 } // namespace net |
438 | 443 |
439 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ | 444 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ |
OLD | NEW |