| Index: chrome/browser/ui/webui/options/browser_options_handler.cc
|
| diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc
|
| index 165f46e9ea225e114c93b1e48e9c5cbd4ab3ae60..72b1c38a0d112c11e146178148ca5053acc781d3 100644
|
| --- a/chrome/browser/ui/webui/options/browser_options_handler.cc
|
| +++ b/chrome/browser/ui/webui/options/browser_options_handler.cc
|
| @@ -502,6 +502,10 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) {
|
| { "cloudPrintEnableNotificationsLabel",
|
| IDS_LOCAL_DISCOVERY_NOTIFICATIONS_ENABLE_CHECKBOX_LABEL },
|
| #endif
|
| +#if defined(OS_CHROMEOS)
|
| + { "resolveTimezoneByGeoLocation",
|
| + IDS_OPTIONS_RESOLVE_TIMEZONE_BY_GEOLOCATION_DESCRIPTION },
|
| +#endif
|
| };
|
|
|
| #if defined(ENABLE_SETTINGS_APP)
|
| @@ -677,6 +681,12 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) {
|
| "showWakeOnWifi",
|
| chromeos::WakeOnWifiManager::Get()->WakeOnWifiSupported() &&
|
| chromeos::switches::WakeOnWifiEnabled());
|
| + const bool have_enable_time_zone_tracking_option_switch =
|
| + base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + chromeos::switches::kEnableTimeZoneTrackingOption);
|
| + values->SetBoolean("enableTimeZoneTrackingOption",
|
| + have_enable_time_zone_tracking_option_switch &&
|
| + !chromeos::system::HasSystemTimezonePolicy());
|
| #endif
|
| }
|
|
|
| @@ -962,6 +972,10 @@ void BrowserOptionsHandler::InitializeHandler() {
|
| base::Bind(&BrowserOptionsHandler::OnWallpaperPolicyChanged,
|
| base::Unretained(this)));
|
| }
|
| + chromeos::CrosSettings::Get()->AddSettingsObserver(
|
| + chromeos::kSystemTimezonePolicy,
|
| + base::Bind(&BrowserOptionsHandler::OnSystemTimezonePolicyChanged,
|
| + weak_ptr_factory_.GetWeakPtr()));
|
| #else // !defined(OS_CHROMEOS)
|
| profile_pref_registrar_.Add(
|
| prefs::kProxy,
|
| @@ -1414,6 +1428,12 @@ void BrowserOptionsHandler::OnWallpaperManagedChanged(bool managed) {
|
| web_ui()->CallJavascriptFunction("BrowserOptions.setWallpaperManaged",
|
| base::FundamentalValue(managed));
|
| }
|
| +
|
| +void BrowserOptionsHandler::OnSystemTimezonePolicyChanged() {
|
| + web_ui()->CallJavascriptFunction(
|
| + "BrowserOptions.setSystemTimezoneManaged",
|
| + base::FundamentalValue(chromeos::system::HasSystemTimezonePolicy()));
|
| +}
|
| #endif
|
|
|
| scoped_ptr<base::DictionaryValue>
|
|
|