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

Side by Side Diff: chrome/browser/chromeos/login/wizard_controller.cc

Issue 2849823003: ChromeOS: implement per-user time zone preferences. (Closed)
Patch Set: Rebased. Created 3 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/login/wizard_controller.h" 5 #include "chrome/browser/chromeos/login/wizard_controller.h"
6 6
7 #include <signal.h> 7 #include <signal.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <sys/types.h> 10 #include <sys/types.h>
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 #include "chrome/browser/chromeos/login/screens/wrong_hwid_screen.h" 60 #include "chrome/browser/chromeos/login/screens/wrong_hwid_screen.h"
61 #include "chrome/browser/chromeos/login/session/user_session_manager.h" 61 #include "chrome/browser/chromeos/login/session/user_session_manager.h"
62 #include "chrome/browser/chromeos/login/startup_utils.h" 62 #include "chrome/browser/chromeos/login/startup_utils.h"
63 #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_scre en.h" 63 #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_scre en.h"
64 #include "chrome/browser/chromeos/login/ui/login_display_host.h" 64 #include "chrome/browser/chromeos/login/ui/login_display_host.h"
65 #include "chrome/browser/chromeos/net/delay_network_call.h" 65 #include "chrome/browser/chromeos/net/delay_network_call.h"
66 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 66 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
67 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" 67 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h"
68 #include "chrome/browser/chromeos/settings/cros_settings.h" 68 #include "chrome/browser/chromeos/settings/cros_settings.h"
69 #include "chrome/browser/chromeos/system/device_disabling_manager.h" 69 #include "chrome/browser/chromeos/system/device_disabling_manager.h"
70 #include "chrome/browser/chromeos/system/timezone_util.h"
70 #include "chrome/browser/lifetime/application_lifetime.h" 71 #include "chrome/browser/lifetime/application_lifetime.h"
71 #include "chrome/browser/metrics/metrics_reporting_state.h" 72 #include "chrome/browser/metrics/metrics_reporting_state.h"
72 #include "chrome/browser/profiles/profile.h" 73 #include "chrome/browser/profiles/profile.h"
73 #include "chrome/browser/profiles/profile_manager.h" 74 #include "chrome/browser/profiles/profile_manager.h"
74 #include "chrome/browser/ui/ash/ash_util.h" 75 #include "chrome/browser/ui/ash/ash_util.h"
75 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" 76 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
76 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" 77 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
77 #include "chrome/browser/ui/webui/help/help_utils_chromeos.h" 78 #include "chrome/browser/ui/webui/help/help_utils_chromeos.h"
78 #include "chrome/common/chrome_constants.h" 79 #include "chrome/common/chrome_constants.h"
79 #include "chrome/common/pref_names.h" 80 #include "chrome/common/pref_names.h"
(...skipping 1415 matching lines...) Expand 10 before | Expand all | Expand 10 after
1495 !policy_timezone.empty()) { 1496 !policy_timezone.empty()) {
1496 VLOG(1) << "Resolve TimeZone: TimeZone settings are overridden" 1497 VLOG(1) << "Resolve TimeZone: TimeZone settings are overridden"
1497 << " by DevicePolicy."; 1498 << " by DevicePolicy.";
1498 return; 1499 return;
1499 } 1500 }
1500 } 1501 }
1501 1502
1502 if (!timezone->timeZoneId.empty()) { 1503 if (!timezone->timeZoneId.empty()) {
1503 VLOG(1) << "Resolve TimeZone: setting timezone to '" << timezone->timeZoneId 1504 VLOG(1) << "Resolve TimeZone: setting timezone to '" << timezone->timeZoneId
1504 << "'"; 1505 << "'";
1505 1506 chromeos::system::SetSystemAndSigninScreenTimezone(timezone->timeZoneId);
1506 system::TimezoneSettings::GetInstance()->SetTimezoneFromID(
1507 base::UTF8ToUTF16(timezone->timeZoneId));
1508 } 1507 }
1509 } 1508 }
1510 1509
1511 TimeZoneProvider* WizardController::GetTimezoneProvider() { 1510 TimeZoneProvider* WizardController::GetTimezoneProvider() {
1512 if (!timezone_provider_) { 1511 if (!timezone_provider_) {
1513 timezone_provider_.reset( 1512 timezone_provider_.reset(
1514 new TimeZoneProvider(g_browser_process->system_request_context(), 1513 new TimeZoneProvider(g_browser_process->system_request_context(),
1515 DefaultTimezoneProviderURL())); 1514 DefaultTimezoneProviderURL()));
1516 } 1515 }
1517 return timezone_provider_.get(); 1516 return timezone_provider_.get();
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1684 SetCurrentScreen(screen); 1683 SetCurrentScreen(screen);
1685 } 1684 }
1686 1685
1687 AutoEnrollmentController* WizardController::GetAutoEnrollmentController() { 1686 AutoEnrollmentController* WizardController::GetAutoEnrollmentController() {
1688 if (!auto_enrollment_controller_) 1687 if (!auto_enrollment_controller_)
1689 auto_enrollment_controller_ = base::MakeUnique<AutoEnrollmentController>(); 1688 auto_enrollment_controller_ = base::MakeUnique<AutoEnrollmentController>();
1690 return auto_enrollment_controller_.get(); 1689 return auto_enrollment_controller_.get();
1691 } 1690 }
1692 1691
1693 } // namespace chromeos 1692 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698