#include "chrome/browser/search_engine_choice/search_engine_choice_dialog_service_factory.h"
#include "base/check_deref.h"
#include "base/check_is_test.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "build/branding_buildflags.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_selections.h"
#include "chrome/browser/search_engine_choice/search_engine_choice_dialog_service.h"
#include "chrome/browser/search_engine_choice/search_engine_choice_service_factory.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/common/chrome_switches.h"
#include "components/search_engines/search_engine_choice/search_engine_choice_service.h"
#include "components/search_engines/search_engine_choice/search_engine_choice_utils.h"
#include "components/search_engines/search_engines_pref_names.h"
#include "components/search_engines/search_engines_switches.h"
#include "components/search_engines/template_url_service.h"
#if BUILDFLAG(IS_CHROMEOS)
#include "chrome/browser/profiles/profiles_state.h"
#include "chromeos/components/kiosk/kiosk_utils.h"
#endif
namespace {
bool g_is_chrome_build = …true;
#else
false;
#endif
search_engines::SearchEngineChoiceScreenConditions ComputeProfileEligibility(
Profile& profile) { … }
bool IsProfileEligibleForChoiceScreen(Profile& profile) { … }
}
SearchEngineChoiceDialogServiceFactory::SearchEngineChoiceDialogServiceFactory()
: … { … }
SearchEngineChoiceDialogServiceFactory::
~SearchEngineChoiceDialogServiceFactory() = default;
SearchEngineChoiceDialogServiceFactory*
SearchEngineChoiceDialogServiceFactory::GetInstance() { … }
SearchEngineChoiceDialogService*
SearchEngineChoiceDialogServiceFactory::GetForProfile(Profile* profile) { … }
base::AutoReset<bool>
SearchEngineChoiceDialogServiceFactory::ScopedChromeBuildOverrideForTesting(
bool force_chrome_build) { … }
bool SearchEngineChoiceDialogServiceFactory::
IsProfileEligibleForChoiceScreenForTesting(Profile& profile) { … }
std::unique_ptr<KeyedService>
SearchEngineChoiceDialogServiceFactory::BuildServiceInstanceForBrowserContext(
content::BrowserContext* context) const { … }