chromium/chrome/browser/extensions/api/settings_overrides/settings_overrides_api.cc

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

#include "chrome/browser/extensions/api/settings_overrides/settings_overrides_api.h"

#include <stddef.h>

#include <memory>
#include <utility>

#include "base/feature_list.h"
#include "base/lazy_instance.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/prefs/session_startup_pref.h"
#include "chrome/browser/profiles/profile.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/extensions/manifest_handlers/settings_overrides_handler.h"
#include "chrome/common/pref_names.h"
#include "components/search_engines/search_engine_choice/search_engine_choice_service.h"
#include "components/search_engines/search_engines_pref_names.h"
#include "components/search_engines/template_url.h"
#include "components/search_engines/template_url_data_util.h"
#include "components/search_engines/template_url_prepopulate_data.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_prefs_factory.h"
#include "extensions/browser/extension_prefs_helper.h"
#include "extensions/browser/extension_prefs_helper_factory.h"
#include "extensions/browser/install_prefs_helper.h"
#include "extensions/common/api/types.h"
#include "extensions/common/error_utils.h"
#include "extensions/common/extension_id.h"
#include "extensions/common/manifest_constants.h"

ChromeSettingScope;

namespace extensions {

namespace {

base::LazyInstance<BrowserContextKeyedAPIFactory<SettingsOverridesAPI>>::
    DestructorAtExit g_settings_overrides_api_factory =;

const char kManyStartupPagesWarning[] =;

ChromeSettingsOverrides;

std::string SubstituteInstallParam(std::string str,
                                   const std::string& install_parameter) {}

std::unique_ptr<TemplateURLData> ConvertSearchProvider(
    PrefService* prefs,
    search_engines::SearchEngineChoiceService* search_engine_choice_service,
    const ChromeSettingsOverrides::SearchProvider& search_provider,
    const std::string& install_parameter) {}

}  // namespace

// Kill-switch for the updated logic to fetch the prepopulated search engine
// for settings override.
// Exposed for tests. To be removed in M122.
BASE_FEATURE();

SettingsOverridesAPI::SettingsOverridesAPI(content::BrowserContext* context)
    :{}

SettingsOverridesAPI::~SettingsOverridesAPI() {}

BrowserContextKeyedAPIFactory<SettingsOverridesAPI>*
SettingsOverridesAPI::GetFactoryInstance() {}

void SettingsOverridesAPI::SetPref(const ExtensionId& extension_id,
                                   const std::string& pref_key,
                                   base::Value value) const {}

void SettingsOverridesAPI::UnsetPref(const ExtensionId& extension_id,
                                     const std::string& pref_key) const {}

void SettingsOverridesAPI::OnExtensionLoaded(
    content::BrowserContext* browser_context,
    const Extension* extension) {}
void SettingsOverridesAPI::OnExtensionUnloaded(
    content::BrowserContext* browser_context,
    const Extension* extension,
    UnloadedExtensionReason reason) {}

void SettingsOverridesAPI::RegisterSearchProvider(
    const Extension* extension) const {}

template <>
void BrowserContextKeyedAPIFactory<
    SettingsOverridesAPI>::DeclareFactoryDependencies() {}

}  // namespace extensions