Commit 74c8f63d authored by Henrique Grandinetti's avatar Henrique Grandinetti Committed by Commit Bot

Allow children to set timezone

Bug: 987763
Change-Id: I891e4143b2d0dfe7e0ac0c05e448e61122a6b6ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1724650Reviewed-by: default avatarAga Wronska <agawronska@chromium.org>
Reviewed-by: default avatarAlexander Alekseev <alemate@chromium.org>
Commit-Queue: Henrique Grandinetti <hgrandinetti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#682689}
parent df2ed4af
......@@ -25,6 +25,7 @@
#include "chrome/browser/chromeos/settings/cros_settings.h"
#include "chrome/browser/chromeos/system/timezone_resolver_manager.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/common/chrome_features.h"
#include "chrome/common/pref_names.h"
#include "chrome/grit/generated_resources.h"
#include "chromeos/constants/chromeos_switches.h"
......@@ -166,9 +167,12 @@ bool CanSetSystemTimezone(const user_manager::User* user) {
case user_manager::USER_TYPE_GUEST:
case user_manager::USER_TYPE_PUBLIC_ACCOUNT:
case user_manager::USER_TYPE_CHILD:
return false;
case user_manager::USER_TYPE_CHILD:
return base::FeatureList::IsEnabled(
features::kParentAccessCodeForTimeChange);
case user_manager::NUM_USER_TYPES:
NOTREACHED();
......
......@@ -49,7 +49,7 @@ bool IsTimezonePrefsManaged(const std::string& pref_name);
void UpdateSystemTimezone(Profile* profile);
// Set system timezone to the given |timezone_id|, as long as the given |user|
// is allowed to set it (so not a guest, public account or child).
// is allowed to set it (so not a guest or public account).
// Updates only the global system timezone - not specific to the user - and
// doesn't care if perUserTimezone is enabled.
// Returns |true| if the system timezone is set, false if the given user cannot.
......
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