Index: net/url_request/url_request_job.cc |
diff --git a/net/url_request/url_request_job.cc b/net/url_request/url_request_job.cc |
index 5b14b6b28fd19ee69f2ab020a9d996fb2703c193..e4665696bdacb4ae5a6d545a5419987eee2836a5 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()); |