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 <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "apps/app_window.h" | 10 #include "apps/app_window.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 #include "ash/magnifier/magnifier_constants.h" | 104 #include "ash/magnifier/magnifier_constants.h" |
105 #include "ash/shell.h" | 105 #include "ash/shell.h" |
106 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 106 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
107 #include "chrome/browser/chromeos/chromeos_utils.h" | 107 #include "chrome/browser/chromeos/chromeos_utils.h" |
108 #include "chrome/browser/chromeos/login/users/user_manager.h" | 108 #include "chrome/browser/chromeos/login/users/user_manager.h" |
109 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" | 109 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" |
110 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 110 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
111 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 111 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
112 #include "chrome/browser/chromeos/reset/metrics.h" | 112 #include "chrome/browser/chromeos/reset/metrics.h" |
113 #include "chrome/browser/chromeos/settings/cros_settings.h" | 113 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 114 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
114 #include "chrome/browser/chromeos/system/timezone_util.h" | 115 #include "chrome/browser/chromeos/system/timezone_util.h" |
115 #include "chrome/browser/policy/profile_policy_connector.h" | 116 #include "chrome/browser/policy/profile_policy_connector.h" |
116 #include "chrome/browser/policy/profile_policy_connector_factory.h" | 117 #include "chrome/browser/policy/profile_policy_connector_factory.h" |
117 #include "chrome/browser/ui/browser_window.h" | 118 #include "chrome/browser/ui/browser_window.h" |
118 #include "chromeos/dbus/dbus_thread_manager.h" | 119 #include "chromeos/dbus/dbus_thread_manager.h" |
119 #include "chromeos/dbus/power_manager_client.h" | 120 #include "chromeos/dbus/power_manager_client.h" |
120 #include "components/policy/core/common/policy_map.h" | 121 #include "components/policy/core/common/policy_map.h" |
121 #include "components/policy/core/common/policy_namespace.h" | 122 #include "components/policy/core/common/policy_namespace.h" |
122 #include "components/policy/core/common/policy_service.h" | 123 #include "components/policy/core/common/policy_service.h" |
123 #include "components/user_manager/user.h" | 124 #include "components/user_manager/user.h" |
124 #include "policy/policy_constants.h" | 125 #include "policy/policy_constants.h" |
| 126 #include "policy/proto/device_management_backend.pb.h" |
125 #include "ui/gfx/image/image_skia.h" | 127 #include "ui/gfx/image/image_skia.h" |
126 #endif // defined(OS_CHROMEOS) | 128 #endif // defined(OS_CHROMEOS) |
127 | 129 |
128 #if defined(OS_WIN) | 130 #if defined(OS_WIN) |
129 #include "chrome/browser/extensions/settings_api_helpers.h" | 131 #include "chrome/browser/extensions/settings_api_helpers.h" |
130 #include "chrome/installer/util/auto_launch_util.h" | 132 #include "chrome/installer/util/auto_launch_util.h" |
131 #include "content/public/browser/browser_url_handler.h" | 133 #include "content/public/browser/browser_url_handler.h" |
132 #endif // defined(OS_WIN) | 134 #endif // defined(OS_WIN) |
133 | 135 |
134 #if defined(ENABLE_SERVICE_DISCOVERY) | 136 #if defined(ENABLE_SERVICE_DISCOVERY) |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 values->SetString("easyUnlockCheckboxLabel", | 607 values->SetString("easyUnlockCheckboxLabel", |
606 l10n_util::GetStringFUTF16( | 608 l10n_util::GetStringFUTF16( |
607 IDS_OPTIONS_EASY_UNLOCK_CHECKBOX_LABEL_CHROMEOS, | 609 IDS_OPTIONS_EASY_UNLOCK_CHECKBOX_LABEL_CHROMEOS, |
608 chromeos::GetChromeDeviceType())); | 610 chromeos::GetChromeDeviceType())); |
609 | 611 |
610 values->SetBoolean( | 612 values->SetBoolean( |
611 "consumerManagementEnabled", | 613 "consumerManagementEnabled", |
612 CommandLine::ForCurrentProcess()->HasSwitch( | 614 CommandLine::ForCurrentProcess()->HasSwitch( |
613 chromeos::switches::kEnableConsumerManagement)); | 615 chromeos::switches::kEnableConsumerManagement)); |
614 | 616 |
| 617 const enterprise_management::PolicyData* policy_data = |
| 618 chromeos::DeviceSettingsService::Get()->policy_data(); |
| 619 values->SetBoolean( |
| 620 "consumerManagementEnrolled", |
| 621 policy_data && |
| 622 policy_data->management_mode() == |
| 623 enterprise_management::PolicyData::CONSUMER_MANAGED); |
| 624 |
615 RegisterTitle(values, "thirdPartyImeConfirmOverlay", | 625 RegisterTitle(values, "thirdPartyImeConfirmOverlay", |
616 IDS_OPTIONS_SETTINGS_LANGUAGES_THIRD_PARTY_WARNING_TITLE); | 626 IDS_OPTIONS_SETTINGS_LANGUAGES_THIRD_PARTY_WARNING_TITLE); |
617 #endif | 627 #endif |
618 | 628 |
619 values->SetBoolean("showSetDefault", ShouldShowSetDefaultBrowser()); | 629 values->SetBoolean("showSetDefault", ShouldShowSetDefaultBrowser()); |
620 | 630 |
621 values->SetBoolean("allowAdvancedSettings", ShouldAllowAdvancedSettings()); | 631 values->SetBoolean("allowAdvancedSettings", ShouldAllowAdvancedSettings()); |
622 | 632 |
623 values->SetBoolean("websiteSettingsManagerEnabled", | 633 values->SetBoolean("websiteSettingsManagerEnabled", |
624 CommandLine::ForCurrentProcess()->HasSwitch( | 634 CommandLine::ForCurrentProcess()->HasSwitch( |
(...skipping 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1805 extension = extensions::GetExtensionOverridingProxy( | 1815 extension = extensions::GetExtensionOverridingProxy( |
1806 Profile::FromWebUI(web_ui())); | 1816 Profile::FromWebUI(web_ui())); |
1807 AppendExtensionData("proxy", extension, &extension_controlled); | 1817 AppendExtensionData("proxy", extension, &extension_controlled); |
1808 | 1818 |
1809 web_ui()->CallJavascriptFunction("BrowserOptions.toggleExtensionIndicators", | 1819 web_ui()->CallJavascriptFunction("BrowserOptions.toggleExtensionIndicators", |
1810 extension_controlled); | 1820 extension_controlled); |
1811 #endif // defined(OS_WIN) | 1821 #endif // defined(OS_WIN) |
1812 } | 1822 } |
1813 | 1823 |
1814 } // namespace options | 1824 } // namespace options |
OLD | NEW |