#include "chrome/browser/page_load_metrics/observers/omnibox_suggestion_used_page_load_metrics_observer.h"
#include <algorithm>
#include "components/page_load_metrics/browser/page_load_metrics_util.h"
#include "content/public/browser/navigation_handle.h"
#include "ui/base/page_transition_types.h"
namespace {
const char kSearchInputToNavigationStart[] = …;
const char kURLInputToNavigationStart[] = …;
const char kSearchFirstContentfulPaint[] = …;
const char kURLFirstContentfulPaint[] = …;
const char kSearchFirstMeaningfulPaint[] = …;
const char kURLFirstMeaningfulPaint[] = …;
const char kSearchLargestContentfulPaint2[] = …;
const char kURLLargestContentfulPaint2[] = …;
const char kSearchLargestContentfulPaint2Above2s[] = …;
}
OmniboxSuggestionUsedMetricsObserver::OmniboxSuggestionUsedMetricsObserver() =
default;
OmniboxSuggestionUsedMetricsObserver::~OmniboxSuggestionUsedMetricsObserver() { … }
page_load_metrics::PageLoadMetricsObserver::ObservePolicy
OmniboxSuggestionUsedMetricsObserver::OnPrerenderStart(
content::NavigationHandle* navigation_handle,
const GURL& currently_committed_url) { … }
page_load_metrics::PageLoadMetricsObserver::ObservePolicy
OmniboxSuggestionUsedMetricsObserver::OnFencedFramesStart(
content::NavigationHandle* navigation_handle,
const GURL& currently_committed_url) { … }
page_load_metrics::PageLoadMetricsObserver::ObservePolicy
OmniboxSuggestionUsedMetricsObserver::OnCommit(
content::NavigationHandle* navigation_handle) { … }
void OmniboxSuggestionUsedMetricsObserver::OnFirstContentfulPaintInPage(
const page_load_metrics::mojom::PageLoadTiming& timing) { … }
void OmniboxSuggestionUsedMetricsObserver::
OnFirstMeaningfulPaintInMainFrameDocument(
const page_load_metrics::mojom::PageLoadTiming& timing) { … }
page_load_metrics::PageLoadMetricsObserver::ObservePolicy
OmniboxSuggestionUsedMetricsObserver::FlushMetricsOnAppEnterBackground(
const page_load_metrics::mojom::PageLoadTiming& timing) { … }
void OmniboxSuggestionUsedMetricsObserver::OnTimingUpdate(
content::RenderFrameHost* subframe_rfh,
const page_load_metrics::mojom::PageLoadTiming& timing) { … }
void OmniboxSuggestionUsedMetricsObserver::RecordSearchLCP2Above2s() { … }
void OmniboxSuggestionUsedMetricsObserver::OnComplete(
const page_load_metrics::mojom::PageLoadTiming& timing) { … }
void OmniboxSuggestionUsedMetricsObserver::RecordSessionEndHistograms(
const page_load_metrics::mojom::PageLoadTiming& timing) { … }