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(); | |
307 reported_transfer_size_ = 0; | 306 reported_transfer_size_ = 0; |
308 response->head.request_start = request()->creation_time(); | 307 response->head.request_start = request()->creation_time(); |
309 response->head.response_start = TimeTicks::Now(); | 308 response->head.response_start = TimeTicks::Now(); |
310 // TODO(davidben): Is it necessary to pass the new first party URL for | 309 // TODO(davidben): Is it necessary to pass the new first party URL for |
311 // cookies? The only case where it can change is top-level navigation requests | 310 // cookies? The only case where it can change is top-level navigation requests |
312 // and hopefully those will eventually all be owned by the browser. It's | 311 // and hopefully those will eventually all be owned by the browser. It's |
313 // possible this is still needed while renderer-owned ones exist. | 312 // possible this is still needed while renderer-owned ones exist. |
314 return info->filter()->Send(new ResourceMsg_ReceivedRedirect( | 313 return info->filter()->Send(new ResourceMsg_ReceivedRedirect( |
315 GetRequestID(), redirect_info, response->head)); | 314 GetRequestID(), redirect_info, response->head)); |
316 } | 315 } |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 } else { | 601 } else { |
603 UMA_HISTOGRAM_CUSTOM_COUNTS( | 602 UMA_HISTOGRAM_CUSTOM_COUNTS( |
604 "Net.ResourceLoader.ResponseStartToEnd.Over_512kB", | 603 "Net.ResourceLoader.ResponseStartToEnd.Over_512kB", |
605 elapsed_time, 1, 100000, 100); | 604 elapsed_time, 1, 100000, 100); |
606 } | 605 } |
607 | 606 |
608 inlining_helper_->RecordHistogram(elapsed_time); | 607 inlining_helper_->RecordHistogram(elapsed_time); |
609 } | 608 } |
610 | 609 |
611 } // namespace content | 610 } // namespace content |
OLD | NEW |