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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
279 // still present to assist in calculations. This is used by URLRequestHttpJob | 279 // still present to assist in calculations. This is used by URLRequestHttpJob |
280 // to get SDCH to emit stats. | 280 // to get SDCH to emit stats. |
281 void DestroyFilters() { filter_.reset(); } | 281 void DestroyFilters() { filter_.reset(); } |
282 | 282 |
283 // The status of the job. | 283 // The status of the job. |
284 const URLRequestStatus GetStatus(); | 284 const URLRequestStatus GetStatus(); |
285 | 285 |
286 // Set the status of the job. | 286 // Set the status of the job. |
287 void SetStatus(const URLRequestStatus& status); | 287 void SetStatus(const URLRequestStatus& status); |
288 | 288 |
289 // Custom handler for derived classes when the request is detached. | |
290 virtual void OnDetachRequest() { } | |
rvargas (doing something else)
2012/07/21 03:04:46
nit: remove the space {}
tburkard
2012/07/24 01:03:12
Done.
| |
291 | |
289 // The number of bytes read before passing to the filter. | 292 // The number of bytes read before passing to the filter. |
290 int prefilter_bytes_read() const { return prefilter_bytes_read_; } | 293 int prefilter_bytes_read() const { return prefilter_bytes_read_; } |
291 | 294 |
292 // The number of bytes read after passing through the filter. | 295 // The number of bytes read after passing through the filter. |
293 int postfilter_bytes_read() const { return postfilter_bytes_read_; } | 296 int postfilter_bytes_read() const { return postfilter_bytes_read_; } |
294 | 297 |
295 // Total number of bytes read from network (or cache) and typically handed | 298 // Total number of bytes read from network (or cache) and typically handed |
296 // to filter to process. Used to histogram compression ratios, and error | 299 // to filter to process. Used to histogram compression ratios, and error |
297 // recovery scenarios in filters. | 300 // recovery scenarios in filters. |
298 int64 filter_input_byte_count() const { return filter_input_byte_count_; } | 301 int64 filter_input_byte_count() const { return filter_input_byte_count_; } |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
375 NetworkDelegate* network_delegate_; | 378 NetworkDelegate* network_delegate_; |
376 | 379 |
377 base::WeakPtrFactory<URLRequestJob> weak_factory_; | 380 base::WeakPtrFactory<URLRequestJob> weak_factory_; |
378 | 381 |
379 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); | 382 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); |
380 }; | 383 }; |
381 | 384 |
382 } // namespace net | 385 } // namespace net |
383 | 386 |
384 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ | 387 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ |
OLD | NEW |