#include "chrome/browser/search_engines/template_url_service_factory.h"
#include <string>
#include "base/check_deref.h"
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_selections.h"
#include "chrome/browser/search_engine_choice/search_engine_choice_service_factory.h"
#include "chrome/browser/search_engines/chrome_template_url_service_client.h"
#include "chrome/browser/search_engines/ui_thread_search_terms_data.h"
#include "chrome/browser/webdata_services/web_data_service_factory.h"
#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
#include "components/omnibox/common/omnibox_features.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/prefs/pref_service.h"
#include "components/search_engines/default_search_manager.h"
#include "components/search_engines/enterprise/enterprise_site_search_manager.h"
#include "components/search_engines/search_engines_pref_names.h"
#include "components/search_engines/template_url_service.h"
#include "rlz/buildflags/buildflags.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "chrome/browser/ash/profiles/profile_helper.h"
#endif
#if BUILDFLAG(ENABLE_RLZ)
#include "components/rlz/rlz_tracker.h"
#endif
TemplateURLService* TemplateURLServiceFactory::GetForProfile(Profile* profile) { … }
TemplateURLServiceFactory* TemplateURLServiceFactory::GetInstance() { … }
std::unique_ptr<KeyedService> TemplateURLServiceFactory::BuildInstanceFor(
content::BrowserContext* context) { … }
TemplateURLServiceFactory::TemplateURLServiceFactory()
: … { … }
TemplateURLServiceFactory::~TemplateURLServiceFactory() = default;
std::unique_ptr<KeyedService>
TemplateURLServiceFactory::BuildServiceInstanceForBrowserContext(
content::BrowserContext* context) const { … }
void TemplateURLServiceFactory::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) { … }
bool TemplateURLServiceFactory::ServiceIsNULLWhileTesting() const { … }