chromium/chrome/browser/page_load_metrics/observers/security_state_page_load_metrics_observer.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/page_load_metrics/observers/security_state_page_load_metrics_observer.h"

#include <cmath>

#include "base/check.h"
#include "base/metrics/histogram_functions.h"
#include "base/time/time.h"
#include "chrome/browser/engagement/site_engagement_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "components/security_state/content/security_state_tab_helper.h"
#include "components/security_state/core/security_state.h"
#include "components/site_engagement/content/site_engagement_service.h"
#include "content/public/browser/navigation_handle.h"
#include "services/metrics/public/cpp/metrics_utils.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "services/metrics/public/cpp/ukm_recorder.h"

namespace {
// Site Engagement score behavior histogram prefixes.
const char kEngagementFinalPrefix[] =;

// Navigation histogram prefixes.
const char kPageEndReasonPrefix[] =;
const char kTimeOnPagePrefix[] =;

// Security level histograms.
const char kSecurityLevelOnCommit[] =;
const char kSecurityLevelOnComplete[] =;

}  // namespace

// static
std::unique_ptr<page_load_metrics::PageLoadMetricsObserver>
SecurityStatePageLoadMetricsObserver::MaybeCreateForProfile(
    content::BrowserContext* profile) {}

// static
std::string
SecurityStatePageLoadMetricsObserver::GetEngagementFinalHistogramNameForTesting(
    security_state::SecurityLevel level) {}

// static
std::string SecurityStatePageLoadMetricsObserver::
    GetSecurityLevelPageEndReasonHistogramNameForTesting(
        security_state::SecurityLevel level) {}

// static
std::string SecurityStatePageLoadMetricsObserver::
    GetSafetyTipPageEndReasonHistogramNameForTesting(
        security_state::SafetyTipStatus safety_tip_status) {}

SecurityStatePageLoadMetricsObserver::SecurityStatePageLoadMetricsObserver(
    site_engagement::SiteEngagementService* engagement_service)
    :{}

SecurityStatePageLoadMetricsObserver::~SecurityStatePageLoadMetricsObserver() =
    default;

page_load_metrics::PageLoadMetricsObserver::ObservePolicy
SecurityStatePageLoadMetricsObserver::OnStart(
    content::NavigationHandle* navigation_handle,
    const GURL& currently_committed_url,
    bool started_in_foreground) {}

page_load_metrics::PageLoadMetricsObserver::ObservePolicy
SecurityStatePageLoadMetricsObserver::OnFencedFramesStart(
    content::NavigationHandle* navigation_handle,
    const GURL& currently_committed_url) {}

page_load_metrics::PageLoadMetricsObserver::ObservePolicy
SecurityStatePageLoadMetricsObserver::OnPrerenderStart(
    content::NavigationHandle* navigation_handle,
    const GURL& currently_committed_url) {}

page_load_metrics::PageLoadMetricsObserver::ObservePolicy
SecurityStatePageLoadMetricsObserver::OnCommit(
    content::NavigationHandle* navigation_handle) {}

void SecurityStatePageLoadMetricsObserver::DidActivatePrerenderedPage(
    content::NavigationHandle* navigation_handle) {}

void SecurityStatePageLoadMetricsObserver::OnComplete(
    const page_load_metrics::mojom::PageLoadTiming& timing) {}

void SecurityStatePageLoadMetricsObserver::DidChangeVisibleSecurityState() {}

void SecurityStatePageLoadMetricsObserver::RecordSecurityLevelHistogram(
    content::NavigationHandle* navigation_handle) {}