Index: chrome/browser/chromeos/login/ui/login_display_host_impl.cc |
diff --git a/chrome/browser/chromeos/login/ui/login_display_host_impl.cc b/chrome/browser/chromeos/login/ui/login_display_host_impl.cc |
index 6db2b1af8b0e70bb4d47adbe482ba8dd6dcb53d3..3dfa4aacd5058a12a91ba352cfdd4992acd61802 100644 |
--- a/chrome/browser/chromeos/login/ui/login_display_host_impl.cc |
+++ b/chrome/browser/chromeos/login/ui/login_display_host_impl.cc |
@@ -189,21 +189,28 @@ void ShowLoginWizardFinish( |
chromeos::LoginDisplayHost* display_host) { |
TRACE_EVENT0("chromeos", "ShowLoginWizard::ShowLoginWizardFinish"); |
+ // Restore system timezone. |
+ std::string timezone; |
+ if (g_browser_process && g_browser_process->local_state()) { |
michaelpg
2017/05/15 23:01:50
this might be a silly question, but when does OOBE
Alexander Alekseev
2017/05/16 01:11:56
In unit_tests, I suppose. We have similar check in
|
+ timezone = g_browser_process->local_state()->GetString( |
+ prefs::kSigninScreenTimezone); |
+ } |
+ |
if (ShouldShowSigninScreen(first_screen)) { |
display_host->StartSignInScreen(chromeos::LoginScreenContext()); |
} else { |
display_host->StartWizard(first_screen); |
- |
// Set initial timezone if specified by customization. |
- const std::string timezone_name = startup_manifest->initial_timezone(); |
- VLOG(1) << "Initial time zone: " << timezone_name; |
+ const std::string customization_timezone = |
+ startup_manifest->initial_timezone(); |
// Apply locale customizations only once to preserve whatever locale |
// user has changed to during OOBE. |
- if (!timezone_name.empty()) { |
- chromeos::system::TimezoneSettings::GetInstance()->SetTimezoneFromID( |
- base::UTF8ToUTF16(timezone_name)); |
- } |
+ if (!customization_timezone.empty()) |
+ timezone = customization_timezone; |
} |
+ g_browser_process->local_state()->SetString(prefs::kSigninScreenTimezone, |
+ timezone); |
stevenjb
2017/05/15 17:08:02
This should only be necessary inside the else, and
michaelpg
2017/05/15 23:01:50
Seems that way, and then we wouldn't need to read
Alexander Alekseev
2017/05/16 01:11:56
Done.
Alexander Alekseev
2017/05/16 01:11:56
We still need to set system timezone value here.
|
+ chromeos::CrosSettings::Get()->SetString(chromeos::kSystemTimezone, timezone); |
stevenjb
2017/05/15 17:08:02
What if timezone is empty, should we still be sett
Alexander Alekseev
2017/05/16 01:11:56
You are right, we should probably use system::Time
|
} |
struct ShowLoginWizardSwitchLanguageCallbackData { |