Chromium Code Reviews| 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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 507 // the ERR_ABORTED error code). | 507 // the ERR_ABORTED error code). |
| 508 DCHECK(!was_ignored_by_handler || error_code == net::ERR_ABORTED); | 508 DCHECK(!was_ignored_by_handler || error_code == net::ERR_ABORTED); |
| 509 | 509 |
| 510 ResourceRequestCompletionStatus request_complete_data; | 510 ResourceRequestCompletionStatus request_complete_data; |
| 511 request_complete_data.error_code = error_code; | 511 request_complete_data.error_code = error_code; |
| 512 request_complete_data.was_ignored_by_handler = was_ignored_by_handler; | 512 request_complete_data.was_ignored_by_handler = was_ignored_by_handler; |
| 513 request_complete_data.exists_in_cache = request()->response_info().was_cached; | 513 request_complete_data.exists_in_cache = request()->response_info().was_cached; |
| 514 request_complete_data.completion_time = TimeTicks::Now(); | 514 request_complete_data.completion_time = TimeTicks::Now(); |
| 515 request_complete_data.encoded_data_length = | 515 request_complete_data.encoded_data_length = |
| 516 request()->GetTotalReceivedBytes(); | 516 request()->GetTotalReceivedBytes(); |
| 517 info->filter()->Send( | 517 request_complete_data.encoded_body_length = request()->GetRawBodyBytes(); |
| 518 info->filter()->Send( | |
|
Adam Rice
2016/11/21 04:26:48
Indentation looks wrong.
yhirano
2016/11/21 06:40:27
Done.
| |
| 518 new ResourceMsg_RequestComplete(GetRequestID(), request_complete_data)); | 519 new ResourceMsg_RequestComplete(GetRequestID(), request_complete_data)); |
| 519 | 520 |
| 520 if (status.is_success()) | 521 if (status.is_success()) |
| 521 RecordHistogram(); | 522 RecordHistogram(); |
| 522 } | 523 } |
| 523 | 524 |
| 524 bool AsyncResourceHandler::EnsureResourceBufferIsInitialized() { | 525 bool AsyncResourceHandler::EnsureResourceBufferIsInitialized() { |
| 525 DCHECK(has_checked_for_sufficient_resources_); | 526 DCHECK(has_checked_for_sufficient_resources_); |
| 526 | 527 |
| 527 if (buffer_.get() && buffer_->IsInitialized()) | 528 if (buffer_.get() && buffer_->IsInitialized()) |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 587 } else { | 588 } else { |
| 588 UMA_HISTOGRAM_CUSTOM_COUNTS( | 589 UMA_HISTOGRAM_CUSTOM_COUNTS( |
| 589 "Net.ResourceLoader.ResponseStartToEnd.Over_512kB", | 590 "Net.ResourceLoader.ResponseStartToEnd.Over_512kB", |
| 590 elapsed_time, 1, 100000, 100); | 591 elapsed_time, 1, 100000, 100); |
| 591 } | 592 } |
| 592 | 593 |
| 593 inlining_helper_->RecordHistogram(elapsed_time); | 594 inlining_helper_->RecordHistogram(elapsed_time); |
| 594 } | 595 } |
| 595 | 596 |
| 596 } // namespace content | 597 } // namespace content |
| OLD | NEW |