| 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 // Called by URLRequest to dump memory allocation stats. |dump| is the memory |
| 232 // allocator dump of the parent in the memory dump hierarchy. |
| 233 virtual void DumpMemoryStats( |
| 234 base::trace_event::MemoryAllocatorDump* dump) const; |
| 235 |
| 231 // Given |policy|, |referrer|, and |redirect_destination|, returns the | 236 // Given |policy|, |referrer|, and |redirect_destination|, returns the |
| 232 // referrer URL mandated by |request|'s referrer policy. | 237 // referrer URL mandated by |request|'s referrer policy. |
| 233 static GURL ComputeReferrerForRedirect(URLRequest::ReferrerPolicy policy, | 238 static GURL ComputeReferrerForRedirect(URLRequest::ReferrerPolicy policy, |
| 234 const GURL& original_referrer, | 239 const GURL& original_referrer, |
| 235 const GURL& redirect_destination); | 240 const GURL& redirect_destination); |
| 236 | 241 |
| 237 protected: | 242 protected: |
| 238 // Notifies the job that a certificate is requested. | 243 // Notifies the job that a certificate is requested. |
| 239 void NotifyCertificateRequested(SSLCertRequestInfo* cert_request_info); | 244 void NotifyCertificateRequested(SSLCertRequestInfo* cert_request_info); |
| 240 | 245 |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 CompletionCallback read_raw_callback_; | 439 CompletionCallback read_raw_callback_; |
| 435 | 440 |
| 436 base::WeakPtrFactory<URLRequestJob> weak_factory_; | 441 base::WeakPtrFactory<URLRequestJob> weak_factory_; |
| 437 | 442 |
| 438 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); | 443 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); |
| 439 }; | 444 }; |
| 440 | 445 |
| 441 } // namespace net | 446 } // namespace net |
| 442 | 447 |
| 443 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ | 448 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ |
| OLD | NEW |