Index: chrome/browser/page_load_metrics/page_load_tracker.h |
diff --git a/chrome/browser/page_load_metrics/page_load_tracker.h b/chrome/browser/page_load_metrics/page_load_tracker.h |
index f6529d1a059d00a620572763477253d17ed8fec0..8c8cefbd9c7166e466c860aaa41694c34423dd72 100644 |
--- a/chrome/browser/page_load_metrics/page_load_tracker.h |
+++ b/chrome/browser/page_load_metrics/page_load_tracker.h |
@@ -152,8 +152,8 @@ enum InternalErrorLoadEvent { |
// No page load end time was recorded for this page load. |
ERR_NO_PAGE_LOAD_END_TIME, |
- // Received a timing update from a subframe. |
- ERR_TIMING_IPC_FROM_SUBFRAME, |
+ // Received a timing update from a subframe (deprecated). |
+ DEPRECATED_ERR_TIMING_IPC_FROM_SUBFRAME, |
// A timing IPC was sent from the renderer that contained timing data which |
// was inconsistent with our timing data for the currently committed load. |
@@ -168,6 +168,11 @@ enum InternalErrorLoadEvent { |
// (e.g. out of order timings, or other issues). |
ERR_BAD_TIMING_IPC_INVALID_TIMING, |
+ // We received an IPC for a subframe when we weren't tracking a committed load |
+ // in that frame. This can happen if the frame fails to commit but a document |
+ // is created in it from the parent document via document.open(). |
+ ERR_SUBFRAME_IPC_WITH_NO_RELEVANT_LOAD, |
+ |
// Add values before this final count. |
ERR_LAST_ENTRY, |
}; |
@@ -222,10 +227,14 @@ class PageLoadTracker { |
void UpdateTiming(const PageLoadTiming& timing, |
const PageLoadMetadata& metadata); |
+ void UpdateSubFrameTiming(content::RenderFrameHost* render_frame_host, |
+ const PageLoadTiming& new_timing, |
+ const PageLoadMetadata& new_metadata); |
+ |
// Update metadata for child frames. Updates for child frames arrive |
// separately from updates for the main frame, so aren't included in |
// UpdateTiming. |
- void UpdateChildFrameMetadata(const PageLoadMetadata& child_metadata); |
+ void UpdateSubFrameMetadata(const PageLoadMetadata& child_metadata); |
void OnStartedResource( |
const ExtraRequestStartInfo& extra_request_started_info); |
@@ -306,6 +315,8 @@ class PageLoadTracker { |
base::TimeDelta actual_delay); |
private: |
+ typedef int FrameTreeNodeId; |
+ |
// This function converts a TimeTicks value taken in the browser process |
// to navigation_start_ if: |
// - base::TimeTicks is not comparable across processes because the clock |
@@ -403,6 +414,11 @@ class PageLoadTracker { |
std::vector<std::unique_ptr<PageLoadMetricsObserver>> observers_; |
+ // Navigation start offsets for the most recently committed document in each |
+ // frame. |
+ std::map<FrameTreeNodeId, base::TimeDelta> |
+ child_frame_navigation_start_offset_; |
+ |
DISALLOW_COPY_AND_ASSIGN(PageLoadTracker); |
}; |