Commit aaf07687 authored by xiyuan@chromium.org's avatar xiyuan@chromium.org

cros: Allow timezone change for non guest users.

None guest users include authenticated users (regular user, owner), kiosk
users and login screen where there is no user.

BUG=340843

Review URL: https://codereview.chromium.org/154863003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248901 0039d316-1c4b-4281-b951-d872f2087c98
parent f953135b
...@@ -33,7 +33,7 @@ SystemSettingsProvider::~SystemSettingsProvider() { ...@@ -33,7 +33,7 @@ SystemSettingsProvider::~SystemSettingsProvider() {
void SystemSettingsProvider::DoSet(const std::string& path, void SystemSettingsProvider::DoSet(const std::string& path,
const base::Value& in_value) { const base::Value& in_value) {
// Non-guest users can change the time zone. // Non-guest users can change the time zone.
if (!LoginState::Get()->IsUserAuthenticated()) if (LoginState::Get()->IsGuestUser())
return; return;
if (path == kSystemTimezone) { if (path == kSystemTimezone) {
......
...@@ -64,7 +64,7 @@ class CHROMEOS_EXPORT LoginState { ...@@ -64,7 +64,7 @@ class CHROMEOS_EXPORT LoginState {
// logged in, and only the owner will be allowed to log in). // logged in, and only the owner will be allowed to log in).
bool IsInSafeMode() const; bool IsInSafeMode() const;
// Returns true if logged in and is a guest, retail, public, or kiosk user. // Returns true if logged in and is a guest, retail, or public user.
bool IsGuestUser() const; bool IsGuestUser() const;
// Returns true if the user is an authenticated user (i.e. non public account) // Returns true if the user is an authenticated user (i.e. non public account)
......
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