OLD | NEW |
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 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1138 base::TimeTicks request_start = load_timing_info_.request_start; | 1138 base::TimeTicks request_start = load_timing_info_.request_start; |
1139 base::Time request_start_time = load_timing_info_.request_start_time; | 1139 base::Time request_start_time = load_timing_info_.request_start_time; |
1140 | 1140 |
1141 // Clear load times. Shouldn't be neded, but gives the GetLoadTimingInfo a | 1141 // Clear load times. Shouldn't be neded, but gives the GetLoadTimingInfo a |
1142 // consistent place to start from. | 1142 // consistent place to start from. |
1143 load_timing_info_ = LoadTimingInfo(); | 1143 load_timing_info_ = LoadTimingInfo(); |
1144 job_->GetLoadTimingInfo(&load_timing_info_); | 1144 job_->GetLoadTimingInfo(&load_timing_info_); |
1145 | 1145 |
1146 load_timing_info_.request_start = request_start; | 1146 load_timing_info_.request_start = request_start; |
1147 load_timing_info_.request_start_time = request_start_time; | 1147 load_timing_info_.request_start_time = request_start_time; |
| 1148 raw_header_size_ = GetTotalReceivedBytes(); |
1148 | 1149 |
1149 ConvertRealLoadTimesToBlockingTimes(&load_timing_info_); | 1150 ConvertRealLoadTimesToBlockingTimes(&load_timing_info_); |
1150 } | 1151 } |
1151 } | 1152 } |
1152 | 1153 |
1153 void URLRequest::NotifyRequestCompleted() { | 1154 void URLRequest::NotifyRequestCompleted() { |
1154 // TODO(battre): Get rid of this check, according to willchan it should | 1155 // TODO(battre): Get rid of this check, according to willchan it should |
1155 // not be needed. | 1156 // not be needed. |
1156 if (has_notified_completion_) | 1157 if (has_notified_completion_) |
1157 return; | 1158 return; |
(...skipping 22 matching lines...) Expand all Loading... |
1180 } | 1181 } |
1181 | 1182 |
1182 void URLRequest::GetConnectionAttempts(ConnectionAttempts* out) const { | 1183 void URLRequest::GetConnectionAttempts(ConnectionAttempts* out) const { |
1183 if (job_) | 1184 if (job_) |
1184 job_->GetConnectionAttempts(out); | 1185 job_->GetConnectionAttempts(out); |
1185 else | 1186 else |
1186 out->clear(); | 1187 out->clear(); |
1187 } | 1188 } |
1188 | 1189 |
1189 } // namespace net | 1190 } // namespace net |
OLD | NEW |