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 "content/browser/loader/async_resource_handler.h" | 5 #include "content/browser/loader/async_resource_handler.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 | 296 |
297 *defer = did_defer_ = true; | 297 *defer = did_defer_ = true; |
298 OnDefer(); | 298 OnDefer(); |
299 | 299 |
300 if (rdh_->delegate()) { | 300 if (rdh_->delegate()) { |
301 rdh_->delegate()->OnRequestRedirected( | 301 rdh_->delegate()->OnRequestRedirected( |
302 redirect_info.new_url, request(), info->GetContext(), response); | 302 redirect_info.new_url, request(), info->GetContext(), response); |
303 } | 303 } |
304 | 304 |
305 NetLogObserver::PopulateResponseInfo(request(), response); | 305 NetLogObserver::PopulateResponseInfo(request(), response); |
| 306 response->head.encoded_data_length = request()->GetTotalReceivedBytes(); |
306 reported_transfer_size_ = 0; | 307 reported_transfer_size_ = 0; |
307 response->head.request_start = request()->creation_time(); | 308 response->head.request_start = request()->creation_time(); |
308 response->head.response_start = TimeTicks::Now(); | 309 response->head.response_start = TimeTicks::Now(); |
309 // TODO(davidben): Is it necessary to pass the new first party URL for | 310 // TODO(davidben): Is it necessary to pass the new first party URL for |
310 // cookies? The only case where it can change is top-level navigation requests | 311 // cookies? The only case where it can change is top-level navigation requests |
311 // and hopefully those will eventually all be owned by the browser. It's | 312 // and hopefully those will eventually all be owned by the browser. It's |
312 // possible this is still needed while renderer-owned ones exist. | 313 // possible this is still needed while renderer-owned ones exist. |
313 return info->filter()->Send(new ResourceMsg_ReceivedRedirect( | 314 return info->filter()->Send(new ResourceMsg_ReceivedRedirect( |
314 GetRequestID(), redirect_info, response->head)); | 315 GetRequestID(), redirect_info, response->head)); |
315 } | 316 } |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 } else { | 602 } else { |
602 UMA_HISTOGRAM_CUSTOM_COUNTS( | 603 UMA_HISTOGRAM_CUSTOM_COUNTS( |
603 "Net.ResourceLoader.ResponseStartToEnd.Over_512kB", | 604 "Net.ResourceLoader.ResponseStartToEnd.Over_512kB", |
604 elapsed_time, 1, 100000, 100); | 605 elapsed_time, 1, 100000, 100); |
605 } | 606 } |
606 | 607 |
607 inlining_helper_->RecordHistogram(elapsed_time); | 608 inlining_helper_->RecordHistogram(elapsed_time); |
608 } | 609 } |
609 | 610 |
610 } // namespace content | 611 } // namespace content |
OLD | NEW |