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 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
728 ~BrowsingHistoryPolicyHandler() override {} | 728 ~BrowsingHistoryPolicyHandler() override {} |
729 | 729 |
730 void ApplyPolicySettings(const PolicyMap& policies, | 730 void ApplyPolicySettings(const PolicyMap& policies, |
731 PrefValueMap* prefs) override { | 731 PrefValueMap* prefs) override { |
732 const base::Value* value = policies.GetValue(policy_name()); | 732 const base::Value* value = policies.GetValue(policy_name()); |
733 bool deleting_history_allowed; | 733 bool deleting_history_allowed; |
734 if (value && value->GetAsBoolean(&deleting_history_allowed) && | 734 if (value && value->GetAsBoolean(&deleting_history_allowed) && |
735 !deleting_history_allowed) { | 735 !deleting_history_allowed) { |
736 prefs->SetBoolean( | 736 prefs->SetBoolean( |
737 browsing_data::prefs::kDeleteBrowsingHistory, false); | 737 browsing_data::prefs::kDeleteBrowsingHistory, false); |
738 prefs->SetBoolean( | 738 prefs->SetBoolean(browsing_data::prefs::kDeleteBrowsingHistoryBasic, |
emaxx
2017/02/28 14:16:14
Looks like there is no actual browser test for All
dullweber
2017/03/02 10:10:00
I added a test to verify that the prefs are set co
| |
739 browsing_data::prefs::kDeleteDownloadHistory, false); | 739 false); |
740 prefs->SetBoolean(browsing_data::prefs::kDeleteDownloadHistory, false); | |
740 } | 741 } |
741 } | 742 } |
742 }; | 743 }; |
743 | 744 |
744 #if BUILDFLAG(ENABLE_EXTENSIONS) | 745 #if BUILDFLAG(ENABLE_EXTENSIONS) |
745 void GetExtensionAllowedTypesMap( | 746 void GetExtensionAllowedTypesMap( |
746 std::vector<std::unique_ptr<StringMappingListPolicyHandler::MappingEntry>>* | 747 std::vector<std::unique_ptr<StringMappingListPolicyHandler::MappingEntry>>* |
747 result) { | 748 result) { |
748 // Mapping from extension type names to Manifest::Type. | 749 // Mapping from extension type names to Manifest::Type. |
749 for (size_t index = 0; | 750 for (size_t index = 0; |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1009 #endif // defined(OS_CHROMEOS) | 1010 #endif // defined(OS_CHROMEOS) |
1010 | 1011 |
1011 #if BUILDFLAG(ENABLE_PLUGINS) | 1012 #if BUILDFLAG(ENABLE_PLUGINS) |
1012 handlers->AddHandler(base::MakeUnique<PluginPolicyHandler>()); | 1013 handlers->AddHandler(base::MakeUnique<PluginPolicyHandler>()); |
1013 #endif // BUILDFLAG(ENABLE_PLUGINS) | 1014 #endif // BUILDFLAG(ENABLE_PLUGINS) |
1014 | 1015 |
1015 return handlers; | 1016 return handlers; |
1016 } | 1017 } |
1017 | 1018 |
1018 } // namespace policy | 1019 } // namespace policy |
OLD | NEW |