Index: components/policy/core/browser/configuration_policy_handler_list.cc |
diff --git a/components/policy/core/browser/configuration_policy_handler_list.cc b/components/policy/core/browser/configuration_policy_handler_list.cc |
index cff71e3f61f5472282902a7fb3bb009bf5490815..0cc678f50e4cb11ec78e4757f71c26d453a3e132 100644 |
--- a/components/policy/core/browser/configuration_policy_handler_list.cc |
+++ b/components/policy/core/browser/configuration_policy_handler_list.cc |
@@ -7,14 +7,17 @@ |
#include "base/prefs/pref_value_map.h" |
#include "base/stl_util.h" |
#include "components/policy/core/browser/configuration_policy_handler.h" |
+#include "components/policy/core/browser/configuration_policy_handler_parameters.h" |
#include "components/policy/core/browser/policy_error_map.h" |
#include "components/policy/core/common/policy_map.h" |
#include "grit/component_strings.h" |
namespace policy { |
ConfigurationPolicyHandlerList::ConfigurationPolicyHandlerList( |
+ const PopulatePolicyHandlerParametersCallback& parameters_callback, |
const GetChromePolicyDetailsCallback& details_callback) |
- : details_callback_(details_callback) {} |
+ : parameters_callback_(parameters_callback), |
+ details_callback_(details_callback) {} |
ConfigurationPolicyHandlerList::~ConfigurationPolicyHandlerList() { |
STLDeleteElements(&handlers_); |
@@ -33,10 +36,14 @@ void ConfigurationPolicyHandlerList::ApplyPolicySettings( |
if (!errors) |
errors = &scoped_errors; |
+ policy::PolicyHandlerParameters parameters; |
+ parameters_callback_.Run(¶meters); |
+ |
std::vector<ConfigurationPolicyHandler*>::const_iterator handler; |
for (handler = handlers_.begin(); handler != handlers_.end(); ++handler) { |
if ((*handler)->CheckPolicySettings(policies, errors) && prefs) |
- (*handler)->ApplyPolicySettings(policies, prefs); |
+ (*handler) |
+ ->ApplyPolicySettingsWithParameters(policies, parameters, prefs); |
} |
for (PolicyMap::const_iterator it = policies.begin(); |