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 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 | 656 |
656 handlers->AddHandler(base::WrapUnique(new AutofillPolicyHandler())); | 657 handlers->AddHandler(base::WrapUnique(new AutofillPolicyHandler())); |
657 handlers->AddHandler(base::WrapUnique(new DefaultSearchPolicyHandler())); | 658 handlers->AddHandler(base::WrapUnique(new DefaultSearchPolicyHandler())); |
658 handlers->AddHandler(base::WrapUnique(new ForceSafeSearchPolicyHandler())); | 659 handlers->AddHandler(base::WrapUnique(new ForceSafeSearchPolicyHandler())); |
659 handlers->AddHandler(base::WrapUnique(new IncognitoModePolicyHandler())); | 660 handlers->AddHandler(base::WrapUnique(new IncognitoModePolicyHandler())); |
660 handlers->AddHandler( | 661 handlers->AddHandler( |
661 base::WrapUnique(new ManagedBookmarksPolicyHandler(chrome_schema))); | 662 base::WrapUnique(new ManagedBookmarksPolicyHandler(chrome_schema))); |
662 handlers->AddHandler(base::WrapUnique(new ProxyPolicyHandler())); | 663 handlers->AddHandler(base::WrapUnique(new ProxyPolicyHandler())); |
663 handlers->AddHandler(base::WrapUnique(new URLBlacklistPolicyHandler())); | 664 handlers->AddHandler(base::WrapUnique(new URLBlacklistPolicyHandler())); |
664 | 665 |
| 666 handlers->AddHandler(base::WrapUnique(new SimpleSchemaValidatingPolicyHandler( |
| 667 key::kCertificateTransparencyEnforcementDisabledForUrls, |
| 668 certificate_transparency::prefs::kCTExcludedHosts, chrome_schema, |
| 669 SCHEMA_STRICT, SimpleSchemaValidatingPolicyHandler::RECOMMENDED_ALLOWED, |
| 670 SimpleSchemaValidatingPolicyHandler::MANDATORY_ALLOWED))); |
| 671 |
665 #if BUILDFLAG(ANDROID_JAVA_UI) | 672 #if BUILDFLAG(ANDROID_JAVA_UI) |
666 handlers->AddHandler( | 673 handlers->AddHandler( |
667 base::WrapUnique(new ContextualSearchPolicyHandlerAndroid())); | 674 base::WrapUnique(new ContextualSearchPolicyHandlerAndroid())); |
668 #endif | 675 #endif |
669 | 676 |
670 handlers->AddHandler( | 677 handlers->AddHandler( |
671 base::WrapUnique(new FileSelectionDialogsPolicyHandler())); | 678 base::WrapUnique(new FileSelectionDialogsPolicyHandler())); |
672 handlers->AddHandler(base::WrapUnique(new JavascriptPolicyHandler())); | 679 handlers->AddHandler(base::WrapUnique(new JavascriptPolicyHandler())); |
673 handlers->AddHandler(base::WrapUnique(new NetworkPredictionPolicyHandler())); | 680 handlers->AddHandler(base::WrapUnique(new NetworkPredictionPolicyHandler())); |
674 handlers->AddHandler(base::WrapUnique(new RestoreOnStartupPolicyHandler())); | 681 handlers->AddHandler(base::WrapUnique(new RestoreOnStartupPolicyHandler())); |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
852 SimpleSchemaValidatingPolicyHandler::RECOMMENDED_ALLOWED, | 859 SimpleSchemaValidatingPolicyHandler::RECOMMENDED_ALLOWED, |
853 SimpleSchemaValidatingPolicyHandler::MANDATORY_PROHIBITED))); | 860 SimpleSchemaValidatingPolicyHandler::MANDATORY_PROHIBITED))); |
854 handlers->AddHandler(base::WrapUnique( | 861 handlers->AddHandler(base::WrapUnique( |
855 new chromeos::KeyPermissionsPolicyHandler(chrome_schema))); | 862 new chromeos::KeyPermissionsPolicyHandler(chrome_schema))); |
856 #endif // defined(OS_CHROMEOS) | 863 #endif // defined(OS_CHROMEOS) |
857 | 864 |
858 return handlers; | 865 return handlers; |
859 } | 866 } |
860 | 867 |
861 } // namespace policy | 868 } // namespace policy |
OLD | NEW |