chromium/chrome/browser/site_protection/site_protection_metrics_observer.h

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

#ifndef CHROME_BROWSER_SITE_PROTECTION_SITE_PROTECTION_METRICS_OBSERVER_H_
#define CHROME_BROWSER_SITE_PROTECTION_SITE_PROTECTION_METRICS_OBSERVER_H_

#include <optional>

#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/task/cancelable_task_tracker.h"
#include "base/time/clock.h"
#include "chrome/browser/site_protection/site_familiarity_heuristic_name.h"
#include "components/history/core/browser/history_types.h"
#include "components/site_engagement/content/engagement_type.h"
#include "components/site_engagement/content/site_engagement_observer.h"
#include "components/site_engagement/content/site_engagement_service.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_user_data.h"
#include "url/gurl.h"
#include "url/origin.h"

namespace history {
struct HistoryLastVisitResult;
class HistoryService;
}  // namespace history

namespace site_protection {

// A class to log metrics related to different heuristics for assessing the
// site's familiarity to the user. These metrics will be used to create
// heuristics for whether Chromium should enable extra protections.
class SiteProtectionMetricsObserver
    : public content::WebContentsUserData<SiteProtectionMetricsObserver>,
      public content::WebContentsObserver,
      public site_engagement::SiteEngagementObserver {};

}  // namespace site_protection
#endif  // CHROME_BROWSER_SITE_PROTECTION_SITE_PROTECTION_METRICS_OBSERVER_H_