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 request_complete_data.encoded_body_length = request()->GetRawBodyBytes(); | |
518 info->filter()->Send( | 517 info->filter()->Send( |
519 new ResourceMsg_RequestComplete(GetRequestID(), request_complete_data)); | 518 new ResourceMsg_RequestComplete(GetRequestID(), request_complete_data)); |
520 | 519 |
521 if (status.is_success()) | 520 if (status.is_success()) |
522 RecordHistogram(); | 521 RecordHistogram(); |
523 } | 522 } |
524 | 523 |
525 bool AsyncResourceHandler::EnsureResourceBufferIsInitialized() { | 524 bool AsyncResourceHandler::EnsureResourceBufferIsInitialized() { |
526 DCHECK(has_checked_for_sufficient_resources_); | 525 DCHECK(has_checked_for_sufficient_resources_); |
527 | 526 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 } else { | 587 } else { |
589 UMA_HISTOGRAM_CUSTOM_COUNTS( | 588 UMA_HISTOGRAM_CUSTOM_COUNTS( |
590 "Net.ResourceLoader.ResponseStartToEnd.Over_512kB", | 589 "Net.ResourceLoader.ResponseStartToEnd.Over_512kB", |
591 elapsed_time, 1, 100000, 100); | 590 elapsed_time, 1, 100000, 100); |
592 } | 591 } |
593 | 592 |
594 inlining_helper_->RecordHistogram(elapsed_time); | 593 inlining_helper_->RecordHistogram(elapsed_time); |
595 } | 594 } |
596 | 595 |
597 } // namespace content | 596 } // namespace content |
OLD | NEW |