Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: chrome/browser/policy/configuration_policy_handler_list_factory.cc

Issue 2671743002: Separate state of basic and advanced tab in CBD dialog (Closed)
Patch Set: rebase and fix compilation Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/net/sdch_browsertest.cc ('k') | chrome/browser/policy/policy_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 ~BrowsingHistoryPolicyHandler() override {} 727 ~BrowsingHistoryPolicyHandler() override {}
728 728
729 void ApplyPolicySettings(const PolicyMap& policies, 729 void ApplyPolicySettings(const PolicyMap& policies,
730 PrefValueMap* prefs) override { 730 PrefValueMap* prefs) override {
731 const base::Value* value = policies.GetValue(policy_name()); 731 const base::Value* value = policies.GetValue(policy_name());
732 bool deleting_history_allowed; 732 bool deleting_history_allowed;
733 if (value && value->GetAsBoolean(&deleting_history_allowed) && 733 if (value && value->GetAsBoolean(&deleting_history_allowed) &&
734 !deleting_history_allowed) { 734 !deleting_history_allowed) {
735 prefs->SetBoolean( 735 prefs->SetBoolean(
736 browsing_data::prefs::kDeleteBrowsingHistory, false); 736 browsing_data::prefs::kDeleteBrowsingHistory, false);
737 prefs->SetBoolean( 737 prefs->SetBoolean(browsing_data::prefs::kDeleteBrowsingHistoryBasic,
738 browsing_data::prefs::kDeleteDownloadHistory, false); 738 false);
739 prefs->SetBoolean(browsing_data::prefs::kDeleteDownloadHistory, false);
739 } 740 }
740 } 741 }
741 }; 742 };
742 743
743 #if BUILDFLAG(ENABLE_EXTENSIONS) 744 #if BUILDFLAG(ENABLE_EXTENSIONS)
744 void GetExtensionAllowedTypesMap( 745 void GetExtensionAllowedTypesMap(
745 std::vector<std::unique_ptr<StringMappingListPolicyHandler::MappingEntry>>* 746 std::vector<std::unique_ptr<StringMappingListPolicyHandler::MappingEntry>>*
746 result) { 747 result) {
747 // Mapping from extension type names to Manifest::Type. 748 // Mapping from extension type names to Manifest::Type.
748 for (size_t index = 0; 749 for (size_t index = 0;
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 #endif // defined(OS_CHROMEOS) 1009 #endif // defined(OS_CHROMEOS)
1009 1010
1010 #if BUILDFLAG(ENABLE_PLUGINS) 1011 #if BUILDFLAG(ENABLE_PLUGINS)
1011 handlers->AddHandler(base::MakeUnique<PluginPolicyHandler>()); 1012 handlers->AddHandler(base::MakeUnique<PluginPolicyHandler>());
1012 #endif // BUILDFLAG(ENABLE_PLUGINS) 1013 #endif // BUILDFLAG(ENABLE_PLUGINS)
1013 1014
1014 return handlers; 1015 return handlers;
1015 } 1016 }
1016 1017
1017 } // namespace policy 1018 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/net/sdch_browsertest.cc ('k') | chrome/browser/policy/policy_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698