| 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 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1162 base::TimeTicks request_start = load_timing_info_.request_start; | 1162 base::TimeTicks request_start = load_timing_info_.request_start; |
| 1163 base::Time request_start_time = load_timing_info_.request_start_time; | 1163 base::Time request_start_time = load_timing_info_.request_start_time; |
| 1164 | 1164 |
| 1165 // Clear load times. Shouldn't be neded, but gives the GetLoadTimingInfo a | 1165 // Clear load times. Shouldn't be neded, but gives the GetLoadTimingInfo a |
| 1166 // consistent place to start from. | 1166 // consistent place to start from. |
| 1167 load_timing_info_ = LoadTimingInfo(); | 1167 load_timing_info_ = LoadTimingInfo(); |
| 1168 job_->GetLoadTimingInfo(&load_timing_info_); | 1168 job_->GetLoadTimingInfo(&load_timing_info_); |
| 1169 | 1169 |
| 1170 load_timing_info_.request_start = request_start; | 1170 load_timing_info_.request_start = request_start; |
| 1171 load_timing_info_.request_start_time = request_start_time; | 1171 load_timing_info_.request_start_time = request_start_time; |
| 1172 raw_header_size_ = GetTotalReceivedBytes(); |
| 1172 | 1173 |
| 1173 ConvertRealLoadTimesToBlockingTimes(&load_timing_info_); | 1174 ConvertRealLoadTimesToBlockingTimes(&load_timing_info_); |
| 1174 } | 1175 } |
| 1175 } | 1176 } |
| 1176 | 1177 |
| 1177 void URLRequest::NotifyRequestCompleted() { | 1178 void URLRequest::NotifyRequestCompleted() { |
| 1178 // TODO(battre): Get rid of this check, according to willchan it should | 1179 // TODO(battre): Get rid of this check, according to willchan it should |
| 1179 // not be needed. | 1180 // not be needed. |
| 1180 if (has_notified_completion_) | 1181 if (has_notified_completion_) |
| 1181 return; | 1182 return; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 1210 out->clear(); | 1211 out->clear(); |
| 1211 } | 1212 } |
| 1212 | 1213 |
| 1213 void URLRequest::set_status(URLRequestStatus status) { | 1214 void URLRequest::set_status(URLRequestStatus status) { |
| 1214 DCHECK(status_.is_io_pending() || status_.is_success() || | 1215 DCHECK(status_.is_io_pending() || status_.is_success() || |
| 1215 (!status.is_success() && !status.is_io_pending())); | 1216 (!status.is_success() && !status.is_io_pending())); |
| 1216 status_ = status; | 1217 status_ = status; |
| 1217 } | 1218 } |
| 1218 | 1219 |
| 1219 } // namespace net | 1220 } // namespace net |
| OLD | NEW |