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