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

Unified Diff: components/policy/core/browser/configuration_policy_handler_list.cc

Issue 197013007: Set drive as the default download folder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes build errors Created 6 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 side-by-side diff with in-line comments
Download patch
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(&parameters);
+
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();

Powered by Google App Engine
This is Rietveld 408576698