diff options
Diffstat (limited to 'net/url_request/url_request_job.cc')
-rw-r--r-- | net/url_request/url_request_job.cc | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/net/url_request/url_request_job.cc b/net/url_request/url_request_job.cc index 5b14b6b..e466569 100644 --- a/net/url_request/url_request_job.cc +++ b/net/url_request/url_request_job.cc @@ -698,12 +698,11 @@ bool URLRequestJob::ReadFilteredData(int* bytes_read) { } // If logging all bytes is enabled, log the filtered bytes read. - if (rv && request() && - request()->net_log().GetCaptureMode().include_socket_bytes() && - filtered_data_len > 0) { + if (rv && request() && filtered_data_len > 0 && + request()->net_log().IsCapturing()) { request()->net_log().AddByteTransferEvent( - NetLog::TYPE_URL_REQUEST_JOB_FILTERED_BYTES_READ, - filtered_data_len, filtered_read_buffer_->data()); + NetLog::TYPE_URL_REQUEST_JOB_FILTERED_BYTES_READ, filtered_data_len, + filtered_read_buffer_->data()); } } else { // we are done, or there is no data left. @@ -790,9 +789,8 @@ void URLRequestJob::FollowRedirect(const RedirectInfo& redirect_info) { void URLRequestJob::OnRawReadComplete(int bytes_read) { DCHECK(raw_read_buffer_.get()); // If |filter_| is non-NULL, bytes will be logged after it is applied instead. - if (!filter_.get() && request() && - request()->net_log().GetCaptureMode().include_socket_bytes() && - bytes_read > 0) { + if (!filter_.get() && request() && bytes_read > 0 && + request()->net_log().IsCapturing()) { request()->net_log().AddByteTransferEvent( NetLog::TYPE_URL_REQUEST_JOB_BYTES_READ, bytes_read, raw_read_buffer_->data()); |