Index: chrome/browser/page_load_metrics/page_load_metrics_observer.h |
diff --git a/chrome/browser/page_load_metrics/page_load_metrics_observer.h b/chrome/browser/page_load_metrics/page_load_metrics_observer.h |
index 11a98896bd91bf72d28f0f68b05251f2ef5229f3..0f6e01cdf55f8689005e972cf492ce5cd099bb40 100644 |
--- a/chrome/browser/page_load_metrics/page_load_metrics_observer.h |
+++ b/chrome/browser/page_load_metrics/page_load_metrics_observer.h |
@@ -196,15 +196,16 @@ struct PageLoadExtraInfo { |
}; |
// Container for various information about a request within a page load. |
RyanSturm
2017/04/17 19:57:08
nit: s/about a request/about a completed request/
Pete Williamson
2017/04/17 20:46:36
Done.
|
-struct ExtraRequestInfo { |
- ExtraRequestInfo(bool was_cached, |
- int64_t raw_body_bytes, |
- bool data_reduction_proxy_used, |
- int64_t original_network_content_length); |
+struct ExtraRequestCompleteInfo { |
+ ExtraRequestCompleteInfo(bool was_cached, |
+ int64_t raw_body_bytes, |
+ bool data_reduction_proxy_used, |
+ int64_t original_network_content_length, |
+ content::ResourceType found_type); |
- ExtraRequestInfo(const ExtraRequestInfo& other); |
+ ExtraRequestCompleteInfo(const ExtraRequestCompleteInfo& other); |
- ~ExtraRequestInfo(); |
+ ~ExtraRequestCompleteInfo(); |
// True if the resource was loaded from cache. |
const bool was_cached; |
@@ -218,6 +219,21 @@ struct ExtraRequestInfo { |
// The number of body (not header) bytes that the data reduction proxy saw |
// before it compressed the requests. |
const int64_t original_network_content_length; |
+ |
+ // The type of the request as gleaned from the ResourceRequestInfo. |
+ const content::ResourceType resource_type; |
+}; |
+ |
+// Container for various information about a request within a page load. |
RyanSturm
2017/04/17 19:57:08
nit: s/about a request/about a started request/
Pete Williamson
2017/04/17 20:46:36
Done.
|
+struct ExtraRequestStartInfo { |
+ explicit ExtraRequestStartInfo(content::ResourceType type); |
+ |
+ ExtraRequestStartInfo(const ExtraRequestStartInfo& other); |
+ |
+ ~ExtraRequestStartInfo(); |
+ |
+ // The type of the request as gleaned from the ResourceRequestInfo. |
+ const content::ResourceType resource_type; |
}; |
// Interface for PageLoadMetrics observers. All instances of this class are |
@@ -375,8 +391,13 @@ class PageLoadMetricsObserver { |
const FailedProvisionalLoadInfo& failed_provisional_load_info, |
const PageLoadExtraInfo& extra_info) {} |
+ // Called whenever a request load begins. |
+ virtual void OnStartedResource( |
+ const ExtraRequestStartInfo& extra_request_start_info) {} |
+ |
// Called whenever a request is loaded for this page load. |
- virtual void OnLoadedResource(const ExtraRequestInfo& extra_request_info) {} |
+ virtual void OnLoadedResource( |
+ const ExtraRequestCompleteInfo& extra_request_complete_info) {} |
}; |
} // namespace page_load_metrics |