#include "chrome/browser/navigation_predictor/anchor_element_preloader.h"
#include "base/functional/callback.h"
#include "base/metrics/histogram_functions.h"
#include "chrome/browser/predictors/loading_predictor.h"
#include "chrome/browser/predictors/loading_predictor_factory.h"
#include "chrome/browser/preloading/chrome_preloading.h"
#include "chrome/browser/preloading/preloading_prefs.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/preloading.h"
#include "content/public/browser/preloading_data.h"
#include "content/public/browser/web_contents.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "services/metrics/public/cpp/ukm_recorder.h"
#include "third_party/blink/public/common/features.h"
#include "ui/base/page_transition_types.h"
#include "url/scheme_host_port.h"
namespace {
bool is_match_for_preconnect(const url::SchemeHostPort& preconnected_origin,
const GURL& visited_url) { … }
}
const char kPreloadingAnchorElementPreloaderPreloadingTriggered[] = …;
content::PreloadingFailureReason ToFailureReason(
AnchorPreloadingFailureReason reason) { … }
AnchorElementPreloader::~AnchorElementPreloader() = default;
AnchorElementPreloader::AnchorElementPreloader(
content::RenderFrameHost& render_frame_host)
: … { … }
void AnchorElementPreloader::MaybePreconnect(const GURL& target) { … }
void AnchorElementPreloader::RecordUmaPreloadedTriggered(
AnchorElementPreloaderType preload) { … }