Index: chrome/browser/resources/settings/date_time_page/date_time_page.html |
diff --git a/chrome/browser/resources/settings/date_time_page/date_time_page.html b/chrome/browser/resources/settings/date_time_page/date_time_page.html |
index b40d20261b9f4aa10d5b2a4b0cf4f72957b32630..edab66ba4b57ca15cc49e96737f9e72180a87ac1 100644 |
--- a/chrome/browser/resources/settings/date_time_page/date_time_page.html |
+++ b/chrome/browser/resources/settings/date_time_page/date_time_page.html |
@@ -35,25 +35,61 @@ |
<div id="timezoneGeolocateToggleLabel" class="start"> |
$i18n{timeZoneGeolocation} |
</div> |
- <template is="dom-if" if="[[hasTimeZoneAutoDetectPolicy_]]" restamp> |
- <cr-policy-indicator indicator-type="devicePolicy" |
- icon-aria-label="$i18n{timeZoneGeolocation}"> |
- </cr-policy-indicator> |
+ <template is="dom-if" restamp |
+ if="[[!prefs.cros.flags.per_user_timezone_enabled.value]]"> |
+ <template is="dom-if" if="[[hasTimeZoneAutoDetectPolicy_]]" restamp> |
+ <cr-policy-indicator indicator-type="devicePolicy" |
+ icon-aria-label="$i18n{timeZoneGeolocation}"> |
+ </cr-policy-indicator> |
+ </template> |
+ <paper-toggle-button |
+ id="timeZoneAutoDetect" |
+ aria-labelledby="timezoneGeolocateToggleLabel" |
+ checked="[[timeZoneAutoDetect_]]" |
+ disabled="[[hasTimeZoneAutoDetectPolicy_]]" |
+ on-change="onTimeZoneAutoDetectChange_"> |
+ </paper-toggle-button> |
+ </template> |
+ <template is="dom-if" restamp |
+ if="[[prefs.cros.flags.per_user_timezone_enabled.value]]"> |
+ <settings-toggle-button |
+ pref="{{prefs.settings.resolve_timezone_by_geolocation}}" |
+ id="timeZoneAutoDetect" |
+ aria-labelledby="timezoneGeolocateToggleLabel"> |
+ </settings-toggle-button> |
</template> |
- <paper-toggle-button |
- id="timeZoneAutoDetect" |
- aria-labelledby="timezoneGeolocateToggleLabel" |
- checked="[[timeZoneAutoDetect_]]" |
- disabled="[[hasTimeZoneAutoDetectPolicy_]]" |
- on-change="onTimeZoneAutoDetectChange_"> |
- </paper-toggle-button> |
</div> |
<div class="settings-box continuation embedded"> |
- <settings-dropdown-menu pref="{{prefs.cros.system.timezone}}" |
- label="$i18n{timeZone}" |
- menu-options="[[timeZoneList_]]" |
- disabled="[[timeZoneAutoDetect_]]"> |
- </settings-dropdown-menu> |
+ <template is="dom-if" restamp |
+ if="[[!prefs.cros.flags.per_user_timezone_enabled.value]]"> |
+ <settings-dropdown-menu pref="{{prefs.cros.system.timezone}}" |
+ label="$i18n{timeZone}" |
+ menu-options="[[timeZoneList_]]" |
+ disabled="[[timeZoneAutoDetect_]]"> |
+ </settings-dropdown-menu> |
+ </template> |
+ <template is="dom-if" restamp |
+ if="[[prefs.cros.flags.per_user_timezone_enabled.value]]"> |
+ <template is="dom-if" if="[[!isUserTimeZoneSelectorHidden_( |
+ prefs.settings.timezone, |
+ prefs.settings.resolve_timezone_by_geolocation.value)]]" restamp> |
+ <settings-dropdown-menu id="userTimeZoneSelector" |
+ pref="{{prefs.settings.timezone}}" |
+ label="$i18n{timeZone}" |
+ menu-options="[[timeZoneList_]]"> |
+ </settings-dropdown-menu> |
+ </template> |
+ <template is="dom-if" if="[[isUserTimeZoneSelectorHidden_( |
+ prefs.settings.timezone, |
+ prefs.settings.resolve_timezone_by_geolocation.value)]]" restamp> |
+ <settings-dropdown-menu id="systemTimezoneSelector" |
+ pref="{{prefs.cros.system.timezone}}" |
+ label="$i18n{timeZone}" |
+ menu-options="[[timeZoneList_]]" |
+ disabled> |
+ </settings-dropdown-menu> |
+ </template> |
+ </template> |
</div> |
<div class="settings-box"> |
<settings-toggle-button class="start" |