Commit 40004e1f authored by Alexander Alekseev's avatar Alexander Alekseev Committed by Commit Bot

Remove pref store initialization check from

ForceKeyboardDrivenUINavigation in input device settings. This fixes a
focus issue when using keyboard navigation in CfM's.

Bug: b:148967469
Change-Id: I20567ce2a4616d80a966401c5b506c98372bca27
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2088012
Commit-Queue: Juan Pablo De Lima <jpdelima@chromium.org>
Reviewed-by: default avatarAlexander Alekseev <alemate@chromium.org>
Cr-Commit-Position: refs/heads/master@{#752328}
parent bc259594
...@@ -374,7 +374,12 @@ void Preferences::RegisterProfilePrefs( ...@@ -374,7 +374,12 @@ void Preferences::RegisterProfilePrefs(
bool allow_time_zone_resolve_by_default = true; bool allow_time_zone_resolve_by_default = true;
// CfM devices default to static timezone unless time zone resolving is // CfM devices default to static timezone unless time zone resolving is
// explicitly enabled for the signin screen (usually by policy). // explicitly enabled for the signin screen (usually by policy).
if (system::InputDeviceSettings::Get()->ForceKeyboardDrivenUINavigation() && // We need local_state fully initialized, which does not happen in tests.
if (!g_browser_process->local_state() ||
g_browser_process->local_state()
->GetAllPrefStoresInitializationStatus() ==
PrefService::INITIALIZATION_STATUS_WAITING ||
system::InputDeviceSettings::Get()->ForceKeyboardDrivenUINavigation() ||
!system::TimeZoneResolverManager:: !system::TimeZoneResolverManager::
IfServiceShouldBeRunningForSigninScreen()) { IfServiceShouldBeRunningForSigninScreen()) {
allow_time_zone_resolve_by_default = false; allow_time_zone_resolve_by_default = false;
......
...@@ -353,10 +353,7 @@ bool InputDeviceSettings::ForceKeyboardDrivenUINavigation() { ...@@ -353,10 +353,7 @@ bool InputDeviceSettings::ForceKeyboardDrivenUINavigation() {
// tests do not have InstallAttributes or LocalState initialized, so getting // tests do not have InstallAttributes or LocalState initialized, so getting
// browser_policy_connector crashes. // browser_policy_connector crashes.
if (!InstallAttributes::IsInitialized() || if (!InstallAttributes::IsInitialized() ||
!g_browser_process->local_state() || !g_browser_process->local_state()) {
g_browser_process->local_state()
->GetAllPrefStoresInitializationStatus() ==
PrefService::INITIALIZATION_STATUS_WAITING) {
return false; return false;
} }
......
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