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 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
659 base::CommandLine::ForCurrentProcess()->HasSwitch( | 659 base::CommandLine::ForCurrentProcess()->HasSwitch( |
660 proximity_auth::switches::kEnableProximityDetection)); | 660 proximity_auth::switches::kEnableProximityDetection)); |
661 | 661 |
662 #if defined(OS_CHROMEOS) | 662 #if defined(OS_CHROMEOS) |
663 values->SetBoolean("consumerManagementEnabled", | 663 values->SetBoolean("consumerManagementEnabled", |
664 base::CommandLine::ForCurrentProcess()->HasSwitch( | 664 base::CommandLine::ForCurrentProcess()->HasSwitch( |
665 chromeos::switches::kEnableConsumerManagement)); | 665 chromeos::switches::kEnableConsumerManagement)); |
666 | 666 |
667 RegisterTitle(values, "thirdPartyImeConfirmOverlay", | 667 RegisterTitle(values, "thirdPartyImeConfirmOverlay", |
668 IDS_OPTIONS_SETTINGS_LANGUAGES_THIRD_PARTY_WARNING_TITLE); | 668 IDS_OPTIONS_SETTINGS_LANGUAGES_THIRD_PARTY_WARNING_TITLE); |
| 669 values->SetBoolean("usingNewProfilesUI", false); |
| 670 #else |
| 671 values->SetBoolean("usingNewProfilesUI", true); |
669 #endif | 672 #endif |
670 | 673 |
671 values->SetBoolean("showSetDefault", ShouldShowSetDefaultBrowser()); | 674 values->SetBoolean("showSetDefault", ShouldShowSetDefaultBrowser()); |
672 | 675 |
673 values->SetBoolean("allowAdvancedSettings", ShouldAllowAdvancedSettings()); | 676 values->SetBoolean("allowAdvancedSettings", ShouldAllowAdvancedSettings()); |
674 | 677 |
675 values->SetBoolean("usingNewProfilesUI", switches::IsNewAvatarMenu()); | |
676 | |
677 #if defined(OS_CHROMEOS) | 678 #if defined(OS_CHROMEOS) |
678 values->SetBoolean( | 679 values->SetBoolean( |
679 "showWakeOnWifi", | 680 "showWakeOnWifi", |
680 chromeos::WakeOnWifiManager::Get()->WakeOnWifiSupported() && | 681 chromeos::WakeOnWifiManager::Get()->WakeOnWifiSupported() && |
681 chromeos::switches::WakeOnWifiEnabled()); | 682 chromeos::switches::WakeOnWifiEnabled()); |
682 const bool have_disable_time_zone_tracking_option_switch = | 683 const bool have_disable_time_zone_tracking_option_switch = |
683 base::CommandLine::ForCurrentProcess()->HasSwitch( | 684 base::CommandLine::ForCurrentProcess()->HasSwitch( |
684 chromeos::switches::kDisableTimeZoneTrackingOption); | 685 chromeos::switches::kDisableTimeZoneTrackingOption); |
685 values->SetBoolean("enableTimeZoneTrackingOption", | 686 values->SetBoolean("enableTimeZoneTrackingOption", |
686 !have_disable_time_zone_tracking_option_switch && | 687 !have_disable_time_zone_tracking_option_switch && |
(...skipping 1494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2181 void BrowserOptionsHandler::OnPolicyUpdated(const policy::PolicyNamespace& ns, | 2182 void BrowserOptionsHandler::OnPolicyUpdated(const policy::PolicyNamespace& ns, |
2182 const policy::PolicyMap& previous, | 2183 const policy::PolicyMap& previous, |
2183 const policy::PolicyMap& current) { | 2184 const policy::PolicyMap& current) { |
2184 std::set<std::string> different_keys; | 2185 std::set<std::string> different_keys; |
2185 current.GetDifferingKeys(previous, &different_keys); | 2186 current.GetDifferingKeys(previous, &different_keys); |
2186 if (ContainsKey(different_keys, policy::key::kMetricsReportingEnabled)) | 2187 if (ContainsKey(different_keys, policy::key::kMetricsReportingEnabled)) |
2187 SetupMetricsReportingCheckbox(); | 2188 SetupMetricsReportingCheckbox(); |
2188 } | 2189 } |
2189 | 2190 |
2190 } // namespace options | 2191 } // namespace options |
OLD | NEW |