Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(834)

Unified Diff: net/url_request/url_request_job.cc

Issue 1122483004: Remove NetLog::GetCaptureMode() and NetLogCaptureMode::None() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mmenke_refactor
Patch Set: second attempt at fixing int --> bool warning on windows Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/url_request/url_request.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « net/url_request/url_request.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698