| 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> |
| 11 | 11 |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/ptr_util.h" | 14 #include "base/memory/ptr_util.h" |
| 15 #include "base/memory/scoped_vector.h" | 15 #include "base/memory/scoped_vector.h" |
| 16 #include "base/values.h" | 16 #include "base/values.h" |
| 17 #include "build/build_config.h" | 17 #include "build/build_config.h" |
| 18 #include "chrome/browser/net/disk_cache_dir_policy_handler.h" | 18 #include "chrome/browser/net/disk_cache_dir_policy_handler.h" |
| 19 #include "chrome/browser/policy/file_selection_dialogs_policy_handler.h" | 19 #include "chrome/browser/policy/file_selection_dialogs_policy_handler.h" |
| 20 #include "chrome/browser/policy/javascript_policy_handler.h" | 20 #include "chrome/browser/policy/javascript_policy_handler.h" |
| 21 #include "chrome/browser/policy/managed_bookmarks_policy_handler.h" | 21 #include "chrome/browser/policy/managed_bookmarks_policy_handler.h" |
| 22 #include "chrome/browser/policy/network_prediction_policy_handler.h" | 22 #include "chrome/browser/policy/network_prediction_policy_handler.h" |
| 23 #include "chrome/browser/profiles/incognito_mode_policy_handler.h" | 23 #include "chrome/browser/profiles/incognito_mode_policy_handler.h" |
| 24 #include "chrome/browser/sessions/restore_on_startup_policy_handler.h" | 24 #include "chrome/browser/sessions/restore_on_startup_policy_handler.h" |
| 25 #include "chrome/common/chrome_switches.h" | 25 #include "chrome/common/chrome_switches.h" |
| 26 #include "chrome/common/features.h" | 26 #include "chrome/common/features.h" |
| 27 #include "chrome/common/pref_names.h" | 27 #include "chrome/common/pref_names.h" |
| 28 #include "components/bookmarks/common/bookmark_pref_names.h" | 28 #include "components/bookmarks/common/bookmark_pref_names.h" |
| 29 #include "components/certificate_transparency/pref_names.h" |
| 29 #include "components/content_settings/core/common/pref_names.h" | 30 #include "components/content_settings/core/common/pref_names.h" |
| 30 #include "components/metrics/metrics_pref_names.h" | 31 #include "components/metrics/metrics_pref_names.h" |
| 31 #include "components/password_manager/core/common/password_manager_pref_names.h" | 32 #include "components/password_manager/core/common/password_manager_pref_names.h" |
| 32 #include "components/policy/core/browser/autofill_policy_handler.h" | 33 #include "components/policy/core/browser/autofill_policy_handler.h" |
| 33 #include "components/policy/core/browser/configuration_policy_handler.h" | 34 #include "components/policy/core/browser/configuration_policy_handler.h" |
| 34 #include "components/policy/core/browser/configuration_policy_handler_list.h" | 35 #include "components/policy/core/browser/configuration_policy_handler_list.h" |
| 35 #include "components/policy/core/browser/configuration_policy_handler_parameters
.h" | 36 #include "components/policy/core/browser/configuration_policy_handler_parameters
.h" |
| 36 #include "components/policy/core/browser/proxy_policy_handler.h" | 37 #include "components/policy/core/browser/proxy_policy_handler.h" |
| 37 #include "components/policy/core/browser/url_blacklist_policy_handler.h" | 38 #include "components/policy/core/browser/url_blacklist_policy_handler.h" |
| 38 #include "components/policy/core/common/policy_details.h" | 39 #include "components/policy/core/common/policy_details.h" |
| (...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 | 659 |
| 659 handlers->AddHandler(base::WrapUnique(new AutofillPolicyHandler())); | 660 handlers->AddHandler(base::WrapUnique(new AutofillPolicyHandler())); |
| 660 handlers->AddHandler(base::WrapUnique(new DefaultSearchPolicyHandler())); | 661 handlers->AddHandler(base::WrapUnique(new DefaultSearchPolicyHandler())); |
| 661 handlers->AddHandler(base::WrapUnique(new ForceSafeSearchPolicyHandler())); | 662 handlers->AddHandler(base::WrapUnique(new ForceSafeSearchPolicyHandler())); |
| 662 handlers->AddHandler(base::WrapUnique(new IncognitoModePolicyHandler())); | 663 handlers->AddHandler(base::WrapUnique(new IncognitoModePolicyHandler())); |
| 663 handlers->AddHandler( | 664 handlers->AddHandler( |
| 664 base::WrapUnique(new ManagedBookmarksPolicyHandler(chrome_schema))); | 665 base::WrapUnique(new ManagedBookmarksPolicyHandler(chrome_schema))); |
| 665 handlers->AddHandler(base::WrapUnique(new ProxyPolicyHandler())); | 666 handlers->AddHandler(base::WrapUnique(new ProxyPolicyHandler())); |
| 666 handlers->AddHandler(base::WrapUnique(new URLBlacklistPolicyHandler())); | 667 handlers->AddHandler(base::WrapUnique(new URLBlacklistPolicyHandler())); |
| 667 | 668 |
| 669 handlers->AddHandler(base::WrapUnique(new SimpleSchemaValidatingPolicyHandler( |
| 670 key::kCertificateTransparencyEnforcementDisabledForUrls, |
| 671 certificate_transparency::prefs::kCTExcludedHosts, chrome_schema, |
| 672 SCHEMA_STRICT, SimpleSchemaValidatingPolicyHandler::RECOMMENDED_ALLOWED, |
| 673 SimpleSchemaValidatingPolicyHandler::MANDATORY_ALLOWED))); |
| 674 |
| 668 #if BUILDFLAG(ANDROID_JAVA_UI) | 675 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 669 handlers->AddHandler( | 676 handlers->AddHandler( |
| 670 base::WrapUnique(new ContextualSearchPolicyHandlerAndroid())); | 677 base::WrapUnique(new ContextualSearchPolicyHandlerAndroid())); |
| 671 #endif | 678 #endif |
| 672 | 679 |
| 673 handlers->AddHandler( | 680 handlers->AddHandler( |
| 674 base::WrapUnique(new FileSelectionDialogsPolicyHandler())); | 681 base::WrapUnique(new FileSelectionDialogsPolicyHandler())); |
| 675 handlers->AddHandler(base::WrapUnique(new JavascriptPolicyHandler())); | 682 handlers->AddHandler(base::WrapUnique(new JavascriptPolicyHandler())); |
| 676 handlers->AddHandler(base::WrapUnique(new NetworkPredictionPolicyHandler())); | 683 handlers->AddHandler(base::WrapUnique(new NetworkPredictionPolicyHandler())); |
| 677 handlers->AddHandler(base::WrapUnique(new RestoreOnStartupPolicyHandler())); | 684 handlers->AddHandler(base::WrapUnique(new RestoreOnStartupPolicyHandler())); |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 855 SimpleSchemaValidatingPolicyHandler::RECOMMENDED_ALLOWED, | 862 SimpleSchemaValidatingPolicyHandler::RECOMMENDED_ALLOWED, |
| 856 SimpleSchemaValidatingPolicyHandler::MANDATORY_PROHIBITED))); | 863 SimpleSchemaValidatingPolicyHandler::MANDATORY_PROHIBITED))); |
| 857 handlers->AddHandler(base::WrapUnique( | 864 handlers->AddHandler(base::WrapUnique( |
| 858 new chromeos::KeyPermissionsPolicyHandler(chrome_schema))); | 865 new chromeos::KeyPermissionsPolicyHandler(chrome_schema))); |
| 859 #endif // defined(OS_CHROMEOS) | 866 #endif // defined(OS_CHROMEOS) |
| 860 | 867 |
| 861 return handlers; | 868 return handlers; |
| 862 } | 869 } |
| 863 | 870 |
| 864 } // namespace policy | 871 } // namespace policy |
| OLD | NEW |