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

Unified Diff: chrome/browser/page_load_metrics/observers/core_page_load_metrics_observer.cc

Issue 1918373002: Metrics for document.write script blocking (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bryan's comment: Returning disallowFetch from shouldDisallowFetchForMainFrameScript Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/page_load_metrics/observers/document_write_page_load_metrics_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/page_load_metrics/observers/core_page_load_metrics_observer.cc
diff --git a/chrome/browser/page_load_metrics/observers/core_page_load_metrics_observer.cc b/chrome/browser/page_load_metrics/observers/core_page_load_metrics_observer.cc
index 36b111a2296ab35aafc0e07b3d882b4b7863b475..b57f72a3df8a48ae286be8392a3123de88e8c8e7 100644
--- a/chrome/browser/page_load_metrics/observers/core_page_load_metrics_observer.cc
+++ b/chrome/browser/page_load_metrics/observers/core_page_load_metrics_observer.cc
@@ -297,14 +297,8 @@ void CorePageLoadMetricsObserver::RecordTimingHistograms(
PAGE_LOAD_HISTOGRAM(internal::kHistogramParseStartToFirstContentfulPaint,
timing.first_contentful_paint - timing.parse_start);
}
- const bool incomplete_parse_in_foreground =
- timing.parse_stop.is_zero() && info.started_in_foreground &&
- info.first_background_time.is_zero();
- // If the parse did not complete but the entire page load duration happened
- // in the foreground, or if the parse completed and happened entirely in the
- // foreground, record a foreground histogram.
- if (incomplete_parse_in_foreground ||
- WasStartedInForegroundEventInForeground(timing.parse_stop, info)) {
+
+ if (WasParseInForeground(timing.parse_start, timing.parse_stop, info)) {
PAGE_LOAD_HISTOGRAM(internal::kHistogramParseBlockedOnScriptLoad,
timing.parse_blocked_on_script_load_duration);
PAGE_LOAD_HISTOGRAM(
@@ -319,6 +313,7 @@ void CorePageLoadMetricsObserver::RecordTimingHistograms(
timing.parse_blocked_on_script_load_from_document_write_duration);
}
}
+
if (!timing.parse_stop.is_zero()) {
base::TimeDelta parse_duration = timing.parse_stop - timing.parse_start;
if (WasStartedInForegroundEventInForeground(timing.parse_stop, info)) {
« no previous file with comments | « no previous file | chrome/browser/page_load_metrics/observers/document_write_page_load_metrics_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698