| 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 27 matching lines...) Expand all Loading... |
| 38 #include "components/policy/core/browser/proxy_policy_handler.h" | 38 #include "components/policy/core/browser/proxy_policy_handler.h" |
| 39 #include "components/policy/core/browser/url_blacklist_policy_handler.h" | 39 #include "components/policy/core/browser/url_blacklist_policy_handler.h" |
| 40 #include "components/policy/core/common/policy_details.h" | 40 #include "components/policy/core/common/policy_details.h" |
| 41 #include "components/policy/core/common/policy_map.h" | 41 #include "components/policy/core/common/policy_map.h" |
| 42 #include "components/policy/core/common/policy_pref_names.h" | 42 #include "components/policy/core/common/policy_pref_names.h" |
| 43 #include "components/policy/core/common/schema.h" | 43 #include "components/policy/core/common/schema.h" |
| 44 #include "components/policy/policy_constants.h" | 44 #include "components/policy/policy_constants.h" |
| 45 #include "components/prefs/pref_value_map.h" | 45 #include "components/prefs/pref_value_map.h" |
| 46 #include "components/search_engines/default_search_policy_handler.h" | 46 #include "components/search_engines/default_search_policy_handler.h" |
| 47 #include "components/signin/core/common/signin_pref_names.h" | 47 #include "components/signin/core/common/signin_pref_names.h" |
| 48 #include "components/spellcheck/spellcheck_build_features.h" |
| 48 #include "components/ssl_config/ssl_config_prefs.h" | 49 #include "components/ssl_config/ssl_config_prefs.h" |
| 49 #include "components/sync/driver/sync_policy_handler.h" | 50 #include "components/sync/driver/sync_policy_handler.h" |
| 50 #include "components/translate/core/common/translate_pref_names.h" | 51 #include "components/translate/core/common/translate_pref_names.h" |
| 51 #include "components/variations/pref_names.h" | 52 #include "components/variations/pref_names.h" |
| 52 #include "extensions/features/features.h" | 53 #include "extensions/features/features.h" |
| 53 | 54 |
| 54 #if BUILDFLAG(ANDROID_JAVA_UI) | 55 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 55 #include "chrome/browser/search/contextual_search_policy_handler_android.h" | 56 #include "chrome/browser/search/contextual_search_policy_handler_android.h" |
| 56 #endif | 57 #endif |
| 57 | 58 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 76 #include "chrome/browser/extensions/extension_management_constants.h" | 77 #include "chrome/browser/extensions/extension_management_constants.h" |
| 77 #include "chrome/browser/extensions/policy_handlers.h" | 78 #include "chrome/browser/extensions/policy_handlers.h" |
| 78 #include "extensions/browser/pref_names.h" | 79 #include "extensions/browser/pref_names.h" |
| 79 #include "extensions/common/manifest.h" | 80 #include "extensions/common/manifest.h" |
| 80 #endif | 81 #endif |
| 81 | 82 |
| 82 #if defined(ENABLE_PLUGINS) | 83 #if defined(ENABLE_PLUGINS) |
| 83 #include "chrome/browser/plugins/plugin_policy_handler.h" | 84 #include "chrome/browser/plugins/plugin_policy_handler.h" |
| 84 #endif | 85 #endif |
| 85 | 86 |
| 86 #if defined(ENABLE_SPELLCHECK) | 87 #if BUILDFLAG(ENABLE_SPELLCHECK) |
| 87 #include "components/spellcheck/browser/pref_names.h" | 88 #include "components/spellcheck/browser/pref_names.h" |
| 88 #endif | 89 #endif |
| 89 | 90 |
| 90 namespace policy { | 91 namespace policy { |
| 91 | 92 |
| 92 namespace { | 93 namespace { |
| 93 | 94 |
| 94 // List of policy types to preference names. This is used for simple policies | 95 // List of policy types to preference names. This is used for simple policies |
| 95 // that directly map to a single preference. | 96 // that directly map to a single preference. |
| 96 const PolicyToPreferenceMapEntry kSimplePolicyMap[] = { | 97 const PolicyToPreferenceMapEntry kSimplePolicyMap[] = { |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 { key::kAllowDinosaurEasterEgg, | 359 { key::kAllowDinosaurEasterEgg, |
| 359 prefs::kAllowDinosaurEasterEgg, | 360 prefs::kAllowDinosaurEasterEgg, |
| 360 base::Value::TYPE_BOOLEAN }, | 361 base::Value::TYPE_BOOLEAN }, |
| 361 { key::kAllowedDomainsForApps, | 362 { key::kAllowedDomainsForApps, |
| 362 prefs::kAllowedDomainsForApps, | 363 prefs::kAllowedDomainsForApps, |
| 363 base::Value::TYPE_STRING }, | 364 base::Value::TYPE_STRING }, |
| 364 { key::kComponentUpdatesEnabled, | 365 { key::kComponentUpdatesEnabled, |
| 365 prefs::kComponentUpdatesEnabled, | 366 prefs::kComponentUpdatesEnabled, |
| 366 base::Value::TYPE_BOOLEAN }, | 367 base::Value::TYPE_BOOLEAN }, |
| 367 | 368 |
| 368 #if defined(ENABLE_SPELLCHECK) | 369 #if BUILDFLAG(ENABLE_SPELLCHECK) |
| 369 { key::kSpellCheckServiceEnabled, | 370 { key::kSpellCheckServiceEnabled, |
| 370 spellcheck::prefs::kSpellCheckUseSpellingService, | 371 spellcheck::prefs::kSpellCheckUseSpellingService, |
| 371 base::Value::TYPE_BOOLEAN }, | 372 base::Value::TYPE_BOOLEAN }, |
| 372 #endif // defined(ENABLE_SPELLCHECK) | 373 #endif // BUILDFLAG(ENABLE_SPELLCHECK) |
| 373 | 374 |
| 374 { key::kDisableScreenshots, | 375 { key::kDisableScreenshots, |
| 375 prefs::kDisableScreenshots, | 376 prefs::kDisableScreenshots, |
| 376 base::Value::TYPE_BOOLEAN }, | 377 base::Value::TYPE_BOOLEAN }, |
| 377 { key::kAudioCaptureAllowed, | 378 { key::kAudioCaptureAllowed, |
| 378 prefs::kAudioCaptureAllowed, | 379 prefs::kAudioCaptureAllowed, |
| 379 base::Value::TYPE_BOOLEAN }, | 380 base::Value::TYPE_BOOLEAN }, |
| 380 { key::kVideoCaptureAllowed, | 381 { key::kVideoCaptureAllowed, |
| 381 prefs::kVideoCaptureAllowed, | 382 prefs::kVideoCaptureAllowed, |
| 382 base::Value::TYPE_BOOLEAN }, | 383 base::Value::TYPE_BOOLEAN }, |
| (...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 926 #endif // defined(OS_CHROMEOS) | 927 #endif // defined(OS_CHROMEOS) |
| 927 | 928 |
| 928 #if defined(ENABLE_PLUGINS) | 929 #if defined(ENABLE_PLUGINS) |
| 929 handlers->AddHandler(base::MakeUnique<PluginPolicyHandler>()); | 930 handlers->AddHandler(base::MakeUnique<PluginPolicyHandler>()); |
| 930 #endif // defined(ENABLE_PLUGINS) | 931 #endif // defined(ENABLE_PLUGINS) |
| 931 | 932 |
| 932 return handlers; | 933 return handlers; |
| 933 } | 934 } |
| 934 | 935 |
| 935 } // namespace policy | 936 } // namespace policy |
| OLD | NEW |