Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Side by Side Diff: chrome/browser/page_load_metrics/observers/protocol_page_load_metrics_observer.cc

Issue 2859393002: Report page load timing information for child frames. (Closed)
Patch Set: add comment Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/protocol_page_load_metrics_ observer.h" 5 #include "chrome/browser/page_load_metrics/observers/protocol_page_load_metrics_ observer.h"
6 6
7 #include "chrome/browser/page_load_metrics/page_load_metrics_util.h" 7 #include "chrome/browser/page_load_metrics/page_load_metrics_util.h"
8 8
9 page_load_metrics::PageLoadMetricsObserver::ObservePolicy 9 page_load_metrics::PageLoadMetricsObserver::ObservePolicy
10 ProtocolPageLoadMetricsObserver::OnStart( 10 ProtocolPageLoadMetricsObserver::OnStart(
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 case net::HttpResponseInfo::CONNECTION_INFO_QUIC_37: 60 case net::HttpResponseInfo::CONNECTION_INFO_QUIC_37:
61 case net::HttpResponseInfo::CONNECTION_INFO_QUIC_38: 61 case net::HttpResponseInfo::CONNECTION_INFO_QUIC_38:
62 case net::HttpResponseInfo::CONNECTION_INFO_QUIC_39: 62 case net::HttpResponseInfo::CONNECTION_INFO_QUIC_39:
63 PAGE_LOAD_HISTOGRAM( 63 PAGE_LOAD_HISTOGRAM(
64 "PageLoad.Clients.Protocol.QUIC.ParseTiming.NavigationToParseStart", 64 "PageLoad.Clients.Protocol.QUIC.ParseTiming.NavigationToParseStart",
65 timing.parse_timing.parse_start.value()); 65 timing.parse_timing.parse_start.value());
66 break; 66 break;
67 } 67 }
68 } 68 }
69 69
70 void ProtocolPageLoadMetricsObserver::OnFirstContentfulPaint( 70 void ProtocolPageLoadMetricsObserver::OnFirstContentfulPaintInPage(
71 const page_load_metrics::PageLoadTiming& timing, 71 const page_load_metrics::PageLoadTiming& timing,
72 const page_load_metrics::PageLoadExtraInfo& extra_info) { 72 const page_load_metrics::PageLoadExtraInfo& extra_info) {
73 switch (connection_info_) { 73 switch (connection_info_) {
74 case net::HttpResponseInfo::CONNECTION_INFO_UNKNOWN: 74 case net::HttpResponseInfo::CONNECTION_INFO_UNKNOWN:
75 case net::HttpResponseInfo::CONNECTION_INFO_DEPRECATED_SPDY2: 75 case net::HttpResponseInfo::CONNECTION_INFO_DEPRECATED_SPDY2:
76 case net::HttpResponseInfo::CONNECTION_INFO_DEPRECATED_SPDY3: 76 case net::HttpResponseInfo::CONNECTION_INFO_DEPRECATED_SPDY3:
77 case net::HttpResponseInfo::CONNECTION_INFO_DEPRECATED_HTTP2_14: 77 case net::HttpResponseInfo::CONNECTION_INFO_DEPRECATED_HTTP2_14:
78 case net::HttpResponseInfo::CONNECTION_INFO_DEPRECATED_HTTP2_15: 78 case net::HttpResponseInfo::CONNECTION_INFO_DEPRECATED_HTTP2_15:
79 case net::HttpResponseInfo::CONNECTION_INFO_HTTP0_9: 79 case net::HttpResponseInfo::CONNECTION_INFO_HTTP0_9:
80 case net::HttpResponseInfo::CONNECTION_INFO_HTTP1_0: 80 case net::HttpResponseInfo::CONNECTION_INFO_HTTP1_0:
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 timing.paint_timing.first_contentful_paint.value()); 117 timing.paint_timing.first_contentful_paint.value());
118 PAGE_LOAD_HISTOGRAM( 118 PAGE_LOAD_HISTOGRAM(
119 "PageLoad.Clients.Protocol.QUIC.PaintTiming." 119 "PageLoad.Clients.Protocol.QUIC.PaintTiming."
120 "ParseStartToFirstContentfulPaint", 120 "ParseStartToFirstContentfulPaint",
121 timing.paint_timing.first_contentful_paint.value() - 121 timing.paint_timing.first_contentful_paint.value() -
122 timing.parse_timing.parse_start.value()); 122 timing.parse_timing.parse_start.value());
123 break; 123 break;
124 } 124 }
125 } 125 }
126 126
127 void ProtocolPageLoadMetricsObserver::OnFirstMeaningfulPaint( 127 void ProtocolPageLoadMetricsObserver::OnFirstMeaningfulPaintInMainFrameDocument(
128 const page_load_metrics::PageLoadTiming& timing, 128 const page_load_metrics::PageLoadTiming& timing,
129 const page_load_metrics::PageLoadExtraInfo& extra_info) { 129 const page_load_metrics::PageLoadExtraInfo& extra_info) {
130 switch (connection_info_) { 130 switch (connection_info_) {
131 case net::HttpResponseInfo::CONNECTION_INFO_UNKNOWN: 131 case net::HttpResponseInfo::CONNECTION_INFO_UNKNOWN:
132 case net::HttpResponseInfo::CONNECTION_INFO_DEPRECATED_SPDY2: 132 case net::HttpResponseInfo::CONNECTION_INFO_DEPRECATED_SPDY2:
133 case net::HttpResponseInfo::CONNECTION_INFO_DEPRECATED_SPDY3: 133 case net::HttpResponseInfo::CONNECTION_INFO_DEPRECATED_SPDY3:
134 case net::HttpResponseInfo::CONNECTION_INFO_DEPRECATED_HTTP2_14: 134 case net::HttpResponseInfo::CONNECTION_INFO_DEPRECATED_HTTP2_14:
135 case net::HttpResponseInfo::CONNECTION_INFO_DEPRECATED_HTTP2_15: 135 case net::HttpResponseInfo::CONNECTION_INFO_DEPRECATED_HTTP2_15:
136 case net::HttpResponseInfo::CONNECTION_INFO_HTTP0_9: 136 case net::HttpResponseInfo::CONNECTION_INFO_HTTP0_9:
137 case net::HttpResponseInfo::CONNECTION_INFO_HTTP1_0: 137 case net::HttpResponseInfo::CONNECTION_INFO_HTTP1_0:
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 case net::HttpResponseInfo::CONNECTION_INFO_QUIC_37: 257 case net::HttpResponseInfo::CONNECTION_INFO_QUIC_37:
258 case net::HttpResponseInfo::CONNECTION_INFO_QUIC_38: 258 case net::HttpResponseInfo::CONNECTION_INFO_QUIC_38:
259 case net::HttpResponseInfo::CONNECTION_INFO_QUIC_39: 259 case net::HttpResponseInfo::CONNECTION_INFO_QUIC_39:
260 PAGE_LOAD_HISTOGRAM( 260 PAGE_LOAD_HISTOGRAM(
261 "PageLoad.Clients.Protocol.QUIC.DocumentTiming." 261 "PageLoad.Clients.Protocol.QUIC.DocumentTiming."
262 "NavigationToLoadEventFired", 262 "NavigationToLoadEventFired",
263 timing.document_timing.load_event_start.value()); 263 timing.document_timing.load_event_start.value());
264 break; 264 break;
265 } 265 }
266 } 266 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698