Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/policy/configuration_policy_handler_list_factory.h" | 5 #include "chrome/browser/policy/configuration_policy_handler_list_factory.h" |
| 6 | 6 |
| 7 #include <limits.h> | 7 #include <limits.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 76 #include "chrome/browser/extensions/extension_management_constants.h" | 76 #include "chrome/browser/extensions/extension_management_constants.h" |
| 77 #include "chrome/browser/extensions/policy_handlers.h" | 77 #include "chrome/browser/extensions/policy_handlers.h" |
| 78 #include "extensions/browser/pref_names.h" | 78 #include "extensions/browser/pref_names.h" |
| 79 #include "extensions/common/manifest.h" | 79 #include "extensions/common/manifest.h" |
| 80 #endif | 80 #endif |
| 81 | 81 |
| 82 #if defined(ENABLE_SPELLCHECK) | 82 #if defined(ENABLE_SPELLCHECK) |
| 83 #include "components/spellcheck/browser/pref_names.h" | 83 #include "components/spellcheck/browser/pref_names.h" |
| 84 #endif | 84 #endif |
| 85 | 85 |
| 86 #if defined(ENABLE_PLUGINS) | |
|
Bernhard Bauer
2016/10/14 11:49:46
Move this before ENABLE_SPELLCHECK so that the #if
pastarmovj
2016/10/14 12:38:59
Done.
| |
| 87 #include "chrome/browser/plugins/plugin_policy_handler.h" | |
| 88 #endif | |
| 89 | |
| 86 namespace policy { | 90 namespace policy { |
| 87 | 91 |
| 88 namespace { | 92 namespace { |
| 89 | 93 |
| 90 // List of policy types to preference names. This is used for simple policies | 94 // List of policy types to preference names. This is used for simple policies |
| 91 // that directly map to a single preference. | 95 // that directly map to a single preference. |
| 92 const PolicyToPreferenceMapEntry kSimplePolicyMap[] = { | 96 const PolicyToPreferenceMapEntry kSimplePolicyMap[] = { |
| 93 { key::kHomepageLocation, | 97 { key::kHomepageLocation, |
| 94 prefs::kHomePage, | 98 prefs::kHomePage, |
| 95 base::Value::TYPE_STRING }, | 99 base::Value::TYPE_STRING }, |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 131 base::Value::TYPE_BOOLEAN }, | 135 base::Value::TYPE_BOOLEAN }, |
| 132 { key::kDisablePrintPreview, | 136 { key::kDisablePrintPreview, |
| 133 prefs::kPrintPreviewDisabled, | 137 prefs::kPrintPreviewDisabled, |
| 134 base::Value::TYPE_BOOLEAN }, | 138 base::Value::TYPE_BOOLEAN }, |
| 135 { key::kDefaultPrinterSelection, | 139 { key::kDefaultPrinterSelection, |
| 136 prefs::kPrintPreviewDefaultDestinationSelectionRules, | 140 prefs::kPrintPreviewDefaultDestinationSelectionRules, |
| 137 base::Value::TYPE_STRING }, | 141 base::Value::TYPE_STRING }, |
| 138 { key::kApplicationLocaleValue, | 142 { key::kApplicationLocaleValue, |
| 139 prefs::kApplicationLocale, | 143 prefs::kApplicationLocale, |
| 140 base::Value::TYPE_STRING }, | 144 base::Value::TYPE_STRING }, |
| 141 { key::kDisabledPlugins, | |
| 142 prefs::kPluginsDisabledPlugins, | |
| 143 base::Value::TYPE_LIST }, | |
| 144 { key::kDisabledPluginsExceptions, | |
| 145 prefs::kPluginsDisabledPluginsExceptions, | |
| 146 base::Value::TYPE_LIST }, | |
| 147 { key::kEnabledPlugins, | |
| 148 prefs::kPluginsEnabledPlugins, | |
| 149 base::Value::TYPE_LIST }, | |
| 150 { key::kAlwaysOpenPdfExternally, | 145 { key::kAlwaysOpenPdfExternally, |
| 151 prefs::kPluginsAlwaysOpenPdfExternally, | 146 prefs::kPluginsAlwaysOpenPdfExternally, |
| 152 base::Value::TYPE_BOOLEAN }, | 147 base::Value::TYPE_BOOLEAN }, |
| 153 { key::kShowHomeButton, | 148 { key::kShowHomeButton, |
| 154 prefs::kShowHomeButton, | 149 prefs::kShowHomeButton, |
| 155 base::Value::TYPE_BOOLEAN }, | 150 base::Value::TYPE_BOOLEAN }, |
| 156 { key::kSavingBrowserHistoryDisabled, | 151 { key::kSavingBrowserHistoryDisabled, |
| 157 prefs::kSavingBrowserHistoryDisabled, | 152 prefs::kSavingBrowserHistoryDisabled, |
| 158 base::Value::TYPE_BOOLEAN }, | 153 base::Value::TYPE_BOOLEAN }, |
| 159 { key::kAllowDeletingBrowserHistory, | 154 { key::kAllowDeletingBrowserHistory, |
| (...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 925 base::MakeUnique<ExternalDataPolicyHandler>(key::kWallpaperImage)); | 920 base::MakeUnique<ExternalDataPolicyHandler>(key::kWallpaperImage)); |
| 926 handlers->AddHandler(base::WrapUnique(new SimpleSchemaValidatingPolicyHandler( | 921 handlers->AddHandler(base::WrapUnique(new SimpleSchemaValidatingPolicyHandler( |
| 927 key::kSessionLocales, NULL, chrome_schema, SCHEMA_STRICT, | 922 key::kSessionLocales, NULL, chrome_schema, SCHEMA_STRICT, |
| 928 SimpleSchemaValidatingPolicyHandler::RECOMMENDED_ALLOWED, | 923 SimpleSchemaValidatingPolicyHandler::RECOMMENDED_ALLOWED, |
| 929 SimpleSchemaValidatingPolicyHandler::MANDATORY_PROHIBITED))); | 924 SimpleSchemaValidatingPolicyHandler::MANDATORY_PROHIBITED))); |
| 930 handlers->AddHandler( | 925 handlers->AddHandler( |
| 931 base::MakeUnique<chromeos::KeyPermissionsPolicyHandler>(chrome_schema)); | 926 base::MakeUnique<chromeos::KeyPermissionsPolicyHandler>(chrome_schema)); |
| 932 handlers->AddHandler(base::WrapUnique(new DefaultGeolocationPolicyHandler())); | 927 handlers->AddHandler(base::WrapUnique(new DefaultGeolocationPolicyHandler())); |
| 933 #endif // defined(OS_CHROMEOS) | 928 #endif // defined(OS_CHROMEOS) |
| 934 | 929 |
| 930 #if defined(ENABLE_PLUGINS) | |
| 931 handlers->AddHandler(base::MakeUnique<PluginPolicyHandler>()); | |
| 932 #endif // defined(ENABLE_PLUGINS) | |
| 933 | |
| 935 return handlers; | 934 return handlers; |
| 936 } | 935 } |
| 937 | 936 |
| 938 } // namespace policy | 937 } // namespace policy |
| OLD | NEW |