#ifndef CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_TEST_UTIL_H_
#define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_TEST_UTIL_H_
#include <memory>
#include <string>
#include "base/files/scoped_temp_dir.h"
#include "base/memory/ref_counted.h"
#include "base/time/time.h"
#include "chrome/browser/search_engine_choice/search_engine_choice_service_factory.h"
#include "chrome/test/base/scoped_testing_local_state.h"
#include "chrome/test/base/testing_profile.h"
#include "components/search_engines/enterprise/enterprise_site_search_manager.h"
#include "components/search_engines/template_url.h"
#include "components/search_engines/template_url_data.h"
#include "components/search_engines/template_url_service_observer.h"
#include "services/data_decoder/public/cpp/test_support/in_process_data_decoder.h"
class KeywordWebDataService;
class TemplateURLService;
void SetManagedDefaultSearchPreferences(const TemplateURLData& managed_data,
bool enabled,
TestingProfile* profile);
void RemoveManagedDefaultSearchPreferences(TestingProfile* profile);
void SetRecommendedDefaultSearchPreferences(const TemplateURLData& data,
bool enabled,
TestingProfile* profile);
void SetManagedSiteSearchSettingsPreference(
const EnterpriseSiteSearchManager::OwnedTemplateURLDataVector&
site_search_engines,
TestingProfile* profile);
std::unique_ptr<TemplateURL> CreateTestTemplateURL(
const std::u16string& keyword,
const std::string& url,
const std::string& guid = std::string(),
base::Time last_modified = base::Time::FromTimeT(100),
bool safe_for_autoreplace = false,
TemplateURLData::CreatedByPolicy created_by_policy =
TemplateURLData::CreatedByPolicy::kNoPolicy,
int prepopulate_id = 999999);
class TemplateURLServiceTestUtil : public TemplateURLServiceObserver { … };
#endif