OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/webui/options/browser_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/browser_options_handler.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 values->SetBoolean( | 671 values->SetBoolean( |
672 "showWakeOnWifi", | 672 "showWakeOnWifi", |
673 chromeos::WakeOnWifiManager::Get()->WakeOnWifiSupported() && | 673 chromeos::WakeOnWifiManager::Get()->WakeOnWifiSupported() && |
674 chromeos::switches::WakeOnWifiEnabled()); | 674 chromeos::switches::WakeOnWifiEnabled()); |
675 const bool have_disable_time_zone_tracking_option_switch = | 675 const bool have_disable_time_zone_tracking_option_switch = |
676 base::CommandLine::ForCurrentProcess()->HasSwitch( | 676 base::CommandLine::ForCurrentProcess()->HasSwitch( |
677 chromeos::switches::kDisableTimeZoneTrackingOption); | 677 chromeos::switches::kDisableTimeZoneTrackingOption); |
678 values->SetBoolean("enableTimeZoneTrackingOption", | 678 values->SetBoolean("enableTimeZoneTrackingOption", |
679 !have_disable_time_zone_tracking_option_switch && | 679 !have_disable_time_zone_tracking_option_switch && |
680 !chromeos::system::HasSystemTimezonePolicy()); | 680 !chromeos::system::HasSystemTimezonePolicy()); |
| 681 values->SetBoolean("resolveTimezoneByGeolocationInitialValue", |
| 682 Profile::FromWebUI(web_ui())->GetPrefs()->GetBoolean( |
| 683 prefs::kResolveTimezoneByGeolocation)); |
681 #endif | 684 #endif |
682 } | 685 } |
683 | 686 |
684 #if defined(ENABLE_PRINT_PREVIEW) | 687 #if defined(ENABLE_PRINT_PREVIEW) |
685 void BrowserOptionsHandler::RegisterCloudPrintValues( | 688 void BrowserOptionsHandler::RegisterCloudPrintValues( |
686 base::DictionaryValue* values) { | 689 base::DictionaryValue* values) { |
687 values->SetString("cloudPrintOptionLabel", | 690 values->SetString("cloudPrintOptionLabel", |
688 l10n_util::GetStringFUTF16( | 691 l10n_util::GetStringFUTF16( |
689 IDS_CLOUD_PRINT_CHROMEOS_OPTION_LABEL, | 692 IDS_CLOUD_PRINT_CHROMEOS_OPTION_LABEL, |
690 l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT))); | 693 l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT))); |
(...skipping 1429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2120 void BrowserOptionsHandler::OnPolicyUpdated(const policy::PolicyNamespace& ns, | 2123 void BrowserOptionsHandler::OnPolicyUpdated(const policy::PolicyNamespace& ns, |
2121 const policy::PolicyMap& previous, | 2124 const policy::PolicyMap& previous, |
2122 const policy::PolicyMap& current) { | 2125 const policy::PolicyMap& current) { |
2123 std::set<std::string> different_keys; | 2126 std::set<std::string> different_keys; |
2124 current.GetDifferingKeys(previous, &different_keys); | 2127 current.GetDifferingKeys(previous, &different_keys); |
2125 if (ContainsKey(different_keys, policy::key::kMetricsReportingEnabled)) | 2128 if (ContainsKey(different_keys, policy::key::kMetricsReportingEnabled)) |
2126 SetupMetricsReportingCheckbox(); | 2129 SetupMetricsReportingCheckbox(); |
2127 } | 2130 } |
2128 | 2131 |
2129 } // namespace options | 2132 } // namespace options |
OLD | NEW |