#include "chrome/browser/preloading/prefetch/prefetch_service/chrome_prefetch_service_delegate.h"
#include "chrome/browser/battery/battery_saver.h"
#include "chrome/browser/data_saver/data_saver.h"
#include "chrome/browser/preloading/prefetch/prefetch_service/prefetch_origin_decider.h"
#include "chrome/browser/preloading/preloading_features.h"
#include "chrome/browser/preloading/preloading_prefs.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "components/google/core/common/google_util.h"
#include "components/language/core/browser/pref_names.h"
#include "components/page_load_metrics/browser/metrics_web_contents_observer.h"
#include "components/prefs/pref_service.h"
#include "components/search_engines/template_url_service.h"
#include "components/unified_consent/url_keyed_data_collection_consent_helper.h"
#include "components/version_info/version_info.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/web_contents.h"
#include "google_apis/google_api_keys.h"
#include "net/http/http_util.h"
#include "url/gurl.h"
ChromePrefetchServiceDelegate::ChromePrefetchServiceDelegate(
content::BrowserContext* browser_context)
: … { … }
ChromePrefetchServiceDelegate::~ChromePrefetchServiceDelegate() = default;
std::string ChromePrefetchServiceDelegate::GetMajorVersionNumber() { … }
std::string ChromePrefetchServiceDelegate::GetAcceptLanguageHeader() { … }
GURL ChromePrefetchServiceDelegate::GetDefaultPrefetchProxyHost() { … }
std::string ChromePrefetchServiceDelegate::GetAPIKey() { … }
GURL ChromePrefetchServiceDelegate::GetDefaultDNSCanaryCheckURL() { … }
GURL ChromePrefetchServiceDelegate::GetDefaultTLSCanaryCheckURL() { … }
void ChromePrefetchServiceDelegate::ReportOriginRetryAfter(
const GURL& url,
base::TimeDelta retry_after) { … }
bool ChromePrefetchServiceDelegate::IsOriginOutsideRetryAfterWindow(
const GURL& url) { … }
void ChromePrefetchServiceDelegate::ClearData() { … }
bool ChromePrefetchServiceDelegate::DisableDecoysBasedOnUserSettings() { … }
content::PreloadingEligibility
ChromePrefetchServiceDelegate::IsSomePreloadingEnabled() { … }
bool ChromePrefetchServiceDelegate::IsPreloadingPrefEnabled() { … }
bool ChromePrefetchServiceDelegate::IsDataSaverEnabled() { … }
bool ChromePrefetchServiceDelegate::IsBatterySaverEnabled() { … }
bool ChromePrefetchServiceDelegate::IsExtendedPreloadingEnabled() { … }
bool ChromePrefetchServiceDelegate::IsDomainInPrefetchAllowList(
const GURL& referring_url) { … }
bool ChromePrefetchServiceDelegate::IsContaminationExempt(
const GURL& referring_url) { … }
void ChromePrefetchServiceDelegate::OnPrefetchLikely(
content::WebContents* web_contents) { … }