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

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

Issue 1019283005: Cleanup the ConfigurationPolicyHandler interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix if condition. Created 5 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
« no previous file with comments | « components/policy/core/browser/configuration_policy_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/core/browser/configuration_policy_handler.cc
diff --git a/components/policy/core/browser/configuration_policy_handler.cc b/components/policy/core/browser/configuration_policy_handler.cc
index 5927ab4026188034c27ae0ef15bc71555a2bb77b..e315b09833ba9884fcc4fed91b830203c5ccd36c 100644
--- a/components/policy/core/browser/configuration_policy_handler.cc
+++ b/components/policy/core/browser/configuration_policy_handler.cc
@@ -48,12 +48,6 @@ ConfigurationPolicyHandler::~ConfigurationPolicyHandler() {
void ConfigurationPolicyHandler::PrepareForDisplaying(
PolicyMap* policies) const {}
-void ConfigurationPolicyHandler::ApplyPolicySettings(
- const policy::PolicyMap& policies,
- PrefValueMap* prefs) {
- NOTREACHED();
-}
-
void ConfigurationPolicyHandler::ApplyPolicySettingsWithParameters(
const PolicyMap& policies,
const PolicyHandlerParameters& parameters,
@@ -466,11 +460,13 @@ bool LegacyPoliciesDeprecatingPolicyHandler::CheckPolicySettings(
}
}
-void LegacyPoliciesDeprecatingPolicyHandler::ApplyPolicySettings(
- const PolicyMap& policies,
+void LegacyPoliciesDeprecatingPolicyHandler::ApplyPolicySettingsWithParameters(
+ const policy::PolicyMap& policies,
+ const policy::PolicyHandlerParameters& parameters,
PrefValueMap* prefs) {
if (policies.Get(new_policy_handler_->policy_name())) {
- new_policy_handler_->ApplyPolicySettings(policies, prefs);
+ new_policy_handler_->ApplyPolicySettingsWithParameters(policies, parameters,
+ prefs);
} else {
// The new policy is not set, fall back to legacy ones.
PolicyErrorMap scoped_errors;
@@ -478,10 +474,17 @@ void LegacyPoliciesDeprecatingPolicyHandler::ApplyPolicySettings(
for (handler = legacy_policy_handlers_.begin();
handler != legacy_policy_handlers_.end();
++handler) {
- if ((*handler)->CheckPolicySettings(policies, &scoped_errors))
- (*handler)->ApplyPolicySettings(policies, prefs);
+ if ((*handler)->CheckPolicySettings(policies, &scoped_errors)) {
+ (*handler)
+ ->ApplyPolicySettingsWithParameters(policies, parameters, prefs);
+ }
}
}
}
+void LegacyPoliciesDeprecatingPolicyHandler::ApplyPolicySettings(
+ const policy::PolicyMap& /* policies */,
+ PrefValueMap* /* prefs */) {
+ NOTREACHED();
+}
} // namespace policy
« no previous file with comments | « components/policy/core/browser/configuration_policy_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698