Chromium Code Reviews| Index: components/page_load_metrics/browser/metrics_web_contents_observer.h |
| diff --git a/components/page_load_metrics/browser/metrics_web_contents_observer.h b/components/page_load_metrics/browser/metrics_web_contents_observer.h |
| index 14aec6712ed0f678efdeaab2aaf07a4714363a5c..dc371aa85b38ebb350c6d34ebc2bcbb31e33e8a4 100644 |
| --- a/components/page_load_metrics/browser/metrics_web_contents_observer.h |
| +++ b/components/page_load_metrics/browser/metrics_web_contents_observer.h |
| @@ -106,9 +106,11 @@ class PageLoadMetricsEmbedderInterface { |
| class PageLoadTracker { |
| public: |
| // Caller must guarantee that the embedder_interface pointer outlives this |
| - // class. |
| + // class. The PageLoadTracker must not hold on to |
| + // currently_committed_load_or_null beyond the scope of the constructor. |
|
Charlie Harrison
2016/04/15 16:51:38
Might as well as the same thing about the Navigati
Bryan McQuade
2016/04/15 17:21:44
Done
|
| PageLoadTracker(bool in_foreground, |
| PageLoadMetricsEmbedderInterface* embedder_interface, |
| + PageLoadTracker* const currently_committed_load_or_null, |
| content::NavigationHandle* navigation_handle, |
| int aborted_chain_size, |
| int aborted_chain_size_same_url); |
| @@ -122,7 +124,6 @@ class PageLoadTracker { |
| // Returns true if the timing was successfully updated. |
| bool UpdateTiming(const PageLoadTiming& timing, |
| const PageLoadMetadata& metadata); |
| - bool HasBackgrounded(); |
| void set_renderer_tracked(bool renderer_tracked); |
| bool renderer_tracked() const { return renderer_tracked_; } |
| @@ -152,12 +153,15 @@ class PageLoadTracker { |
| bool MatchesOriginalNavigation(content::NavigationHandle* navigation_handle); |
| + // Only valid to call post-commit. |
| + const GURL& committed_url() const { |
| + DCHECK(!commit_time_.is_null()); |
| + return url_; |
| + } |
| + |
| private: |
| PageLoadExtraInfo GetPageLoadMetricsInfo(); |
| - // Only valid to call post-commit. |
| - const GURL& committed_url(); |
| - |
| void UpdateAbortInternal(UserAbortType abort_type, |
| base::TimeTicks timestamp); |