| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 712 | 712 |
| 713 values->SetBoolean("showSetDefault", ShouldShowSetDefaultBrowser()); | 713 values->SetBoolean("showSetDefault", ShouldShowSetDefaultBrowser()); |
| 714 | 714 |
| 715 values->SetBoolean("allowAdvancedSettings", ShouldAllowAdvancedSettings()); | 715 values->SetBoolean("allowAdvancedSettings", ShouldAllowAdvancedSettings()); |
| 716 | 716 |
| 717 #if defined(OS_CHROMEOS) | 717 #if defined(OS_CHROMEOS) |
| 718 values->SetBoolean( | 718 values->SetBoolean( |
| 719 "showWakeOnWifi", | 719 "showWakeOnWifi", |
| 720 chromeos::WakeOnWifiManager::Get()->WakeOnWifiSupported() && | 720 chromeos::WakeOnWifiManager::Get()->WakeOnWifiSupported() && |
| 721 chromeos::switches::WakeOnWifiEnabled()); | 721 chromeos::switches::WakeOnWifiEnabled()); |
| 722 const bool have_disable_time_zone_tracking_option_switch = | |
| 723 base::CommandLine::ForCurrentProcess()->HasSwitch( | |
| 724 chromeos::switches::kDisableTimeZoneTrackingOption); | |
| 725 values->SetBoolean("enableTimeZoneTrackingOption", | 722 values->SetBoolean("enableTimeZoneTrackingOption", |
| 726 !have_disable_time_zone_tracking_option_switch && | 723 !chromeos::system::HasSystemTimezonePolicy()); |
| 727 !chromeos::system::HasSystemTimezonePolicy()); | |
| 728 values->SetBoolean("resolveTimezoneByGeolocationInitialValue", | 724 values->SetBoolean("resolveTimezoneByGeolocationInitialValue", |
| 729 Profile::FromWebUI(web_ui())->GetPrefs()->GetBoolean( | 725 Profile::FromWebUI(web_ui())->GetPrefs()->GetBoolean( |
| 730 prefs::kResolveTimezoneByGeolocation)); | 726 prefs::kResolveTimezoneByGeolocation)); |
| 731 values->SetBoolean("enableLanguageOptionsImeMenu", | 727 values->SetBoolean("enableLanguageOptionsImeMenu", |
| 732 base::FeatureList::IsEnabled(features::kOptInImeMenu)); | 728 base::FeatureList::IsEnabled(features::kOptInImeMenu)); |
| 733 values->SetBoolean( | 729 values->SetBoolean( |
| 734 "enableExperimentalAccessibilityFeatures", | 730 "enableExperimentalAccessibilityFeatures", |
| 735 base::CommandLine::ForCurrentProcess()->HasSwitch( | 731 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 736 chromeos::switches::kEnableExperimentalAccessibilityFeatures)); | 732 chromeos::switches::kEnableExperimentalAccessibilityFeatures)); |
| 737 | 733 |
| (...skipping 1495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2233 | 2229 |
| 2234 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { | 2230 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { |
| 2235 #if defined(OS_CHROMEOS) | 2231 #if defined(OS_CHROMEOS) |
| 2236 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); | 2232 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); |
| 2237 #else | 2233 #else |
| 2238 return true; | 2234 return true; |
| 2239 #endif | 2235 #endif |
| 2240 } | 2236 } |
| 2241 | 2237 |
| 2242 } // namespace options | 2238 } // namespace options |
| OLD | NEW |