Commit dbd3dd5f authored by James Cook's avatar James Cook Committed by Commit Bot

chromeos: Remove whitelist of ash prefs for late registration with sync

The "late registration" feature was added to support the mustash
project, which was running the ash system UI in a separate process.
Mustash was cancelled, so we now guarantee that all ash prefs
are registered before the sync subsystem starts.

Remove the whitelist. This is a manual revert of:
https://chromium-review.googlesource.com/c/chromium/src/+/1012788/

The PrefRegistry feature will be cleaned up separately, after
resolving the device_sync service and assistant service usage of
prefs.

Bug: 788918, 1012462
Change-Id: I9811c8f25530d9c0e949ae0675e51aeeb9f583c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1845963
Commit-Queue: James Cook <jamescook@chromium.org>
Auto-Submit: James Cook <jamescook@chromium.org>
Reviewed-by: default avatarMichael Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#703915}
parent dead92c7
...@@ -115,25 +115,6 @@ void TryMigrateToResolveTimezoneByGeolocationMethod(PrefService* prefs) { ...@@ -115,25 +115,6 @@ void TryMigrateToResolveTimezoneByGeolocationMethod(PrefService* prefs) {
static_cast<int>(method)); static_cast<int>(method));
} }
// Whitelist synable preferences that may be registered after sync system init.
void WhitelistLateRegistrationPrefsForSync(
user_prefs::PrefRegistrySyncable* registry) {
// These foreign syncable preferences are registered asynchronously by Ash,
// perhaps after sync system initialization. Whitelist these prefs so that any
// values obtained via sync before the prefs are registered will be stored.
const char* const kAshForeignSyncablePrefs[] = {
ash::prefs::kEnableAutoScreenLock,
ash::prefs::kEnableStylusTools,
ash::prefs::kLaunchPaletteOnEjectEvent,
ash::prefs::kMessageCenterLockScreenMode,
ash::prefs::kShelfAlignment,
ash::prefs::kShelfAutoHideBehavior,
ash::prefs::kTapDraggingEnabled,
};
for (const auto* pref : kAshForeignSyncablePrefs)
registry->WhitelistLateRegistrationPrefForSync(pref);
}
} // namespace } // namespace
Preferences::Preferences() Preferences::Preferences()
...@@ -184,8 +165,6 @@ void Preferences::RegisterPrefs(PrefRegistrySimple* registry) { ...@@ -184,8 +165,6 @@ void Preferences::RegisterPrefs(PrefRegistrySimple* registry) {
// static // static
void Preferences::RegisterProfilePrefs( void Preferences::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) { user_prefs::PrefRegistrySyncable* registry) {
WhitelistLateRegistrationPrefsForSync(registry);
std::string hardware_keyboard_id; std::string hardware_keyboard_id;
// TODO(yusukes): Remove the runtime hack. // TODO(yusukes): Remove the runtime hack.
if (IsRunningAsSystemCompositor()) { if (IsRunningAsSystemCompositor()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment