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 abd5ffaef8718aedb971b6cf384c055f77f5c0b9..04185b933286403c12d0aeb9163954e75801bc1d 100644 |
--- a/chrome/browser/page_load_metrics/page_load_metrics_observer.h |
+++ b/chrome/browser/page_load_metrics/page_load_metrics_observer.h |
@@ -12,6 +12,7 @@ |
#include "base/optional.h" |
#include "chrome/common/page_load_metrics/page_load_timing.h" |
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_data.h" |
+#include "components/ukm/ukm_source.h" |
#include "content/public/browser/navigation_handle.h" |
#include "content/public/browser/web_contents_observer.h" |
#include "content/public/common/resource_type.h" |
@@ -123,7 +124,8 @@ struct PageLoadExtraInfo { |
UserInitiatedInfo page_end_user_initiated_info, |
const base::Optional<base::TimeDelta>& page_end_time, |
const mojom::PageLoadMetadata& main_frame_metadata, |
- const mojom::PageLoadMetadata& subframe_metadata); |
+ const mojom::PageLoadMetadata& subframe_metadata, |
+ ukm::SourceId source_id); |
// Simplified version of the constructor, intended for use in tests. |
static PageLoadExtraInfo CreateForTesting(const GURL& url, |
@@ -196,6 +198,9 @@ struct PageLoadExtraInfo { |
// PageLoadMetadata for subframes of the current page load. |
const mojom::PageLoadMetadata subframe_metadata; |
+ |
+ // UKM SourceId for the current page load. |
+ const ukm::SourceId source_id; |
}; |
// Container for various information about a completed request within a page |
@@ -274,6 +279,8 @@ class PageLoadMetricsObserver { |
virtual ~PageLoadMetricsObserver() {} |
+ static bool IsStandardWebPageMimeType(const std::string& mime_type); |
+ |
// The page load started, with the given navigation handle. |
// currently_committed_url contains the URL of the committed page load at the |
// time the navigation for navigation_handle was initiated, or the empty URL |
@@ -296,7 +303,8 @@ class PageLoadMetricsObserver { |
// reference to it. |
// Observers that return STOP_OBSERVING will not receive any additional |
// callbacks, and will be deleted after invocation of this method returns. |
- virtual ObservePolicy OnCommit(content::NavigationHandle* navigation_handle); |
+ virtual ObservePolicy OnCommit(content::NavigationHandle* navigation_handle, |
+ ukm::SourceId source_id); |
// OnDidFinishSubFrameNavigation is triggered when a sub-frame of the |
// committed page has finished navigating. It has either committed, aborted, |