| 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> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 16 #include "base/power_monitor/power_observer.h" | 16 #include "base/power_monitor/power_observer.h" |
| 17 #include "net/base/host_port_pair.h" | 17 #include "net/base/host_port_pair.h" |
| 18 #include "net/base/load_states.h" | 18 #include "net/base/load_states.h" |
| 19 #include "net/base/net_error_details.h" | 19 #include "net/base/net_error_details.h" |
| 20 #include "net/base/net_export.h" | 20 #include "net/base/net_export.h" |
| 21 #include "net/base/request_priority.h" | 21 #include "net/base/request_priority.h" |
| 22 #include "net/cookies/canonical_cookie.h" | 22 #include "net/cookies/canonical_cookie.h" |
| 23 #include "net/filter/source_stream.h" | 23 #include "net/filter/source_stream.h" |
| 24 #include "net/socket/connection_attempts.h" | 24 #include "net/socket/connection_attempts.h" |
| 25 #include "net/url_request/redirect_info.h" | 25 #include "net/url_request/redirect_info.h" |
| 26 #include "net/url_request/url_request.h" | 26 #include "net/url_request/url_request.h" |
| 27 #include "url/gurl.h" | 27 #include "url/gurl.h" |
| 28 | 28 |
| 29 namespace base { |
| 30 namespace trace_event { |
| 31 class ProcessMemoryDump; |
| 32 } |
| 33 } |
| 34 |
| 29 namespace net { | 35 namespace net { |
| 30 | 36 |
| 31 class AuthChallengeInfo; | 37 class AuthChallengeInfo; |
| 32 class AuthCredentials; | 38 class AuthCredentials; |
| 33 class CookieOptions; | 39 class CookieOptions; |
| 34 class HttpRequestHeaders; | 40 class HttpRequestHeaders; |
| 35 class HttpResponseInfo; | 41 class HttpResponseInfo; |
| 36 class IOBuffer; | 42 class IOBuffer; |
| 37 struct LoadTimingInfo; | 43 struct LoadTimingInfo; |
| 38 class NetworkDelegate; | 44 class NetworkDelegate; |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 // will be destroyed. This is used to track that no pending callbacks | 227 // will be destroyed. This is used to track that no pending callbacks |
| 222 // exist at destruction time of the URLRequestJob, unless they have been | 228 // exist at destruction time of the URLRequestJob, unless they have been |
| 223 // canceled by an explicit NetworkDelegate::NotifyURLRequestDestroyed() call. | 229 // canceled by an explicit NetworkDelegate::NotifyURLRequestDestroyed() call. |
| 224 virtual void NotifyURLRequestDestroyed(); | 230 virtual void NotifyURLRequestDestroyed(); |
| 225 | 231 |
| 226 // Populates |out| with the connection attempts made at the socket layer in | 232 // 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 | 233 // the course of executing the URLRequestJob. Should be called after the job |
| 228 // has failed or the response headers have been received. | 234 // has failed or the response headers have been received. |
| 229 virtual void GetConnectionAttempts(ConnectionAttempts* out) const; | 235 virtual void GetConnectionAttempts(ConnectionAttempts* out) const; |
| 230 | 236 |
| 237 // Dumps memory allocation stats. |parent_dump_absolute_name| is the name |
| 238 // used by the parent MemoryAllocatorDump in the memory dump hierarchy. |
| 239 virtual void DumpMemoryStats( |
| 240 base::trace_event::ProcessMemoryDump* pmd, |
| 241 const std::string& parent_dump_absolute_name) const; |
| 242 |
| 231 // Given |policy|, |referrer|, and |redirect_destination|, returns the | 243 // Given |policy|, |referrer|, and |redirect_destination|, returns the |
| 232 // referrer URL mandated by |request|'s referrer policy. | 244 // referrer URL mandated by |request|'s referrer policy. |
| 233 static GURL ComputeReferrerForRedirect(URLRequest::ReferrerPolicy policy, | 245 static GURL ComputeReferrerForRedirect(URLRequest::ReferrerPolicy policy, |
| 234 const GURL& original_referrer, | 246 const GURL& original_referrer, |
| 235 const GURL& redirect_destination); | 247 const GURL& redirect_destination); |
| 236 | 248 |
| 237 protected: | 249 protected: |
| 238 // Notifies the job that a certificate is requested. | 250 // Notifies the job that a certificate is requested. |
| 239 void NotifyCertificateRequested(SSLCertRequestInfo* cert_request_info); | 251 void NotifyCertificateRequested(SSLCertRequestInfo* cert_request_info); |
| 240 | 252 |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 CompletionCallback read_raw_callback_; | 450 CompletionCallback read_raw_callback_; |
| 439 | 451 |
| 440 base::WeakPtrFactory<URLRequestJob> weak_factory_; | 452 base::WeakPtrFactory<URLRequestJob> weak_factory_; |
| 441 | 453 |
| 442 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); | 454 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); |
| 443 }; | 455 }; |
| 444 | 456 |
| 445 } // namespace net | 457 } // namespace net |
| 446 | 458 |
| 447 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ | 459 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ |
| OLD | NEW |