#include "chrome/browser/ui/side_search/side_search_config.h"
#include "base/observer_list.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/ui/side_search/side_search_utils.h"
#include "chrome/common/webui_url_constants.h"
#include "components/google/core/common/google_util.h"
#include "components/search_engines/template_url_service.h"
#include "content/public/browser/browser_context.h"
#include "content/public/common/url_utils.h"
#include "net/base/url_util.h"
#include "url/gurl.h"
namespace {
constexpr char kSideSearchVersion[] = …;
constexpr char kSideSearchConfigKey[] = …;
void ApplyDSEConfiguration(Profile* profile, SideSearchConfig& config) { … }
void ApplyGoogleSearchConfiguration(SideSearchConfig& config) { … }
}
SideSearchConfig::SideSearchConfig(Profile* profile) : … { … }
SideSearchConfig::~SideSearchConfig() = default;
SideSearchConfig* SideSearchConfig::Get(content::BrowserContext* context) { … }
void SideSearchConfig::OnTemplateURLServiceChanged() { … }
void SideSearchConfig::OnTemplateURLServiceShuttingDown() { … }
bool SideSearchConfig::ShouldNavigateInSidePanel(const GURL& url) { … }
void SideSearchConfig::SetShouldNavigateInSidePanelCallback(
URLTestConditionCallback callback) { … }
bool SideSearchConfig::CanShowSidePanelForURL(const GURL& url) { … }
void SideSearchConfig::SetCanShowSidePanelForURLCallback(
URLTestConditionCallback callback) { … }
GURL SideSearchConfig::GenerateSideSearchURL(const GURL& search_url) { … }
void SideSearchConfig::SetGenerateSideSearchURLCallback(
GenerateURLCallback callback) { … }
void SideSearchConfig::AddObserver(Observer* observer) { … }
void SideSearchConfig::RemoveObserver(Observer* observer) { … }
void SideSearchConfig::ResetStateAndNotifyConfigChanged() { … }
void SideSearchConfig::ApplyGoogleSearchConfigurationForTesting() { … }