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

Side by Side Diff: net/url_request/url_request.cc

Issue 2167853003: [DevTools] Always report encodedDataLength in Network.ResponseReceived. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changes Created 4 years, 3 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 unified diff | Download patch
OLDNEW
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 #include "net/url_request/url_request.h" 5 #include "net/url_request/url_request.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1184 base::TimeTicks request_start = load_timing_info_.request_start; 1184 base::TimeTicks request_start = load_timing_info_.request_start;
1185 base::Time request_start_time = load_timing_info_.request_start_time; 1185 base::Time request_start_time = load_timing_info_.request_start_time;
1186 1186
1187 // Clear load times. Shouldn't be neded, but gives the GetLoadTimingInfo a 1187 // Clear load times. Shouldn't be neded, but gives the GetLoadTimingInfo a
1188 // consistent place to start from. 1188 // consistent place to start from.
1189 load_timing_info_ = LoadTimingInfo(); 1189 load_timing_info_ = LoadTimingInfo();
1190 job_->GetLoadTimingInfo(&load_timing_info_); 1190 job_->GetLoadTimingInfo(&load_timing_info_);
1191 1191
1192 load_timing_info_.request_start = request_start; 1192 load_timing_info_.request_start = request_start;
1193 load_timing_info_.request_start_time = request_start_time; 1193 load_timing_info_.request_start_time = request_start_time;
1194 raw_header_size_ = GetTotalReceivedBytes();
1194 1195
1195 ConvertRealLoadTimesToBlockingTimes(&load_timing_info_); 1196 ConvertRealLoadTimesToBlockingTimes(&load_timing_info_);
1196 } 1197 }
1197 } 1198 }
1198 1199
1199 void URLRequest::NotifyRequestCompleted() { 1200 void URLRequest::NotifyRequestCompleted() {
1200 // TODO(battre): Get rid of this check, according to willchan it should 1201 // TODO(battre): Get rid of this check, according to willchan it should
1201 // not be needed. 1202 // not be needed.
1202 if (has_notified_completion_) 1203 if (has_notified_completion_)
1203 return; 1204 return;
(...skipping 29 matching lines...) Expand all
1233 out->clear(); 1234 out->clear();
1234 } 1235 }
1235 1236
1236 void URLRequest::set_status(URLRequestStatus status) { 1237 void URLRequest::set_status(URLRequestStatus status) {
1237 DCHECK(status_.is_io_pending() || status_.is_success() || 1238 DCHECK(status_.is_io_pending() || status_.is_success() ||
1238 (!status.is_success() && !status.is_io_pending())); 1239 (!status.is_success() && !status.is_io_pending()));
1239 status_ = status; 1240 status_ = status;
1240 } 1241 }
1241 1242
1242 } // namespace net 1243 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698