| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 namespace net { | 23 namespace net { |
| 24 | 24 |
| 25 class AuthChallengeInfo; | 25 class AuthChallengeInfo; |
| 26 class AuthCredentials; | 26 class AuthCredentials; |
| 27 class CookieList; | 27 class CookieList; |
| 28 class CookieOptions; | 28 class CookieOptions; |
| 29 class HttpRequestHeaders; | 29 class HttpRequestHeaders; |
| 30 class HttpResponseInfo; | 30 class HttpResponseInfo; |
| 31 class IOBuffer; | 31 class IOBuffer; |
| 32 class NetworkDelegate; |
| 32 class SSLCertRequestInfo; | 33 class SSLCertRequestInfo; |
| 33 class SSLInfo; | 34 class SSLInfo; |
| 34 class URLRequest; | 35 class URLRequest; |
| 35 class UploadData; | 36 class UploadData; |
| 36 class URLRequestStatus; | 37 class URLRequestStatus; |
| 37 class X509Certificate; | 38 class X509Certificate; |
| 38 | 39 |
| 39 class NET_EXPORT URLRequestJob : public base::RefCounted<URLRequestJob>, | 40 class NET_EXPORT URLRequestJob : public base::RefCounted<URLRequestJob>, |
| 40 public base::SystemMonitor::PowerObserver { | 41 public base::SystemMonitor::PowerObserver { |
| 41 public: | 42 public: |
| 42 explicit URLRequestJob(URLRequest* request); | 43 explicit URLRequestJob(URLRequest* request, |
| 44 NetworkDelegate* network_delegate); |
| 43 | 45 |
| 44 // Returns the request that owns this job. THIS POINTER MAY BE NULL if the | 46 // Returns the request that owns this job. THIS POINTER MAY BE NULL if the |
| 45 // request was destroyed. | 47 // request was destroyed. |
| 46 URLRequest* request() const { | 48 URLRequest* request() const { |
| 47 return request_; | 49 return request_; |
| 48 } | 50 } |
| 49 | 51 |
| 50 // Sets the upload data, most requests have no upload data, so this is a NOP. | 52 // Sets the upload data, most requests have no upload data, so this is a NOP. |
| 51 // Job types supporting upload data will override this. | 53 // Job types supporting upload data will override this. |
| 52 virtual void SetUpload(UploadData* upload); | 54 virtual void SetUpload(UploadData* upload); |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 // OnResponseStarted callback and potentially redirect callbacks as well. | 367 // OnResponseStarted callback and potentially redirect callbacks as well. |
| 366 bool has_handled_response_; | 368 bool has_handled_response_; |
| 367 | 369 |
| 368 // Expected content size | 370 // Expected content size |
| 369 int64 expected_content_size_; | 371 int64 expected_content_size_; |
| 370 | 372 |
| 371 // Set when a redirect is deferred. | 373 // Set when a redirect is deferred. |
| 372 GURL deferred_redirect_url_; | 374 GURL deferred_redirect_url_; |
| 373 int deferred_redirect_status_code_; | 375 int deferred_redirect_status_code_; |
| 374 | 376 |
| 377 NetworkDelegate* network_delegate_; |
| 378 |
| 375 base::WeakPtrFactory<URLRequestJob> weak_factory_; | 379 base::WeakPtrFactory<URLRequestJob> weak_factory_; |
| 376 | 380 |
| 377 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); | 381 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); |
| 378 }; | 382 }; |
| 379 | 383 |
| 380 } // namespace net | 384 } // namespace net |
| 381 | 385 |
| 382 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ | 386 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ |
| OLD | NEW |