chromium/components/search_engines/template_url_service_test_util.cc

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/search_engines/template_url_service_test_util.h"

#include <memory>

#include "base/command_line.h"
#include "components/country_codes/country_codes.h"
#include "components/metrics/metrics_pref_names.h"
#include "components/search_engines/keyword_table.h"
#include "components/search_engines/search_engine_choice/search_engine_choice_service.h"
#include "components/search_engines/search_engines_switches.h"
#include "components/search_engines/search_terms_data.h"
#include "components/search_engines/template_url_prepopulate_data.h"
#include "components/search_engines/template_url_service.h"
#include "components/search_engines/template_url_service_client.h"
#include "components/webdata/common/web_database_service.h"

void RegisterPrefsForTemplateURLService(
    user_prefs::PrefRegistrySyncable* registry) {}

// -- TemplateURLServiceLoadWaiter --------------------------------------------

TemplateURLServiceLoadWaiter::TemplateURLServiceLoadWaiter() = default;
TemplateURLServiceLoadWaiter::~TemplateURLServiceLoadWaiter() = default;

void TemplateURLServiceLoadWaiter::WaitForLoadComplete(
    TemplateURLService& template_url_service) {}

void TemplateURLServiceLoadWaiter::OnTemplateURLServiceChanged() {}

void TemplateURLServiceLoadWaiter::OnTemplateURLServiceShuttingDown() {}

void TemplateURLServiceLoadWaiter::UpdateStatus(bool force_quit) {}

// -- TemplateURLServiceUnitTestBase ------------------------------------------

TemplateURLServiceUnitTestBase::TemplateURLServiceUnitTestBase() = default;
TemplateURLServiceUnitTestBase::~TemplateURLServiceUnitTestBase() = default;

void TemplateURLServiceUnitTestBase::SetUp() {}

std::unique_ptr<TemplateURLService>
TemplateURLServiceUnitTestBase::CreateService() {}

// -- LoadedTemplateURLServiceUnitTestBase ------------------------------------

LoadedTemplateURLServiceUnitTestBase::LoadedTemplateURLServiceUnitTestBase() =
    default;
LoadedTemplateURLServiceUnitTestBase::~LoadedTemplateURLServiceUnitTestBase() =
    default;

std::unique_ptr<TemplateURLService>
LoadedTemplateURLServiceUnitTestBase::CreateService() {}

void LoadedTemplateURLServiceUnitTestBase::SetUp() {}

void LoadedTemplateURLServiceUnitTestBase::TearDown() {}

// Same as `TemplateURLService::GetTemplateURLs()`, but removes the starter
// pack entries.
TemplateURLService::TemplateURLVector
LoadedTemplateURLServiceUnitTestBase::GetKeywordTemplateURLs() {}

// Returns `TemplateURLService::GetTemplateURLs()`, filtering to only entries
// that have `keyword` as their keyword. In general it should return a single
// elements, but in some cases there may be more.
TemplateURLService::TemplateURLVector
LoadedTemplateURLServiceUnitTestBase::GetTemplateURLsMatchingKeyword(
    std::u16string keyword) {}