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

Unified Diff: chrome/browser/chromeos/login/ui/login_display_host_impl.cc

Issue 2849823003: ChromeOS: implement per-user time zone preferences. (Closed)
Patch Set: Try remove g_browser_process check Created 3 years, 7 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
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..cd541a7a09d46243c4124832c272bf77436a31a2 100644
--- a/chrome/browser/chromeos/login/ui/login_display_host_impl.cc
+++ b/chrome/browser/chromeos/login/ui/login_display_host_impl.cc
@@ -189,20 +189,26 @@ void ShowLoginWizardFinish(
chromeos::LoginDisplayHost* display_host) {
TRACE_EVENT0("chromeos", "ShowLoginWizard::ShowLoginWizardFinish");
+ // Restore system timezone.
+ std::string timezone;
+ 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;
+ }
+ if (!timezone.empty()) {
+ chromeos::system::SetSigninScreenTimezone(timezone,
+ true /* set_system_timezone */);
}
}

Powered by Google App Engine
This is Rietveld 408576698