OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chrome/browser/page_load_metrics/observers/core_page_load_metrics_obse
rver.h" | 5 #include "chrome/browser/page_load_metrics/observers/core_page_load_metrics_obse
rver.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 event.GetType() == blink::WebInputEvent::kGestureScrollBegin) { | 643 event.GetType() == blink::WebInputEvent::kGestureScrollBegin) { |
644 received_scroll_input_after_first_paint_ = true; | 644 received_scroll_input_after_first_paint_ = true; |
645 if (now.is_null()) | 645 if (now.is_null()) |
646 now = base::TimeTicks::Now(); | 646 now = base::TimeTicks::Now(); |
647 PAGE_LOAD_HISTOGRAM(internal::kHistogramFirstScrollInputAfterFirstPaint, | 647 PAGE_LOAD_HISTOGRAM(internal::kHistogramFirstScrollInputAfterFirstPaint, |
648 now - first_paint_); | 648 now - first_paint_); |
649 } | 649 } |
650 } | 650 } |
651 | 651 |
652 void CorePageLoadMetricsObserver::OnLoadedResource( | 652 void CorePageLoadMetricsObserver::OnLoadedResource( |
653 const page_load_metrics::ExtraRequestInfo& extra_request_info) { | 653 const page_load_metrics::ExtraRequestCompleteInfo& extra_request_info) { |
654 if (extra_request_info.was_cached) { | 654 if (extra_request_info.was_cached) { |
655 ++num_cache_resources_; | 655 ++num_cache_resources_; |
656 cache_bytes_ += extra_request_info.raw_body_bytes; | 656 cache_bytes_ += extra_request_info.raw_body_bytes; |
657 } else { | 657 } else { |
658 ++num_network_resources_; | 658 ++num_network_resources_; |
659 network_bytes_ += extra_request_info.raw_body_bytes; | 659 network_bytes_ += extra_request_info.raw_body_bytes; |
660 } | 660 } |
661 } | 661 } |
662 | 662 |
663 void CorePageLoadMetricsObserver::RecordTimingHistograms( | 663 void CorePageLoadMetricsObserver::RecordTimingHistograms( |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
811 std::move(sample)); | 811 std::move(sample)); |
812 } | 812 } |
813 | 813 |
814 // Log the eTLD+1 of sites that did not report first meaningful paint. | 814 // Log the eTLD+1 of sites that did not report first meaningful paint. |
815 if (timing.first_paint && !timing.first_meaningful_paint) { | 815 if (timing.first_paint && !timing.first_meaningful_paint) { |
816 rappor::SampleDomainAndRegistryFromGURL( | 816 rappor::SampleDomainAndRegistryFromGURL( |
817 rappor_service, | 817 rappor_service, |
818 internal::kRapporMetricsNameFirstMeaningfulPaintNotRecorded, info.url); | 818 internal::kRapporMetricsNameFirstMeaningfulPaintNotRecorded, info.url); |
819 } | 819 } |
820 } | 820 } |
OLD | NEW |