#include "chrome/browser/preloading/chrome_preloading.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "components/search_engines/template_url.h"
#include "components/search_engines/template_url_service.h"
#include "content/public/browser/browser_context.h"
#include "url/gurl.h"
namespace {
bool IsSideSearch(content::BrowserContext* browser_context, const GURL& url) { … }
}
static_assert …;
content::PreloadingEligibility ToPreloadingEligibility(
ChromePreloadingEligibility eligibility) { … }
TemplateURLService* GetTemplateURLServiceFromBrowserContext(
content::BrowserContext* browser_context) { … }
bool HasCanonicalPreloadingOmniboxSearchURL(
const GURL& preloading_url,
content::BrowserContext* browser_context,
GURL* canonical_url) { … }
bool IsSearchDestinationMatch(const GURL& canonical_preloading_search_url,
content::BrowserContext* browser_context,
const GURL& navigation_url) { … }
bool IsSearchDestinationMatchWithWebUrlMatchResult(
const GURL& canonical_preloading_search_url,
content::BrowserContext* browser_context,
const GURL& navigation_url,
const std::optional<content::UrlMatchType>& default_web_url_match) { … }