#include "chrome/browser/navigation_predictor/search_engine_preconnector.h"
#include "base/functional/bind.h"
#include "base/metrics/field_trial_params.h"
#include "base/metrics/histogram_functions.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "chrome/browser/navigation_predictor/navigation_predictor_features.h"
#include "chrome/browser/navigation_predictor/navigation_predictor_keyed_service.h"
#include "chrome/browser/navigation_predictor/navigation_predictor_keyed_service_factory.h"
#include "chrome/browser/predictors/loading_predictor.h"
#include "chrome/browser/predictors/loading_predictor_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/common/pref_names.h"
#include "components/prefs/pref_service.h"
#include "components/search_engines/template_url_service.h"
#include "content/public/browser/browser_context.h"
#include "net/base/features.h"
namespace {
#if BUILDFLAG(IS_ANDROID)
const int kDefaultStartupDelayMs = 0;
const bool kDefaultSkipInBackground = false;
#else
const int kDefaultStartupDelayMs = …;
const bool kDefaultSkipInBackground = …;
#endif
}
namespace features {
BASE_FEATURE(…);
BASE_FEATURE(…);
}
SearchEnginePreconnector::SearchEnginePreconnector(
content::BrowserContext* browser_context)
: … { … }
SearchEnginePreconnector::~SearchEnginePreconnector() = default;
void SearchEnginePreconnector::StopPreconnecting() { … }
void SearchEnginePreconnector::StartPreconnecting(bool with_startup_delay) { … }
void SearchEnginePreconnector::PreconnectDSE() { … }
GURL SearchEnginePreconnector::GetDefaultSearchEngineOriginURL() const { … }
bool SearchEnginePreconnector::IsBrowserAppLikelyInForeground() const { … }