| 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 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 | 488 |
| 489 #if defined(ENABLE_SETTINGS_APP) | 489 #if defined(ENABLE_SETTINGS_APP) |
| 490 { "profilesAppListSwitch", IDS_SETTINGS_APP_PROFILES_SWITCH_BUTTON_LABEL }, | 490 { "profilesAppListSwitch", IDS_SETTINGS_APP_PROFILES_SWITCH_BUTTON_LABEL }, |
| 491 #endif // defined(ENABLE_SETTINGS_APP) | 491 #endif // defined(ENABLE_SETTINGS_APP) |
| 492 | 492 |
| 493 #if defined(ENABLE_SERVICE_DISCOVERY) | 493 #if defined(ENABLE_SERVICE_DISCOVERY) |
| 494 { "cloudPrintDevicesPageButton", IDS_LOCAL_DISCOVERY_DEVICES_PAGE_BUTTON }, | 494 { "cloudPrintDevicesPageButton", IDS_LOCAL_DISCOVERY_DEVICES_PAGE_BUTTON }, |
| 495 { "cloudPrintEnableNotificationsLabel", | 495 { "cloudPrintEnableNotificationsLabel", |
| 496 IDS_LOCAL_DISCOVERY_NOTIFICATIONS_ENABLE_CHECKBOX_LABEL }, | 496 IDS_LOCAL_DISCOVERY_NOTIFICATIONS_ENABLE_CHECKBOX_LABEL }, |
| 497 #endif // defined(ENABLE_SERVICE_DISCOVERY) | 497 #endif // defined(ENABLE_SERVICE_DISCOVERY) |
| 498 #if defined(OS_CHROMEOS) |
| 499 { "captivePortalBypassProxy", |
| 500 IDS_OPTIONS_CAPTIVE_PORTAL_BYPASS_PROXY_LABEL }, |
| 501 #endif |
| 498 }; | 502 }; |
| 499 | 503 |
| 500 #if defined(ENABLE_SETTINGS_APP) | 504 #if defined(ENABLE_SETTINGS_APP) |
| 501 static OptionsStringResource app_resources[] = { | 505 static OptionsStringResource app_resources[] = { |
| 502 { "syncOverview", IDS_SETTINGS_APP_SYNC_OVERVIEW }, | 506 { "syncOverview", IDS_SETTINGS_APP_SYNC_OVERVIEW }, |
| 503 { "syncButtonTextStart", IDS_SYNC_START_SYNC_BUTTON_LABEL, | 507 { "syncButtonTextStart", IDS_SYNC_START_SYNC_BUTTON_LABEL, |
| 504 IDS_SETTINGS_APP_LAUNCHER_PRODUCT_NAME }, | 508 IDS_SETTINGS_APP_LAUNCHER_PRODUCT_NAME }, |
| 505 { "profilesSingleUser", IDS_PROFILES_SINGLE_USER_MESSAGE, | 509 { "profilesSingleUser", IDS_PROFILES_SINGLE_USER_MESSAGE, |
| 506 IDS_SETTINGS_APP_LAUNCHER_PRODUCT_NAME }, | 510 IDS_SETTINGS_APP_LAUNCHER_PRODUCT_NAME }, |
| 507 { "languageSectionLabel", IDS_OPTIONS_ADVANCED_LANGUAGE_LABEL, | 511 { "languageSectionLabel", IDS_OPTIONS_ADVANCED_LANGUAGE_LABEL, |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 651 base::CommandLine::ForCurrentProcess()->HasSwitch( | 655 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 652 proximity_auth::switches::kEnableProximityDetection)); | 656 proximity_auth::switches::kEnableProximityDetection)); |
| 653 | 657 |
| 654 #if defined(OS_CHROMEOS) | 658 #if defined(OS_CHROMEOS) |
| 655 values->SetBoolean("consumerManagementEnabled", | 659 values->SetBoolean("consumerManagementEnabled", |
| 656 base::CommandLine::ForCurrentProcess()->HasSwitch( | 660 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 657 chromeos::switches::kEnableConsumerManagement)); | 661 chromeos::switches::kEnableConsumerManagement)); |
| 658 | 662 |
| 659 RegisterTitle(values, "thirdPartyImeConfirmOverlay", | 663 RegisterTitle(values, "thirdPartyImeConfirmOverlay", |
| 660 IDS_OPTIONS_SETTINGS_LANGUAGES_THIRD_PARTY_WARNING_TITLE); | 664 IDS_OPTIONS_SETTINGS_LANGUAGES_THIRD_PARTY_WARNING_TITLE); |
| 665 |
| 666 values->SetBoolean( |
| 667 "enableCaptivePortalBypassProxyOption", |
| 668 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 669 chromeos::switches::kEnableCaptivePortalBypassProxyOption)); |
| 661 #endif | 670 #endif |
| 662 | 671 |
| 663 values->SetBoolean("showSetDefault", ShouldShowSetDefaultBrowser()); | 672 values->SetBoolean("showSetDefault", ShouldShowSetDefaultBrowser()); |
| 664 | 673 |
| 665 values->SetBoolean("allowAdvancedSettings", ShouldAllowAdvancedSettings()); | 674 values->SetBoolean("allowAdvancedSettings", ShouldAllowAdvancedSettings()); |
| 666 | 675 |
| 667 values->SetBoolean("websiteSettingsManagerEnabled", | 676 values->SetBoolean("websiteSettingsManagerEnabled", |
| 668 base::CommandLine::ForCurrentProcess()->HasSwitch( | 677 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 669 switches::kEnableWebsiteSettingsManager)); | 678 switches::kEnableWebsiteSettingsManager)); |
| 670 | 679 |
| (...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2173 void BrowserOptionsHandler::OnPolicyUpdated(const policy::PolicyNamespace& ns, | 2182 void BrowserOptionsHandler::OnPolicyUpdated(const policy::PolicyNamespace& ns, |
| 2174 const policy::PolicyMap& previous, | 2183 const policy::PolicyMap& previous, |
| 2175 const policy::PolicyMap& current) { | 2184 const policy::PolicyMap& current) { |
| 2176 std::set<std::string> different_keys; | 2185 std::set<std::string> different_keys; |
| 2177 current.GetDifferingKeys(previous, &different_keys); | 2186 current.GetDifferingKeys(previous, &different_keys); |
| 2178 if (ContainsKey(different_keys, policy::key::kMetricsReportingEnabled)) | 2187 if (ContainsKey(different_keys, policy::key::kMetricsReportingEnabled)) |
| 2179 SetupMetricsReportingCheckbox(); | 2188 SetupMetricsReportingCheckbox(); |
| 2180 } | 2189 } |
| 2181 | 2190 |
| 2182 } // namespace options | 2191 } // namespace options |
| OLD | NEW |