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