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 21 matching lines...) Expand all Loading... |
32 class SSLCertRequestInfo; | 32 class SSLCertRequestInfo; |
33 class SSLInfo; | 33 class SSLInfo; |
34 class URLRequest; | 34 class URLRequest; |
35 class UploadDataStream; | 35 class UploadDataStream; |
36 class URLRequestStatus; | 36 class URLRequestStatus; |
37 class X509Certificate; | 37 class X509Certificate; |
38 | 38 |
39 class NET_EXPORT URLRequestJob : public base::RefCounted<URLRequestJob>, | 39 class NET_EXPORT URLRequestJob : public base::RefCounted<URLRequestJob>, |
40 public base::SystemMonitor::PowerObserver { | 40 public base::SystemMonitor::PowerObserver { |
41 public: | 41 public: |
42 explicit URLRequestJob(URLRequest* request, | 42 URLRequestJob(URLRequest* request, |
43 NetworkDelegate* network_delegate); | 43 NetworkDelegate* network_delegate); |
44 | 44 |
45 // Returns the request that owns this job. THIS POINTER MAY BE NULL if the | 45 // Returns the request that owns this job. THIS POINTER MAY BE NULL if the |
46 // request was destroyed. | 46 // request was destroyed. |
47 URLRequest* request() const { | 47 URLRequest* request() const { |
48 return request_; | 48 return request_; |
49 } | 49 } |
50 | 50 |
51 // Sets the upload data, most requests have no upload data, so this is a NOP. | 51 // Sets the upload data, most requests have no upload data, so this is a NOP. |
52 // Job types supporting upload data will override this. | 52 // Job types supporting upload data will override this. |
53 virtual void SetUpload(UploadDataStream* upload_data_stream); | 53 virtual void SetUpload(UploadDataStream* upload_data_stream); |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 NetworkDelegate* network_delegate_; | 379 NetworkDelegate* network_delegate_; |
380 | 380 |
381 base::WeakPtrFactory<URLRequestJob> weak_factory_; | 381 base::WeakPtrFactory<URLRequestJob> weak_factory_; |
382 | 382 |
383 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); | 383 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); |
384 }; | 384 }; |
385 | 385 |
386 } // namespace net | 386 } // namespace net |
387 | 387 |
388 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ | 388 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ |
OLD | NEW |