#include "components/page_info/core/about_this_site_service.h"
#include "base/feature_list.h"
#include "base/metrics/histogram_functions.h"
#include "components/optimization_guide/core/hints_processing_util.h"
#include "components/optimization_guide/core/optimization_guide_decision.h"
#include "components/optimization_guide/core/optimization_metadata.h"
#include "components/page_info/core/about_this_site_validation.h"
#include "components/page_info/core/features.h"
#include "components/page_info/core/proto/about_this_site_metadata.pb.h"
#include "components/search/search.h"
#include "components/search_engines/template_url_service.h"
#include "net/base/url_util.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "services/metrics/public/cpp/ukm_recorder.h"
#include "url/gurl.h"
namespace page_info {
namespace {
AboutThisSiteStatus;
AboutThisSiteInteraction;
OptimizationGuideDecision;
void RecordAboutThisSiteInteraction(AboutThisSiteInteraction interaction) { … }
}
AboutThisSiteService::AboutThisSiteService(
optimization_guide::OptimizationGuideDecider* optimization_guide_decider,
bool is_off_the_record,
PrefService* prefs,
TemplateURLService* template_url_service)
: … { … }
std::optional<proto::SiteInfo> AboutThisSiteService::GetAboutThisSiteInfo(
const GURL& url,
ukm::SourceId source_id,
const TabHelper* tab_helper) const { … }
GURL AboutThisSiteService::CreateMoreAboutUrlForNavigation(const GURL& url) { … }
void AboutThisSiteService::OnAboutThisSiteRowClicked(bool with_description) { … }
void AboutThisSiteService::OnOpenedDirectlyFromSidePanel() { … }
void AboutThisSiteService::OnSameTabNavigation() { … }
base::WeakPtr<AboutThisSiteService> AboutThisSiteService::GetWeakPtr() { … }
AboutThisSiteService::~AboutThisSiteService() = default;
bool AboutThisSiteService::IsOptimizationGuideAllowed() const { … }
optimization_guide::OptimizationGuideDecision
AboutThisSiteService::CanApplyOptimization(
const GURL& url,
optimization_guide::OptimizationMetadata* optimization_metadata) const { … }
}