Index: net/url_request/url_request_job.cc |
=================================================================== |
--- net/url_request/url_request_job.cc (revision 11636) |
+++ net/url_request/url_request_job.cc (working copy) |
@@ -28,7 +28,8 @@ |
read_buffer_(NULL), |
read_buffer_len_(0), |
has_handled_response_(false), |
- expected_content_size_(-1) { |
+ expected_content_size_(-1), |
+ filter_input_byte_count_(0) { |
is_profiling_ = request->enable_profiling(); |
if (is_profiling()) { |
metrics_.reset(new URLRequestJobMetrics()); |
@@ -86,6 +87,10 @@ |
NOTREACHED(); |
} |
+int64 URLRequestJob::GetByteReadCount() const { |
+ return filter_input_byte_count_ ; |
+} |
+ |
bool URLRequestJob::GetURL(GURL* gurl) const { |
if (!request_) |
return false; |
@@ -505,6 +510,7 @@ |
++(metrics_->number_of_read_IO_); |
metrics_->total_bytes_read_ += bytes_read; |
} |
+ filter_input_byte_count_ += bytes_read; |
g_url_request_job_tracker.OnBytesRead(this, bytes_read); |
} |