Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6664)

Unified Diff: chrome/browser/chromeos/system/timezone_resolver_manager.cc

Issue 2855433002: ChromeOS: Correctly handle settings.resolve_device_timezone_by_geolocation. (Closed)
Patch Set: Fx build Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/system/timezone_resolver_manager.cc
diff --git a/chrome/browser/chromeos/system/timezone_resolver_manager.cc b/chrome/browser/chromeos/system/timezone_resolver_manager.cc
index d1e9ef35872830939883ab791eac6e1e04094786..43508c38a913315afca3515d0b3b64ba09731149 100644
--- a/chrome/browser/chromeos/system/timezone_resolver_manager.cc
+++ b/chrome/browser/chromeos/system/timezone_resolver_manager.cc
@@ -98,8 +98,12 @@ ServiceConfiguration GetServiceConfigurationFromUserPrefs(
// Returns service configuration for the signin screen.
ServiceConfiguration GetServiceConfigurationForSigninScreen() {
- if (!g_browser_process->local_state()->GetBoolean(
- prefs::kResolveDeviceTimezoneByGeolocation)) {
+ const PrefService::Preference* device_pref =
+ g_browser_process->local_state()->FindPreference(
+ prefs::kResolveDeviceTimezoneByGeolocation);
+ bool device_pref_value;
+ if (!device_pref ||
+ !device_pref->GetValue()->GetAsBoolean(&device_pref_value)) {
// CfM devices default to static timezone.
bool keyboard_driven_oobe =
system::InputDeviceSettings::Get()->ForceKeyboardDrivenUINavigation();
@@ -112,7 +116,7 @@ ServiceConfiguration GetServiceConfigurationForSigninScreen() {
if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kLoginUser))
return SHOULD_STOP;
- return SHOULD_START;
+ return device_pref_value ? SHOULD_START : SHOULD_STOP;
}
} // anonymous namespace.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698