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 18 matching lines...) Expand all Loading... |
29 | 29 |
30 class AuthChallengeInfo; | 30 class AuthChallengeInfo; |
31 class AuthCredentials; | 31 class AuthCredentials; |
32 class CookieOptions; | 32 class CookieOptions; |
33 class Filter; | 33 class Filter; |
34 class HttpRequestHeaders; | 34 class HttpRequestHeaders; |
35 class HttpResponseInfo; | 35 class HttpResponseInfo; |
36 class IOBuffer; | 36 class IOBuffer; |
37 struct LoadTimingInfo; | 37 struct LoadTimingInfo; |
38 class NetworkDelegate; | 38 class NetworkDelegate; |
| 39 class ProxyServer; |
39 class SSLCertRequestInfo; | 40 class SSLCertRequestInfo; |
40 class SSLInfo; | 41 class SSLInfo; |
41 class SSLPrivateKey; | 42 class SSLPrivateKey; |
42 class UploadDataStream; | 43 class UploadDataStream; |
43 class URLRequestStatus; | 44 class URLRequestStatus; |
44 class X509Certificate; | 45 class X509Certificate; |
45 | 46 |
46 class NET_EXPORT URLRequestJob : public base::PowerObserver { | 47 class NET_EXPORT URLRequestJob : public base::PowerObserver { |
47 public: | 48 public: |
48 explicit URLRequestJob(URLRequest* request, | 49 explicit URLRequestJob(URLRequest* request, |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 // to get SDCH to emit stats. | 319 // to get SDCH to emit stats. |
319 void DestroyFilters(); | 320 void DestroyFilters(); |
320 | 321 |
321 // Provides derived classes with access to the request's network delegate. | 322 // Provides derived classes with access to the request's network delegate. |
322 NetworkDelegate* network_delegate() { return network_delegate_; } | 323 NetworkDelegate* network_delegate() { return network_delegate_; } |
323 | 324 |
324 // The status of the job. | 325 // The status of the job. |
325 const URLRequestStatus GetStatus(); | 326 const URLRequestStatus GetStatus(); |
326 | 327 |
327 // Set the proxy server that was used, if any. | 328 // Set the proxy server that was used, if any. |
328 void SetProxyServer(const HostPortPair& proxy_server); | 329 void SetProxyServer(const ProxyServer& proxy_server); |
329 | 330 |
330 // The number of bytes read after passing through the filter. This value | 331 // The number of bytes read after passing through the filter. This value |
331 // reflects bytes read even when there is no filter. | 332 // reflects bytes read even when there is no filter. |
332 int64_t postfilter_bytes_read() const { return postfilter_bytes_read_; } | 333 int64_t postfilter_bytes_read() const { return postfilter_bytes_read_; } |
333 | 334 |
334 // Turns an integer result code into an Error and a count of bytes read. | 335 // Turns an integer result code into an Error and a count of bytes read. |
335 // The semantics are: | 336 // The semantics are: |
336 // |result| >= 0: |*error| == OK, |*count| == |result| | 337 // |result| >= 0: |*error| == OK, |*count| == |result| |
337 // |result| < 0: |*error| = |result|, |*count| == 0 | 338 // |result| < 0: |*error| = |result|, |*count| == 0 |
338 static void ConvertResultToError(int result, Error* error, int* count); | 339 static void ConvertResultToError(int result, Error* error, int* count); |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 int64_t last_notified_total_sent_bytes_; | 453 int64_t last_notified_total_sent_bytes_; |
453 | 454 |
454 base::WeakPtrFactory<URLRequestJob> weak_factory_; | 455 base::WeakPtrFactory<URLRequestJob> weak_factory_; |
455 | 456 |
456 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); | 457 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); |
457 }; | 458 }; |
458 | 459 |
459 } // namespace net | 460 } // namespace net |
460 | 461 |
461 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ | 462 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ |
OLD | NEW |