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

Unified Diff: chrome/browser/policy/configuration_policy_provider.cc

Issue 6409040: New policy protobuf protocol. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 9 years, 10 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: chrome/browser/policy/configuration_policy_provider.cc
diff --git a/chrome/browser/policy/configuration_policy_provider.cc b/chrome/browser/policy/configuration_policy_provider.cc
index 82ca86494a6bd38b116a1342352e7c794977ae2d..21190ee94f9614bdb90dadc4c85e5311753c3219 100644
--- a/chrome/browser/policy/configuration_policy_provider.cc
+++ b/chrome/browser/policy/configuration_policy_provider.cc
@@ -21,7 +21,7 @@ bool ConfigurationPolicyProvider::IsInitializationComplete() const {
return true;
}
-void ConfigurationPolicyProvider::DecodePolicyValueTree(
+void ConfigurationPolicyProvider::ApplyPolicyValueTree(
const DictionaryValue* policies,
ConfigurationPolicyStoreInterface* store) {
const PolicyDefinitionList* policy_list(policy_definition_list());
@@ -36,6 +36,19 @@ void ConfigurationPolicyProvider::DecodePolicyValueTree(
// supports it.
}
+void ConfigurationPolicyProvider::ApplyPolicyMap(
+ const PolicyMapType* policies,
+ ConfigurationPolicyStoreInterface* store) {
+ const PolicyDefinitionList* policy_list(policy_definition_list());
+ for (const PolicyDefinitionList::Entry* i = policy_list->begin;
+ i != policy_list->end; ++i) {
+ PolicyMapType::const_iterator it =
+ policies->find(i->policy_type);
+ if (it != policies->end() && it->second->IsType(i->value_type))
+ store->Apply(i->policy_type, it->second->DeepCopy());
+ }
+}
+
// Class ConfigurationPolicyObserverRegistrar.
ConfigurationPolicyObserverRegistrar::ConfigurationPolicyObserverRegistrar()
« no previous file with comments | « chrome/browser/policy/configuration_policy_provider.h ('k') | chrome/browser/policy/configuration_policy_store_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698