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

Unified Diff: chrome/browser/page_load_metrics/metrics_web_contents_observer.h

Issue 2624283004: Associate a main resource request with its PageLoadTracker. (Closed)
Patch Set: fix comment Created 3 years, 11 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
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..fe55a24585faa3ac9acd0e17c91bc6cb7bd63742 100644
--- a/chrome/browser/page_load_metrics/metrics_web_contents_observer.h
+++ b/chrome/browser/page_load_metrics/metrics_web_contents_observer.h
@@ -66,11 +66,15 @@ class MetricsWebContentsObserver
void RenderViewHostChanged(content::RenderViewHost* old_host,
content::RenderViewHost* new_host) override;
- // This method is forwarded from the MetricsNavigationThrottle.
+ // These methods are forwarded from the MetricsNavigationThrottle.
void WillStartNavigationRequest(content::NavigationHandle* navigation_handle);
+ void WillProcessNavigationResponse(
+ 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,
+ 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,

Powered by Google App Engine
This is Rietveld 408576698