#include "extensions/browser/extension_prefs.h"
#include <stddef.h>
#include <stdint.h>
#include <iterator>
#include <string_view>
#include <utility>
#include <vector>
#include "base/check_op.h"
#include "base/containers/contains.h"
#include "base/json/values_util.h"
#include "base/observer_list.h"
#include "base/ranges/algorithm.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/clock.h"
#include "base/time/default_clock.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
#include "components/content_settings/core/common/content_settings.h"
#include "components/crx_file/id_util.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/prefs/pref_service.h"
#include "components/supervised_user/core/common/buildflags.h"
#include "components/supervised_user/core/common/pref_names.h"
#include "extensions/browser/api/declarative_net_request/utils.h"
#include "extensions/browser/app_sorting.h"
#include "extensions/browser/blocklist_extension_prefs.h"
#include "extensions/browser/blocklist_state.h"
#include "extensions/browser/disable_reason.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_pref_store.h"
#include "extensions/browser/extension_prefs_factory.h"
#include "extensions/browser/extension_prefs_observer.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/extension_util.h"
#include "extensions/browser/install_flag.h"
#include "extensions/browser/pref_names.h"
#include "extensions/common/api/types.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_features.h"
#include "extensions/common/extension_id.h"
#include "extensions/common/manifest.h"
#include "extensions/common/manifest_handlers/app_display_info.h"
#include "extensions/common/mojom/manifest.mojom-shared.h"
#include "extensions/common/permissions/permission_set.h"
#include "extensions/common/permissions/permissions_info.h"
#include "extensions/common/url_pattern.h"
#include "extensions/common/user_script.h"
ManifestLocation;
namespace extensions {
namespace {
constexpr const char kPrefRunning[] = …;
constexpr const char kIsActive[] = …;
constexpr const char kPrefLocation[] = …;
constexpr const char kPrefState[] = …;
constexpr const char kPrefPath[] = …;
constexpr const char kPrefManifest[] = …;
constexpr const char kPrefManifestVersion[] = …;
constexpr const char kPrefAcknowledgePromptCount[] = …;
constexpr const char kPrefExternalAcknowledged[] = …;
constexpr const char kPrefExternalInstallFirstRun[] = …;
constexpr const char kPrefDisableReasons[] = …;
constexpr const char kLastPingDay[] = …;
constexpr const char kLastActivePingDay[] = …;
constexpr const char kActiveBit[] = …;
constexpr const char kExtensionsBlocklistUpdate[] = …;
constexpr const char kDelayedInstallInfo[] = …;
constexpr const char kDelayedInstallInfoDeletedPrefKeys[] = …;
constexpr const char kDelayedInstallReason[] = …;
constexpr const char kPrefSuggestedPageOrdinal[] = …;
constexpr const char kPrefIncognitoEnabled[] = …;
constexpr const char kPrefAllowFileAccess[] = …;
constexpr const char kPrefDesiredActivePermissions[] = …;
constexpr const char kPrefGrantedPermissions[] = …;
const char kGrantExtensionAllHostPermissions[] = …;
const char kPrefWithholdingPermissions[] = …;
constexpr const char kPrefRuntimeGrantedPermissions[] = …;
constexpr const char kPrefAPIs[] = …;
constexpr const char kPrefManifestPermissions[] = …;
constexpr const char kPrefExplicitHosts[] = …;
constexpr const char kPrefScriptableHosts[] = …;
constexpr const char kPrefFirstInstallTime[] = …;
constexpr const char kPrefLastUpdateTime[] = …;
constexpr const char kPrefDeprecatedInstallTime[] = …;
constexpr const char kPrefCreationFlags[] = …;
constexpr const char kPrefFromWebStore[] = …;
constexpr const char kPrefWasInstalledByDefault[] = …;
constexpr const char kPrefWasInstalledByOem[] = …;
constexpr const char kPrefGeometryCache[] = …;
constexpr const char kPrefLastLaunchTime[] = …;
constexpr const char kPrefInstallParam[] = …;
constexpr const char kInstallSignature[] = …;
constexpr const char kExternalUninstalls[] = …;
constexpr const char kPrefDoNotSync[] = …;
constexpr const char kPrefNeedsSync[] = …;
constexpr const char kDNREnabledStaticRulesetIDs[] = …;
constexpr bool kDefaultWithholdingBehavior = …;
bool CheckPrefType(PrefType pref_type, const base::Value* value) { … }
void SaveTime(prefs::DictionaryValueUpdate* dictionary,
const char* key,
const base::Time& time) { … }
base::Time ReadTime(const base::Value::Dict* dictionary, const char* key) { … }
class ScopedExtensionPrefUpdate : public prefs::ScopedDictionaryPrefUpdate { … };
bool g_run_alerts_in_first_run_for_testing = …;
}
ExtensionPrefs::ScopedDictionaryUpdate::ScopedDictionaryUpdate(
ExtensionPrefs* prefs,
const ExtensionId& extension_id,
const std::string& key)
: … { … }
ExtensionPrefs::ScopedDictionaryUpdate::~ScopedDictionaryUpdate() = default;
std::unique_ptr<prefs::DictionaryValueUpdate>
ExtensionPrefs::ScopedDictionaryUpdate::Get() { … }
std::unique_ptr<prefs::DictionaryValueUpdate>
ExtensionPrefs::ScopedDictionaryUpdate::Create() { … }
ExtensionPrefs::ScopedListUpdate::ScopedListUpdate(
ExtensionPrefs* prefs,
const ExtensionId& extension_id,
const std::string& key)
: … { … }
ExtensionPrefs::ScopedListUpdate::~ScopedListUpdate() = default;
base::Value::List* ExtensionPrefs::ScopedListUpdate::Get() { … }
base::Value::List* ExtensionPrefs::ScopedListUpdate::Ensure() { … }
std::unique_ptr<ExtensionPrefs> ExtensionPrefs::Create(
content::BrowserContext* browser_context,
PrefService* prefs,
const base::FilePath& root_dir,
ExtensionPrefValueMap* extension_pref_value_map,
bool extensions_disabled,
const std::vector<EarlyExtensionPrefsObserver*>& early_observers) { … }
std::unique_ptr<ExtensionPrefs> ExtensionPrefs::Create(
content::BrowserContext* browser_context,
PrefService* pref_service,
const base::FilePath& root_dir,
ExtensionPrefValueMap* extension_pref_value_map,
bool extensions_disabled,
const std::vector<EarlyExtensionPrefsObserver*>& early_observers,
base::Clock* clock) { … }
ExtensionPrefs::~ExtensionPrefs() { … }
ExtensionPrefs* ExtensionPrefs::Get(content::BrowserContext* context) { … }
static std::string MakePathRelative(const base::FilePath& parent,
const base::FilePath& child) { … }
void ExtensionPrefs::MakePathsRelative() { … }
const base::Value::Dict* ExtensionPrefs::GetExtensionPref(
const ExtensionId& extension_id) const { … }
void ExtensionPrefs::SetIntegerPref(const ExtensionId& id,
const PrefMap& pref,
int value) { … }
void ExtensionPrefs::SetBooleanPref(const ExtensionId& id,
const PrefMap& pref,
bool value) { … }
void ExtensionPrefs::SetStringPref(const ExtensionId& id,
const PrefMap& pref,
std::string value) { … }
void ExtensionPrefs::SetListPref(const ExtensionId& id,
const PrefMap& pref,
base::Value::List value) { … }
void ExtensionPrefs::SetDictionaryPref(const ExtensionId& id,
const PrefMap& pref,
base::Value::Dict value) { … }
void ExtensionPrefs::SetTimePref(const ExtensionId& id,
const PrefMap& pref,
base::Time value) { … }
void ExtensionPrefs::UpdateExtensionPrefInternal(
const ExtensionId& extension_id,
const PrefMap& pref,
base::Value data_value) { … }
void ExtensionPrefs::UpdateExtensionPref(
const ExtensionId& extension_id,
std::string_view key,
std::optional<base::Value> data_value) { … }
void ExtensionPrefs::DeleteExtensionPrefs(const ExtensionId& extension_id) { … }
void ExtensionPrefs::DeleteExtensionPrefsIfPrefEmpty(
const ExtensionId& extension_id) { … }
bool ExtensionPrefs::ReadPrefAsBoolean(const ExtensionId& extension_id,
const PrefMap& pref,
bool* out_value) const { … }
bool ExtensionPrefs::ReadPrefAsInteger(const ExtensionId& extension_id,
const PrefMap& pref,
int* out_value) const { … }
bool ExtensionPrefs::ReadPrefAsString(const ExtensionId& extension_id,
const PrefMap& pref,
std::string* out_value) const { … }
const base::Value::List* ExtensionPrefs::ReadPrefAsList(
const ExtensionId& extension_id,
const PrefMap& pref) const { … }
const base::Value::Dict* ExtensionPrefs::ReadPrefAsDictionary(
const ExtensionId& extension_id,
const PrefMap& pref) const { … }
base::Time ExtensionPrefs::ReadPrefAsTime(const ExtensionId& extension_id,
const PrefMap& pref) const { … }
bool ExtensionPrefs::ReadPrefAsBoolean(const ExtensionId& extension_id,
std::string_view pref_key,
bool* out_value) const { … }
bool ExtensionPrefs::ReadPrefAsInteger(const ExtensionId& extension_id,
std::string_view pref_key,
int* out_value) const { … }
bool ExtensionPrefs::ReadPrefAsString(const ExtensionId& extension_id,
std::string_view pref_key,
std::string* out_value) const { … }
const base::Value::List* ExtensionPrefs::ReadPrefAsList(
const ExtensionId& extension_id,
std::string_view pref_key) const { … }
const base::Value* ExtensionPrefs::GetPrefAsValue(
const ExtensionId& extension_id,
std::string_view pref_key) const { … }
const base::Value::Dict* ExtensionPrefs::ReadPrefAsDict(
const ExtensionId& extension_id,
std::string_view pref_key) const { … }
bool ExtensionPrefs::HasPrefForExtension(
const ExtensionId& extension_id) const { … }
bool ExtensionPrefs::ReadPrefAsURLPatternSet(const ExtensionId& extension_id,
std::string_view pref_key,
URLPatternSet* result,
int valid_schemes) const { … }
void ExtensionPrefs::SetExtensionPrefURLPatternSet(
const ExtensionId& extension_id,
std::string_view pref_key,
const URLPatternSet& set) { … }
bool ExtensionPrefs::ReadPrefAsBooleanAndReturn(
const ExtensionId& extension_id,
std::string_view pref_key) const { … }
std::unique_ptr<PermissionSet> ExtensionPrefs::ReadPrefAsPermissionSet(
const ExtensionId& extension_id,
std::string_view pref_key) const { … }
namespace {
template <typename T>
base::Value CreatePermissionList(const T& permissions) { … }
}
void ExtensionPrefs::SetExtensionPrefPermissionSet(
const ExtensionId& extension_id,
std::string_view pref_key,
const PermissionSet& new_value) { … }
void ExtensionPrefs::AddToPrefPermissionSet(const ExtensionId& extension_id,
const PermissionSet& permissions,
const char* pref_name) { … }
void ExtensionPrefs::RemoveFromPrefPermissionSet(
const ExtensionId& extension_id,
const PermissionSet& permissions,
const char* pref_name) { … }
int ExtensionPrefs::IncrementAcknowledgePromptCount(
const ExtensionId& extension_id) { … }
bool ExtensionPrefs::IsExternalExtensionAcknowledged(
const ExtensionId& extension_id) const { … }
void ExtensionPrefs::AcknowledgeExternalExtension(
const ExtensionId& extension_id) { … }
bool ExtensionPrefs::IsBlocklistedExtensionAcknowledged(
const ExtensionId& extension_id) const { … }
void ExtensionPrefs::AcknowledgeBlocklistedExtension(
const ExtensionId& extension_id) { … }
bool ExtensionPrefs::IsExternalInstallFirstRun(
const ExtensionId& extension_id) const { … }
void ExtensionPrefs::SetExternalInstallFirstRun(
const ExtensionId& extension_id) { … }
bool ExtensionPrefs::SetAlertSystemFirstRun() { … }
bool ExtensionPrefs::DidExtensionEscalatePermissions(
const ExtensionId& extension_id) const { … }
int ExtensionPrefs::GetDisableReasons(const ExtensionId& extension_id) const { … }
int ExtensionPrefs::GetBitMapPrefBits(const ExtensionId& extension_id,
std::string_view pref_key,
int default_bit) const { … }
bool ExtensionPrefs::HasDisableReason(
const ExtensionId& extension_id,
disable_reason::DisableReason disable_reason) const { … }
void ExtensionPrefs::AddDisableReason(
const ExtensionId& extension_id,
disable_reason::DisableReason disable_reason) { … }
void ExtensionPrefs::AddDisableReasons(const ExtensionId& extension_id,
int disable_reasons) { … }
void ExtensionPrefs::RemoveDisableReason(
const ExtensionId& extension_id,
disable_reason::DisableReason disable_reason) { … }
void ExtensionPrefs::ReplaceDisableReasons(const ExtensionId& extension_id,
int disable_reasons) { … }
void ExtensionPrefs::ClearDisableReasons(const ExtensionId& extension_id) { … }
void ExtensionPrefs::ClearInapplicableDisableReasonsForComponentExtension(
const ExtensionId& component_extension_id) { … }
void ExtensionPrefs::ModifyDisableReasons(const ExtensionId& extension_id,
int reasons,
BitMapPrefOperation operation) { … }
void ExtensionPrefs::ModifyBitMapPrefBits(const ExtensionId& extension_id,
int pending_bits,
BitMapPrefOperation operation,
std::string_view pref_key,
int default_bit) { … }
base::Time ExtensionPrefs::LastPingDay(const ExtensionId& extension_id) const { … }
void ExtensionPrefs::SetLastPingDay(const ExtensionId& extension_id,
const base::Time& time) { … }
base::Time ExtensionPrefs::BlocklistLastPingDay() const { … }
void ExtensionPrefs::SetBlocklistLastPingDay(const base::Time& time) { … }
base::Time ExtensionPrefs::LastActivePingDay(
const ExtensionId& extension_id) const { … }
void ExtensionPrefs::SetLastActivePingDay(const ExtensionId& extension_id,
const base::Time& time) { … }
bool ExtensionPrefs::GetActiveBit(const ExtensionId& extension_id) const { … }
void ExtensionPrefs::SetActiveBit(const ExtensionId& extension_id,
bool active) { … }
std::unique_ptr<PermissionSet> ExtensionPrefs::GetGrantedPermissions(
const ExtensionId& extension_id) const { … }
void ExtensionPrefs::AddGrantedPermissions(const ExtensionId& extension_id,
const PermissionSet& permissions) { … }
void ExtensionPrefs::RemoveGrantedPermissions(
const ExtensionId& extension_id,
const PermissionSet& permissions) { … }
std::unique_ptr<PermissionSet> ExtensionPrefs::GetDesiredActivePermissions(
const ExtensionId& extension_id) const { … }
void ExtensionPrefs::SetDesiredActivePermissions(
const ExtensionId& extension_id,
const PermissionSet& permissions) { … }
void ExtensionPrefs::AddDesiredActivePermissions(
const ExtensionId& extension_id,
const PermissionSet& permissions) { … }
void ExtensionPrefs::RemoveDesiredActivePermissions(
const ExtensionId& extension_id,
const PermissionSet& permissions) { … }
void ExtensionPrefs::SetWithholdingPermissions(const ExtensionId& extension_id,
bool should_withhold) { … }
bool ExtensionPrefs::GetWithholdingPermissions(
const ExtensionId& extension_id) const { … }
bool ExtensionPrefs::HasWithholdingPermissionsSetting(
const ExtensionId& extension_id) const { … }
std::unique_ptr<PermissionSet> ExtensionPrefs::GetRuntimeGrantedPermissions(
const ExtensionId& extension_id) const { … }
void ExtensionPrefs::AddRuntimeGrantedPermissions(
const ExtensionId& extension_id,
const PermissionSet& permissions) { … }
void ExtensionPrefs::RemoveRuntimeGrantedPermissions(
const ExtensionId& extension_id,
const PermissionSet& permissions) { … }
void ExtensionPrefs::SetExtensionRunning(const ExtensionId& extension_id,
bool is_running) { … }
bool ExtensionPrefs::IsExtensionRunning(const ExtensionId& extension_id) const { … }
void ExtensionPrefs::SetIsActive(const ExtensionId& extension_id,
bool is_active) { … }
bool ExtensionPrefs::IsActive(const ExtensionId& extension_id) const { … }
bool ExtensionPrefs::IsIncognitoEnabled(const ExtensionId& extension_id) const { … }
void ExtensionPrefs::SetIsIncognitoEnabled(const ExtensionId& extension_id,
bool enabled) { … }
bool ExtensionPrefs::AllowFileAccess(const ExtensionId& extension_id) const { … }
void ExtensionPrefs::SetAllowFileAccess(const ExtensionId& extension_id,
bool allow) { … }
bool ExtensionPrefs::HasAllowFileAccessSetting(
const ExtensionId& extension_id) const { … }
bool ExtensionPrefs::DoesExtensionHaveState(
const ExtensionId& id,
Extension::State check_state) const { … }
bool ExtensionPrefs::IsExternalExtensionUninstalled(
const ExtensionId& id) const { … }
bool ExtensionPrefs::ClearExternalExtensionUninstalled(const ExtensionId& id) { … }
bool ExtensionPrefs::IsExtensionDisabled(const ExtensionId& id) const { … }
ExtensionIdList ExtensionPrefs::GetPinnedExtensions() const { … }
void ExtensionPrefs::SetPinnedExtensions(const ExtensionIdList& extension_ids) { … }
void ExtensionPrefs::OnExtensionInstalled(
const Extension* extension,
Extension::State initial_state,
const syncer::StringOrdinal& page_ordinal,
int install_flags,
const std::string& install_parameter,
base::Value::Dict ruleset_install_prefs) { … }
void ExtensionPrefs::OnExtensionUninstalled(const ExtensionId& extension_id,
const ManifestLocation location,
bool external_uninstall) { … }
void ExtensionPrefs::SetExtensionEnabled(const ExtensionId& extension_id) { … }
void ExtensionPrefs::SetExtensionDisabled(const ExtensionId& extension_id,
int disable_reasons) { … }
std::string ExtensionPrefs::GetVersionString(
const ExtensionId& extension_id) const { … }
void ExtensionPrefs::UpdateManifest(const Extension* extension) { … }
void ExtensionPrefs::SetInstallLocation(const ExtensionId& extension_id,
ManifestLocation location) { … }
std::optional<ExtensionInfo> ExtensionPrefs::GetInstalledInfoHelper(
const ExtensionId& extension_id,
const base::Value::Dict& extension,
bool include_component_extensions) const { … }
std::optional<ExtensionInfo> ExtensionPrefs::GetInstalledExtensionInfo(
const ExtensionId& extension_id,
bool include_component_extensions) const { … }
ExtensionPrefs::ExtensionsInfo ExtensionPrefs::GetInstalledExtensionsInfo(
bool include_component_extensions) const { … }
void ExtensionPrefs::SetDelayedInstallInfo(
const Extension* extension,
Extension::State initial_state,
int install_flags,
DelayReason delay_reason,
const syncer::StringOrdinal& page_ordinal,
const std::string& install_parameter,
base::Value::Dict ruleset_install_prefs) { … }
bool ExtensionPrefs::RemoveDelayedInstallInfo(const ExtensionId& extension_id) { … }
bool ExtensionPrefs::FinishDelayedInstallInfo(const ExtensionId& extension_id) { … }
std::optional<ExtensionInfo> ExtensionPrefs::GetDelayedInstallInfo(
const ExtensionId& extension_id) const { … }
ExtensionPrefs::DelayReason ExtensionPrefs::GetDelayedInstallReason(
const ExtensionId& extension_id) const { … }
ExtensionPrefs::ExtensionsInfo ExtensionPrefs::GetAllDelayedInstallInfo()
const { … }
bool ExtensionPrefs::IsFromWebStore(const ExtensionId& extension_id) const { … }
int ExtensionPrefs::GetCreationFlags(const ExtensionId& extension_id) const { … }
int ExtensionPrefs::GetDelayedInstallCreationFlags(
const ExtensionId& extension_id) const { … }
bool ExtensionPrefs::WasInstalledByDefault(
const ExtensionId& extension_id) const { … }
bool ExtensionPrefs::WasInstalledByOem(const ExtensionId& extension_id) const { … }
base::Time ExtensionPrefs::GetFirstInstallTime(
const ExtensionId& extension_id) const { … }
base::Time ExtensionPrefs::GetLastUpdateTime(
const ExtensionId& extension_id) const { … }
bool ExtensionPrefs::DoNotSync(const ExtensionId& extension_id) const { … }
base::Time ExtensionPrefs::GetLastLaunchTime(
const ExtensionId& extension_id) const { … }
void ExtensionPrefs::SetLastLaunchTime(const ExtensionId& extension_id,
const base::Time& time) { … }
void ExtensionPrefs::ClearLastLaunchTimes() { … }
void ExtensionPrefs::SetIntegerPref(const PrefMap& pref, int value) { … }
void ExtensionPrefs::SetBooleanPref(const PrefMap& pref, bool value) { … }
void ExtensionPrefs::SetStringPref(const PrefMap& pref,
const std::string& value) { … }
void ExtensionPrefs::SetTimePref(const PrefMap& pref, base::Time value) { … }
void ExtensionPrefs::SetGURLPref(const PrefMap& pref, const GURL& value) { … }
void ExtensionPrefs::SetDictionaryPref(const PrefMap& pref,
base::Value::Dict value) { … }
int ExtensionPrefs::GetPrefAsInteger(const PrefMap& pref) const { … }
bool ExtensionPrefs::GetPrefAsBoolean(const PrefMap& pref) const { … }
std::string ExtensionPrefs::GetPrefAsString(const PrefMap& pref) const { … }
base::Time ExtensionPrefs::GetPrefAsTime(const PrefMap& pref) const { … }
GURL ExtensionPrefs::GetPrefAsGURL(const PrefMap& pref) const { … }
const base::Value::Dict& ExtensionPrefs::GetPrefAsDictionary(
const PrefMap& pref) const { … }
std::unique_ptr<prefs::ScopedDictionaryPrefUpdate>
ExtensionPrefs::CreatePrefUpdate(const PrefMap& pref) { … }
void ExtensionPrefs::IncrementPref(const PrefMap& pref) { … }
void ExtensionPrefs::DecrementPref(const PrefMap& pref) { … }
ExtensionIdList ExtensionPrefs::GetExtensions() const { … }
void ExtensionPrefs::AddObserver(ExtensionPrefsObserver* observer) { … }
void ExtensionPrefs::RemoveObserver(ExtensionPrefsObserver* observer) { … }
void ExtensionPrefs::InitPrefStore() { … }
bool ExtensionPrefs::HasIncognitoPrefValue(const std::string& pref_key) const { … }
const base::Value::Dict* ExtensionPrefs::GetGeometryCache(
const ExtensionId& extension_id) const { … }
void ExtensionPrefs::SetGeometryCache(const ExtensionId& extension_id,
base::Value::Dict cache) { … }
const base::Value::Dict& ExtensionPrefs::GetInstallSignature() const { … }
void ExtensionPrefs::SetInstallSignature(base::Value::Dict* signature) { … }
bool ExtensionPrefs::NeedsSync(const ExtensionId& extension_id) const { … }
void ExtensionPrefs::SetNeedsSync(const ExtensionId& extension_id,
bool needs_sync) { … }
void ExtensionPrefs::SetRunAlertsInFirstRunForTest() { … }
const char ExtensionPrefs::kFakeObsoletePrefForTesting[] = …;
const char ExtensionPrefs::kDNRStaticRulesetPref[] = …;
std::string ExtensionPrefs::JoinPrefs(
const std::vector<std::string_view>& parts) { … }
ExtensionPrefs::ExtensionPrefs(
content::BrowserContext* browser_context,
PrefService* prefs,
const base::FilePath& root_dir,
ExtensionPrefValueMap* extension_pref_value_map,
base::Clock* clock,
bool extensions_disabled,
const std::vector<EarlyExtensionPrefsObserver*>& early_observers)
: … { … }
AppSorting* ExtensionPrefs::app_sorting() const { … }
bool ExtensionPrefs::NeedsStorageGarbageCollection() const { … }
void ExtensionPrefs::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) { … }
template <class ExtensionIdContainer>
bool ExtensionPrefs::GetUserExtensionPrefIntoContainer(
const char* pref,
ExtensionIdContainer* id_container_out) const { … }
template <class ExtensionIdContainer>
void ExtensionPrefs::SetExtensionPrefFromContainer(
const char* pref,
const ExtensionIdContainer& strings) { … }
void ExtensionPrefs::PopulateExtensionInfoPrefs(
const Extension* extension,
const base::Time install_time,
Extension::State initial_state,
int install_flags,
const std::string& install_parameter,
base::Value::Dict ruleset_install_prefs,
prefs::DictionaryValueUpdate* extension_dict,
base::Value::List& removed_prefs) { … }
void ExtensionPrefs::InitExtensionControlledPrefs(
const ExtensionsInfo& extensions_info) { … }
void ExtensionPrefs::LoadExtensionControlledPrefs(
const ExtensionId& extension_id,
ChromeSettingScope scope) { … }
void ExtensionPrefs::FinishExtensionInfoPrefs(
const ExtensionId& extension_id,
const base::Time install_time,
bool needs_sort_ordinal,
const syncer::StringOrdinal& suggested_page_ordinal,
prefs::DictionaryValueUpdate* extension_dict) { … }
void ExtensionPrefs::BackfillAndMigrateInstallTimePrefs() { … }
void ExtensionPrefs::MigrateDeprecatedDisableReasons() { … }
void ExtensionPrefs::MigrateObsoleteExtensionPrefs() { … }
void ExtensionPrefs::MigrateToNewWithholdingPref() { … }
void ExtensionPrefs::MigrateToNewExternalUninstallPref() { … }
bool ExtensionPrefs::ShouldInstallObsoleteComponentExtension(
const ExtensionId& extension_id) { … }
void ExtensionPrefs::MarkObsoleteComponentExtensionAsRemoved(
const ExtensionId& extension_id,
const ManifestLocation location) { … }
}