Chromium Code Reviews| Index: chrome/browser/page_load_metrics/metrics_web_contents_observer.h |
| diff --git a/chrome/browser/page_load_metrics/metrics_web_contents_observer.h b/chrome/browser/page_load_metrics/metrics_web_contents_observer.h |
| index f8158ba85230ec3861a13484e368a1c1ed9dd324..3a9e0b97871f45faf37558c6ae6f665cdbc1d71b 100644 |
| --- a/chrome/browser/page_load_metrics/metrics_web_contents_observer.h |
| +++ b/chrome/browser/page_load_metrics/metrics_web_contents_observer.h |
| @@ -54,6 +54,8 @@ class MetricsWebContentsObserver |
| // content::WebContentsObserver implementation: |
| bool OnMessageReceived(const IPC::Message& message, |
| content::RenderFrameHost* render_frame_host) override; |
| + void ReadyToCommitNavigation( |
| + content::NavigationHandle* navigation_handle) override; |
| void DidFinishNavigation( |
| content::NavigationHandle* navigation_handle) override; |
| void DidRedirectNavigation( |
| @@ -69,8 +71,10 @@ class MetricsWebContentsObserver |
| // This method is forwarded from the MetricsNavigationThrottle. |
| void WillStartNavigationRequest(content::NavigationHandle* navigation_handle); |
| - // A resource request completed on the IO thread. |
| - void OnRequestComplete(content::ResourceType resource_type, |
| + // A resource request completed on the IO thread. This method is invoked on |
| + // the UI thread. |
| + void OnRequestComplete(const content::GlobalRequestID& request_id, |
|
Charlie Harrison
2017/01/13 15:56:23
#include "content/public/browser/global_request_id
|
| + content::ResourceType resource_type, |
| bool was_cached, |
| bool used_data_reduction_proxy, |
| int64_t raw_body_bytes, |
| @@ -97,6 +101,14 @@ class MetricsWebContentsObserver |
| content::NavigationHandle* navigation_handle, |
| std::unique_ptr<PageLoadTracker> tracker); |
| + // Return a PageLoadTracker (either provisional or committed) that matches the |
| + // given request attributes, or nullptr if there are no matching |
| + // PageLoadTrackers. |
| + PageLoadTracker* GetTrackerOrNullForRequest( |
| + const content::GlobalRequestID& request_id, |
| + content::ResourceType resource_type, |
| + base::TimeTicks creation_time); |
| + |
| // Notify all loads, provisional and committed, that we performed an action |
| // that might abort them. |
| void NotifyAbortAllLoads(UserAbortType abort_type, |