| Index: chrome/browser/chromeos/extensions/info_private_api.cc
|
| diff --git a/chrome/browser/chromeos/extensions/info_private_api.cc b/chrome/browser/chromeos/extensions/info_private_api.cc
|
| index 29bd74e2387dafa036aa085ba42a4ce3aa4386e8..c69c4ab2b89759d47420881d17a6d9feeb25545a 100644
|
| --- a/chrome/browser/chromeos/extensions/info_private_api.cc
|
| +++ b/chrome/browser/chromeos/extensions/info_private_api.cc
|
| @@ -326,6 +326,13 @@ std::unique_ptr<base::Value> ChromeosInfoPrivateGetFunction::GetValue(
|
| }
|
|
|
| if (property_name == kPropertyTimezone) {
|
| + if (chromeos::system::PerUserTimezoneEnabled()) {
|
| + return base::WrapUnique<base::Value>(
|
| + Profile::FromBrowserContext(context_)
|
| + ->GetPrefs()
|
| + ->GetUserPrefValue(prefs::kUserTimezone)
|
| + ->DeepCopy());
|
| + }
|
| // TODO(crbug.com/697817): Convert CrosSettings::Get to take a unique_ptr.
|
| return base::WrapUnique<base::Value>(
|
| chromeos::CrosSettings::Get()
|
| @@ -363,8 +370,13 @@ ExtensionFunction::ResponseAction ChromeosInfoPrivateSetFunction::Run() {
|
| if (param_name == kPropertyTimezone) {
|
| std::string param_value;
|
| EXTENSION_FUNCTION_VALIDATE(args_->GetString(1, ¶m_value));
|
| - chromeos::CrosSettings::Get()->Set(chromeos::kSystemTimezone,
|
| - base::Value(param_value));
|
| + if (chromeos::system::PerUserTimezoneEnabled()) {
|
| + Profile::FromBrowserContext(context_)->GetPrefs()->SetString(
|
| + prefs::kUserTimezone, param_value);
|
| + } else {
|
| + chromeos::CrosSettings::Get()->Set(chromeos::kSystemTimezone,
|
| + base::Value(param_value));
|
| + }
|
| } else {
|
| const char* pref_name = GetBoolPrefNameForApiProperty(param_name.c_str());
|
| if (pref_name) {
|
|
|