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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
333 // The status of the job. | 333 // The status of the job. |
334 const URLRequestStatus GetStatus(); | 334 const URLRequestStatus GetStatus(); |
335 | 335 |
336 // Set the status of the job. | 336 // Set the status of the job. |
337 void SetStatus(const URLRequestStatus& status); | 337 void SetStatus(const URLRequestStatus& status); |
338 | 338 |
339 // Set the proxy server that was used, if any. | 339 // Set the proxy server that was used, if any. |
340 void SetProxyServer(const HostPortPair& proxy_server); | 340 void SetProxyServer(const HostPortPair& proxy_server); |
341 | 341 |
342 // The number of bytes read before passing to the filter. | 342 // The number of bytes read before passing to the filter. |
343 int prefilter_bytes_read() const { return prefilter_bytes_read_; } | 343 int64 prefilter_bytes_read() const { return prefilter_bytes_read_; } |
344 | 344 |
345 // The number of bytes read after passing through the filter. | 345 // The number of bytes read after passing through the filter. |
346 int postfilter_bytes_read() const { return postfilter_bytes_read_; } | 346 int64 postfilter_bytes_read() const { return postfilter_bytes_read_; } |
347 | 347 |
348 // Total number of bytes read from network (or cache) and typically handed | 348 // Total number of bytes read from network (or cache) and typically handed |
349 // to filter to process. Used to histogram compression ratios, and error | 349 // to filter to process. Used to histogram compression ratios, and error |
350 // recovery scenarios in filters. | 350 // recovery scenarios in filters. |
351 int64 filter_input_byte_count() const { return filter_input_byte_count_; } | 351 int64 filter_input_byte_count() const { return filter_input_byte_count_; } |
352 | 352 |
353 // The request that initiated this job. This value MAY BE NULL if the | 353 // The request that initiated this job. This value MAY BE NULL if the |
354 // request was released by DetachRequest(). | 354 // request was released by DetachRequest(). |
355 URLRequest* request_; | 355 URLRequest* request_; |
356 | 356 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
389 | 389 |
390 // Computes a new RedirectInfo based on receiving a redirect response of | 390 // Computes a new RedirectInfo based on receiving a redirect response of |
391 // |location| and |http_status_code|. | 391 // |location| and |http_status_code|. |
392 RedirectInfo ComputeRedirectInfo(const GURL& location, int http_status_code); | 392 RedirectInfo ComputeRedirectInfo(const GURL& location, int http_status_code); |
393 | 393 |
394 // Indicates that the job is done producing data, either it has completed | 394 // Indicates that the job is done producing data, either it has completed |
395 // all the data or an error has been encountered. Set exclusively by | 395 // all the data or an error has been encountered. Set exclusively by |
396 // NotifyDone so that it is kept in sync with the request. | 396 // NotifyDone so that it is kept in sync with the request. |
397 bool done_; | 397 bool done_; |
398 | 398 |
399 int prefilter_bytes_read_; | 399 int64 prefilter_bytes_read_; |
400 int postfilter_bytes_read_; | 400 int64 postfilter_bytes_read_; |
401 int64 filter_input_byte_count_; | 401 int64 filter_input_byte_count_; |
mmenke
2015/04/10 20:43:50
Erm...wait...filter_input_byte_count_ and prefilte
sclittle
2015/04/10 20:59:13
Looks like you're right; I want to merge this CL i
| |
402 | 402 |
403 // The data stream filter which is enabled on demand. | 403 // The data stream filter which is enabled on demand. |
404 scoped_ptr<Filter> filter_; | 404 scoped_ptr<Filter> filter_; |
405 | 405 |
406 // If the filter filled its output buffer, then there is a change that it | 406 // If the filter filled its output buffer, then there is a change that it |
407 // still has internal data to emit, and this flag is set. | 407 // still has internal data to emit, and this flag is set. |
408 bool filter_needs_more_output_space_; | 408 bool filter_needs_more_output_space_; |
409 | 409 |
410 // When we filter data, we receive data into the filter buffers. After | 410 // When we filter data, we receive data into the filter buffers. After |
411 // processing the filtered data, we return the data in the caller's buffer. | 411 // processing the filtered data, we return the data in the caller's buffer. |
(...skipping 20 matching lines...) Expand all Loading... | |
432 NetworkDelegate* network_delegate_; | 432 NetworkDelegate* network_delegate_; |
433 | 433 |
434 base::WeakPtrFactory<URLRequestJob> weak_factory_; | 434 base::WeakPtrFactory<URLRequestJob> weak_factory_; |
435 | 435 |
436 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); | 436 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); |
437 }; | 437 }; |
438 | 438 |
439 } // namespace net | 439 } // namespace net |
440 | 440 |
441 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ | 441 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ |
OLD | NEW |